Test Setup Failed
Branch development (80c362)
by Ashutosh
14:59
created
app/Providers/RouteServiceProvider.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
     protected function mapWebRoutes()
53 53
     {
54 54
         Route::middleware('web')
55
-             ->namespace($this->namespace)
56
-             ->group(base_path('routes/web.php'));
55
+                ->namespace($this->namespace)
56
+                ->group(base_path('routes/web.php'));
57 57
     }
58 58
 
59 59
     /**
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
     protected function mapApiRoutes()
67 67
     {
68 68
         Route::prefix('api')
69
-             ->middleware('api')
70
-             ->namespace($this->namespace)
71
-             ->group(base_path('routes/api.php'));
69
+                ->middleware('api')
70
+                ->namespace($this->namespace)
71
+                ->group(base_path('routes/api.php'));
72 72
     }
73 73
 }
Please login to merge, or discard this patch.
app/Model/Payment/Plan.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
         return '';
32 32
 
33 33
         // return "Product  has been {$eventName}";
34
-         // \Auth::user()->activity;
34
+            // \Auth::user()->activity;
35 35
     }
36 36
 
37 37
     public function planPrice()
Please login to merge, or discard this patch.
app/Model/Order/Invoice.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         return '';
38 38
 
39 39
         // return "Product  has been {$eventName}";
40
-         // \Auth::user()->activity;
40
+            // \Auth::user()->activity;
41 41
     }
42 42
 
43 43
     public function invoiceItem()
Please login to merge, or discard this patch.
app/Model/Payment/PlanPrice.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,6 +33,6 @@
 block discarded – undo
33 33
         return '';
34 34
 
35 35
         // return "Product  has been {$eventName}";
36
-         // \Auth::user()->activity;
36
+            // \Auth::user()->activity;
37 37
     }
38 38
 }
Please login to merge, or discard this patch.
app/Http/Controllers/Order/BaseInvoiceController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         $state_code = $user_state->state_code;
33 33
         if ($state_code == $origin_state) {//If user and origin state are same
34 34
             $taxClassId = TaxClass::where('name', 'Intra State GST')
35
-             ->pluck('id')->toArray(); //Get the class Id  of state
35
+                ->pluck('id')->toArray(); //Get the class Id  of state
36 36
             if ($taxClassId) {
37 37
                 $taxes = $cartController->getTaxByPriority($taxClassId);
38 38
                 $value = $cartController->getValueForSameState($productid, $c_gst, $s_gst, $taxClassId, $taxes);
Please login to merge, or discard this patch.
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,7 +28,8 @@  discard block
 block discarded – undo
28 28
         $i_gst = $user_state->i_gst;
29 29
         $ut_gst = $user_state->ut_gst;
30 30
         $state_code = $user_state->state_code;
31
-        if ($state_code == $origin_state) {//If user and origin state are same
31
+        if ($state_code == $origin_state) {
32
+//If user and origin state are same
32 33
             $taxClassId = TaxClass::where('name', 'Intra State GST')
33 34
              ->pluck('id')->toArray(); //Get the class Id  of state
34 35
             if ($taxClassId) {
@@ -37,7 +38,8 @@  discard block
 block discarded – undo
37 38
             } else {
38 39
                 $taxes = [0];
39 40
             }
40
-        } elseif ($state_code != $origin_state && $ut_gst == 'NULL') {//If user is from other state
41
+        } elseif ($state_code != $origin_state && $ut_gst == 'NULL') {
42
+//If user is from other state
41 43
             $taxClassId = TaxClass::where('name', 'Inter State GST')
42 44
             ->pluck('id')->toArray(); //Get the class Id  of state
43 45
             if ($taxClassId) {
@@ -46,7 +48,8 @@  discard block
 block discarded – undo
46 48
             } else {
47 49
                 $taxes = [0];
48 50
             }
49
-        } elseif ($state_code != $origin_state && $ut_gst != 'NULL') {//if user from Union Territory
51
+        } elseif ($state_code != $origin_state && $ut_gst != 'NULL') {
52
+//if user from Union Territory
50 53
             $taxClassId = TaxClass::where('name', 'Union Territory GST')
51 54
             ->pluck('id')->toArray(); //Get the class Id  of state
52 55
             if ($taxClassId) {
@@ -71,13 +74,15 @@  discard block
 block discarded – undo
71 74
         ->pluck('tax_classes_id')->first();
72 75
         $value = '';
73 76
         $rate = '';
74
-        if ($taxClassId) { //if state equals the user State
77
+        if ($taxClassId) {
78
+//if state equals the user State
75 79
             $taxes = $cartController->getTaxByPriority($taxClassId);
76 80
 
77 81
             // $taxes = $this->cartController::getTaxByPriority($taxClassId);
78 82
             $value = $cartController->getValueForOthers($productid, $taxClassId, $taxes);
79 83
             $rate = $value;
80
-        } else {//if Tax is selected for Any State Any Country
84
+        } else {
85
+//if Tax is selected for Any State Any Country
81 86
             $taxClassId = Tax::where('country', '')->where('state', 'Any State')->pluck('tax_classes_id')->first();
82 87
             if ($taxClassId) {
83 88
                 $taxes = $cartController->getTaxByPriority($taxClassId);
@@ -228,7 +233,8 @@  discard block
 block discarded – undo
228 233
     {
229 234
         $code = '';
230 235
         $codevalue = '';
231
-        if (\Session::has('code')) {//If coupon code is applied get it here from Session
236
+        if (\Session::has('code')) {
237
+//If coupon code is applied get it here from Session
232 238
             $code = \Session::get('code');
233 239
             $codevalue = \Session::get('codevalue');
234 240
         }
Please login to merge, or discard this patch.
app/Http/Controllers/Common/ChatScriptController.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@
 block discarded – undo
36 36
                             value=".$model->id.' name=select[] id=check>';
37 37
                         })
38 38
 
39
-                         ->addColumn('name', function ($model) {
40
-                             return $model->name;
41
-                         })
39
+                            ->addColumn('name', function ($model) {
40
+                                return $model->name;
41
+                            })
42 42
 
43 43
                         ->addColumn('action', function ($model) {
44 44
                             return '<a href='.url('chat/'.$model->id.'/edit').
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,21 +32,21 @@  discard block
 block discarded – undo
32 32
     {
33 33
         try {
34 34
             return \DataTables::of($this->script->get())
35
-                        ->addColumn('checkbox', function ($model) {
35
+                        ->addColumn('checkbox', function($model) {
36 36
                             return "<input type='checkbox' class='chat_checkbox' 
37 37
                             value=".$model->id.' name=select[] id=check>';
38 38
                         })
39 39
 
40
-                         ->addColumn('name', function ($model) {
40
+                         ->addColumn('name', function($model) {
41 41
                              return $model->name;
42 42
                          })
43 43
 
44
-                        ->addColumn('action', function ($model) {
44
+                        ->addColumn('action', function($model) {
45 45
                             return '<a href='.url('chat/'.$model->id.'/edit').
46 46
                             " class='btn btn-sm btn-secondary btn-xs'".tooltip('Edit')."<i class='fa fa-edit'
47 47
                                  style='color:white;'> </i></a>";
48 48
                         })
49
-                        ->rawColumns(['checkbox', 'name',  'action'])
49
+                        ->rawColumns(['checkbox', 'name', 'action'])
50 50
                         ->make(true);
51 51
         } catch (\Exception $ex) {
52 52
             return redirect()->back()->with('fails', $ex->getMessage());
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
     {
145 145
         try {
146 146
             $ids = $request->input('select');
147
-            if (! empty($ids)) {
147
+            if (!empty($ids)) {
148 148
                 foreach ($ids as $id) {
149 149
                     $script = $this->script->where('id', $id)->first();
150 150
                     if ($script) {
Please login to merge, or discard this patch.
app/Http/Controllers/Order/ExtendedBaseInvoiceController.php 3 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
             $symbol = Currency::where('code', $currency)->pluck('symbol')->first();
37 37
             $orders = $order->where('client', $clientid)->get();
38 38
 
39
-            return view('themes.default1.invoice.newpayment', compact('clientid', 'client', 'invoices',  'orders',
39
+            return view('themes.default1.invoice.newpayment', compact('clientid', 'client', 'invoices', 'orders',
40 40
                   'invoiceSum', 'amountReceived', 'pendingAmount', 'currency', 'symbol'));
41 41
         } catch (Exception $ex) {
42 42
             return redirect()->back()->with('fails', $ex->getMessage());
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
             $invoicAmount = $request->invoiceAmount;
113 113
             $amtToCredit = $request->amtToCredit;
114 114
             $payment_status = 'success';
115
-            $payment = $this->multiplePayment($clientid,$invoiceChecked, $payment_method,
115
+            $payment = $this->multiplePayment($clientid, $invoiceChecked, $payment_method,
116 116
              $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status);
117 117
             $response = ['type' => 'success', 'message' => 'Payment Updated Successfully'];
118 118
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         }
130 130
     }
131 131
 
132
-    public function multiplePayment($clientid,$invoiceChecked, $payment_method,
132
+    public function multiplePayment($clientid, $invoiceChecked, $payment_method,
133 133
              $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status)
134 134
     {
135 135
         try {
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
             $invoicAmount = $request->invoiceAmount;
205 205
             $amtToCredit = $request->amtToCredit;
206 206
             $payment_status = 'success';
207
-            $payment = $this->updatePaymentByInvoice($clientid,$invoiceChecked, $payment_method,
207
+            $payment = $this->updatePaymentByInvoice($clientid, $invoiceChecked, $payment_method,
208 208
              $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status);
209 209
             $response = ['type' => 'success', 'message' => 'Payment Updated Successfully'];
210 210
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
         }
219 219
     }
220 220
 
221
-    public function updatePaymentByInvoice($clientid,$invoiceChecked, $payment_method,
221
+    public function updatePaymentByInvoice($clientid, $invoiceChecked, $payment_method,
222 222
              $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status)
223 223
     {
224 224
         try {
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
             $orders = $order->where('client', $clientid)->get();
37 37
 
38 38
             return view('themes.default1.invoice.newpayment', compact('clientid', 'client', 'invoices',  'orders',
39
-                  'invoiceSum', 'amountReceived', 'pendingAmount', 'currency', 'symbol'));
39
+                    'invoiceSum', 'amountReceived', 'pendingAmount', 'currency', 'symbol'));
40 40
         } catch (Exception $ex) {
41 41
             return redirect()->back()->with('fails', $ex->getMessage());
42 42
         }
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
             $amtToCredit = $request->amtToCredit;
118 118
             $payment_status = 'success';
119 119
             $payment = $this->multiplePayment($clientid,$invoiceChecked, $payment_method,
120
-             $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status);
120
+                $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status);
121 121
             $response = ['type' => 'success', 'message' => 'Payment Updated Successfully'];
122 122
 
123 123
             return response()->json($response);
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     }
135 135
 
136 136
     public function multiplePayment($clientid,$invoiceChecked, $payment_method,
137
-             $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status)
137
+                $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status)
138 138
     {
139 139
         try {
140 140
             foreach ($invoiceChecked as $key => $value) {
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
             $amtToCredit = $request->amtToCredit;
219 219
             $payment_status = 'success';
220 220
             $payment = $this->updatePaymentByInvoice($clientid,$invoiceChecked, $payment_method,
221
-             $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status);
221
+                $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status);
222 222
             $response = ['type' => 'success', 'message' => 'Payment Updated Successfully'];
223 223
 
224 224
             return response()->json($response);
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
     }
233 233
 
234 234
     public function updatePaymentByInvoice($clientid,$invoiceChecked, $payment_method,
235
-             $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status)
235
+                $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status)
236 236
     {
237 237
         try {
238 238
             $sum = 0;
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
                 if ($key != 0) {//If Payment is linked to Invoice
241 241
                     $invoice = Invoice::find($value);
242 242
                     Payment::where('user_id', $clientid)->where('invoice_id', 0)
243
-                     ->update(['amt_to_credit'=>$amtToCredit]);
243
+                        ->update(['amt_to_credit'=>$amtToCredit]);
244 244
                     $invoice_status = 'pending';
245 245
                     $payment = Payment::create([
246 246
                         'invoice_id'     => $value,
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -138,7 +138,8 @@  discard block
 block discarded – undo
138 138
     {
139 139
         try {
140 140
             foreach ($invoiceChecked as $key => $value) {
141
-                if ($key != 0) {//If Payment is linked to Invoice
141
+                if ($key != 0) {
142
+//If Payment is linked to Invoice
142 143
                     $invoice = Invoice::find($value);
143 144
                     $invoice_status = 'pending';
144 145
                     $invoicAmount[$key] = $invoicAmount[$key] == '' ? 0 : $invoicAmount[$key];
@@ -166,7 +167,8 @@  discard block
 block discarded – undo
166 167
                         $invoice->status = $invoice_status;
167 168
                         $invoice->save();
168 169
                     }
169
-                } elseif (count($invoiceChecked) == 1 || $amtToCredit > 0) {//If Payment is not linked to any invoice and is to be credited to User Accunt
170
+                } elseif (count($invoiceChecked) == 1 || $amtToCredit > 0) {
171
+//If Payment is not linked to any invoice and is to be credited to User Accunt
170 172
                     $totalExtraSum = Payment::where('user_id', $clientid)->where('invoice_id', 0)
171 173
                     ->pluck('amt_to_credit')->first(); //Get the total Extra Amt Paid
172 174
                     if ($totalExtraSum) {
@@ -237,7 +239,8 @@  discard block
 block discarded – undo
237 239
         try {
238 240
             $sum = 0;
239 241
             foreach ($invoiceChecked as $key => $value) {
240
-                if ($key != 0) {//If Payment is linked to Invoice
242
+                if ($key != 0) {
243
+//If Payment is linked to Invoice
241 244
                     $invoice = Invoice::find($value);
242 245
                     Payment::where('user_id', $clientid)->where('invoice_id', 0)
243 246
                      ->update(['amt_to_credit'=>$amtToCredit]);
Please login to merge, or discard this patch.
app/Model/Payment/Currency.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         return '';
34 34
 
35 35
         // return "Product  has been {$eventName}";
36
-         // \Auth::user()->activity;
36
+            // \Auth::user()->activity;
37 37
     }
38 38
 
39 39
     public function country()
Please login to merge, or discard this patch.
app/Http/Controllers/Order/TaxRatesAndCodeExpiryController.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
                         '<td style="border-bottom: 1px solid#ccc; color: #333; 
187 187
                         font-family: Arial,sans-serif; font-size: 14px; line-height: 20px;
188 188
                          padding: 15px 8px;" valign="top">'.$this->currency($invoiceid).' '
189
-                         .$item->subtotal.'</td>'.
189
+                            .$item->subtotal.'</td>'.
190 190
                         '</tr>';
191 191
             }
192 192
         }
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 
287 287
             return view('themes.default1.invoice.editPayment',
288 288
                 compact('amountReceived','clientid', 'client', 'invoices',  'orders',
289
-                  'invoiceSum', 'amountReceived', 'pendingAmount', 'currency', 'symbol'));
289
+                    'invoiceSum', 'amountReceived', 'pendingAmount', 'currency', 'symbol'));
290 290
         } catch (\Exception $e) {
291 291
             Bugsnag::notifyException($e);
292 292
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
      **/
17 17
     public function getGrandTotal($code, $total, $cost, $productid, $currency, $user_id = '')
18 18
     {
19
-        if (! $total) {
19
+        if (!$total) {
20 20
             return ['total'=>$total, 'code'=>'', 'value'=>'', 'mode'=>''];
21 21
         }
22 22
         if ($code) {
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         $currency = Currency::where('code', $currency_code)->first();
105 105
         if ($currency) {
106 106
             $cur = $currency->symbol;
107
-            if (! $cur) {
107
+            if (!$cur) {
108 108
                 $cur = $currency->code;
109 109
             }
110 110
         }
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
             $orders = $order->where('client', $clientid)->get();
200 200
 
201 201
             return view('themes.default1.invoice.editPayment',
202
-                compact('amountReceived','clientid', 'client', 'invoices',  'orders',
202
+                compact('amountReceived', 'clientid', 'client', 'invoices', 'orders',
203 203
                   'invoiceSum', 'amountReceived', 'pendingAmount', 'currency', 'symbol'));
204 204
         } catch (\Exception $e) {
205 205
             Bugsnag::notifyException($e);
Please login to merge, or discard this patch.