Completed
Pull Request — development (#453)
by Ashutosh
36:18 queued 22:25
created
app/Http/Controllers/Order/InvoiceController.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -121,21 +121,21 @@  discard block
 block discarded – undo
121 121
 
122 122
                             return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'</a>';
123 123
                         })
124
-                         ->addColumn('number', function ($model) {
125
-                             return ucfirst($model->number);
126
-                         })
124
+                            ->addColumn('number', function ($model) {
125
+                                return ucfirst($model->number);
126
+                            })
127 127
 
128 128
                         ->addColumn('date', function ($model) {
129 129
                             $date = date_create($model->created_at);
130 130
 
131 131
                             return "<span style='display:none'>$model->id</span>".$date->format('l, F j, Y H:m');
132 132
                         })
133
-                         ->addColumn('grand_total', function ($model) {
134
-                             return ucfirst($model->number);
135
-                         })
136
-                          ->addColumn('status', function ($model) {
137
-                              return ucfirst($model->status);
138
-                          })
133
+                            ->addColumn('grand_total', function ($model) {
134
+                                return ucfirst($model->number);
135
+                            })
136
+                            ->addColumn('status', function ($model) {
137
+                                return ucfirst($model->status);
138
+                            })
139 139
 
140 140
                         ->addColumn('action', function ($model) {
141 141
                             $action = '';
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
                                     ."   $action";
155 155
                         })
156 156
 
157
-                         ->rawColumns(['checkbox', 'user_id', 'number', 'date', 'grand_total', 'status', 'action'])
157
+                            ->rawColumns(['checkbox', 'user_id', 'number', 'date', 'grand_total', 'status', 'action'])
158 158
                         ->make(true);
159 159
     }
160 160
 
@@ -283,8 +283,8 @@  discard block
 block discarded – undo
283 283
             $symbol = $attributes[0]['currency'][0]['code'];
284 284
             //dd($symbol);
285 285
             $invoice = $this->invoice->create(['user_id' => $user_id, 'number' => $number,
286
-             'date'                                      => $date, 'grand_total' => $grand_total, 'status' => 'pending',
287
-             'currency'                                  => $symbol, ]);
286
+                'date'                                      => $date, 'grand_total' => $grand_total, 'status' => 'pending',
287
+                'currency'                                  => $symbol, ]);
288 288
 
289 289
             foreach (\Cart::getContent() as $cart) {
290 290
                 $this->createInvoiceItems($invoice->id, $cart);
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
                 'currency'                        => $currency, 'status' => 'pending', 'description' => $description, ]);
389 389
 
390 390
             $items = $this->createInvoiceItemsByAdmin($invoice->id, $productid,
391
-             $code, $total, $currency, $qty, $plan, $user_id, $tax_name, $tax_rate);
391
+                $code, $total, $currency, $qty, $plan, $user_id, $tax_name, $tax_rate);
392 392
             $result = $this->getMessage($items, $user_id);
393 393
         } catch (\Exception $ex) {
394 394
             app('log')->useDailyFiles(storage_path().'/laravel.log');
@@ -537,7 +537,7 @@  discard block
 block discarded – undo
537 537
                 } elseif ($this->tax_option->tax_enable == 0) {//if tax_enable is 0
538 538
 
539 539
                     $taxClassId = Tax::where('country', '')->where('state', 'Any State')
540
-                     ->pluck('tax_classes_id')->first(); //In case of India when
540
+                        ->pluck('tax_classes_id')->first(); //In case of India when
541 541
                     //other tax is available and tax is not enabled
542 542
                     if ($taxClassId) {
543 543
                         $rate = $this->getTotalRate($taxClassId, $productid, $taxs);
@@ -606,10 +606,10 @@  discard block
 block discarded – undo
606 606
         foreach ($taxes as $key => $tax) {
607 607
             if ($taxes[0]) {
608 608
                 $tax_attribute[$key] = ['name' => $tax->name, 'name1' => $name1,
609
-                 'name2'                       => $name2, 'name3' => $name3, 'name4' => $name4,
610
-                 'rate'                        => $value, 'rate1'=>$c_gst, 'rate2'=>$s_gst,
611
-                 'rate3'                       => $i_gst, 'rate4'=>$ut_gst, 'state'=>$state_code,
612
-                  'origin_state'               => $origin_state, ];
609
+                    'name2'                       => $name2, 'name3' => $name3, 'name4' => $name4,
610
+                    'rate'                        => $value, 'rate1'=>$c_gst, 'rate2'=>$s_gst,
611
+                    'rate3'                       => $i_gst, 'rate4'=>$ut_gst, 'state'=>$state_code,
612
+                    'origin_state'               => $origin_state, ];
613 613
 
614 614
                 $rate = $tax->rate;
615 615
 
@@ -818,8 +818,8 @@  discard block
 block discarded – undo
818 818
                 }
819 819
 
820 820
                 return view('themes.default1.invoice.payment',
821
-                 compact('invoice_status', 'payment_status',
822
-                  'payment_method', 'invoice_id', 'domain', 'invoice'));
821
+                    compact('invoice_status', 'payment_status',
822
+                    'payment_method', 'invoice_id', 'domain', 'invoice'));
823 823
             }
824 824
 
825 825
             return redirect()->back();
@@ -857,7 +857,7 @@  discard block
 block discarded – undo
857 857
                 case 1:
858 858
                     $percentage = $price * ($value / 100);
859 859
 
860
-                     return $price - $percentage;
860
+                        return $price - $percentage;
861 861
                 case 2:
862 862
                     return $price - $value;
863 863
                 case 3:
@@ -889,7 +889,7 @@  discard block
 block discarded – undo
889 889
             $payment_date = \Carbon\Carbon::now()->toDateTimeString();
890 890
             $amount = $grand_total;
891 891
             $paymentRenewal = $this->updateInvoicePayment($invoiceid, $payment_method,
892
-             $payment_status, $payment_date, $amount);
892
+                $payment_status, $payment_date, $amount);
893 893
 
894 894
             return redirect()->back()->with('success', 'Payment Accepted Successfully');
895 895
         } catch (\Exception $ex) {
Please login to merge, or discard this patch.