Completed
Pull Request — development (#724)
by Ashutosh
18:55 queued 09:17
created
app/Http/Controllers/Payment/PromotionController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -59,17 +59,17 @@  discard block
 block discarded – undo
59 59
         $new_promotion = $this->promotion->select('code', 'type', 'id')->get();
60 60
 
61 61
         return\ DataTables::of($new_promotion)
62
-                            ->addColumn('checkbox', function ($model) {
62
+                            ->addColumn('checkbox', function($model) {
63 63
                                 return "<input type='checkbox' class='promotion_checkbox'
64 64
                                  value=".$model->id.' name=select[] id=check>';
65 65
                             })
66
-                        ->addColumn('code', function ($model) {
66
+                        ->addColumn('code', function($model) {
67 67
                             return ucfirst($model->code);
68 68
                         })
69
-                        ->addColumn('type', function ($model) {
69
+                        ->addColumn('type', function($model) {
70 70
                             return $this->type->where('id', $model->type)->first()->name;
71 71
                         })
72
-                        ->addColumn('products', function ($model) {
72
+                        ->addColumn('products', function($model) {
73 73
                             $selected = $this->promoRelation->select('product_id')
74 74
                             ->where('promotion_id', $model->id)->get();
75 75
                             $result = [];
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
                                 return 'None';
83 83
                             }
84 84
                         })
85
-                        ->addColumn('action', function ($model) {
85
+                        ->addColumn('action', function($model) {
86 86
                             return '<a href='.url('promotions/'.$model->id.'/edit')
87 87
                             ." class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit' 
88 88
                             style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
Please login to merge, or discard this patch.
app/Http/Controllers/Common/TemplateController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -122,18 +122,18 @@  discard block
 block discarded – undo
122 122
     public function getTemplates()
123 123
     {
124 124
         return \DataTables::of($this->template->select('id', 'name', 'type')->get())
125
-                        ->addColumn('checkbox', function ($model) {
125
+                        ->addColumn('checkbox', function($model) {
126 126
                             return "<input type='checkbox' class='template_checkbox' 
127 127
                             value=".$model->id.' name=select[] id=check>';
128 128
                         })
129 129
 
130
-                         ->addColumn('name', function ($model) {
130
+                         ->addColumn('name', function($model) {
131 131
                              return $model->name;
132 132
                          })
133
-                        ->addColumn('type', function ($model) {
133
+                        ->addColumn('type', function($model) {
134 134
                             return $this->type->where('id', $model->type)->first()->name;
135 135
                         })
136
-                        ->addColumn('action', function ($model) {
136
+                        ->addColumn('action', function($model) {
137 137
                             return '<a href='.url('templates/'.$model->id.'/edit').
138 138
                             " class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit'
139 139
                                  style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
             
285 285
             $settings = \App\Model\Common\Setting::find(1);
286 286
             $fromname = $settings->company;
287
-            \Mail::send('emails.mail', ['data' => $data], function ($m) use ($from, $to, $subject, $fromname, $toname, $cc, $attach) {
287
+            \Mail::send('emails.mail', ['data' => $data], function($m) use ($from, $to, $subject, $fromname, $toname, $cc, $attach) {
288 288
                 $m->from($from, $fromname);
289 289
 
290 290
                 $m->to($to, $toname)->subject($subject);
Please login to merge, or discard this patch.
app/Http/Controllers/Product/ProductController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -114,18 +114,18 @@  discard block
 block discarded – undo
114 114
 
115 115
             return\ DataTables::of($new_product)
116 116
 
117
-                            ->addColumn('checkbox', function ($model) {
117
+                            ->addColumn('checkbox', function($model) {
118 118
                                 return "<input type='checkbox' class='product_checkbox' 
119 119
                                 value=".$model->id.' name=select[] id=check>';
120 120
                             })
121
-                            ->addColumn('name', function ($model) {
121
+                            ->addColumn('name', function($model) {
122 122
                                 return ucfirst($model->name);
123 123
                             })
124
-                              ->addColumn('image', function ($model) {
124
+                              ->addColumn('image', function($model) {
125 125
                                   // return $model->image;
126 126
                                   return "<img src= '$model->image' + height=\"80\"/>";
127 127
                               })
128
-                            ->addColumn('type', function ($model) {
128
+                            ->addColumn('type', function($model) {
129 129
                                 if ($this->type->where('id', $model->type)->first()) {
130 130
                                     return $this->type->where('id', $model->type)->first()->name;
131 131
                                 } else {
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
                                 }
134 134
                             })
135 135
 
136
-                            ->addColumn('group', function ($model) {
136
+                            ->addColumn('group', function($model) {
137 137
                                 if ($this->group->where('id', $model->group)->first()) {
138 138
                                     return $this->group->where('id', $model->group)->first()->name;
139 139
                                 } else {
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
                                 }
142 142
                             })
143 143
 
144
-                            ->addColumn('Action', function ($model) {
144
+                            ->addColumn('Action', function($model) {
145 145
                                 $permissions = LicensePermissionsController::getPermissionsForProduct($model->id);
146 146
                                 $url = '';
147 147
                                 if ($permissions['downloadPermission'] == 1) {
Please login to merge, or discard this patch.
app/Http/Controllers/Order/InvoiceController.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
175 175
                             style='color:white;'> </i>&nbsp;&nbsp;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
                           })
Please login to merge, or discard this patch.
app/Http/Controllers/Front/PageController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -49,17 +49,17 @@  discard block
 block discarded – undo
49 49
     public function getPages()
50 50
     {
51 51
         return \DataTables::of($this->page->get())
52
-                        ->addColumn('checkbox', function ($model) {
52
+                        ->addColumn('checkbox', function($model) {
53 53
                             return "<input type='checkbox' class='page_checkbox' 
54 54
                             value=".$model->id.' name=select[] id=check>';
55 55
                         })
56
-                        ->addColumn('name', function ($model) {
56
+                        ->addColumn('name', function($model) {
57 57
                             return ucfirst($model->name);
58 58
                         })
59
-                        ->addColumn('url', function ($model) {
59
+                        ->addColumn('url', function($model) {
60 60
                             return $model->url;
61 61
                         })
62
-                        ->addColumn('created_at', function ($model) {
62
+                        ->addColumn('created_at', function($model) {
63 63
                             $created = $model->created_at;
64 64
                             if ($created) {
65 65
                                 $date1 = new \DateTime($created);
@@ -71,13 +71,13 @@  discard block
 block discarded – undo
71 71
                             return $createdate;
72 72
                         })
73 73
 
74
-                        ->addColumn('action', function ($model) {
74
+                        ->addColumn('action', function($model) {
75 75
                             return '<a href='.url('pages/'.$model->id.'/edit')
76 76
                             ." class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit'
77 77
                                  style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
78 78
                         })
79 79
 
80
-                          ->rawColumns(['checkbox', 'name', 'url',  'created_at', 'action'])
80
+                          ->rawColumns(['checkbox', 'name', 'url', 'created_at', 'action'])
81 81
                         ->make(true);
82 82
         // ->searchColumns('name', 'content')
83 83
                         // ->orderColumns('name')
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
             $selectedParent = $this->page->where('id', $id)->pluck('parent_page_id')->toArray();
110 110
             $parentName = $this->page->where('id', $selectedParent)->pluck('name', 'id')->toArray();
111 111
 
112
-            return view('themes.default1.front.page.edit', compact('parents', 'page', 'default', 'selectedDefault', 'publishingDate','selectedParent',
112
+            return view('themes.default1.front.page.edit', compact('parents', 'page', 'default', 'selectedDefault', 'publishingDate', 'selectedParent',
113 113
                 'parentName'));
114 114
         } catch (\Exception $ex) {
115 115
             return redirect()->back()->with('fails', $ex->getMessage());
Please login to merge, or discard this patch.
app/Http/Controllers/Front/ClientController.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -79,18 +79,18 @@  discard block
 block discarded – undo
79 79
                     ->select('number', 'created_at', 'grand_total', 'id', 'status');
80 80
 
81 81
             return \DataTables::of($invoices->get())
82
-                            ->addColumn('number', function ($model) {
82
+                            ->addColumn('number', function($model) {
83 83
                                 return $model->number;
84 84
                             })
85
-                            ->addColumn('date', function ($model) {
85
+                            ->addColumn('date', function($model) {
86 86
                                 $date = $model->created_at;
87 87
 
88 88
                                 return $date;
89 89
                             })
90
-                            ->addColumn('total', function ($model) {
90
+                            ->addColumn('total', function($model) {
91 91
                                 return  currency_format($model->grand_total, $code = \Auth::user()->currency);
92 92
                             })
93
-                            ->addColumn('Action', function ($model) {
93
+                            ->addColumn('Action', function($model) {
94 94
                                 $status = $model->status;
95 95
                                 $payment = '';
96 96
                                 if ($status == 'Pending' && $model->grand_total > 0) {
@@ -155,19 +155,19 @@  discard block
 block discarded – undo
155 155
             }
156 156
 
157 157
             return \DataTables::of($versions)
158
-                            ->addColumn('id', function ($versions) {
158
+                            ->addColumn('id', function($versions) {
159 159
                                 return ucfirst($versions->id);
160 160
                             })
161
-                            ->addColumn('version', function ($versions) {
161
+                            ->addColumn('version', function($versions) {
162 162
                                 return ucfirst($versions->version);
163 163
                             })
164
-                            ->addColumn('title', function ($versions) {
164
+                            ->addColumn('title', function($versions) {
165 165
                                 return ucfirst($versions->title);
166 166
                             })
167
-                            ->addColumn('description', function ($versions) {
167
+                            ->addColumn('description', function($versions) {
168 168
                                 return ucfirst($versions->description);
169 169
                             })
170
-                            ->addColumn('file', function ($versions) use ($countExpiry, $countVersions, $clientid, $invoiceid, $productid) {
170
+                            ->addColumn('file', function($versions) use ($countExpiry, $countVersions, $clientid, $invoiceid, $productid) {
171 171
                                 $invoice_id = Invoice::where('number', $invoiceid)->pluck('id')->first();
172 172
                                 $order = Order::where('invoice_id', '=', $invoice_id)->first();
173 173
                                 $order_id = $order->id;
@@ -233,18 +233,18 @@  discard block
 block discarded – undo
233 233
             }
234 234
 
235 235
             return \DataTables::of($link)
236
-                            ->addColumn('version', function ($link) {
236
+                            ->addColumn('version', function($link) {
237 237
                                 return ucfirst($link['tag_name']);
238 238
                             })
239
-                            ->addColumn('name', function ($link) {
239
+                            ->addColumn('name', function($link) {
240 240
                                 return ucfirst($link['name']);
241 241
                             })
242
-                            ->addColumn('description', function ($link) {
242
+                            ->addColumn('description', function($link) {
243 243
                                 $markdown = Markdown::convertToHtml(ucfirst($link['body']));
244 244
 
245 245
                                 return $markdown;
246 246
                             })
247
-                            ->addColumn('file', function ($link) use ($countExpiry, $countVersions, $invoiceid, $productid) {
247
+                            ->addColumn('file', function($link) use ($countExpiry, $countVersions, $invoiceid, $productid) {
248 248
                                 $order = Order::where('invoice_id', '=', $invoiceid)->first();
249 249
                                 $order_id = $order->id;
250 250
                                 $orderEndDate = Subscription::select('update_ends_at')
@@ -280,20 +280,20 @@  discard block
 block discarded – undo
280 280
             $orders = Order::where('client', \Auth::user()->id);
281 281
 
282 282
             return \DataTables::of($orders->get())
283
-                            ->addColumn('id', function ($model) {
283
+                            ->addColumn('id', function($model) {
284 284
                                 return $model->id;
285 285
                             })
286
-                            ->addColumn('product_name', function ($model) {
286
+                            ->addColumn('product_name', function($model) {
287 287
                                 return $model->product()->first()->name;
288 288
                             })
289
-                            ->addColumn('expiry', function ($model) {
289
+                            ->addColumn('expiry', function($model) {
290 290
                                 $tz = \Auth::user()->timezone()->first()->name;
291 291
                                 $end = $this->getExpiryDate($model);
292 292
 
293 293
                                 return $end;
294 294
                             })
295 295
 
296
-                            ->addColumn('Action', function ($model) {
296
+                            ->addColumn('Action', function($model) {
297 297
                                 $sub = $model->subscription()->first();
298 298
                                 $order = Order::where('id', $model->id)->select('product')->first();
299 299
                                 $productid = $order->product;
@@ -399,28 +399,28 @@  discard block
 block discarded – undo
399 399
                     ->select('id', 'invoice_id', 'user_id', 'amount', 'payment_method', 'payment_status', 'created_at');
400 400
 
401 401
             return \DataTables::of($payments->get())
402
-                            ->addColumn('checkbox', function ($model) {
402
+                            ->addColumn('checkbox', function($model) {
403 403
                                 if (\Input::get('client') != 'true') {
404 404
                                     return "<input type='checkbox' class='payment_checkbox' 
405 405
                                     value=".$model->id.' name=select[] id=check>';
406 406
                                 }
407 407
                             })
408
-                            ->addColumn('number', function ($model) {
408
+                            ->addColumn('number', function($model) {
409 409
                                 return $model->invoice()->first()->number;
410 410
                             })
411
-                            ->addColumn('amount', function ($model) {
411
+                            ->addColumn('amount', function($model) {
412 412
                                 $currency = $model->invoice()->first()->currency;
413 413
                                 $total = currency_format($model->amount, $code = $currency);
414 414
 
415 415
                                 return $total;
416 416
                             })
417
-                            ->addColumn('payment_method', function ($model) {
417
+                            ->addColumn('payment_method', function($model) {
418 418
                                 return $model->payment_method;
419 419
                             })
420
-                             ->addColumn('payment_status', function ($model) {
420
+                             ->addColumn('payment_status', function($model) {
421 421
                                  return $model->payment_status;
422 422
                              })
423
-                            ->addColumn('created_at', function ($model) {
423
+                            ->addColumn('created_at', function($model) {
424 424
                                 $date1 = new DateTime($model->created_at);
425 425
                                 $tz = \Auth::user()->timezone()->first()->name;
426 426
                                 $date1->setTimezone(new DateTimeZone($tz));
@@ -452,13 +452,13 @@  discard block
 block discarded – undo
452 452
                     ->select('id', 'invoice_id', 'user_id', 'payment_method', 'payment_status', 'created_at', 'amount');
453 453
             //dd(\Input::all());
454 454
             return \DataTables::of($payments->get())
455
-                            ->addColumn('number', function ($model) {
455
+                            ->addColumn('number', function($model) {
456 456
                                 return $model->invoice()->first()->number;
457 457
                             })
458
-                              ->addColumn('total', function ($model) {
458
+                              ->addColumn('total', function($model) {
459 459
                                   return $model->amount;
460 460
                               })
461
-                               ->addColumn('created_at', function ($model) {
461
+                               ->addColumn('created_at', function($model) {
462 462
                                    $date1 = new DateTime($model->created_at);
463 463
                                    $tz = \Auth::user()->timezone()->first()->name;
464 464
                                    $date1->setTimezone(new DateTimeZone($tz));
Please login to merge, or discard this patch.
app/Http/Controllers/Front/BaseClientController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -201,27 +201,27 @@
 block discarded – undo
201 201
             }
202 202
 
203 203
             return \DataTables::of($invoices->get())
204
-             ->addColumn('number', function ($model) {
204
+             ->addColumn('number', function($model) {
205 205
                  return $model->number;
206 206
              })
207
-            ->addColumn('products', function ($model) {
207
+            ->addColumn('products', function($model) {
208 208
                 $invoice = $this->invoice->find($model->id);
209 209
                 $products = $invoice->invoiceItem()->pluck('product_name')->toArray();
210 210
 
211 211
                 return ucfirst(implode(',', $products));
212 212
             })
213
-            ->addColumn('date', function ($model) {
213
+            ->addColumn('date', function($model) {
214 214
                 $date = date_create($model->created_at);
215 215
 
216 216
                 return date_format($date, 'M j, Y, g:i a');
217 217
             })
218
-            ->addColumn('total', function ($model) {
218
+            ->addColumn('total', function($model) {
219 219
                 return currency_format($model->grand_total, $code = $model->currency);
220 220
             })
221
-            ->addColumn('status', function ($model) {
221
+            ->addColumn('status', function($model) {
222 222
                 return ucfirst($model->status);
223 223
             })
224
-            ->addColumn('action', function ($model) {
224
+            ->addColumn('action', function($model) {
225 225
                 if (\Auth::user()->role == 'admin') {
226 226
                     $url = '/invoices/show?invoiceid='.$model->id;
227 227
                 } else {
Please login to merge, or discard this patch.
app/Http/Controllers/User/AdminOrderInvoiceController.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -14,11 +14,11 @@  discard block
 block discarded – undo
14 14
         $invoices = $invoice->where('user_id', $id)->orderBy('created_at', 'desc')->get();
15 15
 
16 16
         return\ DataTables::of($invoices)
17
-                        ->addColumn('checkbox', function ($model) {
17
+                        ->addColumn('checkbox', function($model) {
18 18
                             return "<input type='checkbox' class='invoice_checkbox' 
19 19
                             value=".$model->id.' name=select[] id=check>';
20 20
                         })
21
-                        ->addColumn('date', function ($model) use ($client) {
21
+                        ->addColumn('date', function($model) use ($client) {
22 22
                             $date1 = new \DateTime($model->date);
23 23
                             $tz = $client->timezone()->first()->name;
24 24
                             $date1->setTimezone(new \DateTimeZone($tz));
@@ -26,13 +26,13 @@  discard block
 block discarded – undo
26 26
 
27 27
                             return $date;
28 28
                         })
29
-                        ->addColumn('invoice_no', function ($model) {
29
+                        ->addColumn('invoice_no', function($model) {
30 30
                             return  	'<a href='.url('invoices/show?invoiceid='.$model->id).'>'.$model->number.'</a>';
31 31
                         })
32
-                        ->addColumn('total', function ($model) use ($client) {
32
+                        ->addColumn('total', function($model) use ($client) {
33 33
                             return currency_format($model->grand_total, $code = $client->currency);
34 34
                         })
35
-                         ->addColumn('paid', function ($model) use ($client) {
35
+                         ->addColumn('paid', function($model) use ($client) {
36 36
                              $payment = \App\Model\Order\Payment::where('invoice_id', $model->id)->select('amount')->get();
37 37
                              $c = count($payment);
38 38
                              $sum = 0;
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
                              return currency_format($sum, $code = $client->currency);
44 44
                          })
45
-                         ->addColumn('balance', function ($model) use ($client) {
45
+                         ->addColumn('balance', function($model) use ($client) {
46 46
                              $payment = \App\Model\Order\Payment::where('invoice_id', $model->id)->select('amount')->get();
47 47
                              $c = count($payment);
48 48
                              $sum = 0;
@@ -53,10 +53,10 @@  discard block
 block discarded – undo
53 53
 
54 54
                              return currency_format($pendingAmount, $code = $client->currency);
55 55
                          })
56
-                          ->addColumn('status', function ($model) {
56
+                          ->addColumn('status', function($model) {
57 57
                               return $model->status;
58 58
                           })
59
-                        ->addColumn('action', function ($model) {
59
+                        ->addColumn('action', function($model) {
60 60
                             $action = '';
61 61
                             $cont = new \App\Http\Controllers\Order\TaxRatesAndCodeExpiryController();
62 62
                             $check = $cont->checkExecution($model->id);
@@ -86,35 +86,35 @@  discard block
 block discarded – undo
86 86
         $order = $client->order()->orderBy('created_at', 'desc')->get();
87 87
 
88 88
         return\ DataTables::of($order)
89
-                        ->addColumn('checkbox', function ($model) {
89
+                        ->addColumn('checkbox', function($model) {
90 90
                             return "<input type='checkbox' class='order_checkbox' 
91 91
                             value=".$model->id.' name=select[] id=checkorder>';
92 92
                         })
93
-                        ->addColumn('date', function ($model) {
93
+                        ->addColumn('date', function($model) {
94 94
                             return ucfirst($model->created_at);
95 95
                         })
96
-                        ->addColumn('product', function ($model) {
96
+                        ->addColumn('product', function($model) {
97 97
                             $productName = $model->product()->first() && $model->product()->first()->name ?
98 98
                             $model->product()->first()->name : 'Unknown';
99 99
 
100 100
                             return $productName;
101 101
                         })
102
-                        ->addColumn('number', function ($model) {
102
+                        ->addColumn('number', function($model) {
103 103
                             $number = $model->number;
104 104
 
105 105
                             return $number;
106 106
                         })
107
-                         ->addColumn('total', function ($model) use ($client) {
107
+                         ->addColumn('total', function($model) use ($client) {
108 108
                              $price = currency_format($model->price_override, $code = $client->currency);
109 109
 
110 110
                              return $price;
111 111
                          })
112
-                         ->addColumn('status', function ($model) {
112
+                         ->addColumn('status', function($model) {
113 113
                              $status = $model->order_status;
114 114
 
115 115
                              return $status;
116 116
                          })
117
-                        ->addColumn('action', function ($model) {
117
+                        ->addColumn('action', function($model) {
118 118
                             return '<a href='.url('orders/'.$model->id)." 
119 119
                             class='btn btn-sm btn-primary btn-xs'><i class='fa fa-eye' 
120 120
                             style='color:white;'> </i>&nbsp;&nbsp;View</a>";
@@ -131,14 +131,14 @@  discard block
 block discarded – undo
131 131
         $extraAmt = $this->getExtraAmtPaid($id);
132 132
 
133 133
         return\ DataTables::of($payments)
134
-                        ->addColumn('checkbox', function ($model) {
134
+                        ->addColumn('checkbox', function($model) {
135 135
                             return "<input type='checkbox' class='payment_checkbox' 
136 136
                             value=".$model->id.' name=select[] id=checkpayment>';
137 137
                         })
138
-                        ->addColumn('invoice_no', function ($model) {
138
+                        ->addColumn('invoice_no', function($model) {
139 139
                             return $model->invoice()->first() ? $model->invoice()->first()->number : '--';
140 140
                         })
141
-                        ->addColumn('date', function ($model) {
141
+                        ->addColumn('date', function($model) {
142 142
                             $date = $model->created_at;
143 143
                             $date1 = new \DateTime($date);
144 144
                             $tz = \Auth::user()->timezone()->first()->name;
@@ -147,10 +147,10 @@  discard block
 block discarded – undo
147 147
 
148 148
                             return $date;
149 149
                         })
150
-                        ->addColumn('payment_method', function ($model) {
150
+                        ->addColumn('payment_method', function($model) {
151 151
                             return $model->payment_method;
152 152
                         })
153
-                         ->addColumn('total', function ($model) use ($client,$extraAmt) {
153
+                         ->addColumn('total', function($model) use ($client, $extraAmt) {
154 154
                              if ($model->invoice_id == 0) {
155 155
                                  $amount = currency_format($extraAmt, $code = $client->currency);
156 156
                              } else {
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 
160 160
                              return $amount;
161 161
                          })
162
-                         ->addColumn('status', function ($model) {
162
+                         ->addColumn('status', function($model) {
163 163
                              return ucfirst($model->payment_status);
164 164
                          })
165 165
 
Please login to merge, or discard this patch.