@@ -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 | } |
@@ -48,15 +48,15 @@ |
||
| 48 | 48 | $condition = new \App\Model\Mailjob\Condition(); |
| 49 | 49 | $command = $condition->getConditionValue($task); |
| 50 | 50 | switch ($task) { |
| 51 | - case 'expiryMail': |
|
| 52 | - if ($expiryMailStatus == 1) { |
|
| 53 | - return $this->getCondition($schedule->command('expiry:notification'), $command); |
|
| 54 | - } |
|
| 51 | + case 'expiryMail': |
|
| 52 | + if ($expiryMailStatus == 1) { |
|
| 53 | + return $this->getCondition($schedule->command('expiry:notification'), $command); |
|
| 54 | + } |
|
| 55 | 55 | |
| 56 | - case 'deleteLogs': |
|
| 57 | - if ($logDeleteStatus == 1) { |
|
| 58 | - return $this->getCondition($schedule->command('activitylog:clean'), $command); |
|
| 59 | - } |
|
| 56 | + case 'deleteLogs': |
|
| 57 | + if ($logDeleteStatus == 1) { |
|
| 58 | + return $this->getCondition($schedule->command('activitylog:clean'), $command); |
|
| 59 | + } |
|
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | 62 | } |
@@ -54,13 +54,13 @@ |
||
| 54 | 54 | switch ($task) { |
| 55 | 55 | case 'expiryMail': |
| 56 | 56 | if ($expiryMailStatus == 1) { |
| 57 | - return $this->getCondition($schedule->command('expiry:notification'), $command); |
|
| 58 | - } |
|
| 57 | + return $this->getCondition($schedule->command('expiry:notification'), $command); |
|
| 58 | + } |
|
| 59 | 59 | |
| 60 | 60 | case 'deleteLogs': |
| 61 | 61 | if ($logDeleteStatus == 1) { |
| 62 | - return $this->getCondition($schedule->command('activitylog:clean'), $command); |
|
| 63 | - } |
|
| 62 | + return $this->getCondition($schedule->command('activitylog:clean'), $command); |
|
| 63 | + } |
|
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | } |
@@ -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; |
@@ -87,19 +87,19 @@ discard block |
||
| 87 | 87 | return '<a href='.url('my-invoice/'.$model->id).'>'.$model->number.'</a>'; |
| 88 | 88 | } |
| 89 | 89 | }) |
| 90 | - ->addColumn('orderNo', function ($model) { |
|
| 91 | - if ($model->is_renewed) { |
|
| 92 | - return Order::find($model->order_id)->first()->getOrderLink($model->order_id, 'my-order'); |
|
| 93 | - } else { |
|
| 94 | - $allOrders = $model->order()->select('id', 'number')->get(); |
|
| 95 | - $orderArray = ''; |
|
| 96 | - foreach ($allOrders as $orders) { |
|
| 97 | - $orderArray .= $orders->getOrderLink($orders->id, 'orders'); |
|
| 98 | - } |
|
| 99 | - |
|
| 100 | - return $orderArray; |
|
| 101 | - } |
|
| 102 | - }) |
|
| 90 | + ->addColumn('orderNo', function ($model) { |
|
| 91 | + if ($model->is_renewed) { |
|
| 92 | + return Order::find($model->order_id)->first()->getOrderLink($model->order_id, 'my-order'); |
|
| 93 | + } else { |
|
| 94 | + $allOrders = $model->order()->select('id', 'number')->get(); |
|
| 95 | + $orderArray = ''; |
|
| 96 | + foreach ($allOrders as $orders) { |
|
| 97 | + $orderArray .= $orders->getOrderLink($orders->id, 'orders'); |
|
| 98 | + } |
|
| 99 | + |
|
| 100 | + return $orderArray; |
|
| 101 | + } |
|
| 102 | + }) |
|
| 103 | 103 | ->addColumn('date', function ($model) { |
| 104 | 104 | return getDateHtml($model->created_at); |
| 105 | 105 | }) |
@@ -117,21 +117,21 @@ discard block |
||
| 117 | 117 | |
| 118 | 118 | return currencyFormat($sum, $code = \Auth::user()->currency); |
| 119 | 119 | }) |
| 120 | - ->addColumn('balance', function ($model) { |
|
| 121 | - $payment = \App\Model\Order\Payment::where('invoice_id', $model->id)->select('amount')->get(); |
|
| 122 | - $c = count($payment); |
|
| 123 | - $sum = 0; |
|
| 124 | - |
|
| 125 | - for ($i = 0; $i <= $c - 1; $i++) { |
|
| 126 | - $sum = $sum + $payment[$i]->amount; |
|
| 127 | - } |
|
| 128 | - $pendingAmount = ($model->grand_total) - ($sum); |
|
| 129 | - |
|
| 130 | - return currencyFormat($pendingAmount, $code = \Auth::user()->currency); |
|
| 131 | - }) |
|
| 132 | - ->addColumn('status', function ($model) { |
|
| 133 | - return getStatusLabel($model->status, 'badge'); |
|
| 134 | - }) |
|
| 120 | + ->addColumn('balance', function ($model) { |
|
| 121 | + $payment = \App\Model\Order\Payment::where('invoice_id', $model->id)->select('amount')->get(); |
|
| 122 | + $c = count($payment); |
|
| 123 | + $sum = 0; |
|
| 124 | + |
|
| 125 | + for ($i = 0; $i <= $c - 1; $i++) { |
|
| 126 | + $sum = $sum + $payment[$i]->amount; |
|
| 127 | + } |
|
| 128 | + $pendingAmount = ($model->grand_total) - ($sum); |
|
| 129 | + |
|
| 130 | + return currencyFormat($pendingAmount, $code = \Auth::user()->currency); |
|
| 131 | + }) |
|
| 132 | + ->addColumn('status', function ($model) { |
|
| 133 | + return getStatusLabel($model->status, 'badge'); |
|
| 134 | + }) |
|
| 135 | 135 | ->addColumn('Action', function ($model) { |
| 136 | 136 | $status = $model->status; |
| 137 | 137 | $payment = ''; |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | |
| 209 | 209 | $order_id = $order->id; |
| 210 | 210 | $updatesEndDate = Subscription::select('update_ends_at') |
| 211 | - ->where('product_id', $productid)->where('order_id', $order_id)->first(); |
|
| 211 | + ->where('product_id', $productid)->where('order_id', $order_id)->first(); |
|
| 212 | 212 | if ($updatesEndDate) { |
| 213 | 213 | foreach ($versions as $version) { |
| 214 | 214 | if ($version->created_at->toDateTimeString() |
@@ -511,9 +511,9 @@ discard block |
||
| 511 | 511 | ->addColumn('payment_method', function ($model) { |
| 512 | 512 | return $model->payment_method; |
| 513 | 513 | }) |
| 514 | - ->addColumn('payment_status', function ($model) { |
|
| 515 | - return $model->payment_status; |
|
| 516 | - }) |
|
| 514 | + ->addColumn('payment_status', function ($model) { |
|
| 515 | + return $model->payment_status; |
|
| 516 | + }) |
|
| 517 | 517 | ->addColumn('created_at', function ($model) { |
| 518 | 518 | return getDateHtml($model->created_at); |
| 519 | 519 | }) |
@@ -549,12 +549,12 @@ discard block |
||
| 549 | 549 | ->addColumn('number', function ($payments) { |
| 550 | 550 | return '<a href='.url('my-invoice/'.$payments->invoice()->first()->id).'>'.$payments->invoice()->first()->number.'</a>'; |
| 551 | 551 | }) |
| 552 | - ->addColumn('total', function ($payments) { |
|
| 553 | - return $payments->amount; |
|
| 554 | - }) |
|
| 555 | - ->addColumn('created_at', function ($payments) { |
|
| 556 | - return getDateHtml($payments->created_at); |
|
| 557 | - }) |
|
| 552 | + ->addColumn('total', function ($payments) { |
|
| 553 | + return $payments->amount; |
|
| 554 | + }) |
|
| 555 | + ->addColumn('created_at', function ($payments) { |
|
| 556 | + return getDateHtml($payments->created_at); |
|
| 557 | + }) |
|
| 558 | 558 | |
| 559 | 559 | ->addColumn('payment_method', 'payment_status', 'created_at') |
| 560 | 560 | |
@@ -80,14 +80,14 @@ discard block |
||
| 80 | 80 | ->get(); |
| 81 | 81 | |
| 82 | 82 | return \DataTables::of($invoices) |
| 83 | - ->addColumn('number', function ($model) { |
|
| 83 | + ->addColumn('number', function($model) { |
|
| 84 | 84 | if ($model->is_renewed) { |
| 85 | 85 | return '<a href='.url('my-invoice/'.$model->id).'>'.$model->number.'</a> '.getStatusLabel('renewed', 'badge'); |
| 86 | 86 | } else { |
| 87 | 87 | return '<a href='.url('my-invoice/'.$model->id).'>'.$model->number.'</a>'; |
| 88 | 88 | } |
| 89 | 89 | }) |
| 90 | - ->addColumn('orderNo', function ($model) { |
|
| 90 | + ->addColumn('orderNo', function($model) { |
|
| 91 | 91 | if ($model->is_renewed) { |
| 92 | 92 | return Order::find($model->order_id)->first()->getOrderLink($model->order_id, 'my-order'); |
| 93 | 93 | } else { |
@@ -100,13 +100,13 @@ discard block |
||
| 100 | 100 | return $orderArray; |
| 101 | 101 | } |
| 102 | 102 | }) |
| 103 | - ->addColumn('date', function ($model) { |
|
| 103 | + ->addColumn('date', function($model) { |
|
| 104 | 104 | return getDateHtml($model->created_at); |
| 105 | 105 | }) |
| 106 | - ->addColumn('total', function ($model) { |
|
| 106 | + ->addColumn('total', function($model) { |
|
| 107 | 107 | return currencyFormat($model->grand_total, $code = \Auth::user()->currency); |
| 108 | 108 | }) |
| 109 | - ->addColumn('paid', function ($model) { |
|
| 109 | + ->addColumn('paid', function($model) { |
|
| 110 | 110 | $payment = \App\Model\Order\Payment::where('invoice_id', $model->id)->select('amount')->get(); |
| 111 | 111 | $c = count($payment); |
| 112 | 112 | $sum = 0; |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | |
| 118 | 118 | return currencyFormat($sum, $code = \Auth::user()->currency); |
| 119 | 119 | }) |
| 120 | - ->addColumn('balance', function ($model) { |
|
| 120 | + ->addColumn('balance', function($model) { |
|
| 121 | 121 | $payment = \App\Model\Order\Payment::where('invoice_id', $model->id)->select('amount')->get(); |
| 122 | 122 | $c = count($payment); |
| 123 | 123 | $sum = 0; |
@@ -129,10 +129,10 @@ discard block |
||
| 129 | 129 | |
| 130 | 130 | return currencyFormat($pendingAmount, $code = \Auth::user()->currency); |
| 131 | 131 | }) |
| 132 | - ->addColumn('status', function ($model) { |
|
| 132 | + ->addColumn('status', function($model) { |
|
| 133 | 133 | return getStatusLabel($model->status, 'badge'); |
| 134 | 134 | }) |
| 135 | - ->addColumn('Action', function ($model) { |
|
| 135 | + ->addColumn('Action', function($model) { |
|
| 136 | 136 | $status = $model->status; |
| 137 | 137 | $payment = ''; |
| 138 | 138 | if ($status != 'Success' && $model->grand_total > 0) { |
@@ -219,19 +219,19 @@ discard block |
||
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | return \DataTables::of($versions) |
| 222 | - ->addColumn('id', function ($versions) { |
|
| 222 | + ->addColumn('id', function($versions) { |
|
| 223 | 223 | return ucfirst($versions->id); |
| 224 | 224 | }) |
| 225 | - ->addColumn('version', function ($versions) { |
|
| 225 | + ->addColumn('version', function($versions) { |
|
| 226 | 226 | return ucfirst($versions->version); |
| 227 | 227 | }) |
| 228 | - ->addColumn('title', function ($versions) { |
|
| 228 | + ->addColumn('title', function($versions) { |
|
| 229 | 229 | return ucfirst($versions->title); |
| 230 | 230 | }) |
| 231 | - ->addColumn('description', function ($versions) { |
|
| 231 | + ->addColumn('description', function($versions) { |
|
| 232 | 232 | return ucfirst($versions->description); |
| 233 | 233 | }) |
| 234 | - ->addColumn('file', function ($versions) use ($countExpiry, $countVersions, $clientid, $invoiceid, $productid) { |
|
| 234 | + ->addColumn('file', function($versions) use ($countExpiry, $countVersions, $clientid, $invoiceid, $productid) { |
|
| 235 | 235 | $invoice_id = Invoice::where('number', $invoiceid)->pluck('id')->first(); |
| 236 | 236 | $order = Order::where('invoice_id', '=', $invoice_id)->first(); |
| 237 | 237 | $order_id = $order->id; |
@@ -297,18 +297,18 @@ discard block |
||
| 297 | 297 | } |
| 298 | 298 | |
| 299 | 299 | return \DataTables::of($link) |
| 300 | - ->addColumn('version', function ($link) { |
|
| 300 | + ->addColumn('version', function($link) { |
|
| 301 | 301 | return ucfirst($link['tag_name']); |
| 302 | 302 | }) |
| 303 | - ->addColumn('name', function ($link) { |
|
| 303 | + ->addColumn('name', function($link) { |
|
| 304 | 304 | return ucfirst($link['name']); |
| 305 | 305 | }) |
| 306 | - ->addColumn('description', function ($link) { |
|
| 306 | + ->addColumn('description', function($link) { |
|
| 307 | 307 | $markdown = Markdown::convertToHtml(ucfirst($link['body'])); |
| 308 | 308 | |
| 309 | 309 | return $markdown; |
| 310 | 310 | }) |
| 311 | - ->addColumn('file', function ($link) use ($countExpiry, $countVersions, $invoiceid, $productid) { |
|
| 311 | + ->addColumn('file', function($link) use ($countExpiry, $countVersions, $invoiceid, $productid) { |
|
| 312 | 312 | $order = Order::where('invoice_id', '=', $invoiceid)->first(); |
| 313 | 313 | $order_id = $order->id; |
| 314 | 314 | $orderEndDate = Subscription::select('update_ends_at') |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | $actionButton = $this->getActionButton($countExpiry, $countVersions, $link, $orderEndDate, $productid); |
| 318 | 318 | |
| 319 | 319 | return $actionButton; |
| 320 | - } elseif (! $orderEndDate) { |
|
| 320 | + } elseif (!$orderEndDate) { |
|
| 321 | 321 | $link = $this->github_api->getCurl1($link['zipball_url']); |
| 322 | 322 | |
| 323 | 323 | return '<p><a href='.$link['header']['Location'] |
@@ -344,23 +344,23 @@ discard block |
||
| 344 | 344 | $orders = $this->getClientPanelOrdersData(); |
| 345 | 345 | |
| 346 | 346 | return \DataTables::of($orders) |
| 347 | - ->addColumn('id', function ($model) { |
|
| 347 | + ->addColumn('id', function($model) { |
|
| 348 | 348 | return $model->id; |
| 349 | 349 | }) |
| 350 | - ->addColumn('product_name', function ($model) { |
|
| 350 | + ->addColumn('product_name', function($model) { |
|
| 351 | 351 | return $model->product_name; |
| 352 | 352 | }) |
| 353 | - ->addColumn('number', function ($model) { |
|
| 353 | + ->addColumn('number', function($model) { |
|
| 354 | 354 | return '<a href='.url('my-order/'.$model->id).'>'.$model->number.'</a>'; |
| 355 | 355 | }) |
| 356 | - ->addColumn('version', function ($model) { |
|
| 356 | + ->addColumn('version', function($model) { |
|
| 357 | 357 | return getVersionAndLabel($model->version, $model->product_id, 'badge'); |
| 358 | 358 | }) |
| 359 | - ->addColumn('expiry', function ($model) { |
|
| 359 | + ->addColumn('expiry', function($model) { |
|
| 360 | 360 | return getExpiryLabel($model->update_ends_at, 'badge'); |
| 361 | 361 | }) |
| 362 | 362 | |
| 363 | - ->addColumn('Action', function ($model) { |
|
| 363 | + ->addColumn('Action', function($model) { |
|
| 364 | 364 | $order_cont = new \App\Http\Controllers\Order\OrderController(); |
| 365 | 365 | $status = $order_cont->checkInvoiceStatusByOrderId($model->id); |
| 366 | 366 | $url = ''; |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | ->leftJoin('invoices', 'orders.invoice_id', 'invoices.id') |
| 391 | 391 | ->select('products.name as product_name', 'products.github_owner', 'products.github_repository', 'products.type', 'products.id as product_id', 'orders.id', 'orders.number', 'orders.client', 'subscriptions.id as sub_id', 'subscriptions.version', 'subscriptions.update_ends_at', 'products.name', 'orders.client', 'invoices.id as invoice_id', 'invoices.number as invoice_number') |
| 392 | 392 | ->where('orders.client', \Auth::user()->id) |
| 393 | - ->get()->map(function ($element) { |
|
| 393 | + ->get()->map(function($element) { |
|
| 394 | 394 | $element->update_ends_at = strtotime($element->update_ends_at) > 1 ? $element->update_ends_at : '--'; |
| 395 | 395 | |
| 396 | 396 | return $element; |
@@ -495,26 +495,26 @@ discard block |
||
| 495 | 495 | ->select('id', 'invoice_id', 'user_id', 'amount', 'payment_method', 'payment_status', 'created_at'); |
| 496 | 496 | |
| 497 | 497 | return \DataTables::of($payments->get()) |
| 498 | - ->addColumn('checkbox', function ($model) { |
|
| 498 | + ->addColumn('checkbox', function($model) { |
|
| 499 | 499 | return "<input type='checkbox' class='payment_checkbox' |
| 500 | 500 | value=".$model->id.' name=select[] id=check>'; |
| 501 | 501 | }) |
| 502 | - ->addColumn('number', function ($model) { |
|
| 502 | + ->addColumn('number', function($model) { |
|
| 503 | 503 | return $model->invoice()->first()->number; |
| 504 | 504 | }) |
| 505 | - ->addColumn('amount', function ($model) { |
|
| 505 | + ->addColumn('amount', function($model) { |
|
| 506 | 506 | $currency = $model->invoice()->first()->currency; |
| 507 | 507 | $total = currencyFormat($model->amount, $code = $currency); |
| 508 | 508 | |
| 509 | 509 | return $total; |
| 510 | 510 | }) |
| 511 | - ->addColumn('payment_method', function ($model) { |
|
| 511 | + ->addColumn('payment_method', function($model) { |
|
| 512 | 512 | return $model->payment_method; |
| 513 | 513 | }) |
| 514 | - ->addColumn('payment_status', function ($model) { |
|
| 514 | + ->addColumn('payment_status', function($model) { |
|
| 515 | 515 | return $model->payment_status; |
| 516 | 516 | }) |
| 517 | - ->addColumn('created_at', function ($model) { |
|
| 517 | + ->addColumn('created_at', function($model) { |
|
| 518 | 518 | return getDateHtml($model->created_at); |
| 519 | 519 | }) |
| 520 | 520 | ->rawColumns(['checkbox', 'number', 'amount', |
@@ -546,13 +546,13 @@ discard block |
||
| 546 | 546 | ->select('id', 'invoice_id', 'user_id', 'amount', 'payment_method', 'payment_status', 'created_at'); |
| 547 | 547 | |
| 548 | 548 | return \DataTables::of($payments->get()) |
| 549 | - ->addColumn('number', function ($payments) { |
|
| 549 | + ->addColumn('number', function($payments) { |
|
| 550 | 550 | return '<a href='.url('my-invoice/'.$payments->invoice()->first()->id).'>'.$payments->invoice()->first()->number.'</a>'; |
| 551 | 551 | }) |
| 552 | - ->addColumn('total', function ($payments) { |
|
| 552 | + ->addColumn('total', function($payments) { |
|
| 553 | 553 | return $payments->amount; |
| 554 | 554 | }) |
| 555 | - ->addColumn('created_at', function ($payments) { |
|
| 555 | + ->addColumn('created_at', function($payments) { |
|
| 556 | 556 | return getDateHtml($payments->created_at); |
| 557 | 557 | }) |
| 558 | 558 | |
@@ -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 | |
@@ -84,7 +84,8 @@ discard block |
||
| 84 | 84 | $getProductId = $this->postCurl($url, "api_key_secret=$api_key_secret&api_function=search |
| 85 | 85 | &search_type=product&search_keyword=$product_sku"); |
| 86 | 86 | $details = json_decode($getProductId); |
| 87 | - if ($details->api_error_detected == 0 && is_array($details->page_message)) {//This is not true if Product_sku is updated |
|
| 87 | + if ($details->api_error_detected == 0 && is_array($details->page_message)) { |
|
| 88 | +//This is not true if Product_sku is updated |
|
| 88 | 89 | $productId = $details->page_message[0]->product_id; |
| 89 | 90 | } |
| 90 | 91 | |
@@ -120,7 +121,8 @@ discard block |
||
| 120 | 121 | &search_type=client&search_keyword=$email"); |
| 121 | 122 | |
| 122 | 123 | $details = json_decode($getUserId); |
| 123 | - if ($details->api_error_detected == 0 && is_array($details->page_message)) {//This is not true if email is updated |
|
| 124 | + if ($details->api_error_detected == 0 && is_array($details->page_message)) { |
|
| 125 | +//This is not true if email is updated |
|
| 124 | 126 | $userId = $details->page_message[0]->client_id; |
| 125 | 127 | } |
| 126 | 128 | |
@@ -150,9 +150,9 @@ |
||
| 150 | 150 | return \Response::json([]); |
| 151 | 151 | } |
| 152 | 152 | $users = User::where('email', 'LIKE', '%'.$term.'%') |
| 153 | - ->orWhere('first_name', 'LIKE', '%'.$term.'%') |
|
| 154 | - ->orWhere('last_name', 'LIKE', '%'.$term.'%') |
|
| 155 | - ->select('id', 'email', 'profile_pic', 'first_name', 'last_name')->get(); |
|
| 153 | + ->orWhere('first_name', 'LIKE', '%'.$term.'%') |
|
| 154 | + ->orWhere('last_name', 'LIKE', '%'.$term.'%') |
|
| 155 | + ->select('id', 'email', 'profile_pic', 'first_name', 'last_name')->get(); |
|
| 156 | 156 | $formatted_tags = []; |
| 157 | 157 | |
| 158 | 158 | foreach ($users as $user) { |
@@ -47,7 +47,8 @@ |
||
| 47 | 47 | if ($url) { |
| 48 | 48 | $content = \Cart::getContent(); |
| 49 | 49 | $currency = (\Session::get('currency')); |
| 50 | - if (\Auth::user()->currency != $currency) {//If user currency is not equal to the cart currency then redirect to default url and clear his cart items and let the customer add the Product again so that the tax could be calculated properly |
|
| 50 | + if (\Auth::user()->currency != $currency) { |
|
| 51 | +//If user currency is not equal to the cart currency then redirect to default url and clear his cart items and let the customer add the Product again so that the tax could be calculated properly |
|
| 51 | 52 | foreach ($content as $key => $item) { |
| 52 | 53 | $id = $item->id; |
| 53 | 54 | Cart::remove($id); |
@@ -76,7 +76,8 @@ |
||
| 76 | 76 | $file_upload = ProductUpload::find($id); |
| 77 | 77 | $file_upload->where('id', $id)->update(['title'=>$request->input('title'), 'description'=>$request->input('description'), 'version'=> $request->input('version')]); |
| 78 | 78 | $autoUpdateStatus = StatusSetting::pluck('update_settings')->first(); |
| 79 | - if ($autoUpdateStatus == 1) { //If License Setting Status is on,Add Product to the AutoUpdate Script |
|
| 79 | + if ($autoUpdateStatus == 1) { |
|
| 80 | +//If License Setting Status is on,Add Product to the AutoUpdate Script |
|
| 80 | 81 | $productSku = $file_upload->product->product_sku; |
| 81 | 82 | $updateClassObj = new \App\Http\Controllers\AutoUpdate\AutoUpdateController(); |
| 82 | 83 | $addProductToAutoUpdate = $updateClassObj->editVersion($request->input('version'), $productSku); |
@@ -121,7 +121,7 @@ |
||
| 121 | 121 | if ($product->require_domain == 1) { |
| 122 | 122 | $field .= '<div> |
| 123 | 123 | <label>'./* @scrutinizer ignore-type */ |
| 124 | - \Lang::get('message.domain')."</label> |
|
| 124 | + \Lang::get('message.domain')."</label> |
|
| 125 | 125 | <input type='text' name='domain' class='form-control' |
| 126 | 126 | id='domain' placeholder='domain.com or sub.domain.com'> |
| 127 | 127 | </div>"; |
@@ -21,28 +21,28 @@ |
||
| 21 | 21 | ->get(); |
| 22 | 22 | |
| 23 | 23 | return \DataTables::of($new_upload) |
| 24 | - ->addColumn('checkbox', function ($model) { |
|
| 24 | + ->addColumn('checkbox', function($model) { |
|
| 25 | 25 | return "<input type='checkbox' class='upload_checkbox' value=".$model->id.' name=select[] id=checks>'; |
| 26 | 26 | }) |
| 27 | 27 | |
| 28 | - ->addColumn('product_id', function ($model) { |
|
| 28 | + ->addColumn('product_id', function($model) { |
|
| 29 | 29 | return ucfirst($this->product->where('id', $model->product_id)->first()->name); |
| 30 | 30 | }) |
| 31 | 31 | |
| 32 | - ->addColumn('title', function ($model) { |
|
| 32 | + ->addColumn('title', function($model) { |
|
| 33 | 33 | return ucfirst($model->title); |
| 34 | 34 | }) |
| 35 | - ->addColumn('description', function ($model) { |
|
| 35 | + ->addColumn('description', function($model) { |
|
| 36 | 36 | return ucfirst($model->description); |
| 37 | 37 | }) |
| 38 | - ->addColumn('version', function ($model) { |
|
| 38 | + ->addColumn('version', function($model) { |
|
| 39 | 39 | return $model->version; |
| 40 | 40 | }) |
| 41 | 41 | |
| 42 | - ->addColumn('file', function ($model) { |
|
| 42 | + ->addColumn('file', function($model) { |
|
| 43 | 43 | return $model->file; |
| 44 | 44 | }) |
| 45 | - ->addColumn('action', function ($model) { |
|
| 45 | + ->addColumn('action', function($model) { |
|
| 46 | 46 | return '<p><a href='.url('edit-upload/'.$model->id). |
| 47 | 47 | " class='btn btn-sm btn-secondary'".tooltip('Edit')."<i class='fa fa-edit' |
| 48 | 48 | style='color:white;'> </i></a></p>"; |
@@ -127,7 +127,7 @@ |
||
| 127 | 127 | \Cart::clear(); |
| 128 | 128 | $status = 'success'; |
| 129 | 129 | $message = view('themes.default1.front.postPaymentTemplate', compact('invoice','orders', |
| 130 | - 'invoiceItems', 'state', 'currency'))->render(); |
|
| 130 | + 'invoiceItems', 'state', 'currency'))->render(); |
|
| 131 | 131 | |
| 132 | 132 | return ['status'=>$status, 'message'=>$message]; |
| 133 | 133 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | $rzp_key = ApiKey::where('id', 1)->value('rzp_key'); |
| 50 | 50 | $rzp_secret = ApiKey::where('id', 1)->value('rzp_secret'); |
| 51 | 51 | $invoice = Invoice::where('id', $invoice)->first(); |
| 52 | - if (count($input) && ! empty($input['razorpay_payment_id'])) { //Verify Razorpay Payment Id and Signature |
|
| 52 | + if (count($input) && !empty($input['razorpay_payment_id'])) { //Verify Razorpay Payment Id and Signature |
|
| 53 | 53 | |
| 54 | 54 | //Fetch payment information by razorpay_payment_id |
| 55 | 55 | try { |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | |
| 128 | 128 | \Cart::clear(); |
| 129 | 129 | $status = 'success'; |
| 130 | - $message = view('themes.default1.front.postPaymentTemplate', compact('invoice','orders', |
|
| 130 | + $message = view('themes.default1.front.postPaymentTemplate', compact('invoice', 'orders', |
|
| 131 | 131 | 'invoiceItems', 'state', 'currency'))->render(); |
| 132 | 132 | |
| 133 | 133 | return ['status'=>$status, 'message'=>$message]; |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | \Cart::clear(); |
| 148 | 148 | $status = 'success'; |
| 149 | 149 | |
| 150 | - $message = view('themes.default1.front.postRenewTemplate', compact('invoice','date', |
|
| 150 | + $message = view('themes.default1.front.postRenewTemplate', compact('invoice', 'date', |
|
| 151 | 151 | 'product', 'invoiceItem', 'state', 'currency'))->render(); |
| 152 | 152 | |
| 153 | 153 | return ['status'=>$status, 'message'=>$message]; |
@@ -49,7 +49,8 @@ |
||
| 49 | 49 | $rzp_key = ApiKey::where('id', 1)->value('rzp_key'); |
| 50 | 50 | $rzp_secret = ApiKey::where('id', 1)->value('rzp_secret'); |
| 51 | 51 | $invoice = Invoice::where('id', $invoice)->first(); |
| 52 | - if (count($input) && ! empty($input['razorpay_payment_id'])) { //Verify Razorpay Payment Id and Signature |
|
| 52 | + if (count($input) && ! empty($input['razorpay_payment_id'])) { |
|
| 53 | +//Verify Razorpay Payment Id and Signature |
|
| 53 | 54 | |
| 54 | 55 | //Fetch payment information by razorpay_payment_id |
| 55 | 56 | try { |