@extends('layout.app') @section('title', 'Print Sale Voucher #' . $saleVoucher->voucher_no) @push('header_script') @endpush @section('content')
Back
@if($companyDetails) @if($companyDetails->faith_line)
{{ $companyDetails->faith_line }}
@endif
{{ $companyDetails->company_name }}
{{ $companyDetails->address }}, {{ $companyDetails->district }}, {{ optional($companyDetails->state)->state_name }} - {{ $companyDetails->pin_code }}
@if($companyDetails->mobile_no) Ph: {{ $companyDetails->mobile_no }} @endif @if($companyDetails->email) | Email: {{ $companyDetails->email }} @endif
@if($companyDetails->gst_no) GSTIN: {{ $companyDetails->gst_no }} @endif @if($companyDetails->pan_no) | PAN: {{ $companyDetails->pan_no }} @endif
@else
SALE VOUCHER
@endif
Party / Customer Details
Name: @php $ledgerName = $saleVoucher->accountLedger->ledger_name ?? 'N/A'; $gstNo = optional($partyDetails)->gst_no; if($gstNo) { $ledgerName = trim(str_replace('-'.$gstNo, '', $ledgerName)); $ledgerName = trim(str_replace($gstNo, '', $ledgerName), '- '); } @endphp {{ $ledgerName }}
Address: @if($partyDetails) {{ $partyDetails->address ?? '' }} @if(!empty($partyDetails->city)) , {{ $partyDetails->city }} @endif @if($partyDetails->state) , {{ $partyDetails->state->state_name }} @endif @else - @endif
Mobile No: {{ optional($partyDetails)->mobile_no ?? '-' }}
Voucher Details
Voucher No: #{{ $saleVoucher->voucher_no }}
Date: {{ \Carbon\Carbon::parse($saleVoucher->voucher_date)->format('d-M-Y') }}
@if($companyDetails && $companyDetails->gst_type === 'Regular') @endif @forelse($saleVoucher->voucherDetails as $index => $detail) @if($companyDetails && $companyDetails->gst_type === 'Regular') @endif @empty @endforelse
# Product / Item Qty Unit Rate (₹) Amount (₹)Tax Slab GST (₹)Total (₹)
{{ $index + 1 }} {{ $detail->product->product_name ?? 'N/A' }} {{ $detail->qty }} {{ $detail->units }} {{ number_format($detail->rate, 2) }} {{ number_format($detail->amount, 2) }} @if($detail->taxGroup) {{ $detail->taxGroup->tax_slab === 'None' || $detail->taxGroup->tax_slab === 'Exempt' ? $detail->taxGroup->tax_slab : $detail->taxGroup->tax_slab . '%' }} @else - @endif {{ number_format($detail->tax_amount, 2) }}{{ number_format($detail->total_amount, 2) }}
No products recorded.
Remarks / Narration

{{ $saleVoucher->remark ?: 'No narration entered for this sale voucher.' }}

Created By: {{ $saleVoucher->created_by }}
@php $is_igst = false; if (optional($companyDetails)->state_id != optional($partyDetails)->state_id) { $is_igst = true; } $total_before_gst_expenses = 0; if($saleVoucher->otherCharges && count($saleVoucher->otherCharges) > 0) { foreach($saleVoucher->otherCharges as $expense) { $total_before_gst_expenses += $expense->paid_amount; } } $total_taxable_value = $saleVoucher->total_sale_amount + $total_before_gst_expenses; @endphp @if($saleVoucher->otherCharges && count($saleVoucher->otherCharges) > 0) @foreach($saleVoucher->otherCharges as $expense) @endforeach @endif @if($companyDetails && $companyDetails->gst_type === 'Regular') @if(!$is_igst) @else @endif @endif @if($saleVoucher->afterGstCharges && count($saleVoucher->afterGstCharges) > 0) @foreach($saleVoucher->afterGstCharges as $afterCharge) @endforeach @endif @if($saleVoucher->discount > 0) @endif @if($saleVoucher->payments && count($saleVoucher->payments) > 0) @foreach($saleVoucher->payments as $payment) @endforeach @endif
Taxable Value {{ number_format($saleVoucher->total_sale_amount, 2) }}
Add:- {{ $expense->ledger->ledger_name ?? 'Other Charge' }} (Before GST) {{ number_format($expense->paid_amount, 2) }}
Total Taxable Value {{ number_format($total_taxable_value, 2) }}
Total Tax {{ number_format($saleVoucher->total_tax_amount, 2) }}
CGST {{ number_format($saleVoucher->total_tax_amount / 2, 2) }}
SGST {{ number_format($saleVoucher->total_tax_amount / 2, 2) }}
IGST {{ number_format($saleVoucher->total_tax_amount, 2) }}
Add:- {{ $afterCharge->ledger->ledger_name ?? 'Other Charge' }} (After GST) {{ number_format($afterCharge->amount, 2) }}
Discount Given -{{ number_format($saleVoucher->discount, 2) }}
Round Off {{ ($saleVoucher->round_off ?? 0) > 0 ? '+' : '' }}{{ number_format($saleVoucher->round_off ?? 0, 2) }}
Grand Total {{ number_format($saleVoucher->total, 2) }}
Paid ({{ $payment->ledger->ledger_name ?? 'Payment' }}) {{ number_format($payment->paid_amount, 2) }}
Total Amount Paid {{ number_format($saleVoucher->total_paid, 2) }}
Balance Remaining Due {{ number_format($saleVoucher->final_total, 2) }}
Prepared By / Staff
Authorized Signature
@endsection