@php
// defining
$ppn = $shop->ppn;
$services = $shop->services;
// dd($orders['tipe'], $orders['discount']);
$discounts = $sub_total_review*$orders['discount']/100;
$disc_charge = ($sub_total_review) - ($orders['tipe'] == 1 ? $discounts : $orders['discount']);
// operating
$service_review = ( $disc_charge * $services/100);
$tax_review = ( ($disc_charge + $service_review ) * $ppn/100);
$grand_total_review = $disc_charge + $tax_review + $service_review;
@endphp
Sub Total |
: |
{{number_format($sub_total_review, 0, ",", ".")}} |
@if ($orders['tipe'] && $orders['discount'])
Discount |
: |
- {{number_format(($orders['tipe'] == 1 ? $discounts : $orders['discount'] ), 0, ",", ".")}} |
|
Total |
: |
{{number_format($disc_charge, 0, ",", ".")}} |
@endif
Service |
: |
{{number_format($service_review, 0, ",", ".")}} |
Tax |
: |
{{number_format($tax_review, 0, ",", ".")}} |
{{-- dummy space --}}
|
Grand Total |
: |
{{number_format($grand_total_review, 0, ",", ".")}} |