Completed
Branch feature-dynamic-fields (9e5831)
by Ashutosh
13:15
created
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.
Spacing   +14 added lines, -14 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(100))
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);
@@ -171,25 +171,25 @@  discard block
 block discarded – undo
171 171
                             style='color:white;'> </i>&nbsp;&nbsp;View</a>"
172 172
                                     ."   $action";
173 173
                         })
174
-                         ->filterColumn('user_id', function ($query, $keyword) {
174
+                         ->filterColumn('user_id', function($query, $keyword) {
175 175
                              $sql = 'first_name like ?';
176 176
                              $query->whereRaw($sql, ["%{$keyword}%"]);
177 177
                          })
178 178
 
179
-                          ->filterColumn('status', function ($query, $keyword) {
179
+                          ->filterColumn('status', function($query, $keyword) {
180 180
                               $sql = 'status like ?';
181 181
                               $query->whereRaw($sql, ["%{$keyword}%"]);
182 182
                           })
183 183
 
184
-                        ->filterColumn('number', function ($query, $keyword) {
184
+                        ->filterColumn('number', function($query, $keyword) {
185 185
                             $sql = 'number like ?';
186 186
                             $query->whereRaw($sql, ["%{$keyword}%"]);
187 187
                         })
188
-                         ->filterColumn('grand_total', function ($query, $keyword) {
188
+                         ->filterColumn('grand_total', function($query, $keyword) {
189 189
                              $sql = 'grand_total like ?';
190 190
                              $query->whereRaw($sql, ["%{$keyword}%"]);
191 191
                          })
192
-                          ->filterColumn('date', function ($query, $keyword) {
192
+                          ->filterColumn('date', function($query, $keyword) {
193 193
                               $sql = 'date like ?';
194 194
                               $query->whereRaw($sql, ["%{$keyword}%"]);
195 195
                           })
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
         $join = $join->select('id', 'user_id', 'number', 'date', 'grand_total', 'currency', 'status', 'created_at');
235 235
 
236 236
         $join = $join->orderBy('created_at', 'desc')
237
-         ->select('invoices.id','first_name','invoices.created_at',
237
+         ->select('invoices.id', 'first_name', 'invoices.created_at',
238 238
             'invoices.currency', 'user_id', 'number', 'status');
239 239
 
240 240
         return $join;
Please login to merge, or discard this patch.
Indentation   +44 added lines, -44 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(100))
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 = '';
@@ -171,30 +171,30 @@  discard block
 block discarded – undo
171 171
                             style='color:white;'> </i>&nbsp;&nbsp;View</a>"
172 172
                                     ."   $action";
173 173
                         })
174
-                         ->filterColumn('user_id', function ($query, $keyword) {
175
-                             $sql = 'first_name like ?';
176
-                             $query->whereRaw($sql, ["%{$keyword}%"]);
177
-                         })
174
+                            ->filterColumn('user_id', function ($query, $keyword) {
175
+                                $sql = 'first_name like ?';
176
+                                $query->whereRaw($sql, ["%{$keyword}%"]);
177
+                            })
178 178
 
179
-                          ->filterColumn('status', function ($query, $keyword) {
180
-                              $sql = 'status like ?';
181
-                              $query->whereRaw($sql, ["%{$keyword}%"]);
182
-                          })
179
+                            ->filterColumn('status', function ($query, $keyword) {
180
+                                $sql = 'status like ?';
181
+                                $query->whereRaw($sql, ["%{$keyword}%"]);
182
+                            })
183 183
 
184 184
                         ->filterColumn('number', function ($query, $keyword) {
185 185
                             $sql = 'number like ?';
186 186
                             $query->whereRaw($sql, ["%{$keyword}%"]);
187 187
                         })
188
-                         ->filterColumn('grand_total', function ($query, $keyword) {
189
-                             $sql = 'grand_total like ?';
190
-                             $query->whereRaw($sql, ["%{$keyword}%"]);
191
-                         })
192
-                          ->filterColumn('date', function ($query, $keyword) {
193
-                              $sql = 'date like ?';
194
-                              $query->whereRaw($sql, ["%{$keyword}%"]);
195
-                          })
196
-
197
-                         ->rawColumns(['checkbox', 'user_id', 'number', 'date', 'grand_total', 'status', 'action'])
188
+                            ->filterColumn('grand_total', function ($query, $keyword) {
189
+                                $sql = 'grand_total like ?';
190
+                                $query->whereRaw($sql, ["%{$keyword}%"]);
191
+                            })
192
+                            ->filterColumn('date', function ($query, $keyword) {
193
+                                $sql = 'date like ?';
194
+                                $query->whereRaw($sql, ["%{$keyword}%"]);
195
+                            })
196
+
197
+                            ->rawColumns(['checkbox', 'user_id', 'number', 'date', 'grand_total', 'status', 'action'])
198 198
                         ->make(true);
199 199
     }
200 200
 
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
         $join = $join->select('id', 'user_id', 'number', 'date', 'grand_total', 'currency', 'status', 'created_at');
235 235
 
236 236
         $join = $join->orderBy('created_at', 'desc')
237
-         ->select('invoices.id','first_name','invoices.created_at',
237
+            ->select('invoices.id','first_name','invoices.created_at',
238 238
             'invoices.currency', 'user_id', 'number', 'status');
239 239
 
240 240
         return $join;
@@ -422,8 +422,8 @@  discard block
 block discarded – undo
422 422
             }
423 423
             $symbol = $attributes[0]['currency']['symbol'];
424 424
             $invoice = $this->invoice->create(['user_id' => $user_id, 'number' => $number,
425
-             'date'                                      => $date, 'grand_total' => $grand_total, 'status' => 'pending',
426
-             'currency'                                  => $symbol, ]);
425
+                'date'                                      => $date, 'grand_total' => $grand_total, 'status' => 'pending',
426
+                'currency'                                  => $symbol, ]);
427 427
             foreach (\Cart::getContent() as $cart) {
428 428
                 $this->createInvoiceItems($invoice->id, $cart);
429 429
             }
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
                 'currency'                        => $currency, 'status' => 'pending', 'description' => $description, ]);
532 532
 
533 533
             $items = $this->createInvoiceItemsByAdmin($invoice->id, $productid,
534
-             $code, $total, $currency, $qty, $plan, $user_id, $tax_name, $tax_rate);
534
+                $code, $total, $currency, $qty, $plan, $user_id, $tax_name, $tax_rate);
535 535
             $result = $this->getMessage($items, $user_id);
536 536
         } catch (\Exception $ex) {
537 537
             dd($ex);
@@ -683,7 +683,7 @@  discard block
 block discarded – undo
683 683
                 } elseif ($this->tax_option->tax_enable == 0) {//if tax_enable is 0
684 684
 
685 685
                     $taxClassId = Tax::where('country', '')->where('state', 'Any State')
686
-                     ->pluck('tax_classes_id')->first(); //In case of India when
686
+                        ->pluck('tax_classes_id')->first(); //In case of India when
687 687
                     //other tax is available and tax is not enabled
688 688
                     if ($taxClassId) {
689 689
                         $rate = $this->getTotalRate($taxClassId, $productid, $taxs);
@@ -751,10 +751,10 @@  discard block
 block discarded – undo
751 751
         foreach ($taxes as $key => $tax) {
752 752
             if ($taxes[0]) {
753 753
                 $tax_attribute[$key] = ['name' => $tax->name, 'name1' => $name1,
754
-                 'name2'                       => $name2, 'name3' => $name3, 'name4' => $name4,
755
-                 'rate'                        => $value, 'rate1'=>$c_gst, 'rate2'=>$s_gst,
756
-                 'rate3'                       => $i_gst, 'rate4'=>$ut_gst, 'state'=>$state_code,
757
-                  'origin_state'               => $origin_state, ];
754
+                    'name2'                       => $name2, 'name3' => $name3, 'name4' => $name4,
755
+                    'rate'                        => $value, 'rate1'=>$c_gst, 'rate2'=>$s_gst,
756
+                    'rate3'                       => $i_gst, 'rate4'=>$ut_gst, 'state'=>$state_code,
757
+                    'origin_state'               => $origin_state, ];
758 758
 
759 759
                 $rate = $tax->rate;
760 760
 
@@ -964,8 +964,8 @@  discard block
 block discarded – undo
964 964
                 }
965 965
 
966 966
                 return view('themes.default1.invoice.payment',
967
-                 compact('invoice_status', 'payment_status',
968
-                  'payment_method', 'invoice_id', 'domain', 'invoice', 'userid'));
967
+                    compact('invoice_status', 'payment_status',
968
+                    'payment_method', 'invoice_id', 'domain', 'invoice', 'userid'));
969 969
             }
970 970
 
971 971
             return redirect()->back();
@@ -1004,7 +1004,7 @@  discard block
 block discarded – undo
1004 1004
                 case 1:
1005 1005
                     $percentage = $price * ($value / 100);
1006 1006
 
1007
-                     return $price - $percentage;
1007
+                        return $price - $percentage;
1008 1008
                 case 2:
1009 1009
                     return $price - $value;
1010 1010
                 case 3:
@@ -1036,7 +1036,7 @@  discard block
 block discarded – undo
1036 1036
             $payment_date = \Carbon\Carbon::now()->toDateTimeString();
1037 1037
             $amount = $grand_total;
1038 1038
             $paymentRenewal = $this->updateInvoicePayment($invoiceid, $payment_method,
1039
-             $payment_status, $payment_date, $amount);
1039
+                $payment_status, $payment_date, $amount);
1040 1040
 
1041 1041
             return redirect()->back()->with('success', 'Payment Accepted Successfully');
1042 1042
         } catch (\Exception $ex) {
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/GroupController.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
 
53 53
         // return \Datatable::of($this->group->select('id', 'name')->get())
54 54
 
55
-                        ->editColumn('#', function ($model) {
55
+                        ->editColumn('#', function($model) {
56 56
                             return "<input type='checkbox' value=".$model->id.' name=select[] id=check>';
57 57
                         })
58 58
                         // ->showColumns('name')
59
-                        ->editColumn('features', function ($model) {
59
+                        ->editColumn('features', function($model) {
60 60
                             $features = $this->feature->select('features')->where('group_id', $model->id)->get();
61 61
                             //dd($features);
62 62
                             $result = [];
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
                             //dd($result);
68 68
                             return implode(',', $result);
69 69
                         })
70
-                        ->addColumn('action', function ($model) {
70
+                        ->addColumn('action', function($model) {
71 71
                             return '<a href='.url('groups/'.$model->id.'/edit').
72 72
                             " class='btn btn-sm btn-primary'>Edit</a>";
73 73
                         })
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                             return '<a href='.url('groups/'.$model->id.'/edit').
73 73
                             " class='btn btn-sm btn-primary'>Edit</a>";
74 74
                         })
75
-                      ->rawColumns(['name', 'features', 'action'])
75
+                        ->rawColumns(['name', 'features', 'action'])
76 76
                         ->make(true);
77 77
     }
78 78
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             'pricing_templates_id' => 'required',
107 107
             ], [
108 108
                 'pricing_templates_id.required'=> 'Please Select a Template',
109
-          ]);
109
+            ]);
110 110
 
111 111
         try {
112 112
             $this->group->fill($request->input())->save();
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.
app/Model/Common/State.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,6 +13,6 @@
 block discarded – undo
13 13
         'state_subdivision_id', 'country_code_char2',
14 14
         'country_code_char3', 'state_subdivision_name',
15 15
         'state_subdivision_alternate_names', 'primary_level_name',
16
-         'state_subdivision_code',
16
+            'state_subdivision_code',
17 17
     ];
18 18
 }
Please login to merge, or discard this patch.
app/Console/Commands/Install.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
             $dbpassword = $this->ask('Enter your database password (blank if not entered)', false);
49 49
             $port = $this->ask('Enter your sql port (blank if not entered)', false);
50 50
             $array = ['DB_TYPE' => $default, 'DB_HOST' => $host,
51
-             'DB_DATABASE'      => $database, 'DB_USERNAME' => $dbusername, 'DB_PASSWORD' => $dbpassword, ];
51
+                'DB_DATABASE'      => $database, 'DB_USERNAME' => $dbusername, 'DB_PASSWORD' => $dbpassword, ];
52 52
             $this->updateDBEnv($array);
53 53
             $this->call('key:generate');
54 54
             $this->call('migrate');
Please login to merge, or discard this patch.
app/Http/Controllers/Common/SocialMediaController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -35,20 +35,20 @@
 block discarded – undo
35 35
             $social = $this->social->get();
36 36
 
37 37
             return \DataTables::of($social)
38
-                            ->addColumn('#', function ($model) {
38
+                            ->addColumn('#', function($model) {
39 39
                                 return "<input type='checkbox' value=".$model->id.' name=select[] id=check>';
40 40
                             })
41
-                            ->addColumn('name', function ($model) {
41
+                            ->addColumn('name', function($model) {
42 42
                                 return $model->name;
43 43
                             })
44
-                            ->addColumn('class', function ($model) {
44
+                            ->addColumn('class', function($model) {
45 45
                                 return $model->class;
46 46
                             })
47
-                            ->addColumn('link', function ($model) {
47
+                            ->addColumn('link', function($model) {
48 48
                                 return $model->link;
49 49
                             })
50 50
                             // ->showColumns('name', 'class', 'link')
51
-                            ->addColumn('action', function ($model) {
51
+                            ->addColumn('action', function($model) {
52 52
                                 return '<a href='.url('social-media/'.$model->id.'/edit')
53 53
                                 ." class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit'
54 54
                                  style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
Please login to merge, or discard this patch.