@@ -125,10 +125,10 @@ discard block |
||
125 | 125 | ->addColumn('name', function ($model) { |
126 | 126 | return ucfirst($model->name); |
127 | 127 | }) |
128 | - ->addColumn('image', function ($model) { |
|
129 | - // return $model->image; |
|
130 | - return "<img src= '$model->image' + height=\"80\"/>"; |
|
131 | - }) |
|
128 | + ->addColumn('image', function ($model) { |
|
129 | + // return $model->image; |
|
130 | + return "<img src= '$model->image' + height=\"80\"/>"; |
|
131 | + }) |
|
132 | 132 | ->addColumn('type', function ($model) { |
133 | 133 | if ($this->type->where('id', $model->type)->first()) { |
134 | 134 | return $this->type->where('id', $model->type)->first()->name; |
@@ -174,9 +174,9 @@ discard block |
||
174 | 174 | $this->validate($request,[ |
175 | 175 | 'producttitle' => 'required', |
176 | 176 | 'version' => 'required', |
177 | - // 'filename' => 'required', |
|
178 | - // ], |
|
179 | - // ['filename.required' => 'Please Uplaod A file', |
|
177 | + // 'filename' => 'required', |
|
178 | + // ], |
|
179 | + // ['filename.required' => 'Please Uplaod A file', |
|
180 | 180 | ]); |
181 | 181 | |
182 | 182 | try { |
@@ -118,18 +118,18 @@ discard block |
||
118 | 118 | |
119 | 119 | return\ DataTables::of($new_product) |
120 | 120 | |
121 | - ->addColumn('checkbox', function ($model) { |
|
121 | + ->addColumn('checkbox', function($model) { |
|
122 | 122 | return "<input type='checkbox' class='product_checkbox' |
123 | 123 | value=".$model->id.' name=select[] id=check>'; |
124 | 124 | }) |
125 | - ->addColumn('name', function ($model) { |
|
125 | + ->addColumn('name', function($model) { |
|
126 | 126 | return ucfirst($model->name); |
127 | 127 | }) |
128 | - ->addColumn('image', function ($model) { |
|
128 | + ->addColumn('image', function($model) { |
|
129 | 129 | // return $model->image; |
130 | 130 | return "<img src= '$model->image' + height=\"80\"/>"; |
131 | 131 | }) |
132 | - ->addColumn('type', function ($model) { |
|
132 | + ->addColumn('type', function($model) { |
|
133 | 133 | if ($this->type->where('id', $model->type)->first()) { |
134 | 134 | return $this->type->where('id', $model->type)->first()->name; |
135 | 135 | } else { |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | } |
138 | 138 | }) |
139 | 139 | |
140 | - ->addColumn('group', function ($model) { |
|
140 | + ->addColumn('group', function($model) { |
|
141 | 141 | if ($this->group->where('id', $model->group)->first()) { |
142 | 142 | return $this->group->where('id', $model->group)->first()->name; |
143 | 143 | } else { |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | } |
146 | 146 | }) |
147 | 147 | |
148 | - ->addColumn('Action', function ($model) { |
|
148 | + ->addColumn('Action', function($model) { |
|
149 | 149 | $permissions = LicensePermissionsController::getPermissionsForProduct($model->id); |
150 | 150 | $url = ''; |
151 | 151 | if ($permissions['downloadPermission'] == 1) { |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | // Save file Info in Modal popup |
172 | 172 | public function save(Request $request) |
173 | 173 | { |
174 | - $this->validate($request,[ |
|
174 | + $this->validate($request, [ |
|
175 | 175 | 'producttitle' => 'required', |
176 | 176 | 'version' => 'required', |
177 | 177 | // 'filename' => 'required', |
@@ -129,12 +129,12 @@ discard block |
||
129 | 129 | $query = $this->advanceSearch($name, $invoice_no, $currency, $status, $from, $till); |
130 | 130 | |
131 | 131 | return \DataTables::of($query->take(100)) |
132 | - ->setTotalRecords($query->count()) |
|
132 | + ->setTotalRecords($query->count()) |
|
133 | 133 | |
134 | - ->addColumn('checkbox', function ($model) { |
|
135 | - return "<input type='checkbox' class='invoice_checkbox' |
|
134 | + ->addColumn('checkbox', function ($model) { |
|
135 | + return "<input type='checkbox' class='invoice_checkbox' |
|
136 | 136 | value=".$model->id.' name=select[] id=check>'; |
137 | - }) |
|
137 | + }) |
|
138 | 138 | ->addColumn('user_id', function ($model) { |
139 | 139 | $first = $this->user->where('id', $model->user_id)->first()->first_name; |
140 | 140 | $last = $this->user->where('id', $model->user_id)->first()->last_name; |
@@ -142,9 +142,9 @@ discard block |
||
142 | 142 | |
143 | 143 | return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'</a>'; |
144 | 144 | }) |
145 | - ->addColumn('number', function ($model) { |
|
146 | - return ucfirst($model->number); |
|
147 | - }) |
|
145 | + ->addColumn('number', function ($model) { |
|
146 | + return ucfirst($model->number); |
|
147 | + }) |
|
148 | 148 | |
149 | 149 | ->addColumn('date', function ($model) { |
150 | 150 | $date = ($model->created_at); |
@@ -152,12 +152,12 @@ discard block |
||
152 | 152 | return $date; |
153 | 153 | // return "<span style='display:none'>$model->id</span>".$date->format('l, F j, Y H:m'); |
154 | 154 | }) |
155 | - ->addColumn('grand_total', function ($model) { |
|
156 | - return $model->grand_total; |
|
157 | - }) |
|
158 | - ->addColumn('status', function ($model) { |
|
159 | - return ucfirst($model->status); |
|
160 | - }) |
|
155 | + ->addColumn('grand_total', function ($model) { |
|
156 | + return $model->grand_total; |
|
157 | + }) |
|
158 | + ->addColumn('status', function ($model) { |
|
159 | + return ucfirst($model->status); |
|
160 | + }) |
|
161 | 161 | |
162 | 162 | ->addColumn('action', function ($model) { |
163 | 163 | $action = ''; |
@@ -175,30 +175,30 @@ discard block |
||
175 | 175 | style='color:white;'> </i> View</a>" |
176 | 176 | ." $action"; |
177 | 177 | }) |
178 | - ->filterColumn('user_id', function ($query, $keyword) { |
|
179 | - $sql = 'first_name like ?'; |
|
180 | - $query->whereRaw($sql, ["%{$keyword}%"]); |
|
181 | - }) |
|
178 | + ->filterColumn('user_id', function ($query, $keyword) { |
|
179 | + $sql = 'first_name like ?'; |
|
180 | + $query->whereRaw($sql, ["%{$keyword}%"]); |
|
181 | + }) |
|
182 | 182 | |
183 | - ->filterColumn('status', function ($query, $keyword) { |
|
184 | - $sql = 'status like ?'; |
|
185 | - $query->whereRaw($sql, ["%{$keyword}%"]); |
|
186 | - }) |
|
183 | + ->filterColumn('status', function ($query, $keyword) { |
|
184 | + $sql = 'status like ?'; |
|
185 | + $query->whereRaw($sql, ["%{$keyword}%"]); |
|
186 | + }) |
|
187 | 187 | |
188 | 188 | ->filterColumn('number', function ($query, $keyword) { |
189 | 189 | $sql = 'number like ?'; |
190 | 190 | $query->whereRaw($sql, ["%{$keyword}%"]); |
191 | 191 | }) |
192 | - ->filterColumn('grand_total', function ($query, $keyword) { |
|
193 | - $sql = 'grand_total like ?'; |
|
194 | - $query->whereRaw($sql, ["%{$keyword}%"]); |
|
195 | - }) |
|
196 | - ->filterColumn('date', function ($query, $keyword) { |
|
197 | - $sql = 'date like ?'; |
|
198 | - $query->whereRaw($sql, ["%{$keyword}%"]); |
|
199 | - }) |
|
200 | - |
|
201 | - ->rawColumns(['checkbox', 'user_id', 'number', 'date', 'grand_total', 'status', 'action']) |
|
192 | + ->filterColumn('grand_total', function ($query, $keyword) { |
|
193 | + $sql = 'grand_total like ?'; |
|
194 | + $query->whereRaw($sql, ["%{$keyword}%"]); |
|
195 | + }) |
|
196 | + ->filterColumn('date', function ($query, $keyword) { |
|
197 | + $sql = 'date like ?'; |
|
198 | + $query->whereRaw($sql, ["%{$keyword}%"]); |
|
199 | + }) |
|
200 | + |
|
201 | + ->rawColumns(['checkbox', 'user_id', 'number', 'date', 'grand_total', 'status', 'action']) |
|
202 | 202 | ->make(true); |
203 | 203 | } |
204 | 204 | |
@@ -292,8 +292,8 @@ discard block |
||
292 | 292 | |
293 | 293 | $symbol = $attributes[0]['currency']['symbol']; |
294 | 294 | $invoice = $this->invoice->create(['user_id' => $user_id, 'number' => $number, |
295 | - 'date' => $date, 'grand_total' => $grand_total, 'status' => 'pending', |
|
296 | - 'currency' => \Auth::user()->currency, ]); |
|
295 | + 'date' => $date, 'grand_total' => $grand_total, 'status' => 'pending', |
|
296 | + 'currency' => \Auth::user()->currency, ]); |
|
297 | 297 | foreach (\Cart::getContent() as $cart) { |
298 | 298 | $this->createInvoiceItems($invoice->id, $cart); |
299 | 299 | } |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | 'currency' => $currency, 'status' => $status, 'description' => $description, ]); |
411 | 411 | |
412 | 412 | $items = $this->createInvoiceItemsByAdmin($invoice->id, $productid, |
413 | - $code, $total, $currency, $qty, $agents, $plan, $user_id, $tax_name, $tax_rate); |
|
413 | + $code, $total, $currency, $qty, $agents, $plan, $user_id, $tax_name, $tax_rate); |
|
414 | 414 | $result = $this->getMessage($items, $user_id); |
415 | 415 | } catch (\Exception $ex) { |
416 | 416 | app('log')->info($ex->getMessage()); |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | } elseif ($this->tax_option->tax_enable == 0) {//if tax_enable is 0 |
487 | 487 | |
488 | 488 | $taxClassId = Tax::where('country', '')->where('state', 'Any State') |
489 | - ->pluck('tax_classes_id')->first(); //In case of India when |
|
489 | + ->pluck('tax_classes_id')->first(); //In case of India when |
|
490 | 490 | //other tax is available and tax is not enabled |
491 | 491 | if ($taxClassId) { |
492 | 492 | $rate = $this->getTotalRate($taxClassId, $productid, $taxs); |
@@ -554,10 +554,10 @@ discard block |
||
554 | 554 | foreach ($taxes as $key => $tax) { |
555 | 555 | if ($taxes[0]) { |
556 | 556 | $tax_attribute[$key] = ['name' => $tax->name, 'name1' => $name1, |
557 | - 'name2' => $name2, 'name3' => $name3, 'name4' => $name4, |
|
558 | - 'rate' => $value, 'rate1'=>$c_gst, 'rate2'=>$s_gst, |
|
559 | - 'rate3' => $i_gst, 'rate4'=>$ut_gst, 'state'=>$state_code, |
|
560 | - 'origin_state' => $origin_state, ]; |
|
557 | + 'name2' => $name2, 'name3' => $name3, 'name4' => $name4, |
|
558 | + 'rate' => $value, 'rate1'=>$c_gst, 'rate2'=>$s_gst, |
|
559 | + 'rate3' => $i_gst, 'rate4'=>$ut_gst, 'state'=>$state_code, |
|
560 | + 'origin_state' => $origin_state, ]; |
|
561 | 561 | |
562 | 562 | $rate = $tax->rate; |
563 | 563 |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | $from = $request->input('from'); |
109 | 109 | $till = $request->input('till'); |
110 | 110 | |
111 | - return view('themes.default1.invoice.index', compact('name','invoice_no','status','currencies','currency_id','from', |
|
111 | + return view('themes.default1.invoice.index', compact('name', 'invoice_no', 'status', 'currencies', 'currency_id', 'from', |
|
112 | 112 | |
113 | 113 | 'till')); |
114 | 114 | } catch (\Exception $ex) { |
@@ -131,35 +131,35 @@ discard block |
||
131 | 131 | return \DataTables::of($query->take(100)) |
132 | 132 | ->setTotalRecords($query->count()) |
133 | 133 | |
134 | - ->addColumn('checkbox', function ($model) { |
|
134 | + ->addColumn('checkbox', function($model) { |
|
135 | 135 | return "<input type='checkbox' class='invoice_checkbox' |
136 | 136 | value=".$model->id.' name=select[] id=check>'; |
137 | 137 | }) |
138 | - ->addColumn('user_id', function ($model) { |
|
138 | + ->addColumn('user_id', function($model) { |
|
139 | 139 | $first = $this->user->where('id', $model->user_id)->first()->first_name; |
140 | 140 | $last = $this->user->where('id', $model->user_id)->first()->last_name; |
141 | 141 | $id = $this->user->where('id', $model->user_id)->first()->id; |
142 | 142 | |
143 | 143 | return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'</a>'; |
144 | 144 | }) |
145 | - ->addColumn('number', function ($model) { |
|
145 | + ->addColumn('number', function($model) { |
|
146 | 146 | return ucfirst($model->number); |
147 | 147 | }) |
148 | 148 | |
149 | - ->addColumn('date', function ($model) { |
|
149 | + ->addColumn('date', function($model) { |
|
150 | 150 | $date = ($model->created_at); |
151 | 151 | |
152 | 152 | return $date; |
153 | 153 | // return "<span style='display:none'>$model->id</span>".$date->format('l, F j, Y H:m'); |
154 | 154 | }) |
155 | - ->addColumn('grand_total', function ($model) { |
|
155 | + ->addColumn('grand_total', function($model) { |
|
156 | 156 | return $model->grand_total; |
157 | 157 | }) |
158 | - ->addColumn('status', function ($model) { |
|
158 | + ->addColumn('status', function($model) { |
|
159 | 159 | return ucfirst($model->status); |
160 | 160 | }) |
161 | 161 | |
162 | - ->addColumn('action', function ($model) { |
|
162 | + ->addColumn('action', function($model) { |
|
163 | 163 | $action = ''; |
164 | 164 | |
165 | 165 | $check = $this->checkExecution($model->id); |
@@ -175,25 +175,25 @@ discard block |
||
175 | 175 | style='color:white;'> </i> View</a>" |
176 | 176 | ." $action"; |
177 | 177 | }) |
178 | - ->filterColumn('user_id', function ($query, $keyword) { |
|
178 | + ->filterColumn('user_id', function($query, $keyword) { |
|
179 | 179 | $sql = 'first_name like ?'; |
180 | 180 | $query->whereRaw($sql, ["%{$keyword}%"]); |
181 | 181 | }) |
182 | 182 | |
183 | - ->filterColumn('status', function ($query, $keyword) { |
|
183 | + ->filterColumn('status', function($query, $keyword) { |
|
184 | 184 | $sql = 'status like ?'; |
185 | 185 | $query->whereRaw($sql, ["%{$keyword}%"]); |
186 | 186 | }) |
187 | 187 | |
188 | - ->filterColumn('number', function ($query, $keyword) { |
|
188 | + ->filterColumn('number', function($query, $keyword) { |
|
189 | 189 | $sql = 'number like ?'; |
190 | 190 | $query->whereRaw($sql, ["%{$keyword}%"]); |
191 | 191 | }) |
192 | - ->filterColumn('grand_total', function ($query, $keyword) { |
|
192 | + ->filterColumn('grand_total', function($query, $keyword) { |
|
193 | 193 | $sql = 'grand_total like ?'; |
194 | 194 | $query->whereRaw($sql, ["%{$keyword}%"]); |
195 | 195 | }) |
196 | - ->filterColumn('date', function ($query, $keyword) { |
|
196 | + ->filterColumn('date', function($query, $keyword) { |
|
197 | 197 | $sql = 'date like ?'; |
198 | 198 | $query->whereRaw($sql, ["%{$keyword}%"]); |
199 | 199 | }) |
@@ -96,7 +96,8 @@ discard block |
||
96 | 96 | { |
97 | 97 | try { |
98 | 98 | $plan = ''; |
99 | - if ($request->has('subscription')) {//put he Plan id sent into session variable |
|
99 | + if ($request->has('subscription')) { |
|
100 | +//put he Plan id sent into session variable |
|
100 | 101 | $plan = $request->get('subscription'); |
101 | 102 | Session::put('plan', $plan); |
102 | 103 | } |
@@ -127,7 +128,8 @@ discard block |
||
127 | 128 | foreach ($cartCollection as $item) { |
128 | 129 | $attributes[] = $item->attributes; |
129 | 130 | $cart_currency = $attributes[0]['currency']['currency']; |
130 | - if (\Auth::user()) {//If User is Loggen in and his currency changes after logginng in then remove his previous order from cart |
|
131 | + if (\Auth::user()) { |
|
132 | +//If User is Loggen in and his currency changes after logginng in then remove his previous order from cart |
|
131 | 133 | $currency = \Auth::user()->currency; |
132 | 134 | if ($cart_currency != $currency) { |
133 | 135 | $id = $item->id; |
@@ -174,8 +176,10 @@ discard block |
||
174 | 176 | $user_state = TaxByState::where('state_code', $geoip_state)->first(); |
175 | 177 | $origin_state = $this->setting->first()->state; //Get the State of origin |
176 | 178 | $tax_class_id = TaxProductRelation::where('product_id', $productid)->pluck('tax_class_id')->toArray(); |
177 | - if (count($tax_class_id) > 0) {//If the product is allowed for tax (Check in tax_product relation table) |
|
178 | - if ($tax_enable == 1) {//If GST is Enabled |
|
179 | + if (count($tax_class_id) > 0) { |
|
180 | +//If the product is allowed for tax (Check in tax_product relation table) |
|
181 | + if ($tax_enable == 1) { |
|
182 | +//If GST is Enabled |
|
179 | 183 | |
180 | 184 | $details = $this->getDetailsWhenUserStateIsIndian( |
181 | 185 | $user_state, |
@@ -218,7 +222,8 @@ discard block |
||
218 | 222 | ]); |
219 | 223 | } |
220 | 224 | } |
221 | - } elseif ($tax_enable == 0) {//If Tax enable is 0 and other tax is available |
|
225 | + } elseif ($tax_enable == 0) { |
|
226 | +//If Tax enable is 0 and other tax is available |
|
222 | 227 | |
223 | 228 | $details = $this->whenOtherTaxAvailableAndTaxNotEnable($tax_class_id, $productid, $geoip_state, $geoip_country); |
224 | 229 | |
@@ -394,7 +399,8 @@ discard block |
||
394 | 399 | try { |
395 | 400 | $currency = Setting::find(1)->default_currency; |
396 | 401 | $currency_symbol = Setting::find(1)->default_symbol; |
397 | - if (!\Auth::user()) {//When user is not logged in |
|
402 | + if (!\Auth::user()) { |
|
403 | +//When user is not logged in |
|
398 | 404 | $cont = new \App\Http\Controllers\Front\PageController(); |
399 | 405 | $location = $cont->getLocation(); |
400 | 406 | $country = self::findCountryByGeoip($location['iso_code']); |
@@ -409,7 +415,8 @@ discard block |
||
409 | 415 | $currency = \Auth::user()->currency; |
410 | 416 | $currency_symbol = \Auth::user()->currency_symbol; |
411 | 417 | } |
412 | - if ($userid != '') {//For Admin Panel Clients |
|
418 | + if ($userid != '') { |
|
419 | +//For Admin Panel Clients |
|
413 | 420 | $currencyAndSymbol = self::getCurrency($userid); |
414 | 421 | $currency = $currencyAndSymbol['currency']; |
415 | 422 | $currency_symbol = $currencyAndSymbol['symbol']; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $paymentid = $request->input('id'); |
29 | 29 | $creditAmtUserId = $this->payment->where('id', $paymentid)->value('user_id'); |
30 | 30 | $creditAmt = $this->payment->where('user_id', $creditAmtUserId) |
31 | - ->where('invoice_id', '=', 0)->value('amt_to_credit'); |
|
31 | + ->where('invoice_id', '=', 0)->value('amt_to_credit'); |
|
32 | 32 | $invoices = $invoice->where('user_id', $creditAmtUserId)->orderBy('created_at', 'desc')->get(); |
33 | 33 | $cltCont = new \App\Http\Controllers\User\ClientController(); |
34 | 34 | $invoiceSum = $cltCont->getTotalInvoice($invoices); |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | $paymentRenewal = $this->updateInvoicePayment( |
160 | 160 | $invoiceid, |
161 | 161 | $payment_method, |
162 | - $payment_status, |
|
162 | + $payment_status, |
|
163 | 163 | $payment_date, |
164 | 164 | $amount |
165 | 165 | ); |
@@ -217,15 +217,15 @@ discard block |
||
217 | 217 | |
218 | 218 | return view( |
219 | 219 | 'themes.default1.invoice.payment', |
220 | - compact( |
|
221 | - 'invoice_status', |
|
222 | - 'payment_status', |
|
223 | - 'payment_method', |
|
224 | - 'invoice_id', |
|
225 | - 'domain', |
|
226 | - 'invoice', |
|
227 | - 'userid' |
|
228 | - ) |
|
220 | + compact( |
|
221 | + 'invoice_status', |
|
222 | + 'payment_status', |
|
223 | + 'payment_method', |
|
224 | + 'invoice_id', |
|
225 | + 'domain', |
|
226 | + 'invoice', |
|
227 | + 'userid' |
|
228 | + ) |
|
229 | 229 | ); |
230 | 230 | } |
231 | 231 |
@@ -15,7 +15,7 @@ |
||
15 | 15 | public function uploadFile(Request $request) |
16 | 16 | { |
17 | 17 | try { |
18 | - $receiver = new FileReceiver('file', $request, HandlerFactory::classFromRequest($request)); |
|
18 | + $receiver = new FileReceiver('file', $request, HandlerFactory::classFromRequest($request)); |
|
19 | 19 | if ($receiver->isUploaded() === false) { |
20 | 20 | throw new UploadMissingFileException(); |
21 | 21 | } |