| $pg = $request->package; | $pg = $request->package; | ||||
| $coverage = Coverage::where('_id', $request->coverage)->first(); | |||||
| $city = $coverage->city; | |||||
| return view('sales.form.business_package', compact('data', 'pg', 'city')); | |||||
| return view('sales.form.business_package', compact('data', 'pg')); | |||||
| } | } | ||||
| public function viewFormPreview(Request $request) | public function viewFormPreview(Request $request) | ||||
| $promo_st = number_format(floatval($promo_price) * 1.06, 2); | $promo_st = number_format(floatval($promo_price) * 1.06, 2); | ||||
| $total_monthly = number_format($promo_st + ($voice_price * 1.06) + $ip_tax, 2); | $total_monthly = number_format($promo_st + ($voice_price * 1.06) + $ip_tax, 2); | ||||
| } else if ($request->package == "1Gbps") { | } else if ($request->package == "1Gbps") { | ||||
| if ($request->subscription == '24' && $coverage->city == 'CYBERJAYA') { | |||||
| $gst = 1058.94; | |||||
| $total_monthly = 1058.94; | |||||
| if ($request->ip == "1 Fixed IP RM200/1P/Month") { | |||||
| $gst = number_format(floatval($product->retail_price) * 1.06, 2); | |||||
| $total_monthly = 3920.94; | |||||
| } elseif ($request->ip == "5 Fixed IP RM400/1P/Month") { | |||||
| $gst = number_format(floatval($product->retail_price) * 1.06, 2); | |||||
| $total_monthly = 4132.94; | |||||
| } else { | } else { | ||||
| $gst = 3708.94; | $gst = 3708.94; | ||||
| $total_monthly = 3708.94; | $total_monthly = 3708.94; |
| <label class="radio-inline"> | <label class="radio-inline"> | ||||
| <input type="checkbox" id="10off" checked=""> <small id="10off1">Year End Promotion (RM10 off for 24 months)</small> | <input type="checkbox" id="10off" checked=""> <small id="10off1">Year End Promotion (RM10 off for 24 months)</small> | ||||
| </label> | </label> | ||||
| @elseif ($pg == "1Gbps" && $city == "CYBERJAYA") | |||||
| <label class="radio-inline"> | |||||
| <input type="checkbox" id="10off" checked=""> <small id="10off1">City Broadband Business Cyberjaya 1Gbps@RM999 Promotion</small> | |||||
| </label> | |||||
| @endif | @endif | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div class="form-group"> | <div class="form-group"> | ||||
| <div class="checkbox"> | <div class="checkbox"> | ||||
| @if ($pg == "1Gbps") | @if ($pg == "1Gbps") | ||||
| @if ($city == "CYBERJAYA") | |||||
| <label> | |||||
| <input type="checkbox" name="ip" id="ip" value="Free 1 Fixed IP" checked> <p style="margin-bottom: 0px !important">Free 1 Fixed IP</p> | |||||
| </label> | |||||
| @else | |||||
| <label> | |||||
| <input type="checkbox" name="ip" id="ip" value="Free 3 Fixed IP" checked> <p style="margin-bottom: 0px !important">Free 3 Fixed IP</p> | |||||
| </label> | |||||
| @endif | |||||
| <label> | |||||
| <input type="checkbox" name="ip" id="ip" value="Free 3 Fixed IP" checked> <p style="margin-bottom: 0px !important">Free 3 Fixed IP</p> | |||||
| </label> | |||||
| @else | @else | ||||
| <label> | <label> | ||||
| <p>Add on subscribtion for Fixed IP?</p> | <p>Add on subscribtion for Fixed IP?</p> |
| <td>Year End Promotion (RM10 off for 24 months)</td> | <td>Year End Promotion (RM10 off for 24 months)</td> | ||||
| </tr> | </tr> | ||||
| @endif | @endif | ||||
| @if ($a['subscription']==24 && $a['package'] == '1Gbps' && $coverage->city == 'CYBERJAYA') | |||||
| <tr><th width="50%">Promotion</th> | |||||
| <td>City Broadband Business Cyberjaya 1Gbps@RM999 Promotion</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> | ||||
| @if($a['package']!='1Gbps' && $a['subscription']=='24') | @if($a['package']!='1Gbps' && $a['subscription']=='24') | ||||
| <td><span style="text-decoration: line-through;">RM{{ $product->retail_price }}</span> RM{{ $promo_price}}</td> | <td><span style="text-decoration: line-through;">RM{{ $product->retail_price }}</span> RM{{ $promo_price}}</td> | ||||
| <td>RM{{ $promo_st }}</td> | <td>RM{{ $promo_st }}</td> | ||||
| @elseif($a['package']=='1Gbps' && $a['subscription']=='24' && $coverage->city == 'CYBERJAYA') | |||||
| <td><span style="text-decoration: line-through;">RM{{ $product->retail_price }}</span> RM999</td> | |||||
| <td>RM{{ $gst }}</td> | |||||
| @else | @else | ||||
| <td>RM{{ $product->retail_price }}</td> | <td>RM{{ $product->retail_price }}</td> | ||||
| <td>RM{{ $gst }}</td> | <td>RM{{ $gst }}</td> |