@@ -82,8 +82,8 @@ discard block |
||
| 82 | 82 | $status = $view['status']; |
| 83 | 83 | $message = $view['message']; |
| 84 | 84 | \Session::forget('items'); |
| 85 | - \Session::forget('code'); |
|
| 86 | - \Session::forget('codevalue'); |
|
| 85 | + \Session::forget('code'); |
|
| 86 | + \Session::forget('codevalue'); |
|
| 87 | 87 | } else { |
| 88 | 88 | //Afer Renew |
| 89 | 89 | $control->successRenew($invoice); |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | |
| 98 | 98 | return redirect()->back()->with($status, $message); |
| 99 | 99 | } catch (\Exception $ex) { |
| 100 | - throw new \Exception($ex->getMessage(), $ex->getCode(), $ex->getPrevious()); |
|
| 100 | + throw new \Exception($ex->getMessage(), $ex->getCode(), $ex->getPrevious()); |
|
| 101 | 101 | } |
| 102 | 102 | } |
| 103 | 103 | } |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | \Cart::clear(); |
| 129 | 129 | $status = 'success'; |
| 130 | 130 | $message = view('themes.default1.front.postPaymentTemplate', compact('invoice','date','orders', |
| 131 | - 'invoiceItems', 'state', 'currency'))->render(); |
|
| 131 | + 'invoiceItems', 'state', 'currency'))->render(); |
|
| 132 | 132 | |
| 133 | 133 | return ['status'=>$status, 'message'=>$message]; |
| 134 | 134 | } |
@@ -41,15 +41,15 @@ discard block |
||
| 41 | 41 | return $model->file; |
| 42 | 42 | }) |
| 43 | 43 | ->addColumn('action', function ($model) { |
| 44 | - return "<p><button data-toggle='modal' |
|
| 44 | + return "<p><button data-toggle='modal' |
|
| 45 | 45 | data-id=".$model->id." data-title='$model->title' data-description='$model->description' data-version='$model->version'data-file='$model->file' |
| 46 | 46 | class='btn btn-sm btn-primary btn-xs editUploadsOption'><i class='fa fa-edit' |
| 47 | 47 | style='color:white;'> </i> Edit</button> </p>"; |
| 48 | 48 | |
| 49 | - // return '<a href='.('#edit-upload-option/'.$model->id).' |
|
| 50 | - // class=" btn btn-sm btn-primary editupload" data-title="'.$model->title.'" |
|
| 51 | - // data-description="'.$model->description.'" data-version="' |
|
| 52 | - // .$model->version.'" data-id="'.$model->id.'" data-file="'.$model->file.'"onclick="openEditPopup(this)" >Edit</a>'; |
|
| 49 | + // return '<a href='.('#edit-upload-option/'.$model->id).' |
|
| 50 | + // class=" btn btn-sm btn-primary editupload" data-title="'.$model->title.'" |
|
| 51 | + // data-description="'.$model->description.'" data-version="' |
|
| 52 | + // .$model->version.'" data-id="'.$model->id.'" data-file="'.$model->file.'"onclick="openEditPopup(this)" >Edit</a>'; |
|
| 53 | 53 | }) |
| 54 | 54 | ->rawcolumns(['checkbox', 'product_id', 'title', 'description', 'version', 'file', 'action']) |
| 55 | 55 | ->make(true); |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | if ($product->require_domain == 1) { |
| 112 | 112 | $field .= "<div class='col-md-4 form-group'> |
| 113 | 113 | <label class='required'>"./* @scrutinizer ignore-type */ |
| 114 | - \Lang::get('message.domain')."</label> |
|
| 114 | + \Lang::get('message.domain')."</label> |
|
| 115 | 115 | <input type='text' name='domain' class='form-control' |
| 116 | 116 | id='domain' placeholder='http://example.com'> |
| 117 | 117 | </div>"; |
@@ -130,12 +130,12 @@ discard block |
||
| 130 | 130 | $query = $this->advanceSearch($name, $invoice_no, $currency, $status, $from, $till); |
| 131 | 131 | |
| 132 | 132 | return \DataTables::of($query->take(100)) |
| 133 | - ->setTotalRecords($query->count()) |
|
| 133 | + ->setTotalRecords($query->count()) |
|
| 134 | 134 | |
| 135 | - ->addColumn('checkbox', function ($model) { |
|
| 136 | - return "<input type='checkbox' class='invoice_checkbox' |
|
| 135 | + ->addColumn('checkbox', function ($model) { |
|
| 136 | + return "<input type='checkbox' class='invoice_checkbox' |
|
| 137 | 137 | value=".$model->id.' name=select[] id=check>'; |
| 138 | - }) |
|
| 138 | + }) |
|
| 139 | 139 | ->addColumn('user_id', function ($model) { |
| 140 | 140 | $first = $this->user->where('id', $model->user_id)->first()->first_name; |
| 141 | 141 | $last = $this->user->where('id', $model->user_id)->first()->last_name; |
@@ -143,9 +143,9 @@ discard block |
||
| 143 | 143 | |
| 144 | 144 | return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'</a>'; |
| 145 | 145 | }) |
| 146 | - ->addColumn('number', function ($model) { |
|
| 147 | - return ucfirst($model->number); |
|
| 148 | - }) |
|
| 146 | + ->addColumn('number', function ($model) { |
|
| 147 | + return ucfirst($model->number); |
|
| 148 | + }) |
|
| 149 | 149 | |
| 150 | 150 | ->addColumn('date', function ($model) { |
| 151 | 151 | $date = ($model->created_at); |
@@ -153,12 +153,12 @@ discard block |
||
| 153 | 153 | return $date; |
| 154 | 154 | // return "<span style='display:none'>$model->id</span>".$date->format('l, F j, Y H:m'); |
| 155 | 155 | }) |
| 156 | - ->addColumn('grand_total', function ($model) { |
|
| 157 | - return $model->grand_total; |
|
| 158 | - }) |
|
| 159 | - ->addColumn('status', function ($model) { |
|
| 160 | - return ucfirst($model->status); |
|
| 161 | - }) |
|
| 156 | + ->addColumn('grand_total', function ($model) { |
|
| 157 | + return $model->grand_total; |
|
| 158 | + }) |
|
| 159 | + ->addColumn('status', function ($model) { |
|
| 160 | + return ucfirst($model->status); |
|
| 161 | + }) |
|
| 162 | 162 | |
| 163 | 163 | ->addColumn('action', function ($model) { |
| 164 | 164 | $action = ''; |
@@ -176,30 +176,30 @@ discard block |
||
| 176 | 176 | style='color:white;'> </i> View</a>" |
| 177 | 177 | ." $action"; |
| 178 | 178 | }) |
| 179 | - ->filterColumn('user_id', function ($query, $keyword) { |
|
| 180 | - $sql = 'first_name like ?'; |
|
| 181 | - $query->whereRaw($sql, ["%{$keyword}%"]); |
|
| 182 | - }) |
|
| 179 | + ->filterColumn('user_id', function ($query, $keyword) { |
|
| 180 | + $sql = 'first_name like ?'; |
|
| 181 | + $query->whereRaw($sql, ["%{$keyword}%"]); |
|
| 182 | + }) |
|
| 183 | 183 | |
| 184 | - ->filterColumn('status', function ($query, $keyword) { |
|
| 185 | - $sql = 'status like ?'; |
|
| 186 | - $query->whereRaw($sql, ["%{$keyword}%"]); |
|
| 187 | - }) |
|
| 184 | + ->filterColumn('status', function ($query, $keyword) { |
|
| 185 | + $sql = 'status like ?'; |
|
| 186 | + $query->whereRaw($sql, ["%{$keyword}%"]); |
|
| 187 | + }) |
|
| 188 | 188 | |
| 189 | 189 | ->filterColumn('number', function ($query, $keyword) { |
| 190 | 190 | $sql = 'number like ?'; |
| 191 | 191 | $query->whereRaw($sql, ["%{$keyword}%"]); |
| 192 | 192 | }) |
| 193 | - ->filterColumn('grand_total', function ($query, $keyword) { |
|
| 194 | - $sql = 'grand_total like ?'; |
|
| 195 | - $query->whereRaw($sql, ["%{$keyword}%"]); |
|
| 196 | - }) |
|
| 197 | - ->filterColumn('date', function ($query, $keyword) { |
|
| 198 | - $sql = 'date like ?'; |
|
| 199 | - $query->whereRaw($sql, ["%{$keyword}%"]); |
|
| 200 | - }) |
|
| 201 | - |
|
| 202 | - ->rawColumns(['checkbox', 'user_id', 'number', 'date', 'grand_total', 'status', 'action']) |
|
| 193 | + ->filterColumn('grand_total', function ($query, $keyword) { |
|
| 194 | + $sql = 'grand_total like ?'; |
|
| 195 | + $query->whereRaw($sql, ["%{$keyword}%"]); |
|
| 196 | + }) |
|
| 197 | + ->filterColumn('date', function ($query, $keyword) { |
|
| 198 | + $sql = 'date like ?'; |
|
| 199 | + $query->whereRaw($sql, ["%{$keyword}%"]); |
|
| 200 | + }) |
|
| 201 | + |
|
| 202 | + ->rawColumns(['checkbox', 'user_id', 'number', 'date', 'grand_total', 'status', 'action']) |
|
| 203 | 203 | ->make(true); |
| 204 | 204 | } |
| 205 | 205 | |
@@ -294,8 +294,8 @@ discard block |
||
| 294 | 294 | |
| 295 | 295 | $symbol = $attributes[0]['currency']['symbol']; |
| 296 | 296 | $invoice = $this->invoice->create(['user_id' => $user_id, 'number' => $number, |
| 297 | - 'date' => $date, 'discount'=>$codevalue, 'grand_total' => $grand_total, 'coupon_code'=>$code, 'status' => 'pending', |
|
| 298 | - 'currency' => \Auth::user()->currency, ]); |
|
| 297 | + 'date' => $date, 'discount'=>$codevalue, 'grand_total' => $grand_total, 'coupon_code'=>$code, 'status' => 'pending', |
|
| 298 | + 'currency' => \Auth::user()->currency, ]); |
|
| 299 | 299 | foreach (\Cart::getContent() as $cart) { |
| 300 | 300 | $this->createInvoiceItems($invoice->id, $cart, $codevalue); |
| 301 | 301 | } |
@@ -415,11 +415,11 @@ discard block |
||
| 415 | 415 | $grand_total = \App\Http\Controllers\Front\CartController::rounding($grand_total); |
| 416 | 416 | |
| 417 | 417 | $invoice = Invoice::create(['user_id' => $user_id, 'number' => $number, 'date' => $date, |
| 418 | - 'coupon_code' => $code, 'discount'=>$codeValue, |
|
| 418 | + 'coupon_code' => $code, 'discount'=>$codeValue, |
|
| 419 | 419 | 'grand_total' => $grand_total, 'currency' => $currency, 'status' => $status, 'description' => $description, ]); |
| 420 | 420 | |
| 421 | 421 | $items = $this->createInvoiceItemsByAdmin($invoice->id, $productid, |
| 422 | - $code, $total, $currency, $qty, $agents, $plan, $user_id, $tax_name, $tax_rate); |
|
| 422 | + $code, $total, $currency, $qty, $agents, $plan, $user_id, $tax_name, $tax_rate); |
|
| 423 | 423 | $result = $this->getMessage($items, $user_id); |
| 424 | 424 | } catch (\Exception $ex) { |
| 425 | 425 | app('log')->info($ex->getMessage()); |
@@ -491,13 +491,13 @@ discard block |
||
| 491 | 491 | $cartController = new CartController(); |
| 492 | 492 | if ($this->tax_option->findOrFail(1)->inclusive == 0) { |
| 493 | 493 | $tax_class_id = TaxProductRelation::where('product_id', $productid)->pluck('tax_class_id')->toArray(); |
| 494 | - if (count($tax_class_id) > 0) { |
|
| 494 | + if (count($tax_class_id) > 0) { |
|
| 495 | 495 | if ($this->tax_option->findOrFail(1)->tax_enable == 1) { |
| 496 | 496 | $taxs = $this->getTaxWhenEnable($productid, $taxs[0], $userid); |
| 497 | 497 | } elseif ($this->tax_option->tax_enable == 0) {//if tax_enable is 0 |
| 498 | 498 | |
| 499 | 499 | $taxClassId = Tax::where('country', '')->where('state', 'Any State') |
| 500 | - ->pluck('tax_classes_id')->first(); //In case of India when |
|
| 500 | + ->pluck('tax_classes_id')->first(); //In case of India when |
|
| 501 | 501 | //other tax is available and tax is not enabled |
| 502 | 502 | if ($taxClassId) { |
| 503 | 503 | $rate = $this->getTotalRate($taxClassId, $productid, $taxs); |
@@ -566,10 +566,10 @@ discard block |
||
| 566 | 566 | foreach ($taxes as $key => $tax) { |
| 567 | 567 | if ($taxes[0]) { |
| 568 | 568 | $tax_attribute[$key] = ['name' => $tax->name, 'name1' => $name1, |
| 569 | - 'name2' => $name2, 'name3' => $name3, 'name4' => $name4, |
|
| 570 | - 'rate' => $value, 'rate1'=>$c_gst, 'rate2'=>$s_gst, |
|
| 571 | - 'rate3' => $i_gst, 'rate4'=>$ut_gst, 'state'=>$state_code, |
|
| 572 | - 'origin_state' => $origin_state, ]; |
|
| 569 | + 'name2' => $name2, 'name3' => $name3, 'name4' => $name4, |
|
| 570 | + 'rate' => $value, 'rate1'=>$c_gst, 'rate2'=>$s_gst, |
|
| 571 | + 'rate3' => $i_gst, 'rate4'=>$ut_gst, 'state'=>$state_code, |
|
| 572 | + 'origin_state' => $origin_state, ]; |
|
| 573 | 573 | |
| 574 | 574 | $rate = $tax->rate; |
| 575 | 575 | |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | $sub->update_ends_at = $updatesExpiry; |
| 66 | 66 | $sub->support_ends_at = $supportExpiry; |
| 67 | 67 | $sub->save(); |
| 68 | - $licenseStatus = StatusSetting::pluck('license_status')->first(); |
|
| 68 | + $licenseStatus = StatusSetting::pluck('license_status')->first(); |
|
| 69 | 69 | if ($licenseStatus == 1) { |
| 70 | 70 | $this->editDateInAPL($sub, $updatesExpiry, $licenseExpiry, $supportExpiry); |
| 71 | 71 | } |
@@ -123,7 +123,7 @@ |
||
| 123 | 123 | ]); |
| 124 | 124 | $this->createOrderInvoiceRelation($orderid, $invoice->id); |
| 125 | 125 | $items = $controller->createInvoiceItemsByAdmin($invoice->id, $product->id, |
| 126 | - $code, $renewalPrice, $currency, $qty = 1, $agents); |
|
| 126 | + $code, $renewalPrice, $currency, $qty = 1, $agents); |
|
| 127 | 127 | |
| 128 | 128 | return $items; |
| 129 | 129 | } catch (Exception $ex) { |