@@ -36,9 +36,9 @@ |
||
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'). |
@@ -32,21 +32,21 @@ |
||
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-primary btn-xs'><i class='fa fa-edit' |
47 | 47 | style='color:white;'> </i> Edit</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()); |
@@ -31,19 +31,19 @@ |
||
31 | 31 | public function getPages() |
32 | 32 | { |
33 | 33 | return \DataTables::of($this->widget->get()) |
34 | - ->addColumn('checkbox', function ($model) { |
|
35 | - return "<input type='checkbox' class='widget_checkbox' |
|
34 | + ->addColumn('checkbox', function ($model) { |
|
35 | + return "<input type='checkbox' class='widget_checkbox' |
|
36 | 36 | value=".$model->id.' name=select[] id=check>'; |
37 | - }) |
|
38 | - ->addColumn('name', function ($model) { |
|
39 | - return ucfirst($model->name); |
|
40 | - }) |
|
37 | + }) |
|
38 | + ->addColumn('name', function ($model) { |
|
39 | + return ucfirst($model->name); |
|
40 | + }) |
|
41 | 41 | ->addColumn('type', function ($model) { |
42 | 42 | return $model->type; |
43 | 43 | }) |
44 | - ->addColumn('created_at', function ($model) { |
|
45 | - return $model->created_at; |
|
46 | - }) |
|
44 | + ->addColumn('created_at', function ($model) { |
|
45 | + return $model->created_at; |
|
46 | + }) |
|
47 | 47 | // ->showColumns('name', 'type', 'created_at') |
48 | 48 | ->addColumn('content', function ($model) { |
49 | 49 | return str_limit($model->content, 10, '...'); |
@@ -31,24 +31,24 @@ |
||
31 | 31 | public function getPages() |
32 | 32 | { |
33 | 33 | return \DataTables::of($this->widget->get()) |
34 | - ->addColumn('checkbox', function ($model) { |
|
34 | + ->addColumn('checkbox', function($model) { |
|
35 | 35 | return "<input type='checkbox' class='widget_checkbox' |
36 | 36 | value=".$model->id.' name=select[] id=check>'; |
37 | 37 | }) |
38 | - ->addColumn('name', function ($model) { |
|
38 | + ->addColumn('name', function($model) { |
|
39 | 39 | return ucfirst($model->name); |
40 | 40 | }) |
41 | - ->addColumn('type', function ($model) { |
|
41 | + ->addColumn('type', function($model) { |
|
42 | 42 | return $model->type; |
43 | 43 | }) |
44 | - ->addColumn('created_at', function ($model) { |
|
44 | + ->addColumn('created_at', function($model) { |
|
45 | 45 | return $model->created_at; |
46 | 46 | }) |
47 | 47 | // ->showColumns('name', 'type', 'created_at') |
48 | - ->addColumn('content', function ($model) { |
|
48 | + ->addColumn('content', function($model) { |
|
49 | 49 | return str_limit($model->content, 10, '...'); |
50 | 50 | }) |
51 | - ->addColumn('action', function ($model) { |
|
51 | + ->addColumn('action', function($model) { |
|
52 | 52 | return '<a href='.url('widgets/'.$model->id.'/edit')." |
53 | 53 | class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit' |
54 | 54 | style='color:white;'> </i> Edit</a>"; |
@@ -36,7 +36,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 { |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $orders = $order->where('client', $clientid)->get(); |
38 | 38 | |
39 | 39 | return view('themes.default1.invoice.newpayment', compact('clientid', 'client', 'invoices', 'orders', |
40 | - 'invoiceSum', 'amountReceived', 'pendingAmount', 'currency', 'symbol')); |
|
40 | + 'invoiceSum', 'amountReceived', 'pendingAmount', 'currency', 'symbol')); |
|
41 | 41 | } catch (Exception $ex) { |
42 | 42 | return redirect()->back()->with('fails', $ex->getMessage()); |
43 | 43 | } |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | public function postNewPayment($clientid, Request $request) |
47 | 47 | { |
48 | 48 | $this->validate($request, [ |
49 | - 'payment_date' => 'required', |
|
50 | - 'payment_method'=> 'required', |
|
51 | - 'amount' => 'required', |
|
49 | + 'payment_date' => 'required', |
|
50 | + 'payment_method'=> 'required', |
|
51 | + 'amount' => 'required', |
|
52 | 52 | ]); |
53 | 53 | |
54 | 54 | try { |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $amtToCredit = $request->amtToCredit; |
114 | 114 | $payment_status = 'success'; |
115 | 115 | $payment = $this->multiplePayment($clientid,$invoiceChecked, $payment_method, |
116 | - $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status); |
|
116 | + $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status); |
|
117 | 117 | $response = ['type' => 'success', 'message' => 'Payment Updated Successfully']; |
118 | 118 | |
119 | 119 | return response()->json($response); |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | } |
131 | 131 | |
132 | 132 | public function multiplePayment($clientid,$invoiceChecked, $payment_method, |
133 | - $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status) |
|
133 | + $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status) |
|
134 | 134 | { |
135 | 135 | try { |
136 | 136 | foreach ($invoiceChecked as $key => $value) { |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | $amtToCredit = $request->amtToCredit; |
212 | 212 | $payment_status = 'success'; |
213 | 213 | $payment = $this->updatePaymentByInvoice($clientid,$invoiceChecked, $payment_method, |
214 | - $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status); |
|
214 | + $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status); |
|
215 | 215 | $response = ['type' => 'success', 'message' => 'Payment Updated Successfully']; |
216 | 216 | |
217 | 217 | return response()->json($response); |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | } |
226 | 226 | |
227 | 227 | public function updatePaymentByInvoice($clientid,$invoiceChecked, $payment_method, |
228 | - $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status) |
|
228 | + $payment_date, $totalAmt, $invoicAmount, $amtToCredit, $payment_status) |
|
229 | 229 | { |
230 | 230 | try { |
231 | 231 | $sum = 0; |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | if ($key != 0) {//If Payment is linked to Invoice |
234 | 234 | $invoice = Invoice::find($value); |
235 | 235 | Payment::where('user_id', $clientid)->where('invoice_id', 0) |
236 | - ->update(['amt_to_credit'=>$amtToCredit]); |
|
236 | + ->update(['amt_to_credit'=>$amtToCredit]); |
|
237 | 237 | $invoice_status = 'pending'; |
238 | 238 | $payment = Payment::create([ |
239 | 239 | 'invoice_id' => $value, |
@@ -134,7 +134,8 @@ discard block |
||
134 | 134 | { |
135 | 135 | try { |
136 | 136 | foreach ($invoiceChecked as $key => $value) { |
137 | - if ($key != 0) {//If Payment is linked to Invoice |
|
137 | + if ($key != 0) { |
|
138 | +//If Payment is linked to Invoice |
|
138 | 139 | $invoice = Invoice::find($value); |
139 | 140 | $invoice_status = 'pending'; |
140 | 141 | $payment = Payment::where('invoice_id', $value)->create([ |
@@ -159,7 +160,8 @@ discard block |
||
159 | 160 | $invoice->status = $invoice_status; |
160 | 161 | $invoice->save(); |
161 | 162 | } |
162 | - } elseif (count($invoiceChecked) == 1 || $amtToCredit > 0) {//If Payment is not linked to any invoice and is to be credited to User Accunt |
|
163 | + } elseif (count($invoiceChecked) == 1 || $amtToCredit > 0) { |
|
164 | +//If Payment is not linked to any invoice and is to be credited to User Accunt |
|
163 | 165 | $totalExtraSum = Payment::where('user_id', $clientid)->where('invoice_id', 0) |
164 | 166 | ->pluck('amt_to_credit')->first(); //Get the total Extra Amt Paid |
165 | 167 | if ($totalExtraSum) { |
@@ -230,7 +232,8 @@ discard block |
||
230 | 232 | try { |
231 | 233 | $sum = 0; |
232 | 234 | foreach ($invoiceChecked as $key => $value) { |
233 | - if ($key != 0) {//If Payment is linked to Invoice |
|
235 | + if ($key != 0) { |
|
236 | +//If Payment is linked to Invoice |
|
234 | 237 | $invoice = Invoice::find($value); |
235 | 238 | Payment::where('user_id', $clientid)->where('invoice_id', 0) |
236 | 239 | ->update(['amt_to_credit'=>$amtToCredit]); |
@@ -33,7 +33,7 @@ |
||
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() |
@@ -33,6 +33,6 @@ |
||
33 | 33 | return ''; |
34 | 34 | |
35 | 35 | // return "Product has been {$eventName}"; |
36 | - // \Auth::user()->activity; |
|
36 | + // \Auth::user()->activity; |
|
37 | 37 | } |
38 | 38 | } |
@@ -33,6 +33,6 @@ |
||
33 | 33 | return ''; |
34 | 34 | |
35 | 35 | // return "Product has been {$eventName}"; |
36 | - // \Auth::user()->activity; |
|
36 | + // \Auth::user()->activity; |
|
37 | 37 | } |
38 | 38 | } |
@@ -122,18 +122,18 @@ discard block |
||
122 | 122 | public function getTemplates() |
123 | 123 | { |
124 | 124 | return \DataTables::of($this->template->select('id', 'name', 'type')->get()) |
125 | - ->addColumn('checkbox', function ($model) { |
|
125 | + ->addColumn('checkbox', function($model) { |
|
126 | 126 | return "<input type='checkbox' class='template_checkbox' |
127 | 127 | value=".$model->id.' name=select[] id=check>'; |
128 | 128 | }) |
129 | 129 | |
130 | - ->addColumn('name', function ($model) { |
|
130 | + ->addColumn('name', function($model) { |
|
131 | 131 | return $model->name; |
132 | 132 | }) |
133 | - ->addColumn('type', function ($model) { |
|
133 | + ->addColumn('type', function($model) { |
|
134 | 134 | return $this->type->where('id', $model->type)->first()->name; |
135 | 135 | }) |
136 | - ->addColumn('action', function ($model) { |
|
136 | + ->addColumn('action', function($model) { |
|
137 | 137 | return '<a href='.url('templates/'.$model->id.'/edit'). |
138 | 138 | " class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit' |
139 | 139 | style='color:white;'> </i> Edit</a>"; |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | |
285 | 285 | $settings = \App\Model\Common\Setting::find(1); |
286 | 286 | $fromname = $settings->company; |
287 | - \Mail::send('emails.mail', ['data' => $data], function ($m) use ($from, $to, $subject, $fromname, $toname, $cc, $attach) { |
|
287 | + \Mail::send('emails.mail', ['data' => $data], function($m) use ($from, $to, $subject, $fromname, $toname, $cc, $attach) { |
|
288 | 288 | $m->from($from, $fromname); |
289 | 289 | |
290 | 290 | $m->to($to, $toname)->subject($subject); |
@@ -122,9 +122,9 @@ discard block |
||
122 | 122 | value=".$model->id.' name=select[] id=check>'; |
123 | 123 | }) |
124 | 124 | |
125 | - ->addColumn('name', function ($model) { |
|
126 | - return $model->name; |
|
127 | - }) |
|
125 | + ->addColumn('name', function ($model) { |
|
126 | + return $model->name; |
|
127 | + }) |
|
128 | 128 | ->addColumn('type', function ($model) { |
129 | 129 | return $this->type->where('id', $model->type)->first()->name; |
130 | 130 | }) |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | } |
269 | 269 | |
270 | 270 | public function mailing($from, $to, $data, $subject, $replace = [], |
271 | - $type = '', $fromname = '', $toname = '', $cc = [], $attach = []) |
|
271 | + $type = '', $fromname = '', $toname = '', $cc = [], $attach = []) |
|
272 | 272 | { |
273 | 273 | try { |
274 | 274 | $transform = []; |
@@ -301,10 +301,10 @@ discard block |
||
301 | 301 | 'date' => date('Y-m-d H:i:s'), |
302 | 302 | 'from' => $from, |
303 | 303 | 'to' => $to, |
304 | - 'subject' => $subject, |
|
304 | + 'subject' => $subject, |
|
305 | 305 | 'body' => $data, |
306 | - 'status' => 'success', |
|
307 | - ]); |
|
306 | + 'status' => 'success', |
|
307 | + ]); |
|
308 | 308 | |
309 | 309 | return 'success'; |
310 | 310 | } catch (\Exception $ex) { |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | 'date' => date('Y-m-d H:i:s'), |
313 | 313 | 'from' => $from, |
314 | 314 | 'to' => $to, |
315 | - 'subject' => $subject, |
|
315 | + 'subject' => $subject, |
|
316 | 316 | 'body' => $data, |
317 | 317 | 'status' => 'failed', |
318 | 318 | ]); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | 'zip' => 'required|numeric', |
38 | 38 | 'user_name' => 'required|unique:users,user_name,'.$userid, |
39 | 39 | 'bussiness' => 'required', |
40 | - 'profile_pic' => 'sometimes|mimes:jpeg,jpg,png,gif|max:100000', |
|
40 | + 'profile_pic' => 'sometimes|mimes:jpeg,jpg,png,gif|max:100000', |
|
41 | 41 | |
42 | 42 | ]; |
43 | 43 | } |
@@ -46,10 +46,10 @@ discard block |
||
46 | 46 | $userid = \Auth::user()->id; |
47 | 47 | |
48 | 48 | return [ |
49 | - 'first_name' => 'required|min:3|max:30', |
|
49 | + 'first_name' => 'required|min:3|max:30', |
|
50 | 50 | 'last_name' => 'required|max:30', |
51 | - 'mobile' => 'required|regex:/[0-9]/|min:5|max:20', |
|
52 | - 'email' => 'required', |
|
51 | + 'mobile' => 'required|regex:/[0-9]/|min:5|max:20', |
|
52 | + 'email' => 'required', |
|
53 | 53 | 'mobile_code' => 'required|numeric', |
54 | 54 | 'mobile' => 'required|numeric', |
55 | 55 | 'zip' => 'required|numeric', |
@@ -19,7 +19,7 @@ |
||
19 | 19 | protected static $logName = 'Product'; |
20 | 20 | |
21 | 21 | protected static $logAttributes = ['name', 'description', 'type', 'file', 'category', |
22 | - 'github_owner', 'github_repository', 'version', 'subscription', 'hidden', 'product_sku', ]; |
|
22 | + 'github_owner', 'github_repository', 'version', 'subscription', 'hidden', 'product_sku', ]; |
|
23 | 23 | |
24 | 24 | protected static $logOnlyDirty = true; |
25 | 25 |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | use LogsActivity; |
11 | 11 | protected $table = 'products'; |
12 | 12 | protected $fillable = ['name', 'description', 'type', 'group', 'file', 'image', 'require_domain', 'category', |
13 | - 'can_modify_agent', 'can_modify_quantity', 'show_agent', 'tax_apply', 'show_product_quantity', 'hidden', 'auto_terminate', |
|
13 | + 'can_modify_agent', 'can_modify_quantity', 'show_agent', 'tax_apply', 'show_product_quantity', 'hidden', 'auto_terminate', |
|
14 | 14 | 'setup_order_placed', 'setup_first_payment', 'setup_accept_manually', |
15 | 15 | 'no_auto_setup', 'shoping_cart_link', 'process_url', 'github_owner', |
16 | 16 | 'github_repository', |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | protected static $logName = 'Product'; |
20 | 20 | |
21 | 21 | protected static $logAttributes = ['name', 'description', 'type', 'file', 'category', |
22 | - 'github_owner', 'github_repository', 'version', 'subscription', 'hidden', 'product_sku', ]; |
|
22 | + 'github_owner', 'github_repository', 'version', 'subscription', 'hidden', 'product_sku', ]; |
|
23 | 23 | |
24 | 24 | protected static $logOnlyDirty = true; |
25 | 25 |