Quellcode durchsuchen

Edit residential controller for merdeka promo

ifah
Siti Hajar Ibrahim vor 5 Jahren
Ursprung
Commit
df9be85336

+ 0
- 47
.env.example Datei anzeigen

@@ -1,47 +0,0 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:wDRcykZN8RDAYhcl9gyWb+w18UIdnN41lj+jNf9yrk4=
APP_DEBUG=true
APP_URL=http://localhost

LOG_CHANNEL=stack

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret

MONGO_DB_HOST=127.0.0.1
MONGO_DB_PORT=27017
MONGO_DB_DATABASE=sandbox_CBB
MONGO_DB_USERNAME=
MONGO_DB_PASSWORD=

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

JWT_SECRET=S9yDXbv8gQW3T2dG4Gm0he1sqEzTR4NO

+ 47
- 22
app/Http/Controllers/Form/ResidentialController.php Datei anzeigen

@@ -92,6 +92,12 @@ class ResidentialController extends Controller
$street = $request->street;
}

if (!empty($request->nric_passport1)){
$nokp = $request->nric_passport1;
}else {
$nokp = $request->nric_passport2;
}

array_push($data, array(
'coverage' => $request->coverage,
'unit' => $request->unit,
@@ -99,7 +105,7 @@ class ResidentialController extends Controller
'package' => $request->package,
'application' => $request->application,
'name' => $request->name,
'nric_passport' => $request->nric_passport,
'nric_passport' => $nokp,
'gender' => $request->gender,
'race' => $request->race,
'contact_primary' => $request->contact_primary,
@@ -108,9 +114,9 @@ class ResidentialController extends Controller
'email' => $request->email
));

$pg = $request->package;
$product = Product::where('formT','R')->where('package_name',$request->package)->first();

return view('sales.form.residential_package', compact('data','pg','citizen'));
return view('sales.form.residential_package', compact('data','product','citizen'));
}

public function viewFormPreview(Request $request){
@@ -123,22 +129,38 @@ class ResidentialController extends Controller
$voice = "No";
if($request->has('voice')){
$voice = $request->voice;
$voice_price = 20;
}else {
$voice = "No";
$voice_price = 0;
}

$total_monthly = 0;
$gst ='';
$promo_st = '';

if ($request->package != "1Gbps" && $request->subscription == '24'){
$promo_price = number_format(floatval($product->retail_price) - 10);
$promo_st = number_format(floatval($promo_price) * 1.06,2);
$total_monthly = number_format($promo_st + ($voice_price * 1.06), 2);
}
else{
$gst = number_format(floatval($product->retail_price) * 1.06,2);
$total_monthly = number_format($gst + ($voice_price * 1.06), 2);
}

if($request->citizenship != 'Malaysian' && $request->subscription == '12' && $voice == 'No'){
$otc = 300;
$deposit = $product->deposit;
$deposit = 300;
}else if($request->citizenship != 'Malaysian' && $request->subscription == '12' && $voice == 'Yes'){
$otc = 300 + 100;
$deposit = $product->deposit;
$deposit = 300;
}else if($request->citizenship != 'Malaysian' && $request->subscription == '24' && $voice == 'No'){
$otc = 0.0;
$deposit = 300;
}else if($request->citizenship != 'Malaysian' && $request->subscription == '24' && $voice == 'Yes') {
$otc = 0.0;
$deposit = 300 + 100;
$otc = 100;
$deposit = 300;
}else if($request->citizenship == 'Malaysian' && $request->subscription == '24'){
$otc = 0.0;
$deposit = $product->deposit;
@@ -147,19 +169,9 @@ class ResidentialController extends Controller
$deposit = $product->deposit;
}

$gst = 0; $total = 0;
if($product->promotion_price != '0' && $request->subscription == '24'){

$gst = number_format(floatval($product->promotion_price) * 1.06,2);
$total = number_format((floatval($product->promotion_price) * 1.06) + ($otc * 1.06) + $deposit, 2);

}else if($product->promotion_price == '0'){

$gst = number_format(floatval($product->retail_price) * 1.06,2);
$total = number_format((floatval($product->retail_price) * 1.06) + ($otc * 1.06) + $deposit, 2);
}

$otc_st = number_format(floatval($otc) * 1.06,2);
$upfront_total = number_format(floatval($otc_st) + $deposit,2);

array_push($data, array(
'coverage' => $request->coverage,
@@ -181,7 +193,7 @@ class ResidentialController extends Controller
'thedate' => $request->thedate,
));

return view('sales.form.residential_preview', compact('data','coverage','product','deposit','otc','gst','total'));
return view('sales.form.residential_preview', compact('data','coverage','product','deposit','otc', 'otc_st','gst','promo_price','promo_st','total_monthly', 'upfront_total'));
}

public function storeFormData(Request $request){
@@ -277,7 +289,11 @@ class ResidentialController extends Controller
$packageD = new PackageDetail();
$packageD->contract = $request->subscription;
$packageD->name = $product->speed;
$packageD->montly_fee = $request->gst;
if ($request->gst != null){
$packageD->montly_fee = $request->gst;
}else {
$packageD->montly_fee = $request->promo_st;
}
$packageD->voice_fee = $request->voice;
$packageD->deposit = $request->deposit;
$packageD->upfront_payment = $request->otc;
@@ -581,5 +597,14 @@ class ResidentialController extends Controller
$f_id = $this->sendInvoice($subscriber_id);
return $f_id;
}

public function checkEmailTemplate($subscriber_id){
$subscriber = Subscriber::where('subscriber_id',$subscriber_id)->first();
if(!empty($subscriber)){
$form = Form::where('_id',$subscriber->_id)->first();
$product = Product::where('formT','R')->where('package_name','50Mbps')->first();
}
return view('email.invoice', compact ('form', 'product'));
}
}


+ 1
- 1
public/css/style.css Datei anzeigen

@@ -222,7 +222,7 @@ Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normalize.css/
h2 {
font-family: 'Signika';
font-size:37px;
color: #e07027;
color: #000000;
margin:0 0 10px 0 !important;
}
h6 {

+ 17
- 17
resources/views/email/invoice.blade.php Datei anzeigen

@@ -177,15 +177,15 @@
<tbody>
<tr>
<td style="padding:10px 15px" width="50%" valign="middle" align="center" bgcolor="#eee">
<b>Type Application</b>
<b>Application Type</b>
<p>{{ $form->type_service }}</p>
</td>
<td style="padding:10px 15px" width="50%" valign="middle" align="center" bgcolor="#eee">
<b>Broadband Package</b>
<b>Service Package</b>
@if($form->type_application == 'R')
<p>Residential Package - {{ $product->package_name }}</p>
<p>City Broadband Residential Package - {{ $product->package_name }}</p>
@elseif($form->type_application == 'B')
<p>Business Package - {{ $product-package_name }}</p>
<p>City Broadband Business Package - {{ $product-package_name }}</p>
@endif
</td>
</tr>
@@ -201,11 +201,11 @@
</tr>
<tr>
<td colspan="2" style="padding:10px 15px" width="50%" valign="middle" align="center" bgcolor="#eee">
<b>Subscribe for Voice</b>
@if($form->voice_fee == 'Yes')
<p>YES</p>
@elseif($form->voice_fee == 'No')
<p>NO</p>
<b>Home Voice Plan</b>
@if($form->PackageDetail->voice_fee == 'Yes')
<p>Yes</p>
@elseif($form->PackageDetail->voice_fee == 'No')
<p>No</p>
@endif
</td>
</tr>
@@ -249,7 +249,7 @@
<tr>
<td style="padding:10px 15px" width="50%" valign="middle" align="center" bgcolor="#eee">
<b>Gender</b>
<p>{{ $form->Subscriber->gender }}</p>
<p>{{ ucfirst($form->Subscriber->gender) }}</p>
</td>
<td style="padding:10px 15px" width="50%" valign="middle" align="center" bgcolor="#eee">
<b>Nationality</b>
@@ -295,25 +295,25 @@
<tbody>
<tr>
<td style="padding:10px 15px" width="50%" valign="middle" align="center" bgcolor="#eee">
<b>Upfront Payment</b>
<p>{{ $form->PackageDetail->upfront_payment }}</p>
<b>Upfront Chargers</b>
<p>RM {{ $form->PackageDetail->upfront_payment }}</p>
</td>
<td style="padding:10px 15px" width="50%" valign="middle" align="center" bgcolor="#eee">
<b>Deposit</b>
<p>{{ $form->PackageDetail->deposit }}</p>
<p>RM {{ $form->PackageDetail->deposit }}</p>
</td>
</tr>
<tr>
<td style="padding:10px 15px" width="50%" valign="middle" align="center" bgcolor="#eee">
<b>Monthly Broadband Fee (incl. ST)</b>
<p>{{ $form->PackageDetail->montly_fee }}</p>
<p>RM {{ $form->PackageDetail->montly_fee }}</p>
</td>
<td style="padding:10px 15px" width="50%" valign="middle" align="center" bgcolor="#eee">
<b>Voice Fee</b>
<b>Voice Home Plan Fee (incl. ST)</b>
@if($form->PackageDetail->voice_fee == 'Yes')
<p>RM 20</p>
<p>RM 21.20</p>
@else
<p>RM 0</p>
<p>RM 0.00</p>
@endif
</td>
</tr>

+ 1
- 1
resources/views/sales/form/after_submit_form.blade.php Datei anzeigen

@@ -111,7 +111,7 @@
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<h2 align="center">Thank You For Subscribing</h2>
<h2 align="center">Thank you for subscribing</h2>
<p>Please check your email. If you don't receive any email from us, please wait for a while or check your spam/junk folder.</p>
<p>If you have a problem or any question regarding our CBB, you can <a href="https://cbb.allo.my/index.php/contact-us/write-to-us/">write</a> to us or you can read our <a href="https://cbb.allo.my/index.php/support/faqs">FAQ</a></p>
</div>

+ 37
- 5
resources/views/sales/form/residential_address.blade.php Datei anzeigen

@@ -173,7 +173,7 @@
<div class="col-md-12">
<div class="form-group">
<label>
<b>Select Available Coverage</b>
<b>Select Your Coverage Area</b>
<small style="color: red">*</small>
</label>
<select id="coverage" name="coverage" class="form-control" required aria-required="true">
@@ -196,14 +196,32 @@
</div>

<div class="col-md-12">
<div class="form-group">
<label>
<b>Street</b>
</label>
<div class="form-group">
<label><b>Street</b></label>
<input type="text" name="street" placeholder="Enter your street" class="form-control">
</div>
</div>

<div class="col-md-6">
<div class="form-group">
<label><b>City</b> <small style="color: red">*</small></label>
<input name="city" id="city" placeholder="Enter city" class="form-control" type="text" required readonly="" >
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label><b>State</b> <small style="color: red">*</small></label>
<input name="state" id="state" placeholder="Enter state" class="form-control" type="text" required readonly="">
</div>
</div>

<div class="col-md-12">
<div class="form-group">
<label><b>Postcode / Zip Code</b> <small style="color: red">*</small></label>
<input name="postcode" id="postcode" placeholder="90000" class="form-control" type="text" required readonly="">
</div>
</div>

</div>
</div>
</div>
@@ -357,6 +375,20 @@
$('footer').removeClass('reached-bottom');
}
});

$('#coverage').change(function(){
$.ajax({
type: "GET",
url: "{{ url('api/get-coverage-detail') }}"+"/"+$(this).val(),
success: function(result){
$.each(result.data, function(i, d) {
$('#city').val(d.city);
$('#state').val(d.state);
$('#postcode').val(d.postcode);
});
}
});
});
</script>
<style>
select {

+ 41
- 52
resources/views/sales/form/residential_application_information.blade.php Datei anzeigen

@@ -180,7 +180,7 @@
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label><b>Type Application</b> <small style="color: red">*</small></label>
<label><b>Application Type</b> <small style="color: red">*</small></label>
<div>
<label class="radio-inline">
<input type="radio" name="application" value="New" checked="">New
@@ -196,26 +196,11 @@
</div>
<div class="col-md-12">
<div class="form-group">
<label><b>Full Name</b> <small style="color: red">*</small></label>
<label><b>Full Name (as per MyKad/Passport)</b> <small style="color: red">*</small></label>
<input name="name" placeholder="Enter Full Name" class="form-control" type="text" required="" aria-required="true">
</div>
</div>

<div class="col-md-6">
<div class="form-group">
<label><b>NRIC / Passport</b> <small style="color: red">*</small></label>
<input name="nric_passport" placeholder="Enter NRIC / Passport Number" class="form-control" type="text" required="" aria-required="true">
</div>
</div>

<div class="col-md-6">
<div class="form-group">
<label><b>Email</b> <small style="color: red">*</small></label>
<input name="email" placeholder="Enter Email" class="form-control" type="email" required="" aria-required="true">
</div>
</div>

<div class="col-md-6">
<div class="col-md-12">
<div class="form-group">
<label><b>Gender</b> <small style="color: red">*</small></label>
<select name="gender" id="gender" class="form-control">
@@ -223,40 +208,16 @@
<option value="female">Female</option>
</select>
</div>
<small id="desc" style="color: red; display:none">A deposit of RM300 will be charge upfront prior installation.</small>
</div>
<div class="col-md-6">
<div class="form-group">
<label><b>Race</b> <small style="color: red">*</small></label>
<select name="race" id="race" class="form-control">
<option value="malay">Malay</option>
<option value="chinese">Chinese</option>
<option value="indian">Indian</option>
<option value="others">Others</option>
</select>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label><b>Primary Contact No.</b> <small style="color: red">*</small></label>
<input name="contact_primary" placeholder="Enter Primary Contact Number" class="form-control" type="tel" required="" aria-required="true">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label><b>Secondary Contact No.</b> </label>
<input name="contact_secondary" placeholder="Enter Secondary Contact Number" class="form-control" type="tel">
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<label><b>Citizenship</b> <small style="color: red">*</small></label>
<label><b>Nationality (Malaysian/Non-Malaysian)</b> <small style="color: red">*</small></label>
<select name="citizenship" id="citizenship" onchange="citizen()" class="form-control">
<option value="Malaysian">Malaysian</option>
<option value="Non">Non-Malaysian</option>
</select>
<div>
<p id="list" style="display:none">
<select name="citizenlist" id="citizenlist"class="form-control" >
<select id="list" name="citizenlist" id="citizenlist"class="form-control" style="display:none">
<option value="" selected="selected">Select Country</option>
<option value="United States">United States</option>
<option value="United Kingdom">United Kingdom</option>
@@ -500,8 +461,32 @@
<option value="Zambia">Zambia</option>
<option value="Zimbabwe">Zimbabwe</option>
</select>
</p>
</div>
</div>
</div>

<div class="col-md-6">
<div class="form-group">
<label><b>MyKad / Passport</b> <small style="color: red">*</small></label>
<input id="nric1" name="nric_passport1" placeholder="Enter NRIC / Passport Number" class="form-control" type="text" required="" aria-required="true" style="display:block">
<textarea rows="3" id="nric2" name="nric_passport2" placeholder="Enter NRIC / Passport Number" class="form-control" type="text" required="" aria-required="true" style="display:none"></textarea>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label><b>Contact Number (Primary) </b> <small style="color: red">*</small></label>
<input name="contact_primary" placeholder="Enter Primary Contact Number" class="form-control" type="tel" required="" aria-required="true">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label><b>Contact Number (Secondary)</b> </label>
<input name="contact_secondary" placeholder="Enter Secondary Contact Number" class="form-control" type="tel">
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<label><b>Email</b> <small style="color: red">*</small></label>
<input name="email" placeholder="Enter Email" class="form-control" type="email" required="" aria-required="true">
</div>
</div>
</div>
@@ -518,11 +503,11 @@
<!-- </a> -->
</div>
<!-- <div class="pull-left">
<a href="{{url('/application-form/residential/address/step1')}}">
<div class="pull-left">
<a href="javascript:history.back()">
<input type="button" class="btn btn-previous" name="previous" value="Previous" style="background-color: grey;">
</a>
</div> -->
</div>
<div class="clearfix"></div>
</div>
</div>
@@ -641,10 +626,14 @@
var val = $( "#citizenship" ).val();
if (val =='Non') {
document.getElementById("list").style.display="block";
document.getElementById("race").value="others"; // show the list if non selected
document.getElementById("nric2").style.display="block";
document.getElementById("nric1").style.display="none";
document.getElementById("desc").style.display="block";
}else{
document.getElementById("list").style.display="none";
document.getElementById("race").value="malay";
document.getElementById("nric2").style.display="none";
document.getElementById("nric1").style.display="block";
document.getElementById("desc").style.display="none";
}
}
</script>

+ 33
- 21
resources/views/sales/form/residential_package.blade.php Datei anzeigen

@@ -183,36 +183,31 @@
<div class="inner-pane">
<div class="row">
<div class="col-md-12">
<label>You have selected:</label>
<p>Resident package - {{ $pg }}</p>
<label>City Broadband Package:</label>
<p>{{ $product->package_name }} RM{{ $product->retail_price }}/month</p>
</div>
</div>

<!-- Contract -->
<div class="row">
<div class="col-md-6">
<div class="col-md-12">
<div class="form-group">
<label><b>Subscription / Contract Period </b> <small style="color: red">*</small></label>

<div>
<label class="radio-inline">
<input type="radio" name="subscription" value="12">12 Months (Rm 300)
<input id="subscription1" type="radio" name="subscription" value="12">12 Months
</label>
<label class="radio-inline">
<input type="radio" name="subscription" value="24" checked="">24 Months
<input id="subscription2" type="radio" name="subscription" value="24" checked="">24 Months
</label>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label><b>Billing Cycle</b> <small style="color: red">*</small></label>

<div>
@if ($a['package'] != "1Gbps")
<label class="radio-inline">
<input type="radio" name="billing" value="monthly" checked="" readonly="">Monthly
<input type="checkbox" id="10off" checked=""> <small id="10off1">RM10 off every month for 24 months</small>
</label>
@endif
</div>
<small id="OTC" style="color:blue; display:none">A one-time charge of RM300 applies for 12 months subscription.</small>
</div>
</div>
</div>
@@ -224,9 +219,9 @@
<div class="checkbox">
<label>
@if($citizen != 'Malaysian')
<input type="checkbox" name="voice" id="voice" value="Yes"> <p>Would you like to subscribe for Voice ( Rm 20) ?<br><small style="color:red">Deposit RM100 is required for new activation</small></p>
<input type="checkbox" name="voice" id="voice" value="Yes"> <p>Add on Voice Home Plan at RM20/month<br><small style="color:red">A deposit of RM100 is required for new voice activation tied to 12 months contract</small></p>
@else
<input type="checkbox" name="voice" id="voice" value="Yes"> <p>Would you like to subscribe for Voice ( Rm 20) ?</p>
<input type="checkbox" name="voice" id="voice" value="Yes"> <p>Add on Voice Home Plan at RM20/month</p>
@endif
</label>
</div>
@@ -278,11 +273,11 @@
<!-- </a> -->
</div>
<!-- <div class="pull-left">
<a href="{{url('/application-form/residential/address/step1')}}">
<input type="button" class="btn btn-previous" name="previous" value="Previous" style="background-color: grey;">
</a>
</div> -->
<div class="pull-left">
<a href="javascript:history.back()">
<input type="button" class="btn btn-previous" name="previous" value="Previous" style="background-color: grey;">
</a>
</div>
<div class="clearfix"></div>
</div>
</div>
@@ -432,6 +427,23 @@
$('footer').removeClass('reached-bottom');
}
});

$('#subscription1').change(function(){
if(document.getElementById('subscription1').checked){
$('#OTC').show();
document.getElementById('10off').checked = false;
$('#10off').hide();
$('#10off1').hide();
}
});
$('#subscription2').change(function(){
if(document.getElementById('subscription2').checked){
$('#OTC').hide();
document.getElementById('10off').checked = true;
$('#10off').show();
$('#10off1').show();
}
});
</script>
<style>
select {

+ 95
- 45
resources/views/sales/form/residential_preview.blade.php Datei anzeigen

@@ -193,9 +193,10 @@
<input type="hidden" name="city" value="{{ $coverage->city }}">
<input type="hidden" name="state" value="{{ $coverage->state }}">
<input type="hidden" name="deposit" value="{{ $deposit }}">
<input type="hidden" name="otc" value="{{ $otc }}">
<input type="hidden" name="otc" value="{{ $otc_st }}">
<input type="hidden" name="gst" value="{{ $gst }}">
<input type="hidden" name="total" value="{{ $total }}">
<input type="hidden" name="promo_st" value="{{ $promo_st }}">
<input type="hidden" name="total_monthly" value="{{ $total_monthly }}">

<div class="tracking-process"></div>
@@ -208,16 +209,21 @@
<label><b>Subscription Details</b></label>
<table class="table table-sm table-bordered">
<tbody>
<tr><th width="50%">Type Application</th>
<tr><th width="50%">Application Type</th>
<td>{{$a['application']}}</td>
</tr>
<tr><th width="50%">Residential Package</th>
<td>{{$a['package']}}</td>
<tr><th width="50%">Package</th>
<td>City Broadband Residential {{$a['package']}}</td>
</tr>
@if ($a['subscription']==24 && ($a['package']=='50Mbps' || $a['package']=='100Mbps' || $a['package']=='300Mbps' || $a['package']=='500Mbps'))
<tr><th width="50%">Promotion</th>
<td>RM10 off for 24 months</td>
</tr>
@endif
<tr><th width="50%">Contract Term</th>
<td>{{$a['subscription']}}Months</td>
<td>{{$a['subscription']}} Months</td>
</tr>
<tr><th width="50%">Checking and Evaluation, Date</th>
<tr><th width="50%">Preferred Installation Date</th>
<td>{{$a['thedate']}}</td>
</tr>
</tbody>
@@ -225,7 +231,7 @@
<hr><label><b>Add-On(s)</b></label>
<table class="table table-sm table-bordered">
<tbody>
<tr><th width="50%">Subscribe for Voice</th>
<tr><th width="50%">Home Voice Plan</th>
<td>{{$a['voice']}}</td>
</tr>
</tbody>
@@ -240,7 +246,7 @@
<td>{{$a['nric_passport']}}</td>
</tr>
<tr><th width="50%">Gender</th>
<td>{{$a['gender']}}</td>
<td>{{ucfirst($a['gender'])}}</td>
</tr>
<tr><th width="50%">Nationality</th>
<td>{{$a['citizenship']}}</td>
@@ -266,7 +272,7 @@
<td>{{$coverage->building_name}}</td>
</tr>
<tr><th width="50%">Street</th>
<td>{{$a['street']}}</td>
<td>{{ucwords($a['street'])}}</td>
</tr>
<tr><th width="50%">Postcode</th>
<td>{{$coverage->postcode}}</td>
@@ -279,35 +285,63 @@
</tr>
</tbody>
</table>
<hr><label><b>Montly Recurring Fee</b></label>
<hr><label><b>Montly Recurring Charges</b></label>
@if($a['package']!='1Gbps' && $a['subscription']=='24')
<br><small> Promotion: RM10 off for 24 months</small>
@endif
<table class="table table-sm table-bordered">
<tbody>
<tr>
<th>Description</th>
<th>Price excl. ST</th>
<th>With ST (6%)</th>
<th>Price exclude ST</th>
<th>With ST 6%</th>
</tr>
<tr><th>Broadband Fee</th>
@if($product->promotion_price == '0')
<td>{{ $product->retail_price }}</td>
@elseif($product->promotion_price != '0' && $a['subscription'] == '24')
<td><span style="text-decoration: line-through;">{{ $product->retail_price }}</span> {{ $product->promotion_price }}</td>
@endif
<td>{{ $gst }}</td>
<tr><th>City Broadband Residential - {{$a['package']}}</th>
@if($a['package']!='1Gbps' && $a['subscription']=='24')
<td><span style="text-decoration: line-through;">RM{{ $product->retail_price }}</span> RM{{ $promo_price}}</td>
<td>RM{{ $promo_st }}</td>
@else
<td>RM{{ $product->retail_price }}</td>
<td>RM{{ $gst }}</td>
@endif
</tr>
<tr><th colspan="2">Deposit</th>
@if($a['voice']=='Yes')
<tr><th>Voice Home Plan</th>
<td>
RM20
</td>
<td>
{{ $deposit }}
RM21.20
</td>
</tr>
<tr><th colspan="2">OTC</th>
<td>{{ $otc }}</td>
@endif
<tr><th colspan="2">Total Charges</th>
<td><b>RM{{ $total_monthly }}</b></td>
</tr>
</tbody>
</table>
<hr><label><b>Upfront Charges</b></label>
<table class="table table-sm table-bordered">
<tbody>
<tr>
<th>Description</th>
<th>Price exclude ST</th>
<th>With ST 6%</th>
</tr>
<tr><th>One Time Charges</th>
<td>RM{{ $otc }}</td>
<td>RM{{ $otc_st }}</td>
</tr>
<tr><th>Deposit</th></th>
<td colspan="2">RM{{ $deposit}}</td>
</tr>
<tr><th colspan="2">Total Charges</th>
<td>{{ $total }}</td>
<td><b>RM{{ $upfront_total }}</b></td>
</tr>
</tbody>
</table>
<small>All upfront charges will need to be paid prior installation. You will receive an email once your application has been processed.</small>
</div>
</div>
</div>
@@ -323,19 +357,14 @@
<div class="form-group">
<div class="checkbox">
<label>
<input type="checkbox" name="photocopy" id="photocopy" value="24" required="" aria-required="true"> <p>Photocopy of NRIC(both side) or passport minimum (12 months validity) and visa minimum 6 months validity)</p>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" name="consent" id="consent" value="24" required="" aria-required="true"> <p>I hereby consent to the collection, use,
disclosure of my personal information in accordance with the <b> Privacy Policy </b> available one www.citybroadband.my.</p>
disclosure of my personal information in accordance with the <b> <a href="https://www.citybroadband.my/privacy-policy-2/" >Privacy Policy</a> </b> available one www.citybroadband.my.</p>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" name="declare" id="declare" value="24" required="" aria-required="true"> <p>I hereby declare that the above information, documents, and
any appendices attached are true and valid. I have read and understood the contents of this form and agreed to be bound by <b> Terms &amp; Condition </b>
any appendices attached are true and valid. I have read and understood the contents of this form and agreed to be bound by <b> <a href="https://www.citybroadband.my/terms-conditions/">Terms &amp; Condition </a> </b>
as stated on the next page of this form which accompany the subscription of product(s) and/ or service(s). Allo Technology Sdn Bhd reserve the rights
to refuse any application at any given time should any of the information is incorrect.
</p>
@@ -346,32 +375,38 @@
</div>

<h3>Upload Documents</h3>
<small><b>Acceptable formats: jpg , jpeg </b></small>
<small><b>Acceptable formats: jpg , jpeg , png </b></small>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label><b>Front IC / Passport</b> <small style="color: red">*</small></label>
<label><b>MyKad/Passport (Front)</b> <small style="color: red">*</small></label>
<input type="file" id="front_ic" accept="image/*" capture="camera" name="front_ic" multiple="" onchange="validateImage1()" class="form-control" required="" aria-required="true">
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<label><b>Rear IC / Passport</b> <small style="color: red">*</small></label>
<label><b>MyKad/Passport (Back)</b> <small style="color: red">*</small></label>
<input type="file" id="back_ic" accept="image/*" capture="camera" name="back_ic" multiple="" onchange="validateImage2()" class="form-control" required="" aria-required="true">
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<label><b>Front Visa</b> <small style="color: red">* Non-Malaysia</small></label>
<label><b>Visa (Front)</b> <small style="color: red">* Non-Malaysian</small></label>
<input type="file" id="visaF" accept="image/*" capture="camera" name="visaF" multiple="" onchange="validateImage3()" class="form-control" aria-required="true">
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<label><b>Rear Visa</b> <small style="color: red">* Non-Malaysia</small></label>
<label><b>Visa (Back)</b> <small style="color: red">* Non-Malaysian</small></label>
<input type="file" id="visaB" accept="image/*" capture="camera" name="visaB" multiple="" onchange="validateImage4()" class="form-control" aria-required="true">
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<label><b>Upfront Payment Receipt</b></label>
<input type="file" id="payment_receipt" accept="image/*" capture="camera" name="payment_receipt" multiple="" onchange="validateImage5()" class="form-control" required="" aria-required="true">
</div>
</div>
</div>

<!-- Signature -->
@@ -540,8 +575,8 @@
formData.append("Filedata", file);
var t = file.type.split('/').pop().toLowerCase();
if (t != "jpeg" && t != "jpg") {
alert('Only Accept jpg / jpeg Only!!');
if (t != "jpeg" && t != "jpg" && t !="png") {
alert('Accept jpg, jpeg, png and pdf only');
document.getElementById("front_ic").value = '';
return false;
}
@@ -555,8 +590,8 @@
formData.append("Filedata", file);
var t = file.type.split('/').pop().toLowerCase();
if (t != "jpeg" && t != "jpg") {
alert('Only Accept jpg / jpeg');
if (t != "jpeg" && t != "jpg" && t !="png") {
alert('Accept jpg, jpeg, png and pdf only');
document.getElementById("back_ic").value = '';
return false;
}
@@ -570,8 +605,8 @@
formData.append("Filedata", file);
var t = file.type.split('/').pop().toLowerCase();
if (t != "jpeg" && t != "jpg") {
alert('Only Accept jpg / jpeg');
if (t != "jpeg" && t != "jpg" && t !="png") {
alert('Accept jpg, jpeg, png and pdf only');
document.getElementById("visaF").value = '';
return false;
}
@@ -585,14 +620,29 @@
formData.append("Filedata", file);
var t = file.type.split('/').pop().toLowerCase();
if (t != "jpeg" && t != "jpg") {
alert('Only Accept jpg / jpeg');
if (t != "jpeg" && t != "jpg" &&t !="png") {
alert('Accept jpg, jpeg, png and pdf only');
document.getElementById("visaB").value = '';
return false;
}
return true;
}

function validateImage5() {
var formData = new FormData();
var file = document.getElementById("payment_receipt").files[0];
formData.append("Filedata", file);
var t = file.type.split('/').pop().toLowerCase();
if (t != "jpeg" && t != "jpg" && t !="png" && t != "pdf") {
alert('Accept jpg, jpeg, png and pdf only');
document.getElementById("payment_receipt").value = '';
return false;
}
return true;
}

$(document).ready(function(){

var needV = "{{ $a['citizenship'] }}";

+ 7
- 0
routes/api.php Datei anzeigen

@@ -47,3 +47,10 @@ Route::group(['middleware' => 'mobileapps'], function() {
Route::get('/claim/12/12/2019','DS\MarketingController@manualDate');
Route::get('/get-data','Api\FormController@get_data_form');
});

/*
|--------------------------------------------------------------------------
| Residential Form
|--------------------------------------------------------------------------
*/
Route::get('/get-coverage-detail/{_id}', 'Api\Controller@getCoverageDetail');

+ 2
- 0
routes/web.php Datei anzeigen

@@ -46,6 +46,8 @@ Route::post('/residential/{package}/application-form/service_package/{dealer_id}
Route::post('/residential/{package}/application-form/upload_preview/{dealer_id}', 'Form\ResidentialController@viewFormPreviewD')->name('dpreview');
Route::post('/residential/application-form/store/{dealer_id}', 'Form\ResidentialController@storeFormDataD')->name('dstoreFormRD');

Route::get('/check-template-email/{subscriber_id}','Form\ResidentialController@checkEmailTemplate');

Route::get('/application-form/verify-email/{subscriber_id}', 'Form\ResidentialController@verifyEmail');
Route::get('/residential/application-form/success-submit', 'Form\ResidentialController@successSubmit');
Route::get('/business/application-form/success-submit', 'Form\BusinessController@successSubmit');

Laden…
Abbrechen
Speichern