@if($PrintSettings->letterpad_with_heading == 0) @endif @foreach ($accountingVouchers as $accountingVoucher)
@if($PrintSettings->letterpad_print_format) @if($PrintSettings->letterpad_with_heading == 0)

CREDIT NOTE

@else
@if($qr_code != null)

@endif

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

CREDIT NOTE

@endif
GST NUMBER {{ $company->gst }}
Invoice Number {{ $accountingVoucher->voucher_number }}
Invoice Date {{ Carbon\Carbon::parse($accountingVoucher->voucher_date)->format('d-m-Y') }}
Transportation Mode
Vehicle Number {{ $accountingVoucher->remarks ?? '-' }}
Date & Time of Supply {{ Carbon\Carbon::parse($accountingVoucher->order_date)->format('d-m-Y') }}
Details of Reciever(Billed to) Details of Consignee (Shipped to)
Name {{ $accountingVoucher->creditLedger->name }} Name {{ $accountingVoucher->creditLedger->name }}
Address {{ $accountingVoucher->creditLedger->address }} Address {{ $accountingVoucher->ship_to_address }}
State {{ $accountingVoucher->creditLedger->state }}
Mobile:{{ $accountingVoucher->creditLedger->mobile_no }}
GST No:{{ $accountingVoucher->creditLedger->gst }}
@foreach ($accountingVoucher->items as $key => $item) @endforeach @if($accountingVoucher->items->count() < 6) @endif
sno Items HSN Qty Unit Rate Disc Taxable
Value
CGST SGST Amount
% Amt % Amt
{{ $key + 1 }} {{ $item->stockItem->name }} {{$item->stockItem->hsn_code }} {{ $item->quantity }} {{ $item->unit->symbol }} {{ number_format($item->price, 2) }} {{ number_format( $item->disc_amount,2) }} {{ number_format( $item->taxable_value,2) }} {{ $item->stockItem->gst/2 }} {{ number_format( $item->cgst,2) }} {{ $item->stockItem->gst/2 }} {{ number_format( $item->sgst,2) }} {{ number_format( $item->total,2) }}
{{ $accountingVoucher->items->sum('quantity') }} {{ number_format($accountingVoucher->items->sum('disc_amount')) }} {{ number_format($accountingVoucher->items->sum('taxable_value')) }} {{ number_format($accountingVoucher->items->sum('sgst'), 2) }} {{ number_format($accountingVoucher->items->sum('cgst') ,2) }} {{ number_format($accountingVoucher->items->sum('total'),2) }}
@php $words = new \NumberFormatter("en", \NumberFormatter::SPELLOUT); $words = $words->format($accountingVoucher->amount); @endphp
Invoice Value(In Words)
({{ $words }})
Freight {{ number_format($accountingVoucher->freight,2) }}
Round off {{ number_format($accountingVoucher->round_off,2) }}
Certified that the Particulars given above are true and correct Discount {{ number_format($accountingVoucher->discount,2) }}
Total {{ number_format($accountingVoucher->amount,2) }}
Closing Balance : {{ number_format($accountingVoucher->closing_balance,2) }} {{ $company->name }} BR
Authorised Signatory
{{-- Normal Table --}} @else
Bill To
@if ($accountingVoucher->customer != null){{ $accountingVoucher->customer->name }} @else{{ $accountingVoucher->creditLedger->name }}@endif
Address:{{ $accountingVoucher->creditLedger->address }}
GSTIN:{{ $accountingVoucher->creditLedger->gst }} State:{{ $accountingVoucher->creditLedger->state }}
Mobile: @if ($accountingVoucher->customer != null){{ $accountingVoucher->customer->mobile }} @else {{ $accountingVoucher->creditLedger->mobile_no }} @endif
Ship To
{{ $accountingVoucher->creditLedger->name }}
Address:{{ $accountingVoucher->ship_to_address }}
@if ($company->show_remarks && $accountingVoucher->remarks != null) @endif
Invoice No : {{ $accountingVoucher->voucher_number }}
Invoice Date: {{ Carbon\Carbon::parse($accountingVoucher->voucher_date)->format('d-m-Y') }}
Remarks: {{ $accountingVoucher->remarks }}
@foreach ($accountingVoucher->items as $key => $item) @endforeach @if($accountingVoucher->items->count() < 6) @endif
S.NO Items HSN Qty Unit Rate Amount
{{ $key + 1 }} {{ $item->stockItem->name }} {{$item->stockItem->hsn_code }} {{ $item->quantity }} {{ $item->unit->symbol }} {{ $item->price }} {{ $item->taxable_value }}
Cgst {{ number_format($accountingVoucher->items->sum('cgst'), 2) }}
Cgst {{ number_format($accountingVoucher->items->sum('sgst'), 2) }}
Total {{ $accountingVoucher->items->sum('quantity') }} {{ number_format($accountingVoucher->items->sum('total'), 2) }}

@php $hsn_codes = $accountingVoucher->items() ->join('stock_items', 'accounting_voucher_items.stock_item_id', '=', 'stock_items.id') ->select('stock_items.hsn_code', \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.taxable_value) as taxable_value')) ->groupBy('stock_items.hsn_code', 'stock_items.gst') ->get(); @endphp @foreach ($hsn_codes as $hsn_code) @endforeach
HSN/SAC Taxable Value CGST SGST Total Tax Amount
Rate Amount Rate Amount
{{ $hsn_code->hsn_code }} {{ $hsn_code->taxable_value }} {{ $hsn_code->gst/2 }}% {{$hsn_code->cgst }} {{$hsn_code->gst/2}}% {{ $hsn_code->sgst }} {{ $hsn_code->cgst + $hsn_code->sgst }}
Total {{ number_format($accountingVoucher->items->sum('cgst'), 2) }} {{ number_format($accountingVoucher->items->sum('sgst'), 2) }} {{ number_format($accountingVoucher->items->sum('cgst') + $accountingVoucher->items->sum('sgst'), 2) }}

@php $words = new \NumberFormatter("en", \NumberFormatter::SPELLOUT); $words = $words->format($accountingVoucher->items->sum('total')); @endphp
Total Amount (in words)
{{ $words }}

Terms and Conditions
{!! $company->terms_conditions !!}
@endif
@if ($accountingVouchers->last() != $accountingVoucher)
@endif @endforeach