Total Discount |
: |
{{ribuanWithComma(($total_discount*-1))}} |
@endif
@php
// defining
$ppn = $shop->ppn;
$services = $shop->services;
//$discounts = $sub_total_review*$discount['discount']/100;
//$disc_charge = ($sub_total_review) - ($discount['tipe'] == 1 ? $discounts : $discount['discount']);
// operating
// $service_review = ( $sub_total_review * $services/100);
// $tax_review = ( ($sub_total_review + $service_review) * $ppn/100);
// $grand_total_review = $sub_total_review + $tax_review + $service_review;
$total_pembayaran = 0;// variable total pembayaran
@endphp
{{-- @if (!$checker)
Sub Total |
: |
{{ribuanWithComma($sub_total_review)}} |
Service |
: |
{{ribuanWithComma($service_review)}} |
Tax |
: |
{{ribuanWithComma($tax_review)}} |
@endif --}}
{{-- dummy space --}}
{{--
|
--}}
@if (!$checker)
Grand Total |
: |
{{ribuanWithComma($grand_total_review)}} |
@if (count($carts->pembayaranpos) > 0)
|
|
|
|
@foreach ($carts->pembayaranpos as $key=>$item)
@if ($item->jenis_pembayaran_id == 1)
@php
$total_pembayaran += $item->nominal;
@endphp
Cash |
: |
{{ribuanWithComma(($item->nominal * -1))}} |
@endif
@endforeach
@foreach ($carts->pembayaranpos as $key=>$item)
@if ($item->jenis_pembayaran_id == 2 || $item->jenis_pembayaran_id == 4)
@php
$total_pembayaran += $item->nominal;
@endphp
{{@$item->platform->nama}} - {{$item->voucher}} |
: |
{{ribuanWithComma(($item->nominal * -1))}} |
@endif
@endforeach
@foreach ($carts->pembayaranpos as $key=>$item)
@if ($item->jenis_pembayaran_id == 3 || $item->jenis_pembayaran_id == 6 )
@php
$total_pembayaran += $item->nominal;
@endphp
Transfer Nonstay |
: |
{{ribuanWithComma(($item->nominal * -1))}} |
@endif
@endforeach
@foreach ($carts->pembayaranpos as $key=>$item)
@if ($item->jenis_pembayaran_id == 5 )
@php
$total_pembayaran += $item->nominal;
@endphp
{{@$item->ledger->name}} |
: |
{{ribuanWithComma(($item->nominal * -1))}} |
@endif
@endforeach
@foreach ($carts->pembayaranpos as $key=>$item)
@if ($item->jenis_pembayaran_id == 7 )
@php
$total_pembayaran += $item->nominal;
@endphp
Transfer to Room - {{ @$item->Invoice->nomor_kamar }} - {{$nama_ini}} |
: |
{{ribuanWithComma(($item->nominal * -1))}} |
@endif
@endforeach
|
|
|
|
@endif
@php
if($carts->complimentary_id > 0){
$balance = 0;
} else {
$balance = $grand_total_review + ($total_pembayaran *-1);
}
@endphp
Balance |
: |
{{ribuanWithComma(str_replace('-','',$balance))}} |
@endif
@endif
{{-- Jika Transaksi bayar langsung di POS --}}
@if($carts->pembayaranpos && $carts->order_flag != null)
@php
$discount = $carts->sub_total*$carts->discount/100;
$disc_charge = ($carts->sub_total) - ($carts->type_discount == 1 ? $discount : $carts->discount);
// variable unutk total refund
$total = 0;
$balance = 0; // Variable Balance
$status_bill = 0; //status_nonstay.
$refund_for_transfer = 0;//for transfer room or nonstay
$refund_for_transfer_cash = 0;//for transfer room or nonstay
$total_pembayaran = 0;// variable total pembayaran
@endphp
{{--
Disc. |
: |
{{ribuanWithComma(($total_discount*-1))}} |
--}}
{{--
Sub Total |
: |
{{ribuanWithComma($sub_total_review)}} |
Service |
: |
{{ribuanWithComma($service_review)}} |
Tax |
: |
{{ribuanWithComma($tax_review)}} |
--}}
{{-- Kondisi jika guest bill : tidak ada pembayaran maka hanya grand total saja --}}
{{ $carts->complimentary_id > 0 ? 'Compliment' : 'Grand Total' }} |
: |
{{ $carts->complimentary_id > 0 ? $carts->complimentary->name : ribuanWithComma($grand_total_review )}} |
@if($carts->complimentary_id > 0)
|
|
{{ @$carts->coa->description}} |
@endif
|
@if ($carts->status != 3)
|
|
|
@foreach ($carts->pembayaranpos as $key=>$item)
@if ($item->jenis_pembayaran_id == 1)
@php
$total += ($item->nominal * -1);
$refund_for_transfer_cash += ($item->nominal);
$total_pembayaran += $item->nominal;
@endphp
Cash |
: |
{{ribuanWithComma(($item->nominal))}} |
@endif
@endforeach
@foreach ($carts->pembayaranpos as $key=>$item)
@if ($item->jenis_pembayaran_id == 2 || $item->jenis_pembayaran_id == 4)
@php
$total += ($item->nominal * -1);
$total_pembayaran += $item->nominal;
@endphp
{{@$item->platform->nama}} - {{$item->voucher}} |
: |
{{ribuanWithComma(($item->nominal))}} |
@endif
@endforeach
@foreach ($carts->pembayaranpos as $key=>$item)
@if ($item->jenis_pembayaran_id == 3 || $item->jenis_pembayaran_id == 6 )
@php
$status_bill = 1;// kondisi jika jenis pembyaran nonstay
$refund_for_transfer_cash += ($item->nominal);//nonstay
$total += ($item->nominal * -1);
$total_pembayaran += $item->nominal;
@endphp
Transfer Nonstay |
: |
{{ribuanWithComma(($item->nominal))}} |
@endif
@endforeach
@foreach ($carts->pembayaranpos as $key=>$item)
@if ($item->jenis_pembayaran_id == 5 )
@php
$total += ($item->nominal * -1);
$total_pembayaran += $item->nominal;
@endphp
{{@$item->ledger->name}} |
: |
{{ribuanWithComma(($item->nominal))}} |
@endif
@endforeach
@foreach ($carts->pembayaranpos as $key=>$item)
@if ($item->jenis_pembayaran_id == 7 )
@php
$total += ($item->nominal * -1);
$total_pembayaran += $item->nominal;
$nama_ini = $carts->nama_pelanggan ? $carts->nama_pelanggan: 'default user';
@endphp
Transfer to Room - {{ @$item->Invoice->nomor_kamar }} - {{@$item->Invoice->nama_pelanggan}} |
: |
{{ribuanWithComma(($item->nominal))}} |
@endif
@endforeach
@php
$refund = 0;
@endphp
@if ($carts->complimentary_id == 0)
|
|
|
|
@php
$refund = 0;//variable
if ($carts->complimentary_id == 0) {
if ($status_bill == 1) {
$refund = ($refund_for_transfer_cash * -1) + ($carts->grand_total_pos - $refund_for_transfer );
}else {
$refund = ($total) + ($carts->grand_total_pos);
}
}else{
$refund = 0;
}
@endphp
Change |
: |
{{ribuanWithComma(str_replace('-','',$refund))}} |
@endif
@endif
@php
if($carts->complimentary_id > 0){
$balance = 0;
} else {
$balance = $carts->grand_total_pos + ($total_pembayaran *-1) - $refund;
}
@endphp
Balance |
: |
{{ribuanWithComma(str_replace('-','',$balance))}} |
@endif