# |
ITEM DESCRIPTIONS |
SUB-TOTAL |
DESCRIPTIONS |
AMOUNT |
QTY |
USD |
TSH |
{{--*/ $i = 0 /*--}}
{{--*/ $sub_amount_usd = 0 /*--}}
{{--*/ $sub_amount_tsh = 0 /*--}}
{{--*/ $total_tax_usd = 0 /*--}}
{{--*/ $total_tax_tsh = 0 /*--}}
@foreach($invoice->invoiceItems as $detail)
@if($detail->currency == 'TSH')
@if($detail->vat == 'VAT_EXCLUSIVE')
{{--*/ $sub_amount_tsh += $detail->amount /*--}}
{{--*/ $sub_amount_usd += \App\Logistics\Facades\Logistics::currencyConvert($detail->amount, 'TSH',
$invoice->exchange_rate, 'USD') /*--}}
{{--*/ $total_tax_tsh += $sub_amount_tsh*0.18 /*--}}
{{--*/ $total_tax_usd += $sub_amount_usd*0.18 /*--}}
@elseif($detail->vat == 'VAT_INCLUSIVE')
{{--*/ $sub_amount_tsh += $detail->amount/1.18 /*--}}
{{--*/ $sub_amount_usd += \App\Logistics\Facades\Logistics::currencyConvert($sub_amount_tsh, 'TSH',
$invoice->exchange_rate, 'USD') /*--}}
{{--*/ $total_tax_tsh += $detail->amount-$sub_amount_tsh /*--}}
{{--*/ $total_tax_usd += \App\Logistics\Facades\Logistics::currencyConvert($detail->amount, 'TSH',
$invoice->exchange_rate, 'USD') - $sub_amount_usd /*--}}
@else
{{--*/ $sub_amount_tsh += $detail->amount /*--}}
{{--*/ $sub_amount_usd += \App\Logistics\Facades\Logistics::currencyConvert($detail->amount, 'TSH',
$invoice->exchange_rate, 'USD') /*--}}
@endif
@else
@if($detail->vat == 'VAT_EXCLUSIVE')
{{--*/ $sub_amount_usd += $detail->amount /*--}}
{{--*/ $sub_amount_tsh += \App\Logistics\Facades\Logistics::currencyConvert($detail->amount, 'USD',
$invoice->exchange_rate, 'TSH') /*--}}
{{--*/ $total_tax_tsh += $sub_amount_tsh*0.18 /*--}}
{{--*/ $total_tax_usd += $sub_amount_usd*0.18 /*--}}
@elseif($detail->vat == 'VAT_INCLUSIVE')
{{--*/ $sub_amount_usd += $detail->amount/1.18 /*--}}
{{--*/ $sub_amount_tsh += \App\Logistics\Facades\Logistics::currencyConvert($detail->amount/1.18, 'USD',
$invoice->exchange_rate, 'TSH') /*--}}
{{--*/ $total_tax_tsh += $detail->amount-$sub_amount_tsh/1.18 /*--}}
{{--*/ $total_tax_usd += \App\Logistics\Facades\Logistics::currencyConvert($detail->amount, 'USD',
$invoice->exchange_rate, 'TSH') - $sub_amount_tsh /*--}}
@else
{{--*/ $sub_amount_usd += $detail->amount /*--}}
{{--*/ $sub_amount_tsh += \App\Logistics\Facades\Logistics::currencyConvert($detail->amount, 'USD',
$invoice->exchange_rate, 'TSH') /*--}}
@endif
@endif
{{--*/ $i ++ /*--}}
@endforeach
1 |
TRANSPORTATION FEES |
{{$sub_trip_amount}} |
{{$i}} |
{{number_format($sub_amount_usd,2)}} |
{{number_format($sub_amount_tsh,2)}} |
|
PRE-TAX |
{{number_format($sub_amount_usd,2)}} |
{{number_format($sub_amount_tsh,2)}} |
|
VAT RATED (18%) |
{{number_format($total_tax_usd,2)}} |
{{number_format($total_tax_tsh,2)}} |
|
TOTAL AMOUNT |
{{number_format($sub_amount_usd+$total_tax_usd,2)}} |
{{number_format($sub_amount_tsh+$total_tax_tsh,2)}} |
|