@foreach ($accountingVouchers as $accountingVoucher)
@if ($pageLogo != null) Logo @endif

{{ $accountingVoucher->voucherType->name == "Purchase Order" ? "PURCHASE ORDER" : "PURCHASE" }}

Buyer Details
Buyer Name : {{ $company->name }}
Mobile No : {{ $company->phone }}
Address : {{ $company->address }}
GST No : {{ $company->gst }}
Seller Details
Party Name : {{ $accountingVoucher->creditLedger->name }}
Mobile No : {{ $accountingVoucher->creditLedger->mobile_no }}
Address : {{ $accountingVoucher->creditLedger->address }}
GST No : {{ $accountingVoucher->creditLedger->gst }}
Voucher Details
Date : {{ \Carbon\Carbon::parse($accountingVoucher->voucher_date)->format('d M Y') }}
Voucher No : {{ $accountingVoucher->voucher_number }}
@if ($accountingVoucher->items->count() > 0) @foreach ($accountingVoucher->items as $key => $item) @endforeach
SN Item HSN MRP Qty Unit Price Gross
Value
Dis
(%)
Taxable
Value
CGST SGST IGST CESS Total
{{ $key + 1 }} {{ $item->stockItem->name }}@if($item->variant_id != null)
({{ $item->variant->name }}) @endif
{{ $item->stockItem->hsn_code }} {{ $item->stockItem->getMrp($accountingVoucher->voucher_date) }} {{ $item->quantity }} {{ $item->unit->symbol }} {{ $item->price }} {{ $item->gross_value }} {{ $item->disc_percentage }} {{ $item->taxable_value }} {{ $item->cgst }} {{ $item->sgst }} {{ $item->igst }} {{ $item->cess }} {{ $item->total }}
Total {{ 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) }}
@else @foreach ($accountingVoucher->capitalGoods as $key => $item) @endforeach
SN Ledger Qty Price Gross
Value
Dis
(%)
Taxable
Value
CGST SGST IGST CESS Total
{{ $key + 1 }} {{ $item->ledger->name }} {{ $item->quantity }} {{ $item->price }} {{ $item->gross_value }} {{ $item->disc_percentage }} {{ $item->taxable_value }} {{ $item->cgst }} {{ $item->sgst }} {{ $item->igst }} {{ $item->cess }} {{ $item->total }}
Total {{ number_format($accountingVoucher->capitalGoods->sum('taxable_value'), 2) }} {{ number_format($accountingVoucher->capitalGoods->sum('cgst'), 2) }} {{ number_format($accountingVoucher->capitalGoods->sum('sgst'), 2) }} {{ number_format($accountingVoucher->capitalGoods->sum('igst'), 2) }} {{ number_format($accountingVoucher->capitalGoods->sum('cess'), 2) }} {{ number_format($accountingVoucher->capitalGoods->sum('total'), 2) }}
@endif @if ($company->bankLedger != null) @endif
Bank Name : {{ $company->bankLedger->name }}
Account No : {{ $company->bankLedger->account_number }}
IFSC Code : {{ $company->bankLedger->ifsc_code }}
Branch : {{ $company->bankLedger->branch }}
Total Taxable Value : Rs.{{ $accountingVoucher->items->count() > 0 ? number_format($accountingVoucher->items->sum('taxable_value'), 2) : number_format($accountingVoucher->capitalGoods->sum('taxable_value'), 2) }}
Total CGST : Rs.{{ $accountingVoucher->items->count() > 0 ? number_format($accountingVoucher->items->sum('cgst'), 2) : number_format($accountingVoucher->capitalGoods->sum('cgst'), 2) }}
Total SGST : Rs.{{ $accountingVoucher->items->count() > 0 ? number_format($accountingVoucher->items->sum('sgst'), 2) : number_format($accountingVoucher->capitalGoods->sum('sgst'), 2) }}
TCS : Rs.{{ number_format($accountingVoucher->tcs, 2) ?? '0.00' }}
Discount : Rs.{{ number_format($accountingVoucher->discount, 2) ?? '0.00' }}
Freight/Etc : Rs.{{ number_format($accountingVoucher->freight, 2) ?? '0.00' }}
Round Off : Rs.{{ number_format($accountingVoucher->round_off, 2) }}
Grand Total : Rs.{{ number_format($accountingVoucher->amount, 2) }}
Authorized Signature
@if ($accountingVouchers->last() != $accountingVoucher)
@endif @endforeach