Completed
Push — development ( 28d2c7...2c680e )
by Bhanu
30:20 queued 20:22
created
app/Model/Payment/PlanPrice.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,6 +33,6 @@
 block discarded – undo
33 33
         return '';
34 34
 
35 35
         // return "Product  has been {$eventName}";
36
-         // \Auth::user()->activity;
36
+            // \Auth::user()->activity;
37 37
     }
38 38
 }
Please login to merge, or discard this patch.
app/Model/Payment/TaxOption.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     protected $fillable = ['tax_enable', 'inclusive', 'shop_inclusive', 'cart_inclusive', 'rounding', 'Gst_no'];
13 13
     protected static $logName = 'Tax Class';
14 14
     protected static $logAttributes = ['tax_enable', 'inclusive',
15
-     'shop_inclusive', 'cart_inclusive', 'rounding', 'Gst_no', ];
15
+        'shop_inclusive', 'cart_inclusive', 'rounding', 'Gst_no', ];
16 16
     protected static $logOnlyDirty = true;
17 17
 
18 18
     public function getDescriptionForEvent(string $eventName): string
Please login to merge, or discard this patch.
app/Model/Product/Addon.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     protected $table = 'addons';
10 10
     protected $fillable = ['product', 'subscription', 'name',
11
-     'description', 'regular_price', 'selling_price', 'tax_addon',
11
+        'description', 'regular_price', 'selling_price', 'tax_addon',
12 12
         'show_on_order', 'auto_active_payment', 'suspend_parent', ];
13 13
 
14 14
     public function relation()
Please login to merge, or discard this patch.
app/Http/Controllers/Payment/PromotionController.php 2 patches
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.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
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>";
89 89
                         })
90
-                         ->rawColumns(['checkbox', 'code', 'products', 'action'])
90
+                            ->rawColumns(['checkbox', 'code', 'products', 'action'])
91 91
 
92 92
                         ->make(true);
93 93
     }
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
                 'price'      => $value,
284 284
                 'conditions' => $coupon,
285 285
 
286
-           // new item price, price can also be a string format like so: '98.67'
286
+            // new item price, price can also be a string format like so: '98.67'
287 287
                 ]);
288 288
                 \Session::put('usage', 1);
289 289
                 \Session::put('code', $promo->code);
Please login to merge, or discard this patch.
app/Http/Controllers/Payment/TaxController.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -70,37 +70,37 @@  discard block
 block discarded – undo
70 70
     public function getTax()
71 71
     {
72 72
         return \DataTables::of($this->tax->select('id', 'tax_classes_id', 'name', 'country', 'state', 'rate')->get())
73
-                            ->addColumn('checkbox', function ($model) {
73
+                            ->addColumn('checkbox', function($model) {
74 74
                                 return "<input type='checkbox' class='tax_checkbox' 
75 75
                                 value=".$model->id.' name=select[] id=check>';
76 76
                             })
77
-                            ->addColumn('tax_classes_id', function ($model) {
77
+                            ->addColumn('tax_classes_id', function($model) {
78 78
                                 return ucfirst($this->tax_class->where('id', $model->tax_classes_id)->first()->name);
79 79
                             })
80
-                            ->addColumn('name', function ($model) {
80
+                            ->addColumn('name', function($model) {
81 81
                                 return ucfirst($model->name);
82 82
                             })
83 83
 
84 84
                             // ->showColumns('name', 'level')
85
-                            ->addColumn('country', function ($model) {
85
+                            ->addColumn('country', function($model) {
86 86
                                 if ($this->country->where('country_code_char2', $model->country)->first()) {
87 87
                                     return ucfirst($this->country
88 88
                                       ->where('country_code_char2', $model->country)->first()->country_name);
89 89
                                 }
90 90
                             })
91
-                            ->addColumn('state', function ($model) {
91
+                            ->addColumn('state', function($model) {
92 92
                                 if ($this->state->where('state_subdivision_code', $model->state)->first()) {
93 93
                                     return $this->state
94 94
                                     ->where('state_subdivision_code', $model->state)
95 95
                                     ->first()->state_subdivision_name;
96 96
                                 }
97 97
                             })
98
-                            ->addColumn('rate', function ($model) {
98
+                            ->addColumn('rate', function($model) {
99 99
                                 return $model->rate;
100 100
                             })
101 101
 
102 102
                             // ->showColumns('rate')
103
-                            ->addColumn('action', function ($model) {
103
+                            ->addColumn('action', function($model) {
104 104
                                 return '<a href='.url('tax/'.$model->id.'/edit').
105 105
                                 " class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit' 
106 106
                                 style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
@@ -112,26 +112,26 @@  discard block
 block discarded – undo
112 112
     public function getTaxTable()
113 113
     {
114 114
         return \DataTables::of(TaxByState::select('id', 'state', 'c_gst', 's_gst', 'i_gst', 'ut_gst')->get())
115
-                         ->addColumn('id', function ($model) {
115
+                         ->addColumn('id', function($model) {
116 116
                              return $model->id;
117 117
                          })
118 118
 
119
-                         ->addColumn('state', function ($model) {
119
+                         ->addColumn('state', function($model) {
120 120
                              return ucfirst($model->state);
121 121
                          })
122
-                         ->addColumn('c_gst', function ($model) {
122
+                         ->addColumn('c_gst', function($model) {
123 123
                              return ucfirst($model->c_gst);
124 124
                          })
125
-                         ->addColumn('s_gst', function ($model) {
125
+                         ->addColumn('s_gst', function($model) {
126 126
                              return ucfirst($model->s_gst);
127 127
                          })
128
-                         ->addColumn('i_gst', function ($model) {
128
+                         ->addColumn('i_gst', function($model) {
129 129
                              return ucfirst($model->i_gst);
130 130
                          })
131
-                         ->addColumn('ut_gst', function ($model) {
131
+                         ->addColumn('ut_gst', function($model) {
132 132
                              return ucfirst($model->ut_gst);
133 133
                          })
134
-                          ->rawColumns(['id', 'state',  'c_gst', 's_gst', 'i_gst', 'ut_gst'])
134
+                          ->rawColumns(['id', 'state', 'c_gst', 's_gst', 'i_gst', 'ut_gst'])
135 135
                           ->make(true);
136 136
     }
137 137
 
Please login to merge, or discard this patch.
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                             ->addColumn('country', function ($model) {
86 86
                                 if ($this->country->where('country_code_char2', $model->country)->first()) {
87 87
                                     return ucfirst($this->country
88
-                                      ->where('country_code_char2', $model->country)->first()->country_name);
88
+                                        ->where('country_code_char2', $model->country)->first()->country_name);
89 89
                                 }
90 90
                             })
91 91
                             ->addColumn('state', function ($model) {
@@ -112,27 +112,27 @@  discard block
 block discarded – undo
112 112
     public function getTaxTable()
113 113
     {
114 114
         return \DataTables::of(TaxByState::select('id', 'state', 'c_gst', 's_gst', 'i_gst', 'ut_gst')->get())
115
-                         ->addColumn('id', function ($model) {
116
-                             return $model->id;
117
-                         })
118
-
119
-                         ->addColumn('state', function ($model) {
120
-                             return ucfirst($model->state);
121
-                         })
122
-                         ->addColumn('c_gst', function ($model) {
123
-                             return ucfirst($model->c_gst);
124
-                         })
125
-                         ->addColumn('s_gst', function ($model) {
126
-                             return ucfirst($model->s_gst);
127
-                         })
128
-                         ->addColumn('i_gst', function ($model) {
129
-                             return ucfirst($model->i_gst);
130
-                         })
131
-                         ->addColumn('ut_gst', function ($model) {
132
-                             return ucfirst($model->ut_gst);
133
-                         })
134
-                          ->rawColumns(['id', 'state',  'c_gst', 's_gst', 'i_gst', 'ut_gst'])
135
-                          ->make(true);
115
+                            ->addColumn('id', function ($model) {
116
+                                return $model->id;
117
+                            })
118
+
119
+                            ->addColumn('state', function ($model) {
120
+                                return ucfirst($model->state);
121
+                            })
122
+                            ->addColumn('c_gst', function ($model) {
123
+                                return ucfirst($model->c_gst);
124
+                            })
125
+                            ->addColumn('s_gst', function ($model) {
126
+                                return ucfirst($model->s_gst);
127
+                            })
128
+                            ->addColumn('i_gst', function ($model) {
129
+                                return ucfirst($model->i_gst);
130
+                            })
131
+                            ->addColumn('ut_gst', function ($model) {
132
+                                return ucfirst($model->ut_gst);
133
+                            })
134
+                            ->rawColumns(['id', 'state',  'c_gst', 's_gst', 'i_gst', 'ut_gst'])
135
+                            ->make(true);
136 136
     }
137 137
 
138 138
     /**
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
                                         ->withInput();
369 369
                 }
370 370
                 $this->tax_class->fill($request->except('tax-name', 'level',
371
-                  'active', 'country', 'country1', 'rate'))->save();
371
+                    'active', 'country', 'country1', 'rate'))->save();
372 372
                 $country = ($request->input('rate')) ? $request->input('country') : $request->input('country1');
373 373
 
374 374
                 $this->tax->fill($request->except('tax-name', 'name', 'country'))->save();
Please login to merge, or discard this patch.
app/Http/Controllers/Order/SubscriptionController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         //dd($this->invoice->get());
48 48
         return \Datatable::collection($this->subscription->get())
49 49
 
50
-                        ->addColumn('user_id', function ($model) {
50
+                        ->addColumn('user_id', function($model) {
51 51
                             $user = $model->user()->first();
52 52
                             $first = $user->first_name;
53 53
                             $last = $user->last_name;
@@ -55,18 +55,18 @@  discard block
 block discarded – undo
55 55
 
56 56
                             return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'</a>';
57 57
                         })
58
-                        ->addColumn('plan_id', function ($model) {
58
+                        ->addColumn('plan_id', function($model) {
59 59
                             $name = $this->plan->where('id', $model->plan_id)->first()->name;
60 60
 
61 61
                             return $name;
62 62
                         })
63
-                        ->addColumn('order_id', function ($model) {
63
+                        ->addColumn('order_id', function($model) {
64 64
                             $name = $this->order->where('id', $model->order_id)->first()->id;
65 65
 
66 66
                             return $name;
67 67
                         })
68 68
                         ->showColumns('ends_at')
69
-                        ->addColumn('action', function ($model) {
69
+                        ->addColumn('action', function($model) {
70 70
                             return '<a href='.url('subscriptions/'.$model->id)." 
71 71
                             class='btn btn-sm btn-primary'>View</a>";
72 72
                         })
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   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -129,12 +129,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 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) {
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
 
@@ -296,8 +296,8 @@  discard block
 block discarded – undo
296 296
 
297 297
             $symbol = $attributes[0]['currency']['symbol'];
298 298
             $invoice = $this->invoice->create(['user_id' => $user_id, 'number' => $number,
299
-             'date'                                      => $date, 'discount'=>$codevalue, 'grand_total' => $grand_total, 'coupon_code'=>$code, 'status' => 'pending',
300
-             'currency'                                  => \Auth::user()->currency, ]);
299
+                'date'                                      => $date, 'discount'=>$codevalue, 'grand_total' => $grand_total, 'coupon_code'=>$code, 'status' => 'pending',
300
+                'currency'                                  => \Auth::user()->currency, ]);
301 301
             foreach (\Cart::getContent() as $cart) {
302 302
                 $this->createInvoiceItems($invoice->id, $cart, $codevalue);
303 303
             }
@@ -420,11 +420,11 @@  discard block
 block discarded – undo
420 420
             $grand_total = \App\Http\Controllers\Front\CartController::rounding($grand_total);
421 421
 
422 422
             $invoice = Invoice::create(['user_id' => $user_id, 'number' => $number, 'date' => $date,
423
-             'coupon_code'                        => $code, 'discount'=>$codeValue,
423
+                'coupon_code'                        => $code, 'discount'=>$codeValue,
424 424
                 'grand_total'                     => $grand_total,  'currency'  => $currency, 'status' => $status, 'description' => $description, ]);
425 425
 
426 426
             $items = $this->createInvoiceItemsByAdmin($invoice->id, $productid,
427
-             $code, $total, $currency, $qty, $agents, $plan, $user_id, $tax_name, $tax_rate);
427
+                $code, $total, $currency, $qty, $agents, $plan, $user_id, $tax_name, $tax_rate);
428 428
             $result = $this->getMessage($items, $user_id);
429 429
         } catch (\Exception $ex) {
430 430
             app('log')->info($ex->getMessage());
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
                 } elseif ($this->tax_option->tax_enable == 0) {//if tax_enable is 0
501 501
 
502 502
                     $taxClassId = Tax::where('country', '')->where('state', 'Any State')
503
-                     ->pluck('tax_classes_id')->first(); //In case of India when
503
+                        ->pluck('tax_classes_id')->first(); //In case of India when
504 504
                     //other tax is available and tax is not enabled
505 505
                     if ($taxClassId) {
506 506
                         $rate = $this->getTotalRate($taxClassId, $productid, $taxs);
@@ -568,10 +568,10 @@  discard block
 block discarded – undo
568 568
         foreach ($taxes as $key => $tax) {
569 569
             if ($taxes[0]) {
570 570
                 $tax_attribute[$key] = ['name' => $tax->name, 'name1' => $name1,
571
-                 'name2'                       => $name2, 'name3' => $name3, 'name4' => $name4,
572
-                 'rate'                        => $value, 'rate1'=>$c_gst, 'rate2'=>$s_gst,
573
-                 'rate3'                       => $i_gst, 'rate4'=>$ut_gst, 'state'=>$state_code,
574
-                  'origin_state'               => $origin_state, ];
571
+                    'name2'                       => $name2, 'name3' => $name3, 'name4' => $name4,
572
+                    'rate'                        => $value, 'rate1'=>$c_gst, 'rate2'=>$s_gst,
573
+                    'rate3'                       => $i_gst, 'rate4'=>$ut_gst, 'state'=>$state_code,
574
+                    'origin_state'               => $origin_state, ];
575 575
 
576 576
                 $rate = $tax->rate;
577 577
 
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 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
                           })
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
 
422 422
             $invoice = Invoice::create(['user_id' => $user_id, 'number' => $number, 'date' => $date,
423 423
              'coupon_code'                        => $code, 'discount'=>$codeValue,
424
-                'grand_total'                     => $grand_total,  'currency'  => $currency, 'status' => $status, 'description' => $description, ]);
424
+                'grand_total'                     => $grand_total, 'currency'  => $currency, 'status' => $status, 'description' => $description, ]);
425 425
 
426 426
             $items = $this->createInvoiceItemsByAdmin($invoice->id, $productid,
427 427
              $code, $total, $currency, $qty, $agents, $plan, $user_id, $tax_name, $tax_rate);
Please login to merge, or discard this patch.
app/Http/Controllers/Product/BundleController.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,11 +48,11 @@  discard block
 block discarded – undo
48 48
     {
49 49
         return \Datatable::collection($this->bundle->select('id', 'name',
50 50
          'valid_from', 'valid_till', 'uses', 'maximum_uses')->get())
51
-                        ->addColumn('#', function ($model) {
51
+                        ->addColumn('#', function($model) {
52 52
                             return "<input type='checkbox' value=".$model->id.' name=select[] id=check>';
53 53
                         })
54 54
                         ->showColumns('name', 'valid_from', 'valid_till', 'uses', 'maximum_uses')
55
-                        ->addColumn('item', function ($model) {
55
+                        ->addColumn('item', function($model) {
56 56
                             $name = $this->relation->where('bundle_id', $model->id)->pluck('product_id');
57 57
                             //dd($name);
58 58
                             $result = [];
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
                             //dd($result);
63 63
                             return implode(',', $result);
64 64
                         })
65
-                        ->addColumn('action', function ($model) {
65
+                        ->addColumn('action', function($model) {
66 66
                             return '<a href='.url('bundles/'.$model->id.'/edit').
67 67
                             " class='btn btn-sm btn-primary'>Edit</a>";
68 68
                         })
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     public function getBundles()
48 48
     {
49 49
         return \Datatable::collection($this->bundle->select('id', 'name',
50
-         'valid_from', 'valid_till', 'uses', 'maximum_uses')->get())
50
+            'valid_from', 'valid_till', 'uses', 'maximum_uses')->get())
51 51
                         ->addColumn('#', function ($model) {
52 52
                             return "<input type='checkbox' value=".$model->id.' name=select[] id=check>';
53 53
                         })
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
             }
149 149
 
150 150
             return view('themes.default1.product.bundle.edit',
151
-             compact('products', 'bundle', 'relation', 'till', 'from'));
151
+                compact('products', 'bundle', 'relation', 'till', 'from'));
152 152
         } catch (\Exception $e) {
153 153
             return redirect()->back()->with('fails', $e->getMessage());
154 154
         } catch (\InvalidArgumentException $e) {
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
                 $from = null;
158 158
 
159 159
                 return view('themes.default1.product.bundle.edit',
160
-                 compact('products', 'bundle', 'relation', 'till', 'from'));
160
+                    compact('products', 'bundle', 'relation', 'till', 'from'));
161 161
             }
162 162
         }
163 163
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Product/ServiceController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,14 +35,14 @@
 block discarded – undo
35 35
     public function getServices()
36 36
     {
37 37
         return \Datatable::collection($this->service->get())
38
-                        ->addColumn('#', function ($model) {
38
+                        ->addColumn('#', function($model) {
39 39
                             return "<input type='checkbox' value=".$model->id.' name=select[] id=check>';
40 40
                         })
41 41
                         ->showColumns('name')
42
-                        ->addColumn('plan', function ($model) {
42
+                        ->addColumn('plan', function($model) {
43 43
                             //return $this->product->plan()->name;
44 44
                         })
45
-                        ->addColumn('action', function ($model) {
45
+                        ->addColumn('action', function($model) {
46 46
                             return '<a href='.url('products/'.$model->id.'/edit')
47 47
                             ." class='btn btn-sm btn-primary'>Edit</a>";
48 48
                         })
Please login to merge, or discard this patch.