Completed
Pull Request — development (#468)
by Ashutosh
17:18 queued 08:06
created
app/Http/Controllers/Order/OrderController.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -139,8 +139,8 @@
 block discarded – undo
139 139
                             return $url;
140 140
                         })
141 141
 
142
-                         ->rawColumns(['checkbox', 'date', 'client', 'number',
143
-                          'price_override', 'order_status', 'ends_at', 'action', ])
142
+                            ->rawColumns(['checkbox', 'date', 'client', 'number',
143
+                            'price_override', 'order_status', 'ends_at', 'action', ])
144 144
                         ->make(true);
145 145
     }
146 146
 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -102,16 +102,16 @@  discard block
 block discarded – undo
102 102
 
103 103
         return \DataTables::of($query->take(50)->get())
104 104
                         ->setTotalRecords($query->count())
105
-                        ->addColumn('checkbox', function ($model) {
105
+                        ->addColumn('checkbox', function($model) {
106 106
                             return "<input type='checkbox' class='order_checkbox' value=".
107 107
                             $model->id.' name=select[] id=check>';
108 108
                         })
109
-                        ->addColumn('date', function ($model) {
109
+                        ->addColumn('date', function($model) {
110 110
                             $date = $model->created_at;
111 111
 
112 112
                             return "<span style='display:none'>$model->id</span>".$date;
113 113
                         })
114
-                        ->addColumn('client', function ($model) {
114
+                        ->addColumn('client', function($model) {
115 115
                             $user = $this->user->where('id', $model->client)->first();
116 116
                             $first = $user->first_name;
117 117
                             $last = $user->last_name;
@@ -119,22 +119,22 @@  discard block
 block discarded – undo
119 119
 
120 120
                             return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'<a>';
121 121
                         })
122
-                        ->addColumn('number', function ($model) {
122
+                        ->addColumn('number', function($model) {
123 123
                             return ucfirst($model->number);
124 124
                         })
125
-                        ->addColumn('price_override', function ($model) {
125
+                        ->addColumn('price_override', function($model) {
126 126
                             return ucfirst($model->price_override);
127 127
                         })
128
-                        ->addColumn('order_status', function ($model) {
128
+                        ->addColumn('order_status', function($model) {
129 129
                             return ucfirst($model->order_status);
130 130
                         })
131 131
                         // ->showColumns('number', 'price_override', 'order_status')
132
-                        ->addColumn('ends_at', function ($model) {
132
+                        ->addColumn('ends_at', function($model) {
133 133
                             $end = $this->getEndDate($model);
134 134
 
135 135
                             return $end;
136 136
                         })
137
-                        ->addColumn('action', function ($model) {
137
+                        ->addColumn('action', function($model) {
138 138
                             $sub = $model->subscription()->first();
139 139
                             $status = $this->checkInvoiceStatusByOrderId($model->id);
140 140
                             $url = $this->getUrl($model, $status, $sub);
Please login to merge, or discard this patch.
app/Http/Controllers/Order/TaxRatesAndCodeExpiryController.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@
 block discarded – undo
183 183
                         '<td style="border-bottom: 1px solid#ccc; color: #333; 
184 184
                         font-family: Arial,sans-serif; font-size: 14px; line-height: 20px;
185 185
                          padding: 15px 8px;" valign="top">'.$this->currency($invoiceid).' '
186
-                         .$item->subtotal.'</td>'.
186
+                            .$item->subtotal.'</td>'.
187 187
                         '</tr>';
188 188
             }
189 189
         }
Please login to merge, or discard this patch.
app/Http/Controllers/Order/InvoiceController.php 3 patches
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -475,7 +475,8 @@  discard block
 block discarded – undo
475 475
             if ($this->tax_option->findOrFail(1)->inclusive == 0) {
476 476
                 if ($this->tax_option->findOrFail(1)->tax_enable == 1) {
477 477
                     $taxs = $this->getTaxWhenEnable($productid, $taxs[0], $userid);
478
-                } elseif ($this->tax_option->tax_enable == 0) {//if tax_enable is 0
478
+                } elseif ($this->tax_option->tax_enable == 0) {
479
+//if tax_enable is 0
479 480
 
480 481
                     $taxClassId = Tax::where('country', '')->where('state', 'Any State')
481 482
                      ->pluck('tax_classes_id')->first(); //In case of India when
@@ -484,13 +485,15 @@  discard block
 block discarded – undo
484 485
                         $rate = $this->getTotalRate($taxClassId, $productid, $taxs);
485 486
                         $taxs = $rate['taxes'];
486 487
                         $rate = $rate['rate'];
487
-                    } elseif ($geoip_country != 'IN') {//In case of other country
488
+                    } elseif ($geoip_country != 'IN') {
489
+//In case of other country
488 490
                         // when tax is available and tax is not enabled(Applicable
489 491
                         //when Global Tax class for any country and state is not there)
490 492
 
491 493
                         $taxClassId = Tax::where('state', $geoip_state)
492 494
                         ->orWhere('country', $geoip_country)->pluck('tax_classes_id')->first();
493
-                        if ($taxClassId) { //if state equals the user State
495
+                        if ($taxClassId) {
496
+//if state equals the user State
494 497
                             $rate = $this->getTotalRate($taxClassId, $productid, $taxs);
495 498
                             $taxs = $rate['taxes'];
496 499
                             $rate = $rate['rate'];
@@ -533,11 +536,13 @@  discard block
 block discarded – undo
533 536
         $i_gst = 0;
534 537
         $ut_gst = 0;
535 538
         $state_code = '';
536
-        if ($user_state != '') {//Get the CGST,SGST,IGST,STATE_CODE of the user
539
+        if ($user_state != '') {
540
+//Get the CGST,SGST,IGST,STATE_CODE of the user
537 541
             $tax = $this->getTaxWhenState($user_state, $productid, $origin_state);
538 542
             $taxes = $tax['taxes'];
539 543
             $value = $tax['value'];
540
-        } else {//If user from other Country
544
+        } else {
545
+//If user from other Country
541 546
             $tax = $this->getTaxWhenOtherCountry($geoip_state, $geoip_country, $productid);
542 547
             $taxes = $tax['taxes'];
543 548
             $value = $tax['value'];
Please login to merge, or discard this patch.
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -125,12 +125,12 @@  discard block
 block discarded – undo
125 125
         $query = $this->advanceSearch($name, $invoice_no, $currency, $status, $from, $till);
126 126
 
127 127
         return \DataTables::of($query->take(50)->get())
128
-         ->setTotalRecords($query->count())
128
+            ->setTotalRecords($query->count())
129 129
 
130
-         ->addColumn('checkbox', function ($model) {
131
-             return "<input type='checkbox' class='invoice_checkbox' 
130
+            ->addColumn('checkbox', function ($model) {
131
+                return "<input type='checkbox' class='invoice_checkbox' 
132 132
                             value=".$model->id.' name=select[] id=check>';
133
-         })
133
+            })
134 134
                         ->addColumn('user_id', function ($model) {
135 135
                             $first = $this->user->where('id', $model->user_id)->first()->first_name;
136 136
                             $last = $this->user->where('id', $model->user_id)->first()->last_name;
@@ -138,9 +138,9 @@  discard block
 block discarded – undo
138 138
 
139 139
                             return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'</a>';
140 140
                         })
141
-                         ->addColumn('number', function ($model) {
142
-                             return ucfirst($model->number);
143
-                         })
141
+                            ->addColumn('number', function ($model) {
142
+                                return ucfirst($model->number);
143
+                            })
144 144
 
145 145
                         ->addColumn('date', function ($model) {
146 146
                             $date = ($model->created_at);
@@ -148,12 +148,12 @@  discard block
 block discarded – undo
148 148
                             return $date;
149 149
                             // return "<span style='display:none'>$model->id</span>".$date->format('l, F j, Y H:m');
150 150
                         })
151
-                         ->addColumn('grand_total', function ($model) {
152
-                             return ucfirst($model->number);
153
-                         })
154
-                          ->addColumn('status', function ($model) {
155
-                              return ucfirst($model->status);
156
-                          })
151
+                            ->addColumn('grand_total', function ($model) {
152
+                                return ucfirst($model->number);
153
+                            })
154
+                            ->addColumn('status', function ($model) {
155
+                                return ucfirst($model->status);
156
+                            })
157 157
 
158 158
                         ->addColumn('action', function ($model) {
159 159
                             $action = '';
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
                                     ."   $action";
173 173
                         })
174 174
 
175
-                         ->rawColumns(['checkbox', 'user_id', 'number', 'date', 'grand_total', 'status', 'action'])
175
+                            ->rawColumns(['checkbox', 'user_id', 'number', 'date', 'grand_total', 'status', 'action'])
176 176
                         ->make(true);
177 177
     }
178 178
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
         $join = $join->select('id', 'user_id', 'number', 'date', 'grand_total', 'currency', 'status', 'created_at');
213 213
 
214 214
         $join = $join->orderBy('created_at', 'desc')
215
-         ->select('invoices.id','first_name','invoices.created_at',
215
+            ->select('invoices.id','first_name','invoices.created_at',
216 216
             'invoices.currency', 'user_id', 'number', 'status');
217 217
 
218 218
         return $join;
@@ -363,8 +363,8 @@  discard block
 block discarded – undo
363 363
             $symbol = $attributes[0]['currency'][0]['code'];
364 364
             //dd($symbol);
365 365
             $invoice = $this->invoice->create(['user_id' => $user_id, 'number' => $number,
366
-             'date'                                      => $date, 'grand_total' => $grand_total, 'status' => 'pending',
367
-             'currency'                                  => $symbol, ]);
366
+                'date'                                      => $date, 'grand_total' => $grand_total, 'status' => 'pending',
367
+                'currency'                                  => $symbol, ]);
368 368
 
369 369
             foreach (\Cart::getContent() as $cart) {
370 370
                 $this->createInvoiceItems($invoice->id, $cart);
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
                 'currency'                        => $currency, 'status' => 'pending', 'description' => $description, ]);
469 469
 
470 470
             $items = $this->createInvoiceItemsByAdmin($invoice->id, $productid,
471
-             $code, $total, $currency, $qty, $plan, $user_id, $tax_name, $tax_rate);
471
+                $code, $total, $currency, $qty, $plan, $user_id, $tax_name, $tax_rate);
472 472
             $result = $this->getMessage($items, $user_id);
473 473
         } catch (\Exception $ex) {
474 474
             app('log')->useDailyFiles(storage_path().'/laravel.log');
@@ -617,7 +617,7 @@  discard block
 block discarded – undo
617 617
                 } elseif ($this->tax_option->tax_enable == 0) {//if tax_enable is 0
618 618
 
619 619
                     $taxClassId = Tax::where('country', '')->where('state', 'Any State')
620
-                     ->pluck('tax_classes_id')->first(); //In case of India when
620
+                        ->pluck('tax_classes_id')->first(); //In case of India when
621 621
                     //other tax is available and tax is not enabled
622 622
                     if ($taxClassId) {
623 623
                         $rate = $this->getTotalRate($taxClassId, $productid, $taxs);
@@ -686,10 +686,10 @@  discard block
 block discarded – undo
686 686
         foreach ($taxes as $key => $tax) {
687 687
             if ($taxes[0]) {
688 688
                 $tax_attribute[$key] = ['name' => $tax->name, 'name1' => $name1,
689
-                 'name2'                       => $name2, 'name3' => $name3, 'name4' => $name4,
690
-                 'rate'                        => $value, 'rate1'=>$c_gst, 'rate2'=>$s_gst,
691
-                 'rate3'                       => $i_gst, 'rate4'=>$ut_gst, 'state'=>$state_code,
692
-                  'origin_state'               => $origin_state, ];
689
+                    'name2'                       => $name2, 'name3' => $name3, 'name4' => $name4,
690
+                    'rate'                        => $value, 'rate1'=>$c_gst, 'rate2'=>$s_gst,
691
+                    'rate3'                       => $i_gst, 'rate4'=>$ut_gst, 'state'=>$state_code,
692
+                    'origin_state'               => $origin_state, ];
693 693
 
694 694
                 $rate = $tax->rate;
695 695
 
@@ -899,8 +899,8 @@  discard block
 block discarded – undo
899 899
                 }
900 900
 
901 901
                 return view('themes.default1.invoice.payment',
902
-                 compact('invoice_status', 'payment_status',
903
-                  'payment_method', 'invoice_id', 'domain', 'invoice', 'userid'));
902
+                    compact('invoice_status', 'payment_status',
903
+                    'payment_method', 'invoice_id', 'domain', 'invoice', 'userid'));
904 904
             }
905 905
 
906 906
             return redirect()->back();
@@ -938,7 +938,7 @@  discard block
 block discarded – undo
938 938
                 case 1:
939 939
                     $percentage = $price * ($value / 100);
940 940
 
941
-                     return $price - $percentage;
941
+                        return $price - $percentage;
942 942
                 case 2:
943 943
                     return $price - $value;
944 944
                 case 3:
@@ -970,7 +970,7 @@  discard block
 block discarded – undo
970 970
             $payment_date = \Carbon\Carbon::now()->toDateTimeString();
971 971
             $amount = $grand_total;
972 972
             $paymentRenewal = $this->updateInvoicePayment($invoiceid, $payment_method,
973
-             $payment_status, $payment_date, $amount);
973
+                $payment_status, $payment_date, $amount);
974 974
 
975 975
             return redirect()->back()->with('success', 'Payment Accepted Successfully');
976 976
         } catch (\Exception $ex) {
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             $from = $request->input('from');
105 105
             $till = $request->input('till');
106 106
 
107
-            return view('themes.default1.invoice.index', compact('name','invoice_no','status','currencies','currency_id','from',
107
+            return view('themes.default1.invoice.index', compact('name', 'invoice_no', 'status', 'currencies', 'currency_id', 'from',
108 108
 
109 109
                 'till'));
110 110
         } catch (\Exception $ex) {
@@ -127,35 +127,35 @@  discard block
 block discarded – undo
127 127
         return \DataTables::of($query->take(50)->get())
128 128
          ->setTotalRecords($query->count())
129 129
 
130
-         ->addColumn('checkbox', function ($model) {
130
+         ->addColumn('checkbox', function($model) {
131 131
              return "<input type='checkbox' class='invoice_checkbox' 
132 132
                             value=".$model->id.' name=select[] id=check>';
133 133
          })
134
-                        ->addColumn('user_id', function ($model) {
134
+                        ->addColumn('user_id', function($model) {
135 135
                             $first = $this->user->where('id', $model->user_id)->first()->first_name;
136 136
                             $last = $this->user->where('id', $model->user_id)->first()->last_name;
137 137
                             $id = $this->user->where('id', $model->user_id)->first()->id;
138 138
 
139 139
                             return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'</a>';
140 140
                         })
141
-                         ->addColumn('number', function ($model) {
141
+                         ->addColumn('number', function($model) {
142 142
                              return ucfirst($model->number);
143 143
                          })
144 144
 
145
-                        ->addColumn('date', function ($model) {
145
+                        ->addColumn('date', function($model) {
146 146
                             $date = ($model->created_at);
147 147
 
148 148
                             return $date;
149 149
                             // return "<span style='display:none'>$model->id</span>".$date->format('l, F j, Y H:m');
150 150
                         })
151
-                         ->addColumn('grand_total', function ($model) {
151
+                         ->addColumn('grand_total', function($model) {
152 152
                              return ucfirst($model->number);
153 153
                          })
154
-                          ->addColumn('status', function ($model) {
154
+                          ->addColumn('status', function($model) {
155 155
                               return ucfirst($model->status);
156 156
                           })
157 157
 
158
-                        ->addColumn('action', function ($model) {
158
+                        ->addColumn('action', function($model) {
159 159
                             $action = '';
160 160
 
161 161
                             $check = $this->checkExecution($model->id);
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
         $join = $join->select('id', 'user_id', 'number', 'date', 'grand_total', 'currency', 'status', 'created_at');
213 213
 
214 214
         $join = $join->orderBy('created_at', 'desc')
215
-         ->select('invoices.id','first_name','invoices.created_at',
215
+         ->select('invoices.id', 'first_name', 'invoices.created_at',
216 216
             'invoices.currency', 'user_id', 'number', 'status');
217 217
 
218 218
         return $join;
Please login to merge, or discard this patch.
app/Http/Controllers/Front/ClientController.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         try {
130 130
             $versions = ProductUpload::where('product_id', $productid)
131 131
             ->select('id', 'product_id', 'version',
132
-             'title', 'description', 'file', 'created_at')->get();
132
+                'title', 'description', 'file', 'created_at')->get();
133 133
 
134 134
             return \DataTables::of($versions)
135 135
                             ->addColumn('id', function ($versions) {
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
             $bussinesses = \App\Model\Common\Bussiness::pluck('name', 'short')->toArray();
319 319
 
320 320
             return view('themes.default1.front.clients.profile',
321
-             compact('user', 'timezones', 'state', 'states', 'bussinesses'));
321
+                compact('user', 'timezones', 'state', 'states', 'bussinesses'));
322 322
         } catch (Exception $ex) {
323 323
             Bugsnag::notifyException($ex);
324 324
 
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
                                 return $model->grand_total;
398 398
                             })
399 399
                             ->rawColumns(['checkbox', 'number', 'total',
400
-                             'payment_method', 'payment_status', 'created_at', ])
400
+                                'payment_method', 'payment_status', 'created_at', ])
401 401
                             ->make(true);
402 402
         } catch (Exception $ex) {
403 403
             Bugsnag::notifyException($ex);
@@ -423,17 +423,17 @@  discard block
 block discarded – undo
423 423
                             ->addColumn('number', function ($model) {
424 424
                                 return $model->invoice()->first()->number;
425 425
                             })
426
-                              ->addColumn('total', function ($model) {
427
-                                  return $model->amount;
428
-                              })
429
-                               ->addColumn('created_at', function ($model) {
430
-                                   $date1 = new DateTime($model->created_at);
431
-                                   $tz = \Auth::user()->timezone()->first()->name;
432
-                                   $date1->setTimezone(new DateTimeZone($tz));
433
-                                   $date = $date1->format('M j, Y, g:i a');
434
-
435
-                                   return $date;
436
-                               })
426
+                                ->addColumn('total', function ($model) {
427
+                                    return $model->amount;
428
+                                })
429
+                                ->addColumn('created_at', function ($model) {
430
+                                    $date1 = new DateTime($model->created_at);
431
+                                    $tz = \Auth::user()->timezone()->first()->name;
432
+                                    $date1->setTimezone(new DateTimeZone($tz));
433
+                                    $date = $date1->format('M j, Y, g:i a');
434
+
435
+                                    return $date;
436
+                                })
437 437
 
438 438
                             ->addColumn('payment_method', 'payment_status', 'created_at')
439 439
 
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -77,20 +77,20 @@  discard block
 block discarded – undo
77 77
                     ->select('number', 'created_at', 'grand_total', 'id', 'status');
78 78
 
79 79
             return \DataTables::of($invoices->get())
80
-                            ->addColumn('number', function ($model) {
80
+                            ->addColumn('number', function($model) {
81 81
                                 return $model->number;
82 82
                             })
83
-                            ->addColumn('date', function ($model) {
83
+                            ->addColumn('date', function($model) {
84 84
                                 $date = $model->created_at;
85 85
 
86 86
                                 return $date;
87 87
                                 // $myobject->created_at->timezone($this->auth->user()->timezone);
88 88
                             })
89 89
                             // ->showColumns('created_at')
90
-                            ->addColumn('total', function ($model) {
90
+                            ->addColumn('total', function($model) {
91 91
                                 return $model->grand_total;
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) {
@@ -132,19 +132,19 @@  discard block
 block discarded – undo
132 132
              'title', 'description', 'file', 'created_at')->get();
133 133
 
134 134
             return \DataTables::of($versions)
135
-                            ->addColumn('id', function ($versions) {
135
+                            ->addColumn('id', function($versions) {
136 136
                                 return ucfirst($versions->id);
137 137
                             })
138
-                            ->addColumn('version', function ($versions) {
138
+                            ->addColumn('version', function($versions) {
139 139
                                 return ucfirst($versions->version);
140 140
                             })
141
-                            ->addColumn('title', function ($versions) {
141
+                            ->addColumn('title', function($versions) {
142 142
                                 return ucfirst($versions->title);
143 143
                             })
144
-                            ->addColumn('description', function ($versions) {
144
+                            ->addColumn('description', function($versions) {
145 145
                                 return ucfirst($versions->description);
146 146
                             })
147
-                            ->addColumn('file', function ($versions) use ($clientid, $invoiceid, $productid) {
147
+                            ->addColumn('file', function($versions) use ($clientid, $invoiceid, $productid) {
148 148
                                 $invoice_id = Invoice::where('number', $invoiceid)->pluck('id')->first();
149 149
                                 $order = Order::where('invoice_id', '=', $invoice_id)->first();
150 150
                                 $order_id = $order->id;
@@ -196,18 +196,18 @@  discard block
 block discarded – undo
196 196
             $link = (array_slice($link, 0, 10, true));
197 197
 
198 198
             return \DataTables::of($link)
199
-                            ->addColumn('version', function ($link) {
199
+                            ->addColumn('version', function($link) {
200 200
                                 return ucfirst($link['tag_name']);
201 201
                             })
202
-                            ->addColumn('name', function ($link) {
202
+                            ->addColumn('name', function($link) {
203 203
                                 return ucfirst($link['name']);
204 204
                             })
205
-                            ->addColumn('description', function ($link) {
205
+                            ->addColumn('description', function($link) {
206 206
                                 $markdown = Markdown::convertToHtml(ucfirst($link['body']));
207 207
 
208 208
                                 return $markdown;
209 209
                             })
210
-                            ->addColumn('file', function ($link) use ($invoiceid, $productid) {
210
+                            ->addColumn('file', function($link) use ($invoiceid, $productid) {
211 211
                                 $order = Order::where('invoice_id', '=', $invoiceid)->first();
212 212
                                 $order_id = $order->id;
213 213
                                 $orderEndDate = Subscription::select('ends_at')
@@ -255,20 +255,20 @@  discard block
 block discarded – undo
255 255
             $orders = Order::where('client', \Auth::user()->id);
256 256
 
257 257
             return \DataTables::of($orders->get())
258
-                            ->addColumn('id', function ($model) {
258
+                            ->addColumn('id', function($model) {
259 259
                                 return $model->id;
260 260
                             })
261
-                            ->addColumn('product_name', function ($model) {
261
+                            ->addColumn('product_name', function($model) {
262 262
                                 return $model->product()->first()->name;
263 263
                             })
264
-                            ->addColumn('expiry', function ($model) {
264
+                            ->addColumn('expiry', function($model) {
265 265
                                 $tz = \Auth::user()->timezone()->first()->name;
266 266
                                 $end = $this->getExpiryDate($model);
267 267
 
268 268
                                 return $end;
269 269
                             })
270 270
 
271
-                            ->addColumn('Action', function ($model) {
271
+                            ->addColumn('Action', function($model) {
272 272
                                 $sub = $model->subscription()->first();
273 273
                                 $order = Order::where('id', $model->id)->select('product')->first();
274 274
                                 $productid = $order->product;
@@ -383,17 +383,17 @@  discard block
 block discarded – undo
383 383
                     ->select('id', 'invoice_id', 'user_id', 'amount', 'payment_method', 'payment_status', 'created_at');
384 384
 
385 385
             return \DataTables::of($payments->get())
386
-                            ->addColumn('checkbox', function ($model) {
386
+                            ->addColumn('checkbox', function($model) {
387 387
                                 if (\Input::get('client') != 'true') {
388 388
                                     return "<input type='checkbox' class='payment_checkbox' 
389 389
                                     value=".$model->id.' name=select[] id=check>';
390 390
                                 }
391 391
                             })
392
-                            ->addColumn('number', function ($model) {
392
+                            ->addColumn('number', function($model) {
393 393
                                 return $model->invoice()->first()->number;
394 394
                             })
395 395
                             ->addColumn('amount', 'payment_method', 'payment_status', 'created_at')
396
-                            ->addColumn('total', function ($model) {
396
+                            ->addColumn('total', function($model) {
397 397
                                 return $model->grand_total;
398 398
                             })
399 399
                             ->rawColumns(['checkbox', 'number', 'total',
@@ -420,13 +420,13 @@  discard block
 block discarded – undo
420 420
                     ->select('id', 'invoice_id', 'user_id', 'payment_method', 'payment_status', 'created_at', 'amount');
421 421
             //dd(\Input::all());
422 422
             return \DataTables::of($payments->get())
423
-                            ->addColumn('number', function ($model) {
423
+                            ->addColumn('number', function($model) {
424 424
                                 return $model->invoice()->first()->number;
425 425
                             })
426
-                              ->addColumn('total', function ($model) {
426
+                              ->addColumn('total', function($model) {
427 427
                                   return $model->amount;
428 428
                               })
429
-                               ->addColumn('created_at', function ($model) {
429
+                               ->addColumn('created_at', function($model) {
430 430
                                    $date1 = new DateTime($model->created_at);
431 431
                                    $tz = \Auth::user()->timezone()->first()->name;
432 432
                                    $date1->setTimezone(new DateTimeZone($tz));
Please login to merge, or discard this patch.
app/Http/Controllers/User/ClientController.php 2 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         $position = $request->input('position');
73 73
 
74 74
         $user = $this->advanceSearch($name, $username, $company,
75
-         $mobile, $email, $country, $industry, $company_type, $company_size, $role, $position);
75
+            $mobile, $email, $country, $industry, $company_type, $company_size, $role, $position);
76 76
 
77 77
         return\ DataTables::of($user->take(50)->get())
78 78
                         ->setTotalRecords($user->count())
@@ -84,18 +84,18 @@  discard block
 block discarded – undo
84 84
                             return '<a href='.url('clients/'.$model->id).'>'
85 85
                             .ucfirst($model->first_name).' '.ucfirst($model->last_name).'</a>';
86 86
                         })
87
-                         ->addColumn('email', function ($model) {
88
-                             return $model->email;
89
-                         })
90
-                          ->addColumn('created_at', function ($model) {
91
-                              $ends = $model->created_at;
92
-                              if ($ends) {
93
-                                  $date = date_create($ends);
94
-                                  $end = date_format($date, 'l, F j, Y H:m');
95
-                              }
96
-
97
-                              return $end;
98
-                          })
87
+                            ->addColumn('email', function ($model) {
88
+                                return $model->email;
89
+                            })
90
+                            ->addColumn('created_at', function ($model) {
91
+                                $ends = $model->created_at;
92
+                                if ($ends) {
93
+                                    $date = date_create($ends);
94
+                                    $end = date_format($date, 'l, F j, Y H:m');
95
+                                }
96
+
97
+                                return $end;
98
+                            })
99 99
                         // ->showColumns('email', 'created_at')
100 100
                         ->addColumn('active', function ($model) {
101 101
                             if ($model->active == 1) {
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 
195 195
             return view('themes.default1.user.client.show',
196 196
                 compact('id', 'client', 'invoices', 'model_popup', 'orders',
197
-                 'payments', 'invoiceSum', 'amountReceived', 'pendingAmount', 'currency'));
197
+                    'payments', 'invoiceSum', 'amountReceived', 'pendingAmount', 'currency'));
198 198
         } catch (\Exception $ex) {
199 199
             app('log')->useDailyFiles(storage_path().'/logs/laravel.log');
200 200
             app('log')->info($ex->getMessage());
@@ -373,8 +373,8 @@  discard block
 block discarded – undo
373 373
     }
374 374
 
375 375
     public function advanceSearch($name = '', $username = '', $company = '',
376
-     $mobile = '', $email = '', $country = '', $industry = '',
377
-      $company_type = '', $company_size = '', $role = '', $position = '')
376
+        $mobile = '', $email = '', $country = '', $industry = '',
377
+        $company_type = '', $company_size = '', $role = '', $position = '')
378 378
     {
379 379
         $join = new User();
380 380
         $join = $this->getNamUserCom($join, $name, $username, $company);
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
 
385 385
         $join = $join->orderBy('created_at', 'desc')
386 386
         ->select('id', 'first_name', 'last_name', 'email', 'created_at',
387
-         'active', 'mobile_verified', 'role', 'position');
387
+            'active', 'mobile_verified', 'role', 'position');
388 388
 
389 389
         return $join;
390 390
     }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -76,18 +76,18 @@  discard block
 block discarded – undo
76 76
 
77 77
         return\ DataTables::of($user->take(50)->get())
78 78
                         ->setTotalRecords($user->count())
79
-                        ->addColumn('checkbox', function ($model) {
79
+                        ->addColumn('checkbox', function($model) {
80 80
                             return "<input type='checkbox' class='user_checkbox' 
81 81
                             value=".$model->id.' name=select[] id=check>';
82 82
                         })
83
-                        ->addColumn('first_name', function ($model) {
83
+                        ->addColumn('first_name', function($model) {
84 84
                             return '<a href='.url('clients/'.$model->id).'>'
85 85
                             .ucfirst($model->first_name).' '.ucfirst($model->last_name).'</a>';
86 86
                         })
87
-                         ->addColumn('email', function ($model) {
87
+                         ->addColumn('email', function($model) {
88 88
                              return $model->email;
89 89
                          })
90
-                          ->addColumn('created_at', function ($model) {
90
+                          ->addColumn('created_at', function($model) {
91 91
                               $ends = $model->created_at;
92 92
                               if ($ends) {
93 93
                                   $date = date_create($ends);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                               return $end;
98 98
                           })
99 99
                         // ->showColumns('email', 'created_at')
100
-                        ->addColumn('active', function ($model) {
100
+                        ->addColumn('active', function($model) {
101 101
                             if ($model->active == 1) {
102 102
                                 $email = "<span class='glyphicon glyphicon-envelope'
103 103
                                  style='color:green' title='verified email'></span>";
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 
116 116
                             return $email.'&nbsp;&nbsp;'.$mobile;
117 117
                         })
118
-                        ->addColumn('action', function ($model) {
118
+                        ->addColumn('action', function($model) {
119 119
                             return '<a href='.url('clients/'.$model->id.'/edit')
120 120
                             ." class='btn btn-sm btn-primary btn-xs'>
121 121
                             <i class='fa fa-edit' style='color:white;'> </i>&nbsp;&nbsp;Edit</a>"
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
                                     <i class='fa fa-eye' style='color:white;'> </i>&nbsp;&nbsp;View</a>";
125 125
                             // return 'hhhh';
126 126
                         })
127
-                        ->rawColumns(['checkbox', 'first_name', 'email',  'created_at', 'active', 'action'])
127
+                        ->rawColumns(['checkbox', 'first_name', 'email', 'created_at', 'active', 'action'])
128 128
                         ->make(true);
129 129
 
130 130
         // ->searchColumns('email', 'first_name')
Please login to merge, or discard this patch.