@@ -621,6 +621,7 @@ class CustomerController extends Controller | |||
$form = Subscriber::with('Form')->where('subscriber_id',$subscriber_id)->first(); | |||
$package = PackageDetail::where('_id',$form->_id)->first(); | |||
$dateSubmittion = date('d/m/Y', strtotime($form->created_at)); | |||
$created = $form->Form->created_at->toDateString(); | |||
$ext1 = pathinfo(public_path().$form->front_ic, PATHINFO_EXTENSION); | |||
$ext2 = pathinfo(public_path().$form->back_ic, PATHINFO_EXTENSION); | |||
@@ -634,7 +635,7 @@ class CustomerController extends Controller | |||
// $pdf = PDF::loadView('pdf.business-pdf', compact('form','package','product','ext1','ext2','ext3','ext4','ext5','ext6','dateSubmittion')); | |||
if(strtotime($form->created_at) >= 1580774399){ | |||
$pdf = PDF::loadView('pdf.newBusiness-pdf', compact('form','package','product','ext1','ext2','ext3','ext4','ext5','dateSubmittion')); | |||
$pdf = PDF::loadView('pdf.newBusiness-pdf', compact('form','package','product','ext1','ext2','ext3','ext4','ext5','dateSubmittion', 'created')); | |||
}else { | |||
$pdf = PDF::loadView('pdf.oldBusiness-pdf', compact('form','package','product','ext1','ext2','ext3','ext4','ext5','ext6','dateSubmittion')); | |||
} |
@@ -3111,7 +3111,7 @@ class DealerController extends Controller | |||
} | |||
foreach ($dataOctoberR as $key => $d) { | |||
if(((date('m/Y', strtotime($d['submission'])) == '08/2020') && (date('d/m/Y', strtotime($d['submission'])) >= '11/8/2020')) || (date('m/Y', strtotime($d['submission'])) == $month.'/'.$year)){ | |||
if(((date('m/Y', strtotime($d['submission'])) == '08/2020') && (date('d/m/Y', strtotime($d['submission'])) >= '11/8/2020')) || (date('m/Y', strtotime($d['submission'])) == $month.'/'.$year) || (date('m/Y', strtotime($d['submission'])) == '09/2020')){ | |||
if($d['contract'] == '24'){ | |||
if ($d['package']== 50){ | |||
$d['retail_price'] = 69; | |||
@@ -3198,7 +3198,7 @@ class DealerController extends Controller | |||
} | |||
foreach ($dataOctoberB as $key => $d) { | |||
if(((date('m/Y', strtotime($d['submission'])) == '08/2020') && (date('d/m/Y', strtotime($d['submission'])) >= '11/8/2020')) || (date('m/Y', strtotime($d['submission'])) == $month.'/'.$year)){ | |||
if(((date('m/Y', strtotime($d['submission'])) == '08/2020') && (date('d/m/Y', strtotime($d['submission'])) >= '11/8/2020')) || (date('m/Y', strtotime($d['submission'])) == $month.'/'.$year) || (date('m/Y', strtotime($d['submission'])) == '09/2020')){ | |||
if($d['contract'] == '24'){ | |||
if ($d['package']== 50){ | |||
$d['retail_price'] = 89; |
@@ -21,7 +21,7 @@ | |||
<body> | |||
<!-- Address --> | |||
<table width="100%"> | |||
@if($package->name != '1' && $package->contract == '24' && (($dateSubmittion >= '12/08/2020' && $dateSubmittion < '01/11/2020') || ($dateSubmittion >= '01/10/2020' && $dateSubmittion < '01/11/2020')) ) | |||
@if($package->name != '1' && $package->contract == '24' && ($created >= '2020-08-12' && $created < '2020-11-01')) | |||
<tr> | |||
<td align="left" style="font-size: 10px"> | |||
<b style="color: red">PROMOTION (RM 10 off for 24 months)</b> | |||
@@ -354,7 +354,7 @@ | |||
<tr> | |||
<td> | |||
<table border="0" cellpadding="0" cellspacing="0"> | |||
@if (($dateSubmittion >= '12/08/2020' && $dateSubmittion < '01/11/2020') || ($dateSubmittion >= '01/10/2020' && $dateSubmittion < '01/11/2020')) | |||
@if($created >= '2020-08-12' && $created < '2020-11-01') | |||
@foreach($product as $p) | |||
@if($p->speed != '10' && $p->speed != '30') | |||
<tr> | |||
@@ -408,7 +408,7 @@ | |||
</td> | |||
</tr> | |||
<tr><td height="4"></td></tr> | |||
@if ($package->name != '1' && $package->contract == '24' && (($dateSubmittion >= '12/08/2020' && $dateSubmittion < '01/11/2020') || ($dateSubmittion >= '01/10/2020' && $dateSubmittion < '01/11/2020'))) | |||
@if($package->name != '1' && $package->contract == '24' && ($created >= '2020-08-12' && $created < '2020-11-01')) | |||
<tr> | |||
<td style="font-size: 11px;"> | |||
<img src="{{ url('/assets/tick.png') }}" style="width:14px; height:auto"> RM 10 off for 24 months |