@@ -232,7 +232,7 @@ |
||
| 232 | 232 | $payment_date = \Carbon\Carbon::now()->toDateTimeString(); |
| 233 | 233 | $amount = $grand_total; |
| 234 | 234 | $paymentRenewal = $this->updateInvoicePayment($invoiceid, $payment_method, |
| 235 | - $payment_status, $payment_date, $amount); |
|
| 235 | + $payment_status, $payment_date, $amount); |
|
| 236 | 236 | |
| 237 | 237 | return redirect()->back()->with('success', 'Payment Accepted Successfully'); |
| 238 | 238 | } catch (\Exception $ex) { |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | $value = ''; |
| 171 | 171 | $value = $taxes->toArray()[0]['active'] ? |
| 172 | 172 | (TaxProductRelation::where('product_id', $productid) |
| 173 | - ->where('tax_class_id', $taxClassId)->count() ? $ut_gst + $c_gst.'%' : 0) : 0; |
|
| 173 | + ->where('tax_class_id', $taxClassId)->count() ? $ut_gst + $c_gst.'%' : 0) : 0; |
|
| 174 | 174 | |
| 175 | 175 | return $value; |
| 176 | 176 | } |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | $otherRate = 0; |
| 188 | 188 | $status = $taxes->toArray()[0]['active']; |
| 189 | 189 | if ($status && (TaxProductRelation::where('product_id', $productid) |
| 190 | - ->where('tax_class_id', $taxClassId)->count() > 0)) { |
|
| 190 | + ->where('tax_class_id', $taxClassId)->count() > 0)) { |
|
| 191 | 191 | $otherRate = Tax::where('tax_classes_id', $taxClassId)->first()->rate; |
| 192 | 192 | } |
| 193 | 193 | $value = $otherRate.'%'; |
@@ -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>"; |
@@ -117,12 +117,12 @@ discard block |
||
| 117 | 117 | // $r = $mailchimp->updateSubscriberForFreeProduct($email, $product); |
| 118 | 118 | // } |
| 119 | 119 | |
| 120 | - } catch (\Exception $ex) { |
|
| 120 | + } catch (\Exception $ex) { |
|
| 121 | 121 | dd($ex); |
| 122 | - Bugsnag::notifyException($ex); |
|
| 123 | - app('log')->error($ex->getMessage()); |
|
| 124 | - throw new \Exception('Can not Generate Order'); |
|
| 125 | - } |
|
| 122 | + Bugsnag::notifyException($ex); |
|
| 123 | + app('log')->error($ex->getMessage()); |
|
| 124 | + throw new \Exception('Can not Generate Order'); |
|
| 125 | + } |
|
| 126 | 126 | |
| 127 | 127 | |
| 128 | 128 | throw new \Exception('Can not Generate Order'); |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | $data = $template->data; |
| 280 | 280 | $replace = [ |
| 281 | 281 | 'name' => $user->first_name.' '.$user->last_name, |
| 282 | - 'serialkeyurl'=> $myaccounturl, |
|
| 282 | + 'serialkeyurl'=> $myaccounturl, |
|
| 283 | 283 | 'downloadurl' => $downloadurl, |
| 284 | 284 | 'invoiceurl' => $invoiceurl, |
| 285 | 285 | 'product' => $product, |
@@ -49,16 +49,16 @@ discard block |
||
| 49 | 49 | $this->domain($domain, $join); |
| 50 | 50 | |
| 51 | 51 | $join = $join->orderBy('created_at', 'desc') |
| 52 | - ->select( |
|
| 53 | - 'orders.id', |
|
| 54 | - 'orders.created_at', |
|
| 55 | - 'client', |
|
| 52 | + ->select( |
|
| 53 | + 'orders.id', |
|
| 54 | + 'orders.created_at', |
|
| 55 | + 'client', |
|
| 56 | 56 | 'price_override', |
| 57 | - 'order_status', |
|
| 58 | - 'product', |
|
| 59 | - 'number', |
|
| 60 | - 'serial_key' |
|
| 61 | - ); |
|
| 57 | + 'order_status', |
|
| 58 | + 'product', |
|
| 59 | + 'number', |
|
| 60 | + 'serial_key' |
|
| 61 | + ); |
|
| 62 | 62 | |
| 63 | 63 | return $join; |
| 64 | 64 | } catch (\Exception $ex) { |
@@ -268,17 +268,17 @@ discard block |
||
| 268 | 268 | case '1': |
| 269 | 269 | $lastFour = '000'.$agents; |
| 270 | 270 | break; |
| 271 | - case '2': |
|
| 271 | + case '2': |
|
| 272 | 272 | |
| 273 | 273 | $lastFour = '00'.$agents; |
| 274 | - break; |
|
| 275 | - case '3': |
|
| 274 | + break; |
|
| 275 | + case '3': |
|
| 276 | 276 | $lastFour = '0'.$agents; |
| 277 | - break; |
|
| 278 | - case '4': |
|
| 277 | + break; |
|
| 278 | + case '4': |
|
| 279 | 279 | $lastFour = $agents; |
| 280 | 280 | |
| 281 | - break; |
|
| 281 | + break; |
|
| 282 | 282 | default: |
| 283 | 283 | $lastFour = '0000'; |
| 284 | 284 | break; |
@@ -127,12 +127,12 @@ discard block |
||
| 127 | 127 | $query = $this->advanceSearch($name, $invoice_no, $currency, $status, $from, $till); |
| 128 | 128 | |
| 129 | 129 | return \DataTables::of($query->take(100)) |
| 130 | - ->setTotalRecords($query->count()) |
|
| 130 | + ->setTotalRecords($query->count()) |
|
| 131 | 131 | |
| 132 | - ->addColumn('checkbox', function ($model) { |
|
| 133 | - return "<input type='checkbox' class='invoice_checkbox' |
|
| 132 | + ->addColumn('checkbox', function ($model) { |
|
| 133 | + return "<input type='checkbox' class='invoice_checkbox' |
|
| 134 | 134 | value=".$model->id.' name=select[] id=check>'; |
| 135 | - }) |
|
| 135 | + }) |
|
| 136 | 136 | ->addColumn('user_id', function ($model) { |
| 137 | 137 | $first = $this->user->where('id', $model->user_id)->first()->first_name; |
| 138 | 138 | $last = $this->user->where('id', $model->user_id)->first()->last_name; |
@@ -140,9 +140,9 @@ discard block |
||
| 140 | 140 | |
| 141 | 141 | return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'</a>'; |
| 142 | 142 | }) |
| 143 | - ->addColumn('number', function ($model) { |
|
| 144 | - return ucfirst($model->number); |
|
| 145 | - }) |
|
| 143 | + ->addColumn('number', function ($model) { |
|
| 144 | + return ucfirst($model->number); |
|
| 145 | + }) |
|
| 146 | 146 | |
| 147 | 147 | ->addColumn('date', function ($model) { |
| 148 | 148 | $date = ($model->created_at); |
@@ -150,12 +150,12 @@ discard block |
||
| 150 | 150 | return $date; |
| 151 | 151 | // return "<span style='display:none'>$model->id</span>".$date->format('l, F j, Y H:m'); |
| 152 | 152 | }) |
| 153 | - ->addColumn('grand_total', function ($model) { |
|
| 154 | - return ucfirst($model->number); |
|
| 155 | - }) |
|
| 156 | - ->addColumn('status', function ($model) { |
|
| 157 | - return ucfirst($model->status); |
|
| 158 | - }) |
|
| 153 | + ->addColumn('grand_total', function ($model) { |
|
| 154 | + return ucfirst($model->number); |
|
| 155 | + }) |
|
| 156 | + ->addColumn('status', function ($model) { |
|
| 157 | + return ucfirst($model->status); |
|
| 158 | + }) |
|
| 159 | 159 | |
| 160 | 160 | ->addColumn('action', function ($model) { |
| 161 | 161 | $action = ''; |
@@ -173,30 +173,30 @@ discard block |
||
| 173 | 173 | style='color:white;'> </i> View</a>" |
| 174 | 174 | ." $action"; |
| 175 | 175 | }) |
| 176 | - ->filterColumn('user_id', function ($query, $keyword) { |
|
| 177 | - $sql = 'first_name like ?'; |
|
| 178 | - $query->whereRaw($sql, ["%{$keyword}%"]); |
|
| 179 | - }) |
|
| 176 | + ->filterColumn('user_id', function ($query, $keyword) { |
|
| 177 | + $sql = 'first_name like ?'; |
|
| 178 | + $query->whereRaw($sql, ["%{$keyword}%"]); |
|
| 179 | + }) |
|
| 180 | 180 | |
| 181 | - ->filterColumn('status', function ($query, $keyword) { |
|
| 182 | - $sql = 'status like ?'; |
|
| 183 | - $query->whereRaw($sql, ["%{$keyword}%"]); |
|
| 184 | - }) |
|
| 181 | + ->filterColumn('status', function ($query, $keyword) { |
|
| 182 | + $sql = 'status like ?'; |
|
| 183 | + $query->whereRaw($sql, ["%{$keyword}%"]); |
|
| 184 | + }) |
|
| 185 | 185 | |
| 186 | 186 | ->filterColumn('number', function ($query, $keyword) { |
| 187 | 187 | $sql = 'number like ?'; |
| 188 | 188 | $query->whereRaw($sql, ["%{$keyword}%"]); |
| 189 | 189 | }) |
| 190 | - ->filterColumn('grand_total', function ($query, $keyword) { |
|
| 191 | - $sql = 'grand_total like ?'; |
|
| 192 | - $query->whereRaw($sql, ["%{$keyword}%"]); |
|
| 193 | - }) |
|
| 194 | - ->filterColumn('date', function ($query, $keyword) { |
|
| 195 | - $sql = 'date like ?'; |
|
| 196 | - $query->whereRaw($sql, ["%{$keyword}%"]); |
|
| 197 | - }) |
|
| 198 | - |
|
| 199 | - ->rawColumns(['checkbox', 'user_id', 'number', 'date', 'grand_total', 'status', 'action']) |
|
| 190 | + ->filterColumn('grand_total', function ($query, $keyword) { |
|
| 191 | + $sql = 'grand_total like ?'; |
|
| 192 | + $query->whereRaw($sql, ["%{$keyword}%"]); |
|
| 193 | + }) |
|
| 194 | + ->filterColumn('date', function ($query, $keyword) { |
|
| 195 | + $sql = 'date like ?'; |
|
| 196 | + $query->whereRaw($sql, ["%{$keyword}%"]); |
|
| 197 | + }) |
|
| 198 | + |
|
| 199 | + ->rawColumns(['checkbox', 'user_id', 'number', 'date', 'grand_total', 'status', 'action']) |
|
| 200 | 200 | ->make(true); |
| 201 | 201 | } |
| 202 | 202 | |
@@ -308,8 +308,8 @@ discard block |
||
| 308 | 308 | } |
| 309 | 309 | $symbol = $attributes[0]['currency']['symbol']; |
| 310 | 310 | $invoice = $this->invoice->create(['user_id' => $user_id, 'number' => $number, |
| 311 | - 'date' => $date, 'grand_total' => $grand_total, 'status' => 'pending', |
|
| 312 | - 'currency' => $symbol, ]); |
|
| 311 | + 'date' => $date, 'grand_total' => $grand_total, 'status' => 'pending', |
|
| 312 | + 'currency' => $symbol, ]); |
|
| 313 | 313 | foreach (\Cart::getContent() as $cart) { |
| 314 | 314 | $this->createInvoiceItems($invoice->id, $cart); |
| 315 | 315 | } |
@@ -436,7 +436,7 @@ discard block |
||
| 436 | 436 | 'currency' => $currency, 'status' => 'pending', 'description' => $description, ]); |
| 437 | 437 | |
| 438 | 438 | $items = $this->createInvoiceItemsByAdmin($invoice->id, $productid, |
| 439 | - $code, $total, $currency, $qty, $agents, $plan, $user_id, $tax_name, $tax_rate); |
|
| 439 | + $code, $total, $currency, $qty, $agents, $plan, $user_id, $tax_name, $tax_rate); |
|
| 440 | 440 | $result = $this->getMessage($items, $user_id); |
| 441 | 441 | } catch (\Exception $ex) { |
| 442 | 442 | app('log')->info($ex->getMessage()); |
@@ -541,7 +541,7 @@ discard block |
||
| 541 | 541 | } elseif ($this->tax_option->tax_enable == 0) {//if tax_enable is 0 |
| 542 | 542 | |
| 543 | 543 | $taxClassId = Tax::where('country', '')->where('state', 'Any State') |
| 544 | - ->pluck('tax_classes_id')->first(); //In case of India when |
|
| 544 | + ->pluck('tax_classes_id')->first(); //In case of India when |
|
| 545 | 545 | //other tax is available and tax is not enabled |
| 546 | 546 | if ($taxClassId) { |
| 547 | 547 | $rate = $this->getTotalRate($taxClassId, $productid, $taxs); |
@@ -609,10 +609,10 @@ discard block |
||
| 609 | 609 | foreach ($taxes as $key => $tax) { |
| 610 | 610 | if ($taxes[0]) { |
| 611 | 611 | $tax_attribute[$key] = ['name' => $tax->name, 'name1' => $name1, |
| 612 | - 'name2' => $name2, 'name3' => $name3, 'name4' => $name4, |
|
| 613 | - 'rate' => $value, 'rate1'=>$c_gst, 'rate2'=>$s_gst, |
|
| 614 | - 'rate3' => $i_gst, 'rate4'=>$ut_gst, 'state'=>$state_code, |
|
| 615 | - 'origin_state' => $origin_state, ]; |
|
| 612 | + 'name2' => $name2, 'name3' => $name3, 'name4' => $name4, |
|
| 613 | + 'rate' => $value, 'rate1'=>$c_gst, 'rate2'=>$s_gst, |
|
| 614 | + 'rate3' => $i_gst, 'rate4'=>$ut_gst, 'state'=>$state_code, |
|
| 615 | + 'origin_state' => $origin_state, ]; |
|
| 616 | 616 | |
| 617 | 617 | $rate = $tax->rate; |
| 618 | 618 | |
@@ -684,8 +684,8 @@ discard block |
||
| 684 | 684 | } |
| 685 | 685 | |
| 686 | 686 | return view('themes.default1.invoice.payment', |
| 687 | - compact('invoice_status', 'payment_status', |
|
| 688 | - 'payment_method', 'invoice_id', 'domain', 'invoice', 'userid')); |
|
| 687 | + compact('invoice_status', 'payment_status', |
|
| 688 | + 'payment_method', 'invoice_id', 'domain', 'invoice', 'userid')); |
|
| 689 | 689 | } |
| 690 | 690 | |
| 691 | 691 | return redirect()->back(); |
@@ -125,7 +125,7 @@ |
||
| 125 | 125 | ]); |
| 126 | 126 | $this->createOrderInvoiceRelation($orderid, $invoice->id); |
| 127 | 127 | $items = $controller->createInvoiceItemsByAdmin($invoice->id, $product->id, |
| 128 | - $code, $cost, $currency, $qty = 1, $agents); |
|
| 128 | + $code, $cost, $currency, $qty = 1, $agents); |
|
| 129 | 129 | |
| 130 | 130 | return $items; |
| 131 | 131 | } catch (Exception $ex) { |
@@ -178,13 +178,13 @@ discard block |
||
| 178 | 178 | if (count($tax_class_id) > 0) {//If the product is allowed for tax (Check in tax_product relation table) |
| 179 | 179 | if ($tax_enable == 1) {//If GST is Enabled |
| 180 | 180 | |
| 181 | - $details = $this->getDetailsWhenUserStateIsIndian( |
|
| 182 | - $user_state, |
|
| 183 | - $origin_state, |
|
| 184 | - $productid, |
|
| 185 | - $geoip_state, |
|
| 186 | - $geoip_country |
|
| 187 | - ); |
|
| 181 | + $details = $this->getDetailsWhenUserStateIsIndian( |
|
| 182 | + $user_state, |
|
| 183 | + $origin_state, |
|
| 184 | + $productid, |
|
| 185 | + $geoip_state, |
|
| 186 | + $geoip_country |
|
| 187 | + ); |
|
| 188 | 188 | |
| 189 | 189 | $c_gst = $details['cgst']; |
| 190 | 190 | $s_gst = $details['sgst']; |
@@ -203,21 +203,21 @@ discard block |
||
| 203 | 203 | if ($taxes[0]) { |
| 204 | 204 | $tax_attribute[$key] = ['name' => $tax->name, 'c_gst'=>$c_gst, |
| 205 | 205 | |
| 206 | - 's_gst' => $s_gst, 'i_gst'=>$i_gst, 'ut_gst'=>$ut_gst, |
|
| 206 | + 's_gst' => $s_gst, 'i_gst'=>$i_gst, 'ut_gst'=>$ut_gst, |
|
| 207 | 207 | 'state' => $state_code, 'origin_state'=>$origin_state, |
| 208 | - 'tax_enable' => $tax_enable, 'rate'=>$value, 'status'=>$status, ]; |
|
| 208 | + 'tax_enable' => $tax_enable, 'rate'=>$value, 'status'=>$status, ]; |
|
| 209 | 209 | |
| 210 | 210 | $taxCondition[0] = new \Darryldecode\Cart\CartCondition([ |
| 211 | 211 | 'name' => 'no compound', 'type' => 'tax', |
| 212 | 212 | 'target' => 'item', 'value' => $value, |
| 213 | - ]); |
|
| 213 | + ]); |
|
| 214 | 214 | } else { |
| 215 | 215 | $tax_attribute[0] = ['name' => 'null', 'rate' => 0, 'tax_enable' =>0]; |
| 216 | 216 | $taxCondition[0] = new \Darryldecode\Cart\CartCondition([ |
| 217 | - 'name' => 'null', 'type' => 'tax', |
|
| 218 | - 'target' => 'item', 'value' => '0%', |
|
| 219 | - 'rate' => 0, 'tax_enable' =>0, |
|
| 220 | - ]); |
|
| 217 | + 'name' => 'null', 'type' => 'tax', |
|
| 218 | + 'target' => 'item', 'value' => '0%', |
|
| 219 | + 'rate' => 0, 'tax_enable' =>0, |
|
| 220 | + ]); |
|
| 221 | 221 | } |
| 222 | 222 | } |
| 223 | 223 | } elseif ($tax_enable == 0) {//If Tax enable is 0 and other tax is available |
@@ -405,7 +405,7 @@ discard block |
||
| 405 | 405 | $subregion = \App\Model\Common\State::where('state_subdivision_code', $code)->first(); |
| 406 | 406 | if ($subregion) { |
| 407 | 407 | $result = ['id' => $subregion->state_subdivision_code, |
| 408 | - 'name' => $subregion->state_subdivision_name, ]; |
|
| 408 | + 'name' => $subregion->state_subdivision_name, ]; |
|
| 409 | 409 | } |
| 410 | 410 | |
| 411 | 411 | return $result; |