@foreach ($state_codes as $state_code) @php $gstPercentages = \App\Models\AccountingVoucherItem::whereIn( 'accounting_voucher_id', $state_code->pluck('id'), ) ->select('gst_per') ->groupBy('gst_per') ->get(); @endphp @foreach ($gstPercentages as $gstPercentage) @php $gst = $gstPercentage->gst_per; $acIds = $saleVouchers->where('state_code', $state_code->first()->state_code)->pluck('id'); $returnAcIds = $returnVouchers->where('state_code', $state_code->first()->state_code)->pluck('id'); $acVoucherItems = \App\Models\AccountingVoucherItem::whereIn('accounting_voucher_id', $acIds) ->where('gst_per', $gst) ->get(); $returnAcVoucherItems = \App\Models\AccountingVoucherItem::whereIn( 'accounting_voucher_id', $returnAcIds, ) ->where('gst_per', $gst) ->get(); @endphp @endforeach @endforeach
Place Of Supply Rate Taxable Value Cess Amount
{{ $state_code->first()->state_code }} @if ($state_code->first()->state_code != null || $state_code->first()->state_code != '') - {{ \App\Models\GSTState::where('code', $state_code->first()->state_code)->first()?->name ?? '' }} @endif {{ $gst }} {{ $acVoucherItems->sum('taxable_value') - $returnAcVoucherItems->sum('taxable_value') }} {{ $acVoucherItems->sum('cess') - $returnAcVoucherItems->sum('cess') }}