Browse Source

Edit residential controller for merdeka promo

ifah
Siti Hajar Ibrahim 5 years ago
parent
commit
df9be85336

+ 0
- 47
.env.example View File

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 View File

$street = $request->street; $street = $request->street;
} }


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

array_push($data, array( array_push($data, array(
'coverage' => $request->coverage, 'coverage' => $request->coverage,
'unit' => $request->unit, 'unit' => $request->unit,
'package' => $request->package, 'package' => $request->package,
'application' => $request->application, 'application' => $request->application,
'name' => $request->name, 'name' => $request->name,
'nric_passport' => $request->nric_passport,
'nric_passport' => $nokp,
'gender' => $request->gender, 'gender' => $request->gender,
'race' => $request->race, 'race' => $request->race,
'contact_primary' => $request->contact_primary, 'contact_primary' => $request->contact_primary,
'email' => $request->email '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){ public function viewFormPreview(Request $request){
$voice = "No"; $voice = "No";
if($request->has('voice')){ if($request->has('voice')){
$voice = $request->voice; $voice = $request->voice;
$voice_price = 20;
}else { }else {
$voice = "No"; $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'){ if($request->citizenship != 'Malaysian' && $request->subscription == '12' && $voice == 'No'){
$otc = 300; $otc = 300;
$deposit = $product->deposit;
$deposit = 300;
}else if($request->citizenship != 'Malaysian' && $request->subscription == '12' && $voice == 'Yes'){ }else if($request->citizenship != 'Malaysian' && $request->subscription == '12' && $voice == 'Yes'){
$otc = 300 + 100; $otc = 300 + 100;
$deposit = $product->deposit;
$deposit = 300;
}else if($request->citizenship != 'Malaysian' && $request->subscription == '24' && $voice == 'No'){ }else if($request->citizenship != 'Malaysian' && $request->subscription == '24' && $voice == 'No'){
$otc = 0.0; $otc = 0.0;
$deposit = 300; $deposit = 300;
}else if($request->citizenship != 'Malaysian' && $request->subscription == '24' && $voice == 'Yes') { }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'){ }else if($request->citizenship == 'Malaysian' && $request->subscription == '24'){
$otc = 0.0; $otc = 0.0;
$deposit = $product->deposit; $deposit = $product->deposit;
$deposit = $product->deposit; $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( array_push($data, array(
'coverage' => $request->coverage, 'coverage' => $request->coverage,
'thedate' => $request->thedate, '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){ public function storeFormData(Request $request){
$packageD = new PackageDetail(); $packageD = new PackageDetail();
$packageD->contract = $request->subscription; $packageD->contract = $request->subscription;
$packageD->name = $product->speed; $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->voice_fee = $request->voice;
$packageD->deposit = $request->deposit; $packageD->deposit = $request->deposit;
$packageD->upfront_payment = $request->otc; $packageD->upfront_payment = $request->otc;
$f_id = $this->sendInvoice($subscriber_id); $f_id = $this->sendInvoice($subscriber_id);
return $f_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 View File

h2 { h2 {
font-family: 'Signika'; font-family: 'Signika';
font-size:37px; font-size:37px;
color: #e07027;
color: #000000;
margin:0 0 10px 0 !important; margin:0 0 10px 0 !important;
} }
h6 { h6 {

+ 17
- 17
resources/views/email/invoice.blade.php View File

<tbody> <tbody>
<tr> <tr>
<td style="padding:10px 15px" width="50%" valign="middle" align="center" bgcolor="#eee"> <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> <p>{{ $form->type_service }}</p>
</td> </td>
<td style="padding:10px 15px" width="50%" valign="middle" align="center" bgcolor="#eee"> <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') @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') @elseif($form->type_application == 'B')
<p>Business Package - {{ $product-package_name }}</p>
<p>City Broadband Business Package - {{ $product-package_name }}</p>
@endif @endif
</td> </td>
</tr> </tr>
</tr> </tr>
<tr> <tr>
<td colspan="2" style="padding:10px 15px" width="50%" valign="middle" align="center" bgcolor="#eee"> <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 @endif
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="padding:10px 15px" width="50%" valign="middle" align="center" bgcolor="#eee"> <td style="padding:10px 15px" width="50%" valign="middle" align="center" bgcolor="#eee">
<b>Gender</b> <b>Gender</b>
<p>{{ $form->Subscriber->gender }}</p>
<p>{{ ucfirst($form->Subscriber->gender) }}</p>
</td> </td>
<td style="padding:10px 15px" width="50%" valign="middle" align="center" bgcolor="#eee"> <td style="padding:10px 15px" width="50%" valign="middle" align="center" bgcolor="#eee">
<b>Nationality</b> <b>Nationality</b>
<tbody> <tbody>
<tr> <tr>
<td style="padding:10px 15px" width="50%" valign="middle" align="center" bgcolor="#eee"> <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>
<td style="padding:10px 15px" width="50%" valign="middle" align="center" bgcolor="#eee"> <td style="padding:10px 15px" width="50%" valign="middle" align="center" bgcolor="#eee">
<b>Deposit</b> <b>Deposit</b>
<p>{{ $form->PackageDetail->deposit }}</p>
<p>RM {{ $form->PackageDetail->deposit }}</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="padding:10px 15px" width="50%" valign="middle" align="center" bgcolor="#eee"> <td style="padding:10px 15px" width="50%" valign="middle" align="center" bgcolor="#eee">
<b>Monthly Broadband Fee (incl. ST)</b> <b>Monthly Broadband Fee (incl. ST)</b>
<p>{{ $form->PackageDetail->montly_fee }}</p>
<p>RM {{ $form->PackageDetail->montly_fee }}</p>
</td> </td>
<td style="padding:10px 15px" width="50%" valign="middle" align="center" bgcolor="#eee"> <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') @if($form->PackageDetail->voice_fee == 'Yes')
<p>RM 20</p>
<p>RM 21.20</p>
@else @else
<p>RM 0</p>
<p>RM 0.00</p>
@endif @endif
</td> </td>
</tr> </tr>

+ 1
- 1
resources/views/sales/form/after_submit_form.blade.php View File

<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-md-8 col-md-offset-2"> <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>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> <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> </div>

+ 37
- 5
resources/views/sales/form/residential_address.blade.php View File

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


<div class="col-md-12"> <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"> <input type="text" name="street" placeholder="Enter your street" class="form-control">
</div> </div>
</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> </div>
</div> </div>
$('footer').removeClass('reached-bottom'); $('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> </script>
<style> <style>
select { select {

+ 41
- 52
resources/views/sales/form/residential_application_information.blade.php View File

<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group"> <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> <div>
<label class="radio-inline"> <label class="radio-inline">
<input type="radio" name="application" value="New" checked="">New <input type="radio" name="application" value="New" checked="">New
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group"> <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"> <input name="name" placeholder="Enter Full Name" class="form-control" type="text" required="" aria-required="true">
</div> </div>
</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"> <div class="form-group">
<label><b>Gender</b> <small style="color: red">*</small></label> <label><b>Gender</b> <small style="color: red">*</small></label>
<select name="gender" id="gender" class="form-control"> <select name="gender" id="gender" class="form-control">
<option value="female">Female</option> <option value="female">Female</option>
</select> </select>
</div> </div>
<small id="desc" style="color: red; display:none">A deposit of RM300 will be charge upfront prior installation.</small>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group"> <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"> <select name="citizenship" id="citizenship" onchange="citizen()" class="form-control">
<option value="Malaysian">Malaysian</option> <option value="Malaysian">Malaysian</option>
<option value="Non">Non-Malaysian</option> <option value="Non">Non-Malaysian</option>
</select> </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="" selected="selected">Select Country</option>
<option value="United States">United States</option> <option value="United States">United States</option>
<option value="United Kingdom">United Kingdom</option> <option value="United Kingdom">United Kingdom</option>
<option value="Zambia">Zambia</option> <option value="Zambia">Zambia</option>
<option value="Zimbabwe">Zimbabwe</option> <option value="Zimbabwe">Zimbabwe</option>
</select> </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> </div>
</div> </div>
<!-- </a> --> <!-- </a> -->
</div> </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;"> <input type="button" class="btn btn-previous" name="previous" value="Previous" style="background-color: grey;">
</a> </a>
</div> -->
</div>
<div class="clearfix"></div> <div class="clearfix"></div>
</div> </div>
</div> </div>
var val = $( "#citizenship" ).val(); var val = $( "#citizenship" ).val();
if (val =='Non') { if (val =='Non') {
document.getElementById("list").style.display="block"; 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{ }else{
document.getElementById("list").style.display="none"; 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> </script>

+ 33
- 21
resources/views/sales/form/residential_package.blade.php View File

<div class="inner-pane"> <div class="inner-pane">
<div class="row"> <div class="row">
<div class="col-md-12"> <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>
</div> </div>


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


<div> <div>
<label class="radio-inline"> <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>
<label class="radio-inline"> <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> </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"> <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> </label>
@endif
</div> </div>
<small id="OTC" style="color:blue; display:none">A one-time charge of RM300 applies for 12 months subscription.</small>
</div> </div>
</div> </div>
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
@if($citizen != 'Malaysian') @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 @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 @endif
</label> </label>
</div> </div>
<!-- </a> --> <!-- </a> -->
</div> </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 class="clearfix"></div>
</div> </div>
</div> </div>
$('footer').removeClass('reached-bottom'); $('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> </script>
<style> <style>
select { select {

+ 95
- 45
resources/views/sales/form/residential_preview.blade.php View File

<input type="hidden" name="city" value="{{ $coverage->city }}"> <input type="hidden" name="city" value="{{ $coverage->city }}">
<input type="hidden" name="state" value="{{ $coverage->state }}"> <input type="hidden" name="state" value="{{ $coverage->state }}">
<input type="hidden" name="deposit" value="{{ $deposit }}"> <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="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> <div class="tracking-process"></div>
<label><b>Subscription Details</b></label> <label><b>Subscription Details</b></label>
<table class="table table-sm table-bordered"> <table class="table table-sm table-bordered">
<tbody> <tbody>
<tr><th width="50%">Type Application</th>
<tr><th width="50%">Application Type</th>
<td>{{$a['application']}}</td> <td>{{$a['application']}}</td>
</tr> </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> </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> <tr><th width="50%">Contract Term</th>
<td>{{$a['subscription']}}Months</td>
<td>{{$a['subscription']}} Months</td>
</tr> </tr>
<tr><th width="50%">Checking and Evaluation, Date</th>
<tr><th width="50%">Preferred Installation Date</th>
<td>{{$a['thedate']}}</td> <td>{{$a['thedate']}}</td>
</tr> </tr>
</tbody> </tbody>
<hr><label><b>Add-On(s)</b></label> <hr><label><b>Add-On(s)</b></label>
<table class="table table-sm table-bordered"> <table class="table table-sm table-bordered">
<tbody> <tbody>
<tr><th width="50%">Subscribe for Voice</th>
<tr><th width="50%">Home Voice Plan</th>
<td>{{$a['voice']}}</td> <td>{{$a['voice']}}</td>
</tr> </tr>
</tbody> </tbody>
<td>{{$a['nric_passport']}}</td> <td>{{$a['nric_passport']}}</td>
</tr> </tr>
<tr><th width="50%">Gender</th> <tr><th width="50%">Gender</th>
<td>{{$a['gender']}}</td>
<td>{{ucfirst($a['gender'])}}</td>
</tr> </tr>
<tr><th width="50%">Nationality</th> <tr><th width="50%">Nationality</th>
<td>{{$a['citizenship']}}</td> <td>{{$a['citizenship']}}</td>
<td>{{$coverage->building_name}}</td> <td>{{$coverage->building_name}}</td>
</tr> </tr>
<tr><th width="50%">Street</th> <tr><th width="50%">Street</th>
<td>{{$a['street']}}</td>
<td>{{ucwords($a['street'])}}</td>
</tr> </tr>
<tr><th width="50%">Postcode</th> <tr><th width="50%">Postcode</th>
<td>{{$coverage->postcode}}</td> <td>{{$coverage->postcode}}</td>
</tr> </tr>
</tbody> </tbody>
</table> </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"> <table class="table table-sm table-bordered">
<tbody> <tbody>
<tr> <tr>
<th>Description</th> <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>
<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>
<tr><th colspan="2">Deposit</th>
@if($a['voice']=='Yes')
<tr><th>Voice Home Plan</th>
<td>
RM20
</td>
<td> <td>
{{ $deposit }}
RM21.20
</td> </td>
</tr> </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>
<tr><th colspan="2">Total Charges</th> <tr><th colspan="2">Total Charges</th>
<td>{{ $total }}</td>
<td><b>RM{{ $upfront_total }}</b></td>
</tr> </tr>
</tbody> </tbody>
</table> </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> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="checkbox"> <div class="checkbox">
<label> <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, <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> </label>
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" name="declare" id="declare" value="24" required="" aria-required="true"> <p>I hereby declare that the above information, documents, and <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 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. to refuse any application at any given time should any of the information is incorrect.
</p> </p>
</div> </div>


<h3>Upload Documents</h3> <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="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group"> <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"> <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> </div>
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group"> <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"> <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> </div>
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group"> <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"> <input type="file" id="visaF" accept="image/*" capture="camera" name="visaF" multiple="" onchange="validateImage3()" class="form-control" aria-required="true">
</div> </div>
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group"> <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"> <input type="file" id="visaB" accept="image/*" capture="camera" name="visaB" multiple="" onchange="validateImage4()" class="form-control" aria-required="true">
</div> </div>
</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> </div>


<!-- Signature --> <!-- Signature -->
formData.append("Filedata", file); formData.append("Filedata", file);
var t = file.type.split('/').pop().toLowerCase(); 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 = ''; document.getElementById("front_ic").value = '';
return false; return false;
} }
formData.append("Filedata", file); formData.append("Filedata", file);
var t = file.type.split('/').pop().toLowerCase(); 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 = ''; document.getElementById("back_ic").value = '';
return false; return false;
} }
formData.append("Filedata", file); formData.append("Filedata", file);
var t = file.type.split('/').pop().toLowerCase(); 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 = ''; document.getElementById("visaF").value = '';
return false; return false;
} }
formData.append("Filedata", file); formData.append("Filedata", file);
var t = file.type.split('/').pop().toLowerCase(); 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 = ''; document.getElementById("visaB").value = '';
return false; return false;
} }
return true; 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(){ $(document).ready(function(){


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

+ 7
- 0
routes/api.php View File

Route::get('/claim/12/12/2019','DS\MarketingController@manualDate'); Route::get('/claim/12/12/2019','DS\MarketingController@manualDate');
Route::get('/get-data','Api\FormController@get_data_form'); 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 View File

Route::post('/residential/{package}/application-form/upload_preview/{dealer_id}', 'Form\ResidentialController@viewFormPreviewD')->name('dpreview'); 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::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('/application-form/verify-email/{subscriber_id}', 'Form\ResidentialController@verifyEmail');
Route::get('/residential/application-form/success-submit', 'Form\ResidentialController@successSubmit'); Route::get('/residential/application-form/success-submit', 'Form\ResidentialController@successSubmit');
Route::get('/business/application-form/success-submit', 'Form\BusinessController@successSubmit'); Route::get('/business/application-form/success-submit', 'Form\BusinessController@successSubmit');

Loading…
Cancel
Save