@@ -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 { |
@@ -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 |
@@ -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 | } |