@foreach ($accountingVouchers as $accountingVoucher)

DEBIT NOTE

Order Details @if ($company->show_supplier_invoice_no_date == 1) @else @endif

{{ $company->name }}

@php $company_address = explode(',', $company->address); @endphp

@foreach ($company_address as $address) {{ $address }}
@endforeach

{{ $company->phone }}

GST:{{ $company->gst }}       State:{{ $company->state }} @if ($printSettings->upi_id != null || $printSettings->gpay != null)

@if ($printSettings->upi_id != null) upi id:{{ $printSettings->upi_id }}       @endif @if ($printSettings->gpay != null) gpay no:{{ $printSettings->gpay }} @endif

@endif
Invoice No {{ $accountingVoucher->voucher_number }}
Invoice Date {{ \Carbon\Carbon::parse($accountingVoucher->voucher_date)->format('d M Y') }}
Supplier Invoice No {{ $accountingVoucher->supplier_invoice_no }}
Supplier Invoice Date {{ \Carbon\Carbon::parse($accountingVoucher->supplier_invoice_date)->format('d M Y') }}
_____
______
@if ($accountingVoucher->ship_to_address != null) @else @endif

{{ $accountingVoucher->debitLedger->name }}
{{ $accountingVoucher->debitLedger->mobile_no }}
@php $adresses = explode(',', $accountingVoucher->debitLedger->address); @endphp @foreach ($adresses as $address) {{ $address }}
@endforeach

GSTIN:{{ $accountingVoucher->debitLedger->gst }}
Shipping Address
    {{ $accountingVoucher->ship_to_address }}

{{ $accountingVoucher->debitLedger->name }}
{{ $accountingVoucher->debitLedger->mobile_no }}
@php $adresses = explode(',', $accountingVoucher->debitLedger->address); @endphp @foreach ($adresses as $address) {{ $address }}
@endforeach

GSTIN:{{ $accountingVoucher->debitLedger->gst }}
@if ($printSettings->hsn_code) @endif @if ($printSettings->product_code) @endif @if ($printSettings->mrp) @endif @if ($printSettings->gross) @endif @if ($printSettings->discount_percentage) @endif @if ($printSettings->gst) @endif @if ($printSettings->itemwise_gst) @endif @if ($printSettings->itemwise_igst) @endif @if ($printSettings->cess_amount) @endif @if ($printSettings->itemwise_gst) @endif @foreach ($accountingVoucher->items as $key => $item) @if ($printSettings->hsn_code) @endif @if ($printSettings->product_code) @endif @if ($printSettings->mrp) @endif @if ($printSettings->gross) @endif @if ($printSettings->discount_percentage) @endif @if ($printSettings->gst) @endif @if ($printSettings->itemwise_gst) @endif @if ($printSettings->itemwise_igst) @endif @if ($printSettings->cess_amount) @endif @endforeach @if ($printSettings->extra_space) @if ($accountingVoucher->items->count() < 9) @if ($printSettings->hsn_code) @endif @if ($printSettings->product_code) @endif @if ($printSettings->mrp) @endif @if ($printSettings->gross) @endif @if ($printSettings->discount_percentage) @endif @if ($printSettings->gst) @endif @if ($printSettings->itemwise_gst) @endif @if ($printSettings->itemwise_igst) @endif @if ($printSettings->cess_amount) @endif @endif @endif @if ($printSettings->hsn_code) @endif @if ($printSettings->product_code) @endif @if ($printSettings->mrp) @endif @if ($printSettings->gross) @endif @if ($printSettings->discount_percentage) @endif @if ($printSettings->gst) @endif @if ($printSettings->itemwise_gst) @endif @if ($printSettings->itemwise_igst) @endif @if ($printSettings->cess_amount) @endif
itemwise_gst) rowspan="2" @endif>SNitemwise_gst) rowspan="2" @endif>HSNitemwise_gst) rowspan="2" @endif>Codeitemwise_gst) rowspan="2" @endif>Item itemwise_gst) rowspan="2" @endif>Rate itemwise_gst) rowspan="2" @endif>Qty itemwise_gst) rowspan="2" @endif>Unititemwise_gst) rowspan="2" @endif>MRPitemwise_gst) rowspan="2" @endif>Grossitemwise_gst) rowspan="2" @endif>Dis%itemwise_gst) rowspan="2" @endif>Taxable
Value
itemwise_gst) rowspan="2" @endif>Gst%CGST SGSTitemwise_gst) rowspan="2" @endif>IGSTitemwise_gst) rowspan="2" @endif>Cessitemwise_gst) rowspan="2" @endif>Total
% Amt % Amt
{{ $key + 1 }} {{ $item->stockItem->hsn_code }} {{ $item->stockItem->item_code }} {{ $item->stockItem->name }} @if ($item->variant_id != null)
({{ $item->variant->name }}) @endif
{{ number_format($item->price, 2) }} {{ $item->quantity }} {{ $item->unit->symbol }} {{ $item->stockItem->getMrp($accountingVoucher->voucher_date) }} {{ $item->gross_value }} {{ $item->disc_percentage }} {{ number_format($item->taxable_value, 2) }} {{ $item->gst_per }} {{ $item->gst_per / 2 }} {{ $item->cgst }} {{ $item->gst_per / 2 }} {{ $item->sgst }} {{ $item->igst }} {{ $item->cess }}{{ $item->total }}
{{ $accountingVoucher->items->sum('quantity') }} {{ number_format($accountingVoucher->items->sum('gross_value'), 2) }}{{ number_format($accountingVoucher->items->sum('taxable_value'), 2) }} {{ number_format($accountingVoucher->items->sum('cgst'), 2) }} {{ number_format($accountingVoucher->items->sum('sgst'), 2) }}{{ number_format($accountingVoucher->items->sum('igst'), 2) }}{{ number_format($accountingVoucher->items->sum('cess'), 2) }}{{ number_format($accountingVoucher->items->sum('total'), 2) }}
@php $words = new \NumberFormatter('en', \NumberFormatter::SPELLOUT); $words = $words->format($accountingVoucher->amount); @endphp {{ $words }}
@if ($company->bankLedger != null)
Bank Name {{ $company->bankLedger->name }}
Branch {{ $company->bankLedger->branch }}
Acc No {{ $company->bankLedger->account_number }}
IFSC {{ $company->bankLedger->ifsc_code }}
@endif
@if($accountingVoucher->is_accounts_only == 0)
Taxable Amount {{ $accountingVoucher->items()->sum('taxable_value') }}
CGST {{ $accountingVoucher->items()->sum('cgst') }}
SGST {{ $accountingVoucher->items()->sum('sgst') }}
IGST {{ $accountingVoucher->items()->sum('igst') }}
Cess {{ $accountingVoucher->items()->sum('cess') ?? 0.0 }}
Freight {{ $accountingVoucher->freight ?? 0.0 }}
Discount {{ $accountingVoucher->discount ?? 0.0 }}
Net Total {{ $accountingVoucher->amount ?? 0.0 }}
@else @foreach($accountingVoucher->accountingVoucherLedgers as $accountingVoucherLedger) @if($accountingVoucherLedger->ledger_id != $accountingVoucher->debit_ledger_id) @endif @endforeach
{{ $accountingVoucherLedger->ledger->name }} {{ $accountingVoucherLedger->amount }}
Net Total {{ $accountingVoucher->amount ?? 0.0 }}
@endif
@if ($printSettings->terms_conditions) Terms & Conditions @endif
@if ($printSettings->terms_conditions) {!! $company->terms_conditions !!} @endif
For {{ $company->name }}

Authorised Signatory
@if ($accountingVoucher->remarks != null)    Remarks: {{ $accountingVoucher->remarks }} @endif
@if ($accountingVouchers->last() != $accountingVoucher)
@endif @endforeach