@@ -19,28 +19,28 @@ |
||
19 | 19 | ->get(); |
20 | 20 | |
21 | 21 | return \DataTables::of($new_upload) |
22 | - ->addColumn('checkbox', function ($model) { |
|
22 | + ->addColumn('checkbox', function($model) { |
|
23 | 23 | return "<input type='checkbox' class='upload_checkbox' value=".$model->id.' name=select[] id=checks>'; |
24 | 24 | }) |
25 | 25 | |
26 | - ->addColumn('product_id', function ($model) { |
|
26 | + ->addColumn('product_id', function($model) { |
|
27 | 27 | return ucfirst($this->product->where('id', $model->product_id)->first()->name); |
28 | 28 | }) |
29 | 29 | |
30 | - ->addColumn('title', function ($model) { |
|
30 | + ->addColumn('title', function($model) { |
|
31 | 31 | return ucfirst($model->title); |
32 | 32 | }) |
33 | - ->addColumn('description', function ($model) { |
|
33 | + ->addColumn('description', function($model) { |
|
34 | 34 | return ucfirst($model->description); |
35 | 35 | }) |
36 | - ->addColumn('version', function ($model) { |
|
36 | + ->addColumn('version', function($model) { |
|
37 | 37 | return $model->version; |
38 | 38 | }) |
39 | 39 | |
40 | - ->addColumn('file', function ($model) { |
|
40 | + ->addColumn('file', function($model) { |
|
41 | 41 | return $model->file; |
42 | 42 | }) |
43 | - ->addColumn('action', function ($model) { |
|
43 | + ->addColumn('action', function($model) { |
|
44 | 44 | return '<a href='.('#edit-upload-option/'.$model->id).' |
45 | 45 | class=" btn btn-sm btn-primary " data-title="'.$model->title.'" |
46 | 46 | data-description="'.$model->description.'" data-version="' |
@@ -58,7 +58,8 @@ |
||
58 | 58 | $file_upload->description = $request->input('description'); |
59 | 59 | $file_upload->version = $request->input('version'); |
60 | 60 | $autoUpdateStatus = StatusSetting::pluck('update_settings')->first(); |
61 | - if ($autoUpdateStatus == 1) { //If License Setting Status is on,Add Product to the License Manager |
|
61 | + if ($autoUpdateStatus == 1) { |
|
62 | +//If License Setting Status is on,Add Product to the License Manager |
|
62 | 63 | $productSku = $file_upload->product->product_sku; |
63 | 64 | $updateClassObj = new \App\Http\Controllers\AutoUpdate\AutoUpdateController(); |
64 | 65 | $addProductToAutoUpdate = $updateClassObj->editVersion($request->input('version'), $productSku); |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | return '<a href='.('#edit-upload-option/'.$model->id).' |
45 | 45 | class=" btn btn-sm btn-primary " data-title="'.$model->title.'" |
46 | 46 | data-description="'.$model->description.'" data-version="' |
47 | - .$model->version.'" data-id="'.$model->id.'" onclick="openEditPopup(this)" >Edit</a>'; |
|
47 | + .$model->version.'" data-id="'.$model->id.'" onclick="openEditPopup(this)" >Edit</a>'; |
|
48 | 48 | }) |
49 | 49 | ->rawcolumns(['checkbox', 'product_id', 'title', 'description', 'version', 'file', 'action']) |
50 | 50 | ->make(true); |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | if ($product->require_domain == 1) { |
102 | 102 | $field .= "<div class='col-md-4 form-group'> |
103 | 103 | <label class='required'>"./* @scrutinizer ignore-type */ |
104 | - \Lang::get('message.domain')."</label> |
|
104 | + \Lang::get('message.domain')."</label> |
|
105 | 105 | <input type='text' name='domain' class='form-control' |
106 | 106 | id='domain' placeholder='http://example.com'> |
107 | 107 | </div>"; |
@@ -120,10 +120,10 @@ |
||
120 | 120 | ->addColumn('name', function ($model) { |
121 | 121 | return ucfirst($model->name); |
122 | 122 | }) |
123 | - ->addColumn('image', function ($model) { |
|
124 | - // return $model->image; |
|
125 | - return "<img src= '$model->image' + height=\"80\"/>"; |
|
126 | - }) |
|
123 | + ->addColumn('image', function ($model) { |
|
124 | + // return $model->image; |
|
125 | + return "<img src= '$model->image' + height=\"80\"/>"; |
|
126 | + }) |
|
127 | 127 | ->addColumn('type', function ($model) { |
128 | 128 | if ($this->type->where('id', $model->type)->first()) { |
129 | 129 | return $this->type->where('id', $model->type)->first()->name; |
@@ -113,18 +113,18 @@ discard block |
||
113 | 113 | |
114 | 114 | return\ DataTables::of($new_product) |
115 | 115 | |
116 | - ->addColumn('checkbox', function ($model) { |
|
116 | + ->addColumn('checkbox', function($model) { |
|
117 | 117 | return "<input type='checkbox' class='product_checkbox' |
118 | 118 | value=".$model->id.' name=select[] id=check>'; |
119 | 119 | }) |
120 | - ->addColumn('name', function ($model) { |
|
120 | + ->addColumn('name', function($model) { |
|
121 | 121 | return ucfirst($model->name); |
122 | 122 | }) |
123 | - ->addColumn('image', function ($model) { |
|
123 | + ->addColumn('image', function($model) { |
|
124 | 124 | // return $model->image; |
125 | 125 | return "<img src= '$model->image' + height=\"80\"/>"; |
126 | 126 | }) |
127 | - ->addColumn('type', function ($model) { |
|
127 | + ->addColumn('type', function($model) { |
|
128 | 128 | if ($this->type->where('id', $model->type)->first()) { |
129 | 129 | return $this->type->where('id', $model->type)->first()->name; |
130 | 130 | } else { |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | } |
133 | 133 | }) |
134 | 134 | |
135 | - ->addColumn('group', function ($model) { |
|
135 | + ->addColumn('group', function($model) { |
|
136 | 136 | if ($this->group->where('id', $model->group)->first()) { |
137 | 137 | return $this->group->where('id', $model->group)->first()->name; |
138 | 138 | } else { |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | } |
141 | 141 | }) |
142 | 142 | |
143 | - ->addColumn('Action', function ($model) { |
|
143 | + ->addColumn('Action', function($model) { |
|
144 | 144 | $url = ''; |
145 | 145 | if ($model->type == 2) { |
146 | 146 | $url = '<a href='.url('product/download/'.$model->id). |
@@ -183,7 +183,8 @@ discard block |
||
183 | 183 | $this->product_upload->save(); |
184 | 184 | $this->product->where('id', $product_id->id)->update(['version'=>$request->input('version')]); |
185 | 185 | $autoUpdateStatus = StatusSetting::pluck('update_settings')->first(); |
186 | - if ($autoUpdateStatus == 1) { //If License Setting Status is on,Add Product to the License Manager |
|
186 | + if ($autoUpdateStatus == 1) { |
|
187 | +//If License Setting Status is on,Add Product to the License Manager |
|
187 | 188 | $updateClassObj = new \App\Http\Controllers\AutoUpdate\AutoUpdateController(); |
188 | 189 | $addProductToAutoUpdate = $updateClassObj->addNewVersion($product_id->id, $request->input('version'), '1'); |
189 | 190 | } |
@@ -270,7 +271,8 @@ discard block |
||
270 | 271 | |
271 | 272 | try { |
272 | 273 | $licenseStatus = StatusSetting::pluck('license_status')->first(); |
273 | - if ($licenseStatus == 1) { //If License Setting Status is on,Add Product to the License Manager |
|
274 | + if ($licenseStatus == 1) { |
|
275 | +//If License Setting Status is on,Add Product to the License Manager |
|
274 | 276 | $addProductToLicensing = $this->licensing->addNewProduct($input['name'], $input['product_sku']); |
275 | 277 | } |
276 | 278 | $licenseCont = new \App\Http\Controllers\AutoUpdate\AutoUpdateController(); |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | $ends_at = ''; |
405 | 405 | } |
406 | 406 | $this->subscription->create(['user_id' => \Auth::user()->id, |
407 | - 'plan_id' => $planid, 'order_id' => $orderid, 'ends_at' => $ends_at, ]); |
|
407 | + 'plan_id' => $planid, 'order_id' => $orderid, 'ends_at' => $ends_at, ]); |
|
408 | 408 | } catch (\Exception $ex) { |
409 | 409 | app('log')->error($ex->getMessage()); |
410 | 410 | Bugsnag::notifyException($ex); |
@@ -455,7 +455,7 @@ discard block |
||
455 | 455 | $invoiceItem = $this->invoiceItem->create(['invoice_id' => $invoiceid, |
456 | 456 | 'product_name' => $product_name, 'regular_price' => $regular_price, |
457 | 457 | 'quantity' => $quantity, 'tax_name' => $tax_name, |
458 | - 'tax_percentage' => $tax_percentage, 'subtotal' => $subtotal, ]); |
|
458 | + 'tax_percentage' => $tax_percentage, 'subtotal' => $subtotal, ]); |
|
459 | 459 | } catch (\Exception $ex) { |
460 | 460 | app('log')->error($ex->getMessage()); |
461 | 461 | Bugsnag::notifyException($ex); |
@@ -80,7 +80,8 @@ discard block |
||
80 | 80 | */ |
81 | 81 | public function checkoutForm(Request $request) |
82 | 82 | { |
83 | - if (!\Auth::user()) {//If User is not Logged in then send him to login Page |
|
83 | + if (!\Auth::user()) { |
|
84 | +//If User is not Logged in then send him to login Page |
|
84 | 85 | $url = $request->segments(); //The requested url (chekout).Save it in Session |
85 | 86 | \Session::put('session-url', $url[0]); |
86 | 87 | $content = Cart::getContent(); |
@@ -106,7 +107,8 @@ discard block |
||
106 | 107 | |
107 | 108 | try { |
108 | 109 | $domain = $request->input('domain'); |
109 | - if ($domain) {//Store the Domain in session when user Logged In |
|
110 | + if ($domain) { |
|
111 | +//Store the Domain in session when user Logged In |
|
110 | 112 | foreach ($domain as $key => $value) { |
111 | 113 | \Session::put('domain'.$key, $value); |
112 | 114 | } |
@@ -131,7 +133,8 @@ discard block |
||
131 | 133 | public function getAttributes($content) |
132 | 134 | { |
133 | 135 | try { |
134 | - if (count($content) > 0) {//after ProductPurchase this is not true as cart is cleared |
|
136 | + if (count($content) > 0) { |
|
137 | +//after ProductPurchase this is not true as cart is cleared |
|
135 | 138 | foreach ($content as $key => $item) { |
136 | 139 | $attributes[] = $item->attributes; |
137 | 140 | $cart_currency = $attributes[0]['currency']['currency']; //Get the currency of Product in the cart |
@@ -192,8 +192,8 @@ discard block |
||
192 | 192 | $currency = $request->input('currency'); |
193 | 193 | $symbol = $request->input('symbol'); |
194 | 194 | Cart::update($id, [ |
195 | - 'price' => $price, |
|
196 | - 'attributes' => ['agents' => $agtqty, 'currency'=>['currency'=>$currency, 'symbol'=>$symbol]], |
|
195 | + 'price' => $price, |
|
196 | + 'attributes' => ['agents' => $agtqty, 'currency'=>['currency'=>$currency, 'symbol'=>$symbol]], |
|
197 | 197 | ]); |
198 | 198 | |
199 | 199 | return 'success'; |
@@ -214,8 +214,8 @@ discard block |
||
214 | 214 | $currency = $request->input('currency'); |
215 | 215 | $symbol = $request->input('symbol'); |
216 | 216 | Cart::update($id, [ |
217 | - 'price' => $price, |
|
218 | - 'attributes' => ['agents' => $agtqty, 'currency'=>['currency'=>$currency, 'symbol'=>$symbol]], |
|
217 | + 'price' => $price, |
|
218 | + 'attributes' => ['agents' => $agtqty, 'currency'=>['currency'=>$currency, 'symbol'=>$symbol]], |
|
219 | 219 | ]); |
220 | 220 | |
221 | 221 | return 'success'; |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | 'relative' => false, |
259 | 259 | 'value' => $qty, |
260 | 260 | ], |
261 | - 'price' => $price, |
|
261 | + 'price' => $price, |
|
262 | 262 | ]); |
263 | 263 | |
264 | 264 | return 'success'; |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | $actualPrice = $this->cost($product->id); |
296 | 296 | // $taxConditions = $this->checkTax($id); |
297 | 297 | $items = ['id' => $id, 'name' => $product->name, 'price' => $actualPrice, |
298 | - 'quantity' => $qty, 'attributes' => ['currency' => $currency, 'agents'=> $agents], ]; |
|
298 | + 'quantity' => $qty, 'attributes' => ['currency' => $currency, 'agents'=> $agents], ]; |
|
299 | 299 | |
300 | 300 | return $items; |
301 | 301 | } catch (\Exception $e) { |
@@ -283,7 +283,8 @@ |
||
283 | 283 | $planid = $this->checkPlanSession() === true ? Session::get('plan') : 0; //Get Plan id From Session |
284 | 284 | $product = Product::find($id); |
285 | 285 | $plan = $product->planRelation->find($planid); |
286 | - if ($plan) { //If Plan For a Product exists |
|
286 | + if ($plan) { |
|
287 | +//If Plan For a Product exists |
|
287 | 288 | $quantity = $plan->planPrice->first()->product_quantity; |
288 | 289 | //If Product quantity is null(when show agent in Product Seting Selected),then set quantity as 1; |
289 | 290 | $qty = $quantity != null ? $quantity : 1; |
@@ -72,7 +72,7 @@ |
||
72 | 72 | style='color:white;'> </i> 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') |
@@ -49,30 +49,30 @@ discard block |
||
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> 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 |
||
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()); |
@@ -144,7 +144,7 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -79,18 +79,18 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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)); |
@@ -177,11 +177,13 @@ |
||
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; |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $serial_key = $this->checkSerialKey($faveo_encrypted_key, $order_number); |
96 | 96 | |
97 | 97 | \Log::emergency(json_encode(['domain' => $request->input('domain'), |
98 | - 'serial' => $serial_key, 'order' => $order_number, ])); |
|
98 | + 'serial' => $serial_key, 'order' => $order_number, ])); |
|
99 | 99 | $result = []; |
100 | 100 | if ($request_type == 'install') { |
101 | 101 | $result = $this->verificationResult($order_number, $serial_key); |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | // $faveo_encrypted_key = self::decryptByFaveoPrivateKey($request->input('serial_key')); |
349 | 349 | // $faveo_encrypted_domain = self::decryptByFaveoPrivateKey($request->input('domain')); |
350 | 350 | $this_order = $order |
351 | - ->where('number', $faveo_encrypted_order_number) |
|
351 | + ->where('number', $faveo_encrypted_order_number) |
|
352 | 352 | // ->where('number', $request->input('order_number')) |
353 | 353 | //->where('serial_key', $faveo_encrypted_key) |
354 | 354 | //->where('domain', $faveo_encrypted_domain) |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | public function checkUpdatesExpiry(Request $request) |
401 | 401 | { |
402 | 402 | $v = \Validator::make($request->all(), [ |
403 | - 'order_number' => 'required', |
|
403 | + 'order_number' => 'required', |
|
404 | 404 | ]); |
405 | 405 | if ($v->fails()) { |
406 | 406 | $error = $v->errors(); |
@@ -44,20 +44,20 @@ discard block |
||
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 |
||
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 |
@@ -38,14 +38,14 @@ |
||
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' |