@if ($printSettings->seperate_lines) @endif @foreach ($accountingVouchers as $accountingVoucher)

{{ $printSettings->seperate_header_b2b_b2c == 1 ? ($accountingVoucher->debitLedger->gst == null || $accountingVoucher->debitLedger->gst == '' ? 'B2C INVOICE' : 'B2B INVOICE') : 'INVOICE' }}

@if ($printSettings->extra_space) @php $separate_print = $company->separate_print_for_branch; if ($separate_print == 1) { $branch = $accountingVoucher->branch; } else { $branch = null; } @endphp
@if ($branch == null || $branch->name == 'Main Branch')

{{ $company->name }}

@else

{{ $branch->name }}

@endif @if ($branch == null || $branch->name == 'Main Branch')

{{ $company->address }}

@else

{{ $branch->address }}

@endif @if ($branch == null || $branch->name == 'Main Branch')

PH:{{ $company->phone }}

@else

PH:{{ $branch->mobile }}

@endif @if (Auth::user()->company_profile->fssai_number != null) FSSAI NO:{{ Auth::user()->company_profile->fssai_number }}       @endif @if ($branch == null || $branch->name == 'Main Branch') GST:{{ $company->gst }}       @else GST:{{ $branch->gst_no }}       @endif 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') }}
Staff {{ $accountingVoucher->user != null ? ($accountingVoucher->user->name == 'Super Admin' ? '' : $accountingVoucher->user->name ?? '') : '' }}
______
@if ($printSettings->qr_image != null)

Customer Name : {{ $accountingVoucher->debitLedger->name }}
Mobile No :{{ $accountingVoucher->debitLedger->mobile_no }}
Address : {{ $accountingVoucher->debitLedger->address }}

GSTIN:{{ $accountingVoucher->debitLedger->gst }}
@else

Customer Name : {{ $accountingVoucher->debitLedger->name }}
Mobile No :{{ $accountingVoucher->debitLedger->mobile_no }}
Address : {{ $accountingVoucher->debitLedger->address }}

GSTIN:{{ $accountingVoucher->debitLedger->gst }}
@endif @else

{{ $company->name }}

{{ $company->address }}

PH:{{ $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') }}
_____
______
@endif
qr_image != null) style="width:80%" @else style="width:100%" @endif>
Customer Name : {{ $accountingVoucher->debitLedger->name }}
Mobile No :{{ $accountingVoucher->debitLedger->mobile_no }} @if ($accountingVoucher->ship_to_address != null)
Shipping Address : {{ $accountingVoucher->ship_to_address }} @endif
Address : {{ $accountingVoucher->debitLedger->address }}
{{-- Mobile No :{{ $accountingVoucher->debitLedger->mobile_no }}
--}} {{--

--}} GSTIN:{{ $accountingVoucher->debitLedger->gst }}
@if ($printSettings->qr_image != null)
@endif @if ($printSettings->hsn_code) @endif @if ($printSettings->product_code) @endif @if ($printSettings->mrp) @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->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() < 10) @if ($printSettings->hsn_code) @endif @if ($printSettings->product_code) @endif @if ($printSettings->mrp) @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->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>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 @if ($item->remarks != null)
({{ $item->remarks }}) @endif
{{ number_format($item->price, 2) }} {{ $item->quantity }} {{ $item->unit->symbol }} {{ number_format($item->stockItem->getMrp($accountingVoucher->voucher_date), 2) }} {{ number_format($item->gross_value, 2) }} {{ number_format($item->disc_percentage, 2) }}{{ $item->gst_per }} {{ $item->gst_per / 2 }} {{ number_format($item->cgst, 2) }} {{ $item->gst_per / 2 }} {{ number_format($item->sgst, 2) }} {{ number_format($item->igst, 2) }}{{ $item->cess }} {{ number_format($item->total, 2) }}
{{ $accountingVoucher->items->sum('quantity') }} {{ number_format($accountingVoucher->items->sum('gross_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) }} @if ($printSettings->item_total) {{ number_format($accountingVoucher->items->sum('total'), 2) }} @endif
@if ($printSettings->extra_space) @endif @if ($printSettings->show_outstanding && $accountingVoucher->debitLedger->name != 'Cash') @if ($printSettings->signature) @if ($printSettings->signature_left == 1) @else @endif @endif @if ($printSettings->terms_conditions) @endif @else @endif
@php $words = new \NumberFormatter('en', \NumberFormatter::SPELLOUT); $words = $words->format($accountingVoucher->amount); @endphp {{ $words }}
@if ($printSettings->grand_total_on_right_side == 0) @if ($accountingVoucher->sales != 0) @endif @if ($accountingVoucher->receipt != 0) @endif @if ($accountingVoucher->salesReturn != 0) @endif @endif
grand_total_on_right_side) style="font-weight:bold;font-size:17px;vertical-align:top" @endif> Prev Day Balance : Rs. grand_total_on_right_side) style="font-weight:bold;font-size:17px;vertical-align:top" @endif> {{ $accountingVoucher->previousBalance }} {{ $accountingVoucher->previousBalanceDrCr }}
Bill Date Summary
Sales {{ $accountingVoucher->sales }}
Recipt {{ $accountingVoucher->receipt }}
Sales Return {{ $accountingVoucher->salesReturn }}
Grand Total {{ $accountingVoucher->closing_balance }} {{ $accountingVoucher->closing_balance_dr_cr }}
@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->items()->sum('cgst') > 0) @endif @if ($accountingVoucher->items()->sum('sgst') > 0) @endif @if ($accountingVoucher->items()->sum('igst') > 0) @endif @if ($accountingVoucher->items()->sum('cess') > 0) @endif @if ($accountingVoucher->freight > 0) @endif @if ($printSettings->grand_total_on_right_side) @endif
Amount {{ number_format($accountingVoucher->items()->sum('taxable_value'), 2) }}
CGST {{ number_format($accountingVoucher->items()->sum('cgst'), 2) }}
SGST {{ number_format($accountingVoucher->items()->sum('sgst'), 2) }}
IGST {{ number_format($accountingVoucher->items()->sum('igst'), 2) }}
Cess {{ number_format($accountingVoucher->items()->sum('cess'), 2) ?? 0.0 }}
Freight {{ number_format($accountingVoucher->freight, 2) ?? 0.0 }}
Discount {{ number_format($accountingVoucher->discount, 2) ?? 0.0 }}
Net Total {{ number_format($accountingVoucher->amount, 2) ?? 0.0 }}
Grand Total {{ $accountingVoucher->totalOutstanding }}-{{ $accountingVoucher->totalOutstandingDrCr }}  
  
FOR {{ $company->name }} Authorised Signatory FOR {{ $company->name }}

Autherised Signatory
Terms And Conditions
{!! $company->terms_conditions !!}
@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
Amount {{ number_format($accountingVoucher->items()->sum('taxable_value'), 2) }}
CGST {{ number_format($accountingVoucher->items()->sum('cgst'), 2) }}
SGST {{ number_format($accountingVoucher->items()->sum('sgst'), 2) }}
IGST {{ number_format($accountingVoucher->items()->sum('igst'), 2) }}
Cess {{ number_format($accountingVoucher->items()->sum('cess'), 2) ?? 0.0 }}
Freight {{ number_format($accountingVoucher->freight, 2) ?? 0.0 }}
Discount {{ number_format($accountingVoucher->discount, 2) ?? 0.0 }}
Net Total {{ number_format($accountingVoucher->amount, 2) ?? 0.0 }}
@if ($printSettings->terms_conditions) Terms & Conditions @endif
@if ($printSettings->terms_conditions) {!! $company->terms_conditions !!} @endif
Certified that the Particulars given above are true and correct Traders @if ($printSettings->signature) FOR {{ $company->name }}

Authorised Signatory @endif
@if ($accountingVouchers->last() != $accountingVoucher)
@endif @endforeach