{{-- Discount --}} Discount: {{ $item->deduction?->percentage ?? 0 }}% @if(($item->deduction?->percentage ?? 0) > 0) ({{ cMoney($item->deduction?->manual_amount ?? $item->deduction?->amount, $invoice->currency, true) }}) @endif | {{-- Retention --}} Retention: {{ cMoney($item->retention_amount ?? 0, $invoice->currency, true) }} | {{-- Taxes Breakdown --}} @if($item->pivotTaxes && $item->pivotTaxes->count() > 0) Taxes: @foreach($item->pivotTaxes as $tax) {{-- Inline label based on category --}} @php $label = $tax->category == 1 ? 'VAT' : ($tax->category == 3 ? 'RC' : ($tax->category == 2 ? 'WHT' : 'Tax')); @endphp {{ $label }}: @if($tax->category == 2) - @endif {{ !$invoice->is_currency_hidden ? cMoney($tax->manual_amount ?: ($tax->calculated_amount ?? 0), $invoice->currency, true) : number_format(cMoney($tax->manual_amount ?: ($tax->calculated_amount ?? 0), $invoice->currency, false)->getAmount(), 2) }} @if($tax->type == 'Percent') ({{ $tax->amount }}%) {{-- ({{ $item->pivotTaxes[0]->amount }}%) --}} @endif @if($tax->manual_amount) @php $formattedAmount = !$invoice->is_currency_hidden ? cMoney($tax->calculated_amount, $invoice->currency, true) : number_format(cMoney($tax->calculated_amount, $invoice->currency, false)->getAmount(), 2); @endphp * @endif @if(!$loop->last) | @endif @endforeach @else VAT: {{ !$invoice->is_currency_hidden ? cMoney(0, $invoice->currency) : number_format(0, 2) }} @endif
{{-- Actions --}}