Completed
Push — development ( 6c0383...f96071 )
by Ashutosh
11:19
created
app/Http/Controllers/Front/PageController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
                                  style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
73 73
                         })
74 74
 
75
-                          ->rawColumns(['checkbox', 'name', 'url',  'created_at', 'content', 'action'])
75
+                            ->rawColumns(['checkbox', 'name', 'url',  'created_at', 'content', 'action'])
76 76
                         ->make(true);
77 77
         // ->searchColumns('name', 'content')
78 78
                         // ->orderColumns('name')
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -49,30 +49,30 @@  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
                             return $model->created_at;
64 64
                         })
65 65
 
66
-                        ->addColumn('content', function ($model) {
66
+                        ->addColumn('content', function($model) {
67 67
                             return str_limit($model->content, 10, '...');
68 68
                         })
69
-                        ->addColumn('action', function ($model) {
69
+                        ->addColumn('action', function($model) {
70 70
                             return '<a href='.url('pages/'.$model->id.'/edit')
71 71
                             ." class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit'
72 72
                                  style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
73 73
                         })
74 74
 
75
-                          ->rawColumns(['checkbox', 'name', 'url',  'created_at', 'content', 'action'])
75
+                          ->rawColumns(['checkbox', 'name', 'url', 'created_at', 'content', 'action'])
76 76
                         ->make(true);
77 77
         // ->searchColumns('name', 'content')
78 78
                         // ->orderColumns('name')
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             $selectedParent = $this->page->where('id', $id)->pluck('parent_page_id')->toArray();
105 105
             $parentName = $this->page->where('id', $selectedParent)->pluck('name', 'id')->toArray();
106 106
 
107
-            return view('themes.default1.front.page.edit', compact('parents', 'page', 'default', 'selectedDefault', 'publishingDate','selectedParent',
107
+            return view('themes.default1.front.page.edit', compact('parents', 'page', 'default', 'selectedDefault', 'publishingDate', 'selectedParent',
108 108
                 'parentName'));
109 109
         } catch (\Exception $ex) {
110 110
             return redirect()->back()->with('fails', $ex->getMessage());
Please login to merge, or discard this patch.
app/Http/Controllers/Front/ClientController.php 3 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
             $order_id = $order->id;
146 146
             $updatesEndDate = Subscription::select('update_ends_at')
147
-                 ->where('product_id', $productid)->where('order_id', $order_id)->first();
147
+                    ->where('product_id', $productid)->where('order_id', $order_id)->first();
148 148
             if ($updatesEndDate) {
149 149
                 foreach ($versions as $version) {
150 150
                     if ($version->created_at->toDateTimeString()
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
                                 return $model->grand_total;
482 482
                             })
483 483
                             ->rawColumns(['checkbox', 'number', 'total',
484
-                             'payment_method', 'payment_status', 'created_at', ])
484
+                                'payment_method', 'payment_status', 'created_at', ])
485 485
                             ->make(true);
486 486
         } catch (Exception $ex) {
487 487
             Bugsnag::notifyException($ex);
@@ -507,17 +507,17 @@  discard block
 block discarded – undo
507 507
                             ->addColumn('number', function ($model) {
508 508
                                 return $model->invoice()->first()->number;
509 509
                             })
510
-                              ->addColumn('total', function ($model) {
511
-                                  return $model->amount;
512
-                              })
513
-                               ->addColumn('created_at', function ($model) {
514
-                                   $date1 = new DateTime($model->created_at);
515
-                                   $tz = \Auth::user()->timezone()->first()->name;
516
-                                   $date1->setTimezone(new DateTimeZone($tz));
517
-                                   $date = $date1->format('M j, Y, g:i a');
518
-
519
-                                   return $date;
520
-                               })
510
+                                ->addColumn('total', function ($model) {
511
+                                    return $model->amount;
512
+                                })
513
+                                ->addColumn('created_at', function ($model) {
514
+                                    $date1 = new DateTime($model->created_at);
515
+                                    $tz = \Auth::user()->timezone()->first()->name;
516
+                                    $date1->setTimezone(new DateTimeZone($tz));
517
+                                    $date = $date1->format('M j, Y, g:i a');
518
+
519
+                                    return $date;
520
+                                })
521 521
 
522 522
                             ->addColumn('payment_method', 'payment_status', 'created_at')
523 523
 
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -79,18 +79,18 @@  discard block
 block discarded – undo
79 79
                     ->select('number', 'created_at', 'grand_total', 'id', 'status');
80 80
 
81 81
             return \DataTables::of($invoices->get())
82
-                            ->addColumn('number', function ($model) {
82
+                            ->addColumn('number', function($model) {
83 83
                                 return $model->number;
84 84
                             })
85
-                            ->addColumn('date', function ($model) {
85
+                            ->addColumn('date', function($model) {
86 86
                                 $date = $model->created_at;
87 87
 
88 88
                                 return $date;
89 89
                             })
90
-                            ->addColumn('total', function ($model) {
90
+                            ->addColumn('total', function($model) {
91 91
                                 return $model->grand_total;
92 92
                             })
93
-                            ->addColumn('Action', function ($model) {
93
+                            ->addColumn('Action', function($model) {
94 94
                                 $status = $model->status;
95 95
                                 $payment = '';
96 96
                                 if ($status == 'Pending' && $model->grand_total > 0) {
@@ -155,19 +155,19 @@  discard block
 block discarded – undo
155 155
             }
156 156
 
157 157
             return \DataTables::of($versions)
158
-                            ->addColumn('id', function ($versions) {
158
+                            ->addColumn('id', function($versions) {
159 159
                                 return ucfirst($versions->id);
160 160
                             })
161
-                            ->addColumn('version', function ($versions) {
161
+                            ->addColumn('version', function($versions) {
162 162
                                 return ucfirst($versions->version);
163 163
                             })
164
-                            ->addColumn('title', function ($versions) {
164
+                            ->addColumn('title', function($versions) {
165 165
                                 return ucfirst($versions->title);
166 166
                             })
167
-                            ->addColumn('description', function ($versions) {
167
+                            ->addColumn('description', function($versions) {
168 168
                                 return ucfirst($versions->description);
169 169
                             })
170
-                            ->addColumn('file', function ($versions) use ($countExpiry, $countVersions, $clientid, $invoiceid, $productid) {
170
+                            ->addColumn('file', function($versions) use ($countExpiry, $countVersions, $clientid, $invoiceid, $productid) {
171 171
                                 $invoice_id = Invoice::where('number', $invoiceid)->pluck('id')->first();
172 172
                                 $order = Order::where('invoice_id', '=', $invoice_id)->first();
173 173
                                 $order_id = $order->id;
@@ -264,18 +264,18 @@  discard block
 block discarded – undo
264 264
             }
265 265
 
266 266
             return \DataTables::of($link)
267
-                            ->addColumn('version', function ($link) {
267
+                            ->addColumn('version', function($link) {
268 268
                                 return ucfirst($link['tag_name']);
269 269
                             })
270
-                            ->addColumn('name', function ($link) {
270
+                            ->addColumn('name', function($link) {
271 271
                                 return ucfirst($link['name']);
272 272
                             })
273
-                            ->addColumn('description', function ($link) {
273
+                            ->addColumn('description', function($link) {
274 274
                                 $markdown = Markdown::convertToHtml(ucfirst($link['body']));
275 275
 
276 276
                                 return $markdown;
277 277
                             })
278
-                            ->addColumn('file', function ($link) use ($countExpiry, $countVersions, $invoiceid, $productid) {
278
+                            ->addColumn('file', function($link) use ($countExpiry, $countVersions, $invoiceid, $productid) {
279 279
                                 $order = Order::where('invoice_id', '=', $invoiceid)->first();
280 280
                                 $order_id = $order->id;
281 281
                                 $orderEndDate = Subscription::select('update_ends_at')
@@ -322,20 +322,20 @@  discard block
 block discarded – undo
322 322
             $orders = Order::where('client', \Auth::user()->id);
323 323
 
324 324
             return \DataTables::of($orders->get())
325
-                            ->addColumn('id', function ($model) {
325
+                            ->addColumn('id', function($model) {
326 326
                                 return $model->id;
327 327
                             })
328
-                            ->addColumn('product_name', function ($model) {
328
+                            ->addColumn('product_name', function($model) {
329 329
                                 return $model->product()->first()->name;
330 330
                             })
331
-                            ->addColumn('expiry', function ($model) {
331
+                            ->addColumn('expiry', function($model) {
332 332
                                 $tz = \Auth::user()->timezone()->first()->name;
333 333
                                 $end = $this->getExpiryDate($model);
334 334
 
335 335
                                 return $end;
336 336
                             })
337 337
 
338
-                            ->addColumn('Action', function ($model) {
338
+                            ->addColumn('Action', function($model) {
339 339
                                 $sub = $model->subscription()->first();
340 340
                                 $order = Order::where('id', $model->id)->select('product')->first();
341 341
                                 $productid = $order->product;
@@ -467,17 +467,17 @@  discard block
 block discarded – undo
467 467
                     ->select('id', 'invoice_id', 'user_id', 'amount', 'payment_method', 'payment_status', 'created_at');
468 468
 
469 469
             return \DataTables::of($payments->get())
470
-                            ->addColumn('checkbox', function ($model) {
470
+                            ->addColumn('checkbox', function($model) {
471 471
                                 if (\Input::get('client') != 'true') {
472 472
                                     return "<input type='checkbox' class='payment_checkbox' 
473 473
                                     value=".$model->id.' name=select[] id=check>';
474 474
                                 }
475 475
                             })
476
-                            ->addColumn('number', function ($model) {
476
+                            ->addColumn('number', function($model) {
477 477
                                 return $model->invoice()->first()->number;
478 478
                             })
479 479
                             ->addColumn('amount', 'payment_method', 'payment_status', 'created_at')
480
-                            ->addColumn('total', function ($model) {
480
+                            ->addColumn('total', function($model) {
481 481
                                 return $model->grand_total;
482 482
                             })
483 483
                             ->rawColumns(['checkbox', 'number', 'total',
@@ -504,13 +504,13 @@  discard block
 block discarded – undo
504 504
                     ->select('id', 'invoice_id', 'user_id', 'payment_method', 'payment_status', 'created_at', 'amount');
505 505
             //dd(\Input::all());
506 506
             return \DataTables::of($payments->get())
507
-                            ->addColumn('number', function ($model) {
507
+                            ->addColumn('number', function($model) {
508 508
                                 return $model->invoice()->first()->number;
509 509
                             })
510
-                              ->addColumn('total', function ($model) {
510
+                              ->addColumn('total', function($model) {
511 511
                                   return $model->amount;
512 512
                               })
513
-                               ->addColumn('created_at', function ($model) {
513
+                               ->addColumn('created_at', function($model) {
514 514
                                    $date1 = new DateTime($model->created_at);
515 515
                                    $tz = \Auth::user()->timezone()->first()->name;
516 516
                                    $date1->setTimezone(new DateTimeZone($tz));
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -177,11 +177,13 @@
 block discarded – undo
177 177
 
178 178
                                 //if product has Update expiry date ie subscription is generated
179 179
                                 if ($updateEndDate) {
180
-                                    if ($downloadPermission['allowDownloadTillExpiry'] == 1) {//Perpetual download till expiry permission selected
180
+                                    if ($downloadPermission['allowDownloadTillExpiry'] == 1) {
181
+//Perpetual download till expiry permission selected
181 182
                                         $getDownload = $this->whenDownloadTillExpiry($updateEndDate, $productid, $versions, $clientid, $invoiceid);
182 183
 
183 184
                                         return $getDownload;
184
-                                    } elseif ($downloadPermission['allowDownloadTillExpiry'] == 0) {//When download retires after subscription
185
+                                    } elseif ($downloadPermission['allowDownloadTillExpiry'] == 0) {
186
+//When download retires after subscription
185 187
                                         $getDownload = $this->whenDownloadExpiresAfterExpiry($countExpiry, $countVersions, $updateEndDate, $productid, $versions, $clientid, $invoiceid);
186 188
 
187 189
                                         return $getDownload;
Please login to merge, or discard this patch.
app/Http/Controllers/License/LicensePermissionsController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,20 +44,20 @@  discard block
 block discarded – undo
44 44
             $licenseType = LicenseType::select('id', 'name')->get();
45 45
 
46 46
             return \DataTables::of($licenseType)
47
-            ->addColumn('checkbox', function ($model) {
47
+            ->addColumn('checkbox', function($model) {
48 48
                 return "<input type='checkbox' class='type_checkbox' 
49 49
             value=".$model->id.' name=select[] id=check>';
50 50
             })
51
-            ->addColumn('license_type', function ($model) {
51
+            ->addColumn('license_type', function($model) {
52 52
                 return ucfirst($model->name);
53 53
             })
54
-            ->addColumn('permissions', function ($model) {
54
+            ->addColumn('permissions', function($model) {
55 55
                 $permissions = $model->permissions->pluck('permissions');
56 56
                 $allPermissions = $this->showPermissions($permissions);
57 57
 
58 58
                 return $allPermissions;
59 59
             })
60
-            ->addColumn('action', function ($model) {
60
+            ->addColumn('action', function($model) {
61 61
                 $selectedPermission = $model->permissions->pluck('id');
62 62
 
63 63
                 return "<p><button data-toggle='modal' 
@@ -167,10 +167,10 @@  discard block
 block discarded – undo
167 167
                     $downloadPermission = 1; //Has Permission for Download
168 168
                 }
169 169
                 if ($permission == 'No Permissions') {
170
-                    $noPermissions = 1;  //Has No Permission
170
+                    $noPermissions = 1; //Has No Permission
171 171
                 }
172 172
                 if ($permission == 'Allow Downloads Before Updates Expire') {
173
-                    $allowDownloadTillExpiry = 1;  //allow download after Expiry
173
+                    $allowDownloadTillExpiry = 1; //allow download after Expiry
174 174
                 }
175 175
             }
176 176
 
Please login to merge, or discard this patch.
app/Http/Controllers/License/LicenseSettingsController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,14 +38,14 @@
 block discarded – undo
38 38
             $allTypes = $this->licenseType->select('id', 'name')->get();
39 39
 
40 40
             return \DataTables::of($allTypes)
41
-            ->addColumn('checkbox', function ($model) {
41
+            ->addColumn('checkbox', function($model) {
42 42
                 return "<input type='checkbox' class='type_checkbox' 
43 43
             value=".$model->id.' name=select[] id=check>';
44 44
             })
45
-            ->addColumn('type_name', function ($model) {
45
+            ->addColumn('type_name', function($model) {
46 46
                 return ucfirst($model->name);
47 47
             })
48
-            ->addColumn('action', function ($model) {
48
+            ->addColumn('action', function($model) {
49 49
                 return "<p><button data-toggle='modal' 
50 50
              data-id=".$model->id." data-name= '$model->name' 
51 51
              class='btn btn-sm btn-primary btn-xs editType'><i class='fa fa-edit'
Please login to merge, or discard this patch.
app/Http/Controllers/License/LicenseController.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,7 +84,8 @@  discard block
 block discarded – undo
84 84
             $getProductId = $this->postCurl($url, "api_key_secret=$api_key_secret&api_function=search
85 85
             &search_type=product&search_keyword=$product_sku");
86 86
             $details = json_decode($getProductId);
87
-            if ($details->api_error_detected == 0 && is_array($details->page_message)) {//This is not true if Product_sku is updated
87
+            if ($details->api_error_detected == 0 && is_array($details->page_message)) {
88
+//This is not true if Product_sku is updated
88 89
                 $productId = $details->page_message[0]->product_id;
89 90
             }
90 91
 
@@ -120,7 +121,8 @@  discard block
 block discarded – undo
120 121
       &search_type=client&search_keyword=$email");
121 122
 
122 123
         $details = json_decode($getUserId);
123
-        if ($details->api_error_detected == 0 && is_array($details->page_message)) {//This is not true if email is updated
124
+        if ($details->api_error_detected == 0 && is_array($details->page_message)) {
125
+//This is not true if email is updated
124 126
             $userId = $details->page_message[0]->client_id;
125 127
         }
126 128
 
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['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['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.
app/Model/Product/Subscription.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     'user_id', 'plan_id', 'order_id', 'deny_after_subscription', 'version', 'product_id', 'support_ends_at', ];
16 16
     protected $dates = ['ends_at'];
17 17
     protected static $logName = 'Subscription';
18
-    protected static $logAttributes = ['ends_at', 'update_ends_at', 'support_ends_at', 'user_id', 'plan_id', 'order_id',  'version', 'product_id'];
18
+    protected static $logAttributes = ['ends_at', 'update_ends_at', 'support_ends_at', 'user_id', 'plan_id', 'order_id', 'version', 'product_id'];
19 19
     protected static $logOnlyDirty = true;
20 20
 
21 21
     public function getDescriptionForEvent(string $eventName): string
Please login to merge, or discard this patch.
app/Traits/TaxCalculation.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         $value = '';
171 171
         $value = $taxes->toArray()[0]['active'] ?
172 172
              (TaxProductRelation::where('product_id', $productid)
173
-              ->where('tax_class_id', $taxClassId)->count() ? $ut_gst + $c_gst.'%' : 0) : 0;
173
+                ->where('tax_class_id', $taxClassId)->count() ? $ut_gst + $c_gst.'%' : 0) : 0;
174 174
 
175 175
         return $value;
176 176
     }
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
         $otherRate = 0;
188 188
         $status = $taxes->toArray()[0]['active'];
189 189
         if ($status && (TaxProductRelation::where('product_id', $productid)
190
-          ->where('tax_class_id', $taxClassId)->count() > 0)) {
190
+            ->where('tax_class_id', $taxClassId)->count() > 0)) {
191 191
             $otherRate = Tax::where('tax_classes_id', $taxClassId)->first()->rate;
192 192
         }
193 193
         $value = $otherRate.'%';
Please login to merge, or discard this patch.
Braces   +16 added lines, -8 removed lines patch added patch discarded remove patch
@@ -18,24 +18,28 @@  discard block
 block discarded – undo
18 18
 
19 19
     public function getDetailsWhenUserStateIsIndian($user_state, $origin_state, $productid, $geoip_state, $geoip_country, $status = 1)
20 20
     {
21
-        if ($user_state != '') {//Get the CGST,SGST,IGST,STATE_CODE of the user,if user from INdia
21
+        if ($user_state != '') {
22
+//Get the CGST,SGST,IGST,STATE_CODE of the user,if user from INdia
22 23
             $c_gst = $user_state->c_gst;
23 24
             $s_gst = $user_state->s_gst;
24 25
             $i_gst = $user_state->i_gst;
25 26
             $ut_gst = $user_state->ut_gst;
26 27
             $state_code = $user_state->state_code;
27 28
 
28
-            if ($state_code == $origin_state) {//If user and origin state are same
29
+            if ($state_code == $origin_state) {
30
+//If user and origin state are same
29 31
                 $rateForSameState = $this->getTaxWhenIndianSameState($user_state, $origin_state, $productid, $c_gst, $s_gst, $state_code, $status);
30 32
                 $taxes = $rateForSameState['taxes'];
31 33
                 $status = $rateForSameState['status'];
32 34
                 $value = $rateForSameState['value'];
33
-            } elseif ($state_code != $origin_state && $ut_gst == 'NULL') {//If user is from other state
35
+            } elseif ($state_code != $origin_state && $ut_gst == 'NULL') {
36
+//If user is from other state
34 37
                 $rateForOtherState = $this->getTaxWhenIndianOtherState($user_state, $origin_state, $productid, $i_gst, $state_code, $status);
35 38
                 $taxes = $rateForOtherState['taxes'];
36 39
                 $status = $rateForOtherState['status'];
37 40
                 $value = $rateForOtherState['value'];
38
-            } elseif ($state_code != $origin_state && $ut_gst != 'NULL') {//if user from Union Territory
41
+            } elseif ($state_code != $origin_state && $ut_gst != 'NULL') {
42
+//if user from Union Territory
39 43
                 $rateForUnionTerritory = $this->getTaxWhenUnionTerritory($user_state, $origin_state, $productid, $c_gst, $ut_gst, $state_code, $status);
40 44
                 $taxes = $rateForUnionTerritory['taxes'];
41 45
                 $status = $rateForUnionTerritory['status'];
@@ -56,13 +60,15 @@  discard block
 block discarded – undo
56 60
         $taxClassId = Tax::where('state', $geoip_state)
57 61
                 ->orWhere('country', $geoip_country)
58 62
                 ->pluck('tax_classes_id')->first();
59
-        if ($taxClassId) { //if state equals the user State or country equals user country
63
+        if ($taxClassId) {
64
+//if state equals the user State or country equals user country
60 65
             $taxForSpecificCountry = $this->getTaxForSpecificCountry($taxClassId, $productid, $status);
61 66
             $taxes = $taxForSpecificCountry['taxes'];
62 67
             $status = $taxForSpecificCountry['status'];
63 68
             $value = $taxForSpecificCountry['value'];
64 69
             $rate = $taxForSpecificCountry['value'];
65
-        } else {//if Tax is selected for Any Country Any State
70
+        } else {
71
+//if Tax is selected for Any Country Any State
66 72
             $taxClassId = Tax::where('country', '')
67 73
                     ->where('state', 'Any State')
68 74
                     ->pluck('tax_classes_id')->first();
@@ -96,13 +102,15 @@  discard block
 block discarded – undo
96 102
                 $status = 0;
97 103
             }
98 104
             $rate = $value;
99
-        } else {//In case of other country
105
+        } else {
106
+//In case of other country
100 107
             //when tax is available and tax is not enabled
101 108
             //(Applicable when Global Tax class for any country and state is not there)
102 109
             $taxClassId = Tax::where('state', $geoip_state)
103 110
             ->orWhere('country', $geoip_country)
104 111
             ->pluck('tax_classes_id')->first();
105
-            if ($taxClassId) { //if state equals the user State
112
+            if ($taxClassId) {
113
+//if state equals the user State
106 114
                 $taxes = $this->getTaxByPriority($taxClassId);
107 115
                 $value = $this->getValueForOthers($productid, $taxClassId, $taxes);
108 116
                 if ($value == '') {
Please login to merge, or discard this patch.
app/Http/Controllers/Product/BaseProductController.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -169,7 +169,8 @@  discard block
 block discarded – undo
169 169
 
170 170
             $plan = new Plan();
171 171
             $plans = $plan->where('product', $productid)->pluck('name', 'id')->toArray();
172
-            if (count($plans) > 0) {//If Plan Exist For A product, Display Dropdown for Plans
172
+            if (count($plans) > 0) {
173
+//If Plan Exist For A product, Display Dropdown for Plans
173 174
                 $field = "<div class='col-md-4 form-group'>
174 175
                         <label class='required'>"./* @scrutinizer ignore-type */
175 176
                         \Lang::get('message.subscription').'</label>
@@ -180,7 +181,8 @@  discard block
 block discarded – undo
180 181
                             ['class' => 'form-control', 'id' => 'plan', 'onchange' => 'getPrice(this.value)']
181 182
                         ).'
182 183
                 </div>';
183
-            } else {//If No Plan Exist For A Product
184
+            } else {
185
+//If No Plan Exist For A Product
184 186
                 $userid = $request->input('user');
185 187
                 $price = $controller->cost($productid, $userid);
186 188
             }
@@ -243,7 +245,8 @@  discard block
 block discarded – undo
243 245
 
244 246
     public function getRelease($owner, $repository, $order_id, $file)
245 247
     {
246
-        if ($owner && $repository) {//If the Product is downloaded from Github
248
+        if ($owner && $repository) {
249
+//If the Product is downloaded from Github
247 250
             $github_controller = new \App\Http\Controllers\Github\GithubController();
248 251
             $relese = $github_controller->listRepositories($owner, $repository, $order_id);
249 252
 
Please login to merge, or discard this patch.