Completed
Push — development ( 3f3e53...8b03af )
by Ashutosh
11:48
created
app/Http/Controllers/Front/PageController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
                                  style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
78 78
                         })
79 79
 
80
-                          ->rawColumns(['checkbox', 'name', 'url',  'created_at', 'action'])
80
+                            ->rawColumns(['checkbox', 'name', 'url',  'created_at', 'action'])
81 81
                         ->make(true);
82 82
         // ->searchColumns('name', 'content')
83 83
                         // ->orderColumns('name')
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -49,17 +49,17 @@  discard block
 block discarded – undo
49 49
     public function getPages()
50 50
     {
51 51
         return \DataTables::of($this->page->get())
52
-                        ->addColumn('checkbox', function ($model) {
52
+                        ->addColumn('checkbox', function($model) {
53 53
                             return "<input type='checkbox' class='page_checkbox' 
54 54
                             value=".$model->id.' name=select[] id=check>';
55 55
                         })
56
-                        ->addColumn('name', function ($model) {
56
+                        ->addColumn('name', function($model) {
57 57
                             return ucfirst($model->name);
58 58
                         })
59
-                        ->addColumn('url', function ($model) {
59
+                        ->addColumn('url', function($model) {
60 60
                             return $model->url;
61 61
                         })
62
-                        ->addColumn('created_at', function ($model) {
62
+                        ->addColumn('created_at', function($model) {
63 63
                             $created = $model->created_at;
64 64
                             if ($created) {
65 65
                                 $date1 = new \DateTime($created);
@@ -71,13 +71,13 @@  discard block
 block discarded – undo
71 71
                             return $createdate;
72 72
                         })
73 73
 
74
-                        ->addColumn('action', function ($model) {
74
+                        ->addColumn('action', function($model) {
75 75
                             return '<a href='.url('pages/'.$model->id.'/edit')
76 76
                             ." class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit'
77 77
                                  style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
78 78
                         })
79 79
 
80
-                          ->rawColumns(['checkbox', 'name', 'url',  'created_at', 'action'])
80
+                          ->rawColumns(['checkbox', 'name', 'url', 'created_at', 'action'])
81 81
                         ->make(true);
82 82
         // ->searchColumns('name', 'content')
83 83
                         // ->orderColumns('name')
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
             $selectedParent = $this->page->where('id', $id)->pluck('parent_page_id')->toArray();
110 110
             $parentName = $this->page->where('id', $selectedParent)->pluck('name', 'id')->toArray();
111 111
 
112
-            return view('themes.default1.front.page.edit', compact('parents', 'page', 'default', 'selectedDefault', 'publishingDate','selectedParent',
112
+            return view('themes.default1.front.page.edit', compact('parents', 'page', 'default', 'selectedDefault', 'publishingDate', 'selectedParent',
113 113
                 'parentName'));
114 114
         } catch (\Exception $ex) {
115 115
             return redirect()->back()->with('fails', $ex->getMessage());
Please login to merge, or discard this patch.
app/Http/Controllers/Order/ExtendedOrderController.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -49,16 +49,16 @@  discard block
 block discarded – undo
49 49
             $this->domain($domain, $join);
50 50
 
51 51
             $join = $join->orderBy('created_at', 'desc')
52
-           ->select(
53
-               'orders.id',
54
-               'orders.created_at',
55
-               'client',
56
-               'price_override',
57
-               'order_status',
58
-               'product',
59
-               'number',
60
-               'serial_key'
61
-           );
52
+            ->select(
53
+                'orders.id',
54
+                'orders.created_at',
55
+                'client',
56
+                'price_override',
57
+                'order_status',
58
+                'product',
59
+                'number',
60
+                'serial_key'
61
+            );
62 62
 
63 63
             return $join;
64 64
         } catch (\Exception $ex) {
@@ -268,17 +268,17 @@  discard block
 block discarded – undo
268 268
                 case '1':
269 269
                    $lastFour = '000'.$agents;
270 270
                     break;
271
-                   case '2':
271
+                    case '2':
272 272
 
273 273
                     $lastFour = '00'.$agents;
274
-                     break;
275
-                      case '3':
274
+                        break;
275
+                        case '3':
276 276
                     $lastFour = '0'.$agents;
277
-                     break;
278
-                      case '4':
277
+                        break;
278
+                        case '4':
279 279
                     $lastFour = $agents;
280 280
 
281
-                     break;
281
+                        break;
282 282
                 default:
283 283
                     $lastFour = '0000';
284 284
                     break;
Please login to merge, or discard this patch.
app/Http/Controllers/Product/ProductController.php 3 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -125,10 +125,10 @@  discard block
 block discarded – undo
125 125
                             ->addColumn('name', function ($model) {
126 126
                                 return ucfirst($model->name);
127 127
                             })
128
-                              ->addColumn('image', function ($model) {
129
-                                  // return $model->image;
130
-                                  return "<img src= '$model->image' + height=\"80\"/>";
131
-                              })
128
+                                ->addColumn('image', function ($model) {
129
+                                    // return $model->image;
130
+                                    return "<img src= '$model->image' + height=\"80\"/>";
131
+                                })
132 132
                             ->addColumn('type', function ($model) {
133 133
                                 if ($this->type->where('id', $model->type)->first()) {
134 134
                                     return $this->type->where('id', $model->type)->first()->name;
@@ -173,11 +173,11 @@  discard block
 block discarded – undo
173 173
         $this->validate(
174 174
             $request,
175 175
             [
176
-       'producttitle'  => 'required',
176
+        'producttitle'  => 'required',
177 177
         'version'      => 'required',
178
-       'filename'      => 'required',
179
-       ],
180
-       ['filename.required' => 'Please Uplaod A file',
178
+        'filename'      => 'required',
179
+        ],
180
+        ['filename.required' => 'Please Uplaod A file',
181 181
         ]
182 182
         );
183 183
 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -118,25 +118,25 @@  discard block
 block discarded – undo
118 118
 
119 119
             return\ DataTables::of($new_product)
120 120
 
121
-                            ->addColumn('checkbox', function ($model) {
121
+                            ->addColumn('checkbox', function($model) {
122 122
                                 return "<input type='checkbox' class='product_checkbox' 
123 123
                                 value=".$model->id.' name=select[] id=check>';
124 124
                             })
125
-                            ->addColumn('name', function ($model) {
125
+                            ->addColumn('name', function($model) {
126 126
                                 return ucfirst($model->name);
127 127
                             })
128
-                              ->addColumn('image', function ($model) {
128
+                              ->addColumn('image', function($model) {
129 129
                                   // return $model->image;
130 130
                                   return "<img src= '$model->image' + height=\"80\"/>";
131 131
                               })
132
-                            ->addColumn('type', function ($model) {
132
+                            ->addColumn('type', function($model) {
133 133
                                 if ($this->type->where('id', $model->type)->first()) {
134 134
                                     return $this->type->where('id', $model->type)->first()->name;
135 135
                                 } else {
136 136
                                     return 'Not available';
137 137
                                 }
138 138
                             })
139
-                            ->addColumn('group', function ($model) {
139
+                            ->addColumn('group', function($model) {
140 140
                                 if ($this->group->where('id', $model->group)->first()) {
141 141
                                     return $this->group->where('id', $model->group)->first()->name;
142 142
                                 } else {
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                                 }
145 145
                             })
146 146
 
147
-                            ->addColumn('Action', function ($model) {
147
+                            ->addColumn('Action', function($model) {
148 148
                                 $permissions = LicensePermissionsController::getPermissionsForProduct($model->id);
149 149
                                 $url = '';
150 150
                                 if ($permissions['downloadPermission'] == 1) {
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -193,7 +193,8 @@  discard block
 block discarded – undo
193 193
             $this->product_upload->save();
194 194
             $this->product->where('id', $product_id->id)->update(['version'=>$request->input('version')]);
195 195
             $autoUpdateStatus = StatusSetting::pluck('update_settings')->first();
196
-            if ($autoUpdateStatus == 1) { //If License Setting Status is on,Add Product to the License Manager
196
+            if ($autoUpdateStatus == 1) {
197
+//If License Setting Status is on,Add Product to the License Manager
197 198
                 $updateClassObj = new \App\Http\Controllers\AutoUpdate\AutoUpdateController();
198 199
                 $addProductToAutoUpdate = $updateClassObj->addNewVersion($product_id->id, $request->input('version'), $request->input('filename'), '1');
199 200
             }
@@ -284,7 +285,8 @@  discard block
 block discarded – undo
284 285
 
285 286
         try {
286 287
             $licenseStatus = StatusSetting::pluck('license_status')->first();
287
-            if ($licenseStatus == 1) { //If License Setting Status is on,Add Product to the License Manager
288
+            if ($licenseStatus == 1) {
289
+//If License Setting Status is on,Add Product to the License Manager
288 290
                 $addProductToLicensing = $this->licensing->addNewProduct($input['name'], $input['product_sku']);
289 291
             }
290 292
             $updateCont = new \App\Http\Controllers\AutoUpdate\AutoUpdateController();
Please login to merge, or discard this patch.
app/Http/Controllers/User/AdminOrderInvoiceController.php 2 patches
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -32,32 +32,32 @@  discard block
 block discarded – undo
32 32
                         ->addColumn('total', function ($model) use ($client) {
33 33
                             return currency_format($model->grand_total, $code = $client->currency);
34 34
                         })
35
-                         ->addColumn('paid', function ($model) use ($client) {
36
-                             $payment = \App\Model\Order\Payment::where('invoice_id', $model->id)->select('amount')->get();
37
-                             $c = count($payment);
38
-                             $sum = 0;
39
-
40
-                             for ($i = 0; $i <= $c - 1; $i++) {
41
-                                 $sum = $sum + $payment[$i]->amount;
42
-                             }
43
-
44
-                             return currency_format($sum, $code = $client->currency);
45
-                         })
46
-                         ->addColumn('balance', function ($model) use ($client) {
47
-                             $payment = \App\Model\Order\Payment::where('invoice_id', $model->id)->select('amount')->get();
48
-                             $c = count($payment);
49
-                             $sum = 0;
50
-
51
-                             for ($i = 0; $i <= $c - 1; $i++) {
52
-                                 $sum = $sum + $payment[$i]->amount;
53
-                             }
54
-                             $pendingAmount = ($model->grand_total) - ($sum);
55
-
56
-                             return currency_format($pendingAmount, $code = $client->currency);
57
-                         })
58
-                          ->addColumn('status', function ($model) {
59
-                              return $model->status;
60
-                          })
35
+                            ->addColumn('paid', function ($model) use ($client) {
36
+                                $payment = \App\Model\Order\Payment::where('invoice_id', $model->id)->select('amount')->get();
37
+                                $c = count($payment);
38
+                                $sum = 0;
39
+
40
+                                for ($i = 0; $i <= $c - 1; $i++) {
41
+                                    $sum = $sum + $payment[$i]->amount;
42
+                                }
43
+
44
+                                return currency_format($sum, $code = $client->currency);
45
+                            })
46
+                            ->addColumn('balance', function ($model) use ($client) {
47
+                                $payment = \App\Model\Order\Payment::where('invoice_id', $model->id)->select('amount')->get();
48
+                                $c = count($payment);
49
+                                $sum = 0;
50
+
51
+                                for ($i = 0; $i <= $c - 1; $i++) {
52
+                                    $sum = $sum + $payment[$i]->amount;
53
+                                }
54
+                                $pendingAmount = ($model->grand_total) - ($sum);
55
+
56
+                                return currency_format($pendingAmount, $code = $client->currency);
57
+                            })
58
+                            ->addColumn('status', function ($model) {
59
+                                return $model->status;
60
+                            })
61 61
                         ->addColumn('action', function ($model) {
62 62
                             $action = '';
63 63
                             $cont = new \App\Http\Controllers\Order\TaxRatesAndCodeExpiryController();
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                             style='color:white;'> </i>&nbsp;&nbsp;View</a>"
79 79
                                     ."   $editAction $action";
80 80
                         })
81
-                         ->rawColumns(['checkbox', 'date', 'invoice_no', 'total', 'paid', 'balance', 'status', 'action'])
81
+                            ->rawColumns(['checkbox', 'date', 'invoice_no', 'total', 'paid', 'balance', 'status', 'action'])
82 82
                         ->make(true);
83 83
     }
84 84
 
@@ -106,16 +106,16 @@  discard block
 block discarded – undo
106 106
 
107 107
                             return $number;
108 108
                         })
109
-                         ->addColumn('total', function ($model) use ($client) {
110
-                             $price = currency_format($model->price_override, $code = $client->currency);
109
+                            ->addColumn('total', function ($model) use ($client) {
110
+                                $price = currency_format($model->price_override, $code = $client->currency);
111 111
 
112
-                             return $price;
113
-                         })
114
-                         ->addColumn('status', function ($model) {
115
-                             $status = $model->order_status;
112
+                                return $price;
113
+                            })
114
+                            ->addColumn('status', function ($model) {
115
+                                $status = $model->order_status;
116 116
 
117
-                             return $status;
118
-                         })
117
+                                return $status;
118
+                            })
119 119
                         ->addColumn('action', function ($model) {
120 120
                             return '<a href='.url('orders/'.$model->id)." 
121 121
                             class='btn btn-sm btn-primary btn-xs'><i class='fa fa-eye' 
@@ -151,27 +151,27 @@  discard block
 block discarded – undo
151 151
                             return $model->payment_method;
152 152
                         })
153 153
 
154
-                         ->addColumn('total', function ($model) use ($client, $extraAmt) {
155
-                             if ($model->invoice_id == 0) {
156
-                                 $amount = currency_format($extraAmt, $code = $client->currency);
157
-                             } else {
158
-                                 $amount = currency_format($model->amount, $code = $client->currency);
159
-                             }
160
-
161
-                             return $amount;
162
-                         })
163
-                         ->addColumn('status', function ($model) {
164
-                             return ucfirst($model->payment_status);
165
-                         })
166
-
167
-                         ->addColumn('action', function ($model) {
168
-                             '<input type="hidden" class="paymentid" value="{{$model->id}}">';
169
-                             if ($model->invoice_id == 0) {
170
-                                 return '<a href='.url('payments/'.$model->id.'/edit/')." class='btn btn-sm btn-primary btn-xs'> <i class='fa fa-edit' style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
171
-                             } else {
172
-                                 return '--';
173
-                             }
174
-                         })
154
+                            ->addColumn('total', function ($model) use ($client, $extraAmt) {
155
+                                if ($model->invoice_id == 0) {
156
+                                    $amount = currency_format($extraAmt, $code = $client->currency);
157
+                                } else {
158
+                                    $amount = currency_format($model->amount, $code = $client->currency);
159
+                                }
160
+
161
+                                return $amount;
162
+                            })
163
+                            ->addColumn('status', function ($model) {
164
+                                return ucfirst($model->payment_status);
165
+                            })
166
+
167
+                            ->addColumn('action', function ($model) {
168
+                                '<input type="hidden" class="paymentid" value="{{$model->id}}">';
169
+                                if ($model->invoice_id == 0) {
170
+                                    return '<a href='.url('payments/'.$model->id.'/edit/')." class='btn btn-sm btn-primary btn-xs'> <i class='fa fa-edit' style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
171
+                                } else {
172
+                                    return '--';
173
+                                }
174
+                            })
175 175
 
176 176
                         ->rawColumns(['checkbox', 'invoice_no', 'date', 'payment_method', 'total', 'status', 'action'])
177 177
 
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -14,11 +14,11 @@  discard block
 block discarded – undo
14 14
         $invoices = $invoice->where('user_id', $id)->orderBy('created_at', 'desc')->get();
15 15
 
16 16
         return\ DataTables::of($invoices)
17
-                        ->addColumn('checkbox', function ($model) {
17
+                        ->addColumn('checkbox', function($model) {
18 18
                             return "<input type='checkbox' class='invoice_checkbox' 
19 19
                             value=".$model->id.' name=select[] id=check>';
20 20
                         })
21
-                        ->addColumn('date', function ($model) use ($client) {
21
+                        ->addColumn('date', function($model) use ($client) {
22 22
                             $date1 = new \DateTime($model->date);
23 23
                             $tz = \Auth::user()->timezone()->first()->name;
24 24
                             $date1->setTimezone(new \DateTimeZone($tz));
@@ -26,13 +26,13 @@  discard block
 block discarded – undo
26 26
 
27 27
                             return $date;
28 28
                         })
29
-                        ->addColumn('invoice_no', function ($model) {
29
+                        ->addColumn('invoice_no', function($model) {
30 30
                             return      '<a href='.url('invoices/show?invoiceid='.$model->id).'>'.$model->number.'</a>';
31 31
                         })
32
-                        ->addColumn('total', function ($model) use ($client) {
32
+                        ->addColumn('total', function($model) use ($client) {
33 33
                             return currency_format($model->grand_total, $code = $client->currency);
34 34
                         })
35
-                         ->addColumn('paid', function ($model) use ($client) {
35
+                         ->addColumn('paid', function($model) use ($client) {
36 36
                              $payment = \App\Model\Order\Payment::where('invoice_id', $model->id)->select('amount')->get();
37 37
                              $c = count($payment);
38 38
                              $sum = 0;
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
                              return currency_format($sum, $code = $client->currency);
45 45
                          })
46
-                         ->addColumn('balance', function ($model) use ($client) {
46
+                         ->addColumn('balance', function($model) use ($client) {
47 47
                              $payment = \App\Model\Order\Payment::where('invoice_id', $model->id)->select('amount')->get();
48 48
                              $c = count($payment);
49 49
                              $sum = 0;
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
 
56 56
                              return currency_format($pendingAmount, $code = $client->currency);
57 57
                          })
58
-                          ->addColumn('status', function ($model) {
58
+                          ->addColumn('status', function($model) {
59 59
                               return $model->status;
60 60
                           })
61
-                        ->addColumn('action', function ($model) {
61
+                        ->addColumn('action', function($model) {
62 62
                             $action = '';
63 63
                             $cont = new \App\Http\Controllers\Order\TaxRatesAndCodeExpiryController();
64 64
                             $check = $cont->checkExecution($model->id);
@@ -88,35 +88,35 @@  discard block
 block discarded – undo
88 88
         $order = $client->order()->orderBy('created_at', 'desc')->get();
89 89
 
90 90
         return\ DataTables::of($order)
91
-                        ->addColumn('checkbox', function ($model) {
91
+                        ->addColumn('checkbox', function($model) {
92 92
                             return "<input type='checkbox' class='order_checkbox' 
93 93
                             value=".$model->id.' name=select[] id=checkorder>';
94 94
                         })
95
-                        ->addColumn('date', function ($model) {
95
+                        ->addColumn('date', function($model) {
96 96
                             return ucfirst($model->created_at);
97 97
                         })
98
-                        ->addColumn('product', function ($model) {
98
+                        ->addColumn('product', function($model) {
99 99
                             $productName = $model->product()->first() && $model->product()->first()->name ?
100 100
                             $model->product()->first()->name : 'Unknown';
101 101
 
102 102
                             return $productName;
103 103
                         })
104
-                        ->addColumn('number', function ($model) {
104
+                        ->addColumn('number', function($model) {
105 105
                             $number = $model->number;
106 106
 
107 107
                             return $number;
108 108
                         })
109
-                         ->addColumn('total', function ($model) use ($client) {
109
+                         ->addColumn('total', function($model) use ($client) {
110 110
                              $price = currency_format($model->price_override, $code = $client->currency);
111 111
 
112 112
                              return $price;
113 113
                          })
114
-                         ->addColumn('status', function ($model) {
114
+                         ->addColumn('status', function($model) {
115 115
                              $status = $model->order_status;
116 116
 
117 117
                              return $status;
118 118
                          })
119
-                        ->addColumn('action', function ($model) {
119
+                        ->addColumn('action', function($model) {
120 120
                             return '<a href='.url('orders/'.$model->id)." 
121 121
                             class='btn btn-sm btn-primary btn-xs'><i class='fa fa-eye' 
122 122
                             style='color:white;'> </i>&nbsp;&nbsp;View</a>";
@@ -133,25 +133,25 @@  discard block
 block discarded – undo
133 133
         $extraAmt = $this->getExtraAmtPaid($id);
134 134
 
135 135
         return\ DataTables::of($payments)
136
-                        ->addColumn('checkbox', function ($model) {
136
+                        ->addColumn('checkbox', function($model) {
137 137
                             return "<input type='checkbox' class='payment_checkbox' 
138 138
                             value=".$model->id.' name=select[] id=checkpayment>';
139 139
                         })
140
-                        ->addColumn('invoice_no', function ($model) {
140
+                        ->addColumn('invoice_no', function($model) {
141 141
                             return $model->invoice()->first() ? $model->invoice()->first()->number : '--';
142 142
                         })
143
-                        ->addColumn('date', function ($model) {
143
+                        ->addColumn('date', function($model) {
144 144
                             $date = $model->created_at;
145 145
                             $date1 = new \DateTime($date);
146 146
                             $date = $date1->format('M j, Y, g:i a ');
147 147
 
148 148
                             return $date;
149 149
                         })
150
-                        ->addColumn('payment_method', function ($model) {
150
+                        ->addColumn('payment_method', function($model) {
151 151
                             return $model->payment_method;
152 152
                         })
153 153
 
154
-                         ->addColumn('total', function ($model) use ($client, $extraAmt) {
154
+                         ->addColumn('total', function($model) use ($client, $extraAmt) {
155 155
                              if ($model->invoice_id == 0) {
156 156
                                  $amount = currency_format($extraAmt, $code = $client->currency);
157 157
                              } else {
@@ -160,11 +160,11 @@  discard block
 block discarded – undo
160 160
 
161 161
                              return $amount;
162 162
                          })
163
-                         ->addColumn('status', function ($model) {
163
+                         ->addColumn('status', function($model) {
164 164
                              return ucfirst($model->payment_status);
165 165
                          })
166 166
 
167
-                         ->addColumn('action', function ($model) {
167
+                         ->addColumn('action', function($model) {
168 168
                              '<input type="hidden" class="paymentid" value="{{$model->id}}">';
169 169
                              if ($model->invoice_id == 0) {
170 170
                                  return '<a href='.url('payments/'.$model->id.'/edit/')." class='btn btn-sm btn-primary btn-xs'> <i class='fa fa-edit' style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
Please login to merge, or discard this patch.
app/Http/Controllers/Order/BaseRenewController.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@
 block discarded – undo
123 123
             ]);
124 124
             $this->createOrderInvoiceRelation($orderid, $invoice->id);
125 125
             $items = $controller->createInvoiceItemsByAdmin($invoice->id, $product->id,
126
-             $code, $renewalPrice, $currency, $qty = 1, $agents);
126
+                $code, $renewalPrice, $currency, $qty = 1, $agents);
127 127
 
128 128
             return $items;
129 129
         } catch (Exception $ex) {
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
@@ -494,7 +494,8 @@  discard block
 block discarded – undo
494 494
                 if (count($tax_class_id) > 0) {
495 495
                     if ($this->tax_option->findOrFail(1)->tax_enable == 1) {
496 496
                         $taxs = $this->getTaxWhenEnable($productid, $taxs[0], $userid);
497
-                    } elseif ($this->tax_option->tax_enable == 0) {//if tax_enable is 0
497
+                    } elseif ($this->tax_option->tax_enable == 0) {
498
+//if tax_enable is 0
498 499
 
499 500
                         $taxClassId = Tax::where('country', '')->where('state', 'Any State')
500 501
                      ->pluck('tax_classes_id')->first(); //In case of India when
@@ -503,13 +504,15 @@  discard block
 block discarded – undo
503 504
                             $rate = $this->getTotalRate($taxClassId, $productid, $taxs);
504 505
                             $taxs = $rate['taxes'];
505 506
                             $rate = $rate['rate'];
506
-                        } elseif ($geoip_country != 'IN') {//In case of other country
507
+                        } elseif ($geoip_country != 'IN') {
508
+//In case of other country
507 509
                             // when tax is available and tax is not enabled(Applicable
508 510
                             //when Global Tax class for any country and state is not there)
509 511
 
510 512
                             $taxClassId = Tax::where('state', $geoip_state)
511 513
                         ->orWhere('country', $geoip_country)->pluck('tax_classes_id')->first();
512
-                            if ($taxClassId) { //if state equals the user State
514
+                            if ($taxClassId) {
515
+//if state equals the user State
513 516
                                 $rate = $this->getTotalRate($taxClassId, $productid, $taxs);
514 517
                                 $taxs = $rate['taxes'];
515 518
                                 $rate = $rate['rate'];
@@ -552,11 +555,13 @@  discard block
 block discarded – undo
552 555
         $i_gst = 0;
553 556
         $ut_gst = 0;
554 557
         $state_code = '';
555
-        if ($user_state != '') {//Get the CGST,SGST,IGST,STATE_CODE of the user
558
+        if ($user_state != '') {
559
+//Get the CGST,SGST,IGST,STATE_CODE of the user
556 560
             $tax = $this->getTaxWhenState($user_state, $productid, $origin_state);
557 561
             $taxes = $tax['taxes'];
558 562
             $value = $tax['value'];
559
-        } else {//If user from other Country
563
+        } else {
564
+//If user from other Country
560 565
             $tax = $this->getTaxWhenOtherCountry($geoip_state, $geoip_country, $productid);
561 566
             $taxes = $tax['taxes'];
562 567
             $value = $tax['value'];
Please login to merge, or discard this patch.
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -130,12 +130,12 @@  discard block
 block discarded – undo
130 130
         $query = $this->advanceSearch($name, $invoice_no, $currency, $status, $from, $till);
131 131
 
132 132
         return \DataTables::of($query->take(100))
133
-         ->setTotalRecords($query->count())
133
+            ->setTotalRecords($query->count())
134 134
 
135
-         ->addColumn('checkbox', function ($model) {
136
-             return "<input type='checkbox' class='invoice_checkbox' 
135
+            ->addColumn('checkbox', function ($model) {
136
+                return "<input type='checkbox' class='invoice_checkbox' 
137 137
                             value=".$model->id.' name=select[] id=check>';
138
-         })
138
+            })
139 139
                         ->addColumn('user_id', function ($model) {
140 140
                             $first = $this->user->where('id', $model->user_id)->first()->first_name;
141 141
                             $last = $this->user->where('id', $model->user_id)->first()->last_name;
@@ -143,9 +143,9 @@  discard block
 block discarded – undo
143 143
 
144 144
                             return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'</a>';
145 145
                         })
146
-                         ->addColumn('number', function ($model) {
147
-                             return ucfirst($model->number);
148
-                         })
146
+                            ->addColumn('number', function ($model) {
147
+                                return ucfirst($model->number);
148
+                            })
149 149
 
150 150
                         ->addColumn('date', function ($model) {
151 151
                             $date = ($model->created_at);
@@ -153,12 +153,12 @@  discard block
 block discarded – undo
153 153
                             return $date;
154 154
                             // return "<span style='display:none'>$model->id</span>".$date->format('l, F j, Y H:m');
155 155
                         })
156
-                         ->addColumn('grand_total', function ($model) {
157
-                             return currency_format($model->grand_total, $code = $model->currency);
158
-                         })
159
-                          ->addColumn('status', function ($model) {
160
-                              return ucfirst($model->status);
161
-                          })
156
+                            ->addColumn('grand_total', function ($model) {
157
+                                return currency_format($model->grand_total, $code = $model->currency);
158
+                            })
159
+                            ->addColumn('status', function ($model) {
160
+                                return ucfirst($model->status);
161
+                            })
162 162
 
163 163
                         ->addColumn('action', function ($model) {
164 164
                             $action = '';
@@ -176,30 +176,30 @@  discard block
 block discarded – undo
176 176
                             style='color:white;'> </i>&nbsp;&nbsp;View</a>"
177 177
                                     ."   $action";
178 178
                         })
179
-                         ->filterColumn('user_id', function ($query, $keyword) {
180
-                             $sql = 'first_name like ?';
181
-                             $query->whereRaw($sql, ["%{$keyword}%"]);
182
-                         })
179
+                            ->filterColumn('user_id', function ($query, $keyword) {
180
+                                $sql = 'first_name like ?';
181
+                                $query->whereRaw($sql, ["%{$keyword}%"]);
182
+                            })
183 183
 
184
-                          ->filterColumn('status', function ($query, $keyword) {
185
-                              $sql = 'status like ?';
186
-                              $query->whereRaw($sql, ["%{$keyword}%"]);
187
-                          })
184
+                            ->filterColumn('status', function ($query, $keyword) {
185
+                                $sql = 'status like ?';
186
+                                $query->whereRaw($sql, ["%{$keyword}%"]);
187
+                            })
188 188
 
189 189
                         ->filterColumn('number', function ($query, $keyword) {
190 190
                             $sql = 'number like ?';
191 191
                             $query->whereRaw($sql, ["%{$keyword}%"]);
192 192
                         })
193
-                         ->filterColumn('grand_total', function ($query, $keyword) {
194
-                             $sql = 'grand_total like ?';
195
-                             $query->whereRaw($sql, ["%{$keyword}%"]);
196
-                         })
197
-                          ->filterColumn('date', function ($query, $keyword) {
198
-                              $sql = 'date like ?';
199
-                              $query->whereRaw($sql, ["%{$keyword}%"]);
200
-                          })
201
-
202
-                         ->rawColumns(['checkbox', 'user_id', 'number', 'date', 'grand_total', 'status', 'action'])
193
+                            ->filterColumn('grand_total', function ($query, $keyword) {
194
+                                $sql = 'grand_total like ?';
195
+                                $query->whereRaw($sql, ["%{$keyword}%"]);
196
+                            })
197
+                            ->filterColumn('date', function ($query, $keyword) {
198
+                                $sql = 'date like ?';
199
+                                $query->whereRaw($sql, ["%{$keyword}%"]);
200
+                            })
201
+
202
+                            ->rawColumns(['checkbox', 'user_id', 'number', 'date', 'grand_total', 'status', 'action'])
203 203
                         ->make(true);
204 204
     }
205 205
 
@@ -292,8 +292,8 @@  discard block
 block discarded – undo
292 292
                 $attributes[] = $item->attributes;
293 293
             }
294 294
             $invoice = $this->invoice->create(['user_id' => $user_id, 'number' => $number,
295
-             'date'                                      => $date, 'discount'=>$codevalue, 'grand_total' => $grand_total, 'coupon_code'=>$code, 'status' => 'pending',
296
-             'currency'                                  => \Auth::user()->currency, ]);
295
+                'date'                                      => $date, 'discount'=>$codevalue, 'grand_total' => $grand_total, 'coupon_code'=>$code, 'status' => 'pending',
296
+                'currency'                                  => \Auth::user()->currency, ]);
297 297
 
298 298
             foreach (\Cart::getContent() as $cart) {
299 299
                 $this->createInvoiceItems($invoice->id, $cart, $codevalue);
@@ -414,11 +414,11 @@  discard block
 block discarded – undo
414 414
             $grand_total = \App\Http\Controllers\Front\CartController::rounding($grand_total);
415 415
 
416 416
             $invoice = Invoice::create(['user_id' => $user_id, 'number' => $number, 'date' => $date,
417
-             'coupon_code'                        => $code, 'discount'=>$codeValue,
417
+                'coupon_code'                        => $code, 'discount'=>$codeValue,
418 418
                 'grand_total'                     => $grand_total,  'currency'  => $currency, 'status' => $status, 'description' => $description, ]);
419 419
 
420 420
             $items = $this->createInvoiceItemsByAdmin($invoice->id, $productid,
421
-             $code, $total, $currency, $qty, $agents, $plan, $user_id, $tax_name, $tax_rate);
421
+                $code, $total, $currency, $qty, $agents, $plan, $user_id, $tax_name, $tax_rate);
422 422
             $result = $this->getMessage($items, $user_id);
423 423
         } catch (\Exception $ex) {
424 424
             app('log')->info($ex->getMessage());
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
                     } elseif ($this->tax_option->tax_enable == 0) {//if tax_enable is 0
497 497
 
498 498
                         $taxClassId = Tax::where('country', '')->where('state', 'Any State')
499
-                     ->pluck('tax_classes_id')->first(); //In case of India when
499
+                        ->pluck('tax_classes_id')->first(); //In case of India when
500 500
                         //other tax is available and tax is not enabled
501 501
                         if ($taxClassId) {
502 502
                             $rate = $this->getTotalRate($taxClassId, $productid, $taxs);
@@ -565,10 +565,10 @@  discard block
 block discarded – undo
565 565
         foreach ($taxes as $key => $tax) {
566 566
             if ($taxes[0]) {
567 567
                 $tax_attribute[$key] = ['name' => $tax->name, 'name1' => $name1,
568
-                 'name2'                       => $name2, 'name3' => $name3, 'name4' => $name4,
569
-                 'rate'                        => $value, 'rate1'=>$c_gst, 'rate2'=>$s_gst,
570
-                 'rate3'                       => $i_gst, 'rate4'=>$ut_gst, 'state'=>$state_code,
571
-                  'origin_state'               => $origin_state, ];
568
+                    'name2'                       => $name2, 'name3' => $name3, 'name4' => $name4,
569
+                    'rate'                        => $value, 'rate1'=>$c_gst, 'rate2'=>$s_gst,
570
+                    'rate3'                       => $i_gst, 'rate4'=>$ut_gst, 'state'=>$state_code,
571
+                    'origin_state'               => $origin_state, ];
572 572
 
573 573
                 $rate = $tax->rate;
574 574
 
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
             $from = $request->input('from');
110 110
             $till = $request->input('till');
111 111
 
112
-            return view('themes.default1.invoice.index', compact('name','invoice_no','status','currencies','currency_id','from',
112
+            return view('themes.default1.invoice.index', compact('name', 'invoice_no', 'status', 'currencies', 'currency_id', 'from',
113 113
 
114 114
                 'till'));
115 115
         } catch (\Exception $ex) {
@@ -132,35 +132,35 @@  discard block
 block discarded – undo
132 132
         return \DataTables::of($query->take(100))
133 133
          ->setTotalRecords($query->count())
134 134
 
135
-         ->addColumn('checkbox', function ($model) {
135
+         ->addColumn('checkbox', function($model) {
136 136
              return "<input type='checkbox' class='invoice_checkbox' 
137 137
                             value=".$model->id.' name=select[] id=check>';
138 138
          })
139
-                        ->addColumn('user_id', function ($model) {
139
+                        ->addColumn('user_id', function($model) {
140 140
                             $first = $this->user->where('id', $model->user_id)->first()->first_name;
141 141
                             $last = $this->user->where('id', $model->user_id)->first()->last_name;
142 142
                             $id = $this->user->where('id', $model->user_id)->first()->id;
143 143
 
144 144
                             return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'</a>';
145 145
                         })
146
-                         ->addColumn('number', function ($model) {
146
+                         ->addColumn('number', function($model) {
147 147
                              return ucfirst($model->number);
148 148
                          })
149 149
 
150
-                        ->addColumn('date', function ($model) {
150
+                        ->addColumn('date', function($model) {
151 151
                             $date = ($model->created_at);
152 152
 
153 153
                             return $date;
154 154
                             // return "<span style='display:none'>$model->id</span>".$date->format('l, F j, Y H:m');
155 155
                         })
156
-                         ->addColumn('grand_total', function ($model) {
156
+                         ->addColumn('grand_total', function($model) {
157 157
                              return currency_format($model->grand_total, $code = $model->currency);
158 158
                          })
159
-                          ->addColumn('status', function ($model) {
159
+                          ->addColumn('status', function($model) {
160 160
                               return ucfirst($model->status);
161 161
                           })
162 162
 
163
-                        ->addColumn('action', function ($model) {
163
+                        ->addColumn('action', function($model) {
164 164
                             $action = '';
165 165
 
166 166
                             $check = $this->checkExecution($model->id);
@@ -176,25 +176,25 @@  discard block
 block discarded – undo
176 176
                             style='color:white;'> </i>&nbsp;&nbsp;View</a>"
177 177
                                     ."   $action";
178 178
                         })
179
-                         ->filterColumn('user_id', function ($query, $keyword) {
179
+                         ->filterColumn('user_id', function($query, $keyword) {
180 180
                              $sql = 'first_name like ?';
181 181
                              $query->whereRaw($sql, ["%{$keyword}%"]);
182 182
                          })
183 183
 
184
-                          ->filterColumn('status', function ($query, $keyword) {
184
+                          ->filterColumn('status', function($query, $keyword) {
185 185
                               $sql = 'status like ?';
186 186
                               $query->whereRaw($sql, ["%{$keyword}%"]);
187 187
                           })
188 188
 
189
-                        ->filterColumn('number', function ($query, $keyword) {
189
+                        ->filterColumn('number', function($query, $keyword) {
190 190
                             $sql = 'number like ?';
191 191
                             $query->whereRaw($sql, ["%{$keyword}%"]);
192 192
                         })
193
-                         ->filterColumn('grand_total', function ($query, $keyword) {
193
+                         ->filterColumn('grand_total', function($query, $keyword) {
194 194
                              $sql = 'grand_total like ?';
195 195
                              $query->whereRaw($sql, ["%{$keyword}%"]);
196 196
                          })
197
-                          ->filterColumn('date', function ($query, $keyword) {
197
+                          ->filterColumn('date', function($query, $keyword) {
198 198
                               $sql = 'date like ?';
199 199
                               $query->whereRaw($sql, ["%{$keyword}%"]);
200 200
                           })
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
 
416 416
             $invoice = Invoice::create(['user_id' => $user_id, 'number' => $number, 'date' => $date,
417 417
              'coupon_code'                        => $code, 'discount'=>$codeValue,
418
-                'grand_total'                     => $grand_total,  'currency'  => $currency, 'status' => $status, 'description' => $description, ]);
418
+                'grand_total'                     => $grand_total, 'currency'  => $currency, 'status' => $status, 'description' => $description, ]);
419 419
 
420 420
             $items = $this->createInvoiceItemsByAdmin($invoice->id, $productid,
421 421
              $code, $total, $currency, $qty, $agents, $plan, $user_id, $tax_name, $tax_rate);
Please login to merge, or discard this patch.
app/Plugins/Paypal/views/settings.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
                         <div class="pull-right">
65 65
 
66 66
                             <?php
67
-                            $status=0;
67
+                            $status = 0;
68 68
                             $cont = new \App\Plugins\Paypal\Model\Paypal();
69 69
                             $recentselected = $cont->find(1)->pluck('paypal_url')->first();
70 70
                             ?>
Please login to merge, or discard this patch.
app/Http/Controllers/Front/CheckoutController.php 1 patch
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -80,7 +80,8 @@  discard block
 block discarded – undo
80 80
      */
81 81
     public function checkoutForm(Request $request)
82 82
     {
83
-        if (!\Auth::user()) {//If User is not Logged in then send him to login Page
83
+        if (!\Auth::user()) {
84
+//If User is not Logged in then send him to login Page
84 85
             $url = $request->segments(); //The requested url (chekout).Save it in Session
85 86
             \Session::put('session-url', $url[0]);
86 87
             $content = Cart::getContent();
@@ -106,7 +107,8 @@  discard block
 block discarded – undo
106 107
 
107 108
         try {
108 109
             $domain = $request->input('domain');
109
-            if ($domain) {//Store the Domain  in session when user Logged In
110
+            if ($domain) {
111
+//Store the Domain  in session when user Logged In
110 112
                 foreach ($domain as $key => $value) {
111 113
                     \Session::put('domain'.$key, $value);
112 114
                 }
@@ -131,7 +133,8 @@  discard block
 block discarded – undo
131 133
     public function getAttributes($content)
132 134
     {
133 135
         try {
134
-            if (count($content) > 0) {//after ProductPurchase this is not true as cart is cleared
136
+            if (count($content) > 0) {
137
+//after ProductPurchase this is not true as cart is cleared
135 138
                 foreach ($content as $key => $item) {
136 139
                     $attributes[] = $item->attributes;
137 140
                     $cart_currency = $attributes[0]['currency']['currency']; //Get the currency of Product in the cart
@@ -266,9 +269,11 @@  discard block
 block discarded – undo
266 269
                     \Event::fire(new \App\Events\PaymentGateway(['request' => $request, 'cart' => Cart::getContent(), 'order' => $invoice]));
267 270
                 }
268 271
             } else {
269
-                if ($paynow == false) {//Regular Payment for free Product
272
+                if ($paynow == false) {
273
+//Regular Payment for free Product
270 274
                     $action = $this->checkoutAction($invoice);
271
-                } else {//Renewal Payment for free Product
275
+                } else {
276
+//Renewal Payment for free Product
272 277
                     $control = new \App\Http\Controllers\Order\RenewController();
273 278
                     $control->successRenew($invoice);
274 279
                     $payment = new \App\Http\Controllers\Order\InvoiceController();
Please login to merge, or discard this patch.
app/Http/Middleware/Admin.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,8 @@
 block discarded – undo
47 47
             if ($url) {
48 48
                 $content = \Cart::getContent();
49 49
                 $currency = (\Session::get('currency'));
50
-                if (\Auth::user()->currency != $currency) {//If user currency is not equal to the cart currency then redirect to default url and clear his cart items and let the customer add the Product again so that the tax could be calculated properly
50
+                if (\Auth::user()->currency != $currency) {
51
+//If user currency is not equal to the cart currency then redirect to default url and clear his cart items and let the customer add the Product again so that the tax could be calculated properly
51 52
                     foreach ($content as $key => $item) {
52 53
                         $id = $item->id;
53 54
                         Cart::remove($id);
Please login to merge, or discard this patch.