| {{ $loop->iteration }} |
{{ date('d/m/Y', strtotime($accountingVoucher->voucher_date)) }} |
{{ $accountingVoucher->voucher_number }} |
{{ $accountingVoucher->debitLedger ? $accountingVoucher->debitLedger->name : '' }} |
{{ $accountingVoucher->debitLedger ? $accountingVoucher->debitLedger->gst : '' }} |
{{ $accountingVoucher->items()->sum('base_qty') }} |
@php
$totalTaxable = 0;
$totalTax = 0;
$nonTaxable = $accountingVoucher->items()->where(function ($query) { $query->where('gst_per', 0)->orWhere('gst_per', null); })->sum('taxable_value');
$nonTaxable = round($nonTaxable, 2);
$totalTaxable += $nonTaxable;
@endphp
{{ $nonTaxable }} |
@foreach($gstPercentages as $gstPercentage)
@php
$gst = $gstPercentage->gst;
$acVoucherItems = $accountingVoucher->items()->where('gst_per', $gst)->get();
$taxableValue = round($acVoucherItems->sum('taxable_value'),2);
$igst = round($acVoucherItems->sum('igst'),2);
$cgst = round($acVoucherItems->sum('cgst'),2);
$sgst = round($acVoucherItems->sum('sgst'),2);
$totalTaxable += $taxableValue;
$totalTax += $igst + $cgst + $sgst;
@endphp
{{ $taxableValue }} |
{{ $igst }} |
{{ $cgst }} |
{{ $sgst }} |
@endforeach
@php
$cess = round($accountingVoucher->items()->sum('cess'),2);
$totalAmount = $totalTaxable + $totalTax + $cess;
$round_off = round($totalAmount) - $totalAmount;
$amount = $totalAmount + $round_off;
@endphp
{{ $totalTax }} |
{{$cess }} |
{{ $round_off }} |
{{ $amount }} |
@endforeach