@php $pivotTaxes = $invoice->allPivotTaxes; @endphp @if(count($pivotTaxes->where('category', 2)) > 0) {{-- category 2 --}} @include('admin.pages.invoices.export.authority-invoice.tax-report-row', ['taxes' => $pivotTaxes->where('category', 2)]) {{-- --}} @endif @if(count($pivotTaxes->where('category', 3)) > 0) {{-- category 3 --}} @include('admin.pages.invoices.export.authority-invoice.tax-report-row', ['taxes' => $pivotTaxes->where('category', 3)]) {{-- --}} @endif
DESCRIPTION PRICE QTY AMOUNT
{{__('Withholding Tax')}} @cMoney($pivotTaxes->where('category', 2)->sum(function($tax) use ($invoice) { return cMoney($tax->manual_amount ? $tax->manual_amount : $tax->calculated_amount, $invoice->currency, true)->getAmount(); }), $invoice->currency, false) {{count($pivotTaxes->where('category', 2))}} @cMoney($pivotTaxes->where('category', 2)->sum(function($tax) use ($invoice) { return cMoney($tax->manual_amount ? $tax->manual_amount : $tax->calculated_amount, $invoice->currency, true)->getAmount(); }), $invoice->currency, false)
{{__('Reverse Charge')}} @cMoney($pivotTaxes->where('category', 3)->sum(function($tax) use ($invoice) { return cMoney($tax->manual_amount ? $tax->manual_amount : $tax->calculated_amount, $invoice->currency, true)->getAmount(); }), $invoice->currency, false) {{count($pivotTaxes->where('category', 3))}} @cMoney($pivotTaxes->where('category', 3)->sum(function($tax) use ($invoice) { return cMoney($tax->manual_amount ? $tax->manual_amount : $tax->calculated_amount, $invoice->currency, true)->getAmount(); }), $invoice->currency, false)