@foreach ($accountingVouchers as $accountingVoucher) @php $chunks = $accountingVoucher->items->chunk(10); $pages = count($chunks); @endphp @foreach ($chunks as $chunkIndex => $chunk) @if(Auth::user()->company_profile->show_seller == 1) @else @endif @if(Auth::user()->company_profile->show_seller == 1) @else @endif
Page: {{ $chunkIndex + 1 }} of {{ $pages }} Estimate

{{ $company->name }}

{{ $company->address }}

PH: {{ $company->phone }},   Email: {{ $company->email }}

GST: {{ $company->gst }}       State: {{ $company->state }}
CUSTOMER: {{ $accountingVoucher->customer ? $accountingVoucher->customer->name : $accountingVoucher->debitLedger->name }}
ADDRESS: {{ $accountingVoucher->customer ? $accountingVoucher->customer->address : $accountingVoucher->debitLedger->address }}
PHONE: {{ $accountingVoucher->customer ? $accountingVoucher->customer->mobile : $accountingVoucher->debitLedger->mobile_no }}
GSTIN No: {{ $accountingVoucher->customer ? '' : $accountingVoucher->debitLedger->gst }}
State: {{ $accountingVoucher->customer ? $accountingVoucher->customer->state : $accountingVoucher->debitLedger->state }}
PO No: {{ $accountingVoucher->customer ? '' : $accountingVoucher->debitLedger->pin_code }}
Invoice No: {{ $accountingVoucher->voucher_number }}
Invoice Date: {{ date('d-m-Y', strtotime($accountingVoucher->voucher_date))}}
Sales Man: {{ $accountingVoucher->user ? $accountingVoucher->user->name : '' }}
@if($accountingVoucher->items->sum('disc_amount') > 0) @endif @foreach ($chunk as $key => $item) @if($accountingVoucher->items->sum('disc_amount') > 0) @endif @endforeach @if ($loop->last) @if($accountingVoucher->items->sum('disc_amount') > 0) @endif @else @endif
s no Product MRP Qty Unit PriceDiscTotal
{{ $key + 1 }} {{ $item->stockItem->name }} {{ $item->stockItem->getMrp($accountingVoucher->voucher_date) }} {{ $item->quantity }} {{ $item->unit->symbol }} {{ number_format($item->price_inc_tax, 2) }}{{ number_format($item->disc_amount, 2) }}{{ number_format($item->total, 2) }}
{{ $accountingVoucher->items->sum('quantity') }} {{ number_format($accountingVoucher->items->sum('total'), 2) }}
@if (!$loop->last)
@endif @endforeach @php if($PrintSettings->show_outstanding){ $count = 5; }else{ $count = 3; } if($accountingVoucher->discount > 0){ $count++; } if($accountingVoucher->freight > 0){ $count++; } $words = new \NumberFormatter('en', \NumberFormatter::SPELLOUT); $words = $words->format($accountingVoucher->amount); @endphp {{-- @if($company->bankLedger != null) @endif --}} @if($accountingVoucher->discount > 0) @endif @if($accountingVoucher->freight > 0) @endif @if($PrintSettings->show_outstanding) @endif
{{ $words }}
Bank Name : {{ $company->bankLedger->name }}
A/c No. : {{ $company->bankLedger->account_number }}
IFSC Code : {{ $company->bankLedger->ifsc_code }}
Branch : {{ $company->bankLedger->branch }}
@if($qr_code != null) @endif
Bill Discount : {{ $accountingVoucher->discount }}
Freight : {{ $accountingVoucher->freight }}
Round Off : {{ $accountingVoucher->round_off }}
Bill Total : {{ number_format($accountingVoucher->amount) }}
Previous Balance : {{ number_format($accountingVoucher->previousBalance) }} {{ $accountingVoucher->previousBalanceDrCr }}
Grand Total : {{ number_format($accountingVoucher->totalOutstanding) }} {{ $accountingVoucher->totalOutstandingDrCr }}

@if(Auth::user()->company_profile->show_seller == 1) @endif
Remarks : {{ $accountingVoucher->remarks }}
Received In Good Condition Party Signature FOR :   {{ $company->name }}
@if($accountingVouchers->last() != $accountingVoucher)
@endif @endforeach