@foreach ($accountingVouchers as $accountingVoucher) {{-- --}}
@if ($company['logo'] != null) Logo @endif

{{ $company->address }}
PH: {{ $company->phone }}

@if ($company['logo'] != null) Logo @endif
GSTIN: {{ $company->gst ?? '' }}
TAX INVOICE BILL NO : {{ $accountingVoucher->voucher_number }} Invoice Date: {{ \Carbon\Carbon::parse($accountingVoucher->voucher_date)->format('d-m-Y') }}
Details Of Receiver/Billed
@if ($accountingVoucher->customer != null) {{ $accountingVoucher->customer->name }} @else {{ $accountingVoucher->debitLedger->name }} @endif {{-- @if ($accountingVoucher->debitLedger->address != null)
{{ $accountingVoucher->debitLedger->address }} @endif --}}
GSTINN : {{ $accountingVoucher->debitLedger->gst ?? '' }}
{{--
S.L.NO. Description Day Rate CGST SGST Amount
% Amt % Amt
1 Room Names 5 500000 9% 450000 9% 450000 59000000
1 Room Names 5 500000 9% 450000 9% 450000 59000000
1 Room Names 5 500000 9% 450000 9% 450000 59000000
--}} @foreach ($accountingVoucher->items as $key => $item) @endforeach
S.L.NO. Description Unit Rate Amount
{{ $key + 1 }} {{ $item->stockItem->name }} {{ number_format($item->quantity) }} {{ round($item->price, 2) }} {{ round($item->taxable_value, 2) }}
{{--
Our Bank Details
Bank Name : HDFC BANK
Branch : Karukutty
A/C Name : MATTATHY TOWER
A/C No :
--}} {{-- left table --}} {{-- @dd($company->bankLedger) --}} {{-- right table --}}
{{-- @if ($company->bankLedger->account_holder_name != null)
Account Holder Name : {{ $company->bankLedger->account_holder_name }}
@endif --}}
Our Bank Details
Bank Name : {{ $company->bankLedger->name ?? '' }}
Branch : {{ $company->bankLedger->branch ?? '' }}
A/C No : {{ $company->bankLedger->account_number ?? '' }}
@php $summary = $accountingVoucher ->items() ->join('stock_items', 'accounting_voucher_items.stock_item_id', '=', 'stock_items.id') ->where('stock_items.gst', '>', 0) ->select( \DB::raw('stock_items.gst'), \DB::raw('SUM(accounting_voucher_items.cgst) as cgst'), \DB::raw('SUM(accounting_voucher_items.sgst) as sgst'), \DB::raw('SUM(accounting_voucher_items.igst) as igst'), \DB::raw('SUM(accounting_voucher_items.taxable_value) as taxable_value'), )->groupBy( 'stock_items.gst') ->get(); @endphp @foreach ($summary as $s) @endforeach {{-- bill calculation --}}
[Add] SGST Amount {{number_format($s->gst/2) }}% : {{ $s->sgst }}
[Add] CGST Amount {{number_format($s->gst/2) }}% : {{ $s->cgst }}
BILL AMOUNT :{{ round($accountingVoucher->items()->sum('taxable_value'), 2) }}
ADD GST 18% : {{$accountingVoucher->items()->sum('igst') + $accountingVoucher->items()->sum('cgst') + $accountingVoucher->items()->sum('sgst')}}
NET AMOUNT : {{ $accountingVoucher->amount }}
{{ ucfirst((new \NumberFormatter("en", \NumberFormatter::SPELLOUT))->format($accountingVoucher->amount)) }} rupees only
@endforeach