@@ -109,14 +109,14 @@ discard block |
||
109 | 109 | |
110 | 110 | if ($plan_id != 0) { |
111 | 111 | $this->addSubscription($order->id, $plan_id, $version, $product, $serial_key); |
112 | - } |
|
112 | + } |
|
113 | 113 | |
114 | 114 | $this->sendOrderMail($user_id, $order->id, $item->id); |
115 | 115 | //Update Subscriber To Mailchimp |
116 | 116 | $mailchimpStatus = StatusSetting::pluck('mailchimp_status')->first(); |
117 | 117 | if ($mailchimpStatus == 1) { |
118 | - $this->addtoMailchimp($product, $user_id, $item); |
|
119 | - } |
|
118 | + $this->addtoMailchimp($product, $user_id, $item); |
|
119 | + } |
|
120 | 120 | |
121 | 121 | } catch (\Exception $ex) { |
122 | 122 | Bugsnag::notifyException($ex); |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | $data = $template->data; |
295 | 295 | $replace = [ |
296 | 296 | 'name' => $user->first_name.' '.$user->last_name, |
297 | - 'serialkeyurl' => $myaccounturl, |
|
297 | + 'serialkeyurl' => $myaccounturl, |
|
298 | 298 | 'downloadurl' => $downloadurl, |
299 | 299 | 'invoiceurl' => $invoiceurl, |
300 | 300 | 'product' => $product, |
@@ -60,7 +60,7 @@ |
||
60 | 60 | $planid = \Session::get('plan'); |
61 | 61 | } |
62 | 62 | if (count(\Cart::getContent())) { |
63 | - $product_price = $cart_control->planCost($productid, $userid, $planid = ''); |
|
63 | + $product_price = $cart_control->planCost($productid, $userid, $planid = ''); |
|
64 | 64 | } |
65 | 65 | $updated_price = $this->findCost($promotion_type, $promotion_value, $product_price, $productid); |
66 | 66 |
@@ -32,32 +32,32 @@ discard block |
||
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; |
|
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 | 39 | |
40 | 40 | for ($i=0; $i <= $c-1; $i++) { |
41 | 41 | $sum = $sum + $payment[$i]->amount; |
42 | 42 | } |
43 | 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; |
|
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 | 50 | |
51 | 51 | for ($i=0; $i <= $c-1; $i++) { |
52 | 52 | $sum = $sum + $payment[$i]->amount; |
53 | 53 | } |
54 | - $pendingAmount = ($model->grand_total)-($sum); |
|
54 | + $pendingAmount = ($model->grand_total)-($sum); |
|
55 | 55 | |
56 | - return currency_format($pendingAmount, $code = $client->currency); |
|
57 | - }) |
|
58 | - ->addColumn('status', function ($model) { |
|
59 | - return $model->status; |
|
60 | - }) |
|
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 |
||
78 | 78 | style='color:white;'> </i> 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 |
||
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,32 +151,32 @@ discard block |
||
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 { |
158 | 158 | $amount = currency_format($model->amount, $code = $client->currency); |
159 | 159 | } |
160 | 160 | |
161 | - return $amount; |
|
162 | - }) |
|
163 | - ->addColumn('status', function ($model) { |
|
164 | - return ucfirst($model->payment_status); |
|
165 | - }) |
|
161 | + return $amount; |
|
162 | + }) |
|
163 | + ->addColumn('status', function ($model) { |
|
164 | + return ucfirst($model->payment_status); |
|
165 | + }) |
|
166 | 166 | |
167 | - ->addColumn('action', function ($model) { |
|
168 | - '<input type="hidden" class="paymentid" value="{{$model->id}}">'; |
|
167 | + ->addColumn('action', function ($model) { |
|
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> Edit</a>"; |
171 | 171 | ; |
172 | 172 | } else { |
173 | 173 | return '--'; |
174 | 174 | } |
175 | - }) |
|
175 | + }) |
|
176 | 176 | |
177 | 177 | |
178 | 178 | ->rawColumns(['checkbox', 'invoice_no', 'date', 'payment_method', 'total', 'status','action']) |
179 | 179 | |
180 | 180 | ->make(true); |
181 | - } |
|
181 | + } |
|
182 | 182 | } |
@@ -14,11 +14,11 @@ discard block |
||
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 = $client->timezone()->first()->name; |
24 | 24 | $date1->setTimezone(new \DateTimeZone($tz)); |
@@ -26,39 +26,39 @@ discard block |
||
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; |
39 | 39 | |
40 | - for ($i=0; $i <= $c-1; $i++) { |
|
40 | + for ($i = 0; $i <= $c - 1; $i++) { |
|
41 | 41 | $sum = $sum + $payment[$i]->amount; |
42 | 42 | } |
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; |
50 | 50 | |
51 | - for ($i=0; $i <= $c-1; $i++) { |
|
51 | + for ($i = 0; $i <= $c - 1; $i++) { |
|
52 | 52 | $sum = $sum + $payment[$i]->amount; |
53 | 53 | } |
54 | - $pendingAmount = ($model->grand_total)-($sum); |
|
54 | + $pendingAmount = ($model->grand_total) - ($sum); |
|
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 |
||
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> View</a>"; |
@@ -133,25 +133,25 @@ discard block |
||
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 |
||
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> Edit</a>"; |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | }) |
176 | 176 | |
177 | 177 | |
178 | - ->rawColumns(['checkbox', 'invoice_no', 'date', 'payment_method', 'total', 'status','action']) |
|
178 | + ->rawColumns(['checkbox', 'invoice_no', 'date', 'payment_method', 'total', 'status', 'action']) |
|
179 | 179 | |
180 | 180 | ->make(true); |
181 | 181 | } |