{{-- Company Header --}}
Company Logo
{{ strtoupper($order->company->company_name ?? 'COMPANY NAME') }}
@if($order->companyGst) {{ $order->companyGst->address_line1 ?? '' }} @if(!empty($order->companyGst->address_line2)) , {{ $order->companyGst->address_line2 }} @endif @if(!empty($order->companyGst->city)) , {{ $order->companyGst->city }} @endif @if($order->companyGst->state) , {{ $order->companyGst->state->state_name ?? $order->companyGst->state->name ?? '' }} @endif @if(!empty($order->companyGst->pincode)) - {{ $order->companyGst->pincode }} @endif @endif
{{-- Draft Notice --}} {{-- @if($isDraft)
⚠️ THIS IS A PROFORMA INVOICE - NOT A TAX INVOICE ⚠️
{{-- @endif --}} {{-- Document Title --}}
{{ strtoupper($documentTitle) }}
{{-- Buyer Details and Invoice Details (Unified Table) --}}
Seller Details Buyer's Details
Date {{ \Carbon\Carbon::parse($order->so_date)->format('d-m-Y') }} Customer Name {{ strtoupper($order->customer->customer_name ?? 'CUSTOMER NAME') }}
@if($order->billingAddress) {{ $order->billingAddress->address_line1 ?? '' }}
@if($order->billingAddress->address_line2) {{ $order->billingAddress->address_line2 }}
@endif {{ $order->billingAddress->city ?? '' }} @if($order->customerGstin && $order->customerGstin->state) , {{ $order->customerGstin->state->name ?? '' }} @endif @if($order->billingAddress->pincode) , {{ $order->billingAddress->pincode }} @endif @endif
P.I No. {{ $order->so_number }} Address
Sales By {{ $order->createdBy->name ?? 'System' }}
Dispatch Via {{ $order->delivery_terms ?? 'BY TRANSPORT' }} GST No. {{ $order->customerGstin->gstin_number ?? '-' }}
Dispatch From {{ $order->companyGst->city ?? '-' }} Contact Person {{ $order->customer->contact_person ?? '-' }}
Order Confirm Date {{ $order->approved_at ? \Carbon\Carbon::parse($order->approved_at)->format('d-m-Y') : '-' }} Contact No. {{ $order->customer->phone ?? '-' }}
Company GST {{ $order->companyGst->gstin_number ?? '-' }} Email Id {{ $order->customer->email ?? '-' }}
{{-- Line Items Table --}} @foreach($order->lines as $index => $line) @endforeach
S. No. Description of Goods HSN/SAC Qty UOM Rate per Unit Tax % Amount
{{ $index + 1 }} {{ strtoupper($line->productVariant->variant_name ?? ($line->productVariant->product->product_name ?? 'PRODUCT')) }} @if($line->description)
{{ $line->description }} @endif
{{ $line->hsn_code ?? '-' }} {{ number_format($line->ordered_qty, 2) }} {{ $line->uom->uom_code ?? '-' }} {{ number_format($line->rate, 2) }} @if($order->tax_type === 'INTRASTATE') {{ $line->cgst_rate + $line->sgst_rate }}% @elseif($order->tax_type === 'INTERSTATE') {{ $line->igst_rate }}% @else 0% @endif {{ number_format($line->taxable_amount, 2) }}
TOTAL MATERIAL {{ number_format($order->lines->sum('ordered_qty'), 2) }} {{ number_format($order->taxable_amount, 2) }}
{{-- Bottom Section with Bank Details and Totals (Unified Table) --}} @if($order->other_charges > 0) @endif @if(($order->discount_amount ?? 0) > 0) @endif @if($order->tax_type === 'INTRASTATE') @elseif($order->tax_type === 'INTERSTATE') @endif
A/c Name {{ strtoupper($order->company->company_name ?? 'COMPANY NAME') }}
Account Name {{ $order->company->bank_account_name ?? 'ACCOUNT NAME' }}
Account Number {{ $order->company->bank_account_number ?? '-' }}
IFSC CODE {{ $order->company->bank_ifsc_code ?? '-' }}
Bank Name {{ strtoupper($order->company->bank_name ?? 'BANK NAME') }}
Branch {{ strtoupper($order->company->bank_branch ?? 'BRANCH') }}
Assessable Value {{ number_format($order->taxable_amount, 2) }}
FREIGHT Charge @ {{ number_format($order->other_charges, 2) }}
{{ strtoupper($order->lines->first()->productVariant->product->product_name ?? 'PRODUCT') }}
Discount -{{ number_format($order->discount_amount, 2) }}
Sub Total (Before Tax) {{ number_format(($order->taxable_amount ?? 0) + ($order->other_charges ?? 0) - ($order->discount_amount ?? 0), 2) }}
GST (+) @ {{ $order->lines->first()->cgst_rate ?? 0 }}% {{ number_format($order->cgst_amount, 2) }}
GST (+) @ {{ $order->lines->first()->sgst_rate ?? 0 }}% {{ number_format($order->sgst_amount, 2) }}
IGST (+) @ {{ $order->lines->first()->igst_rate ?? 0 }}% {{ number_format($order->igst_amount, 2) }}
Total Payment to be Paid {{ number_format($order->total_amount, 2) }}
{{-- Terms and Conditions (Bordered Section) --}}
Payment Details:
Terms & Conditions
  1. The above mentioned price is ex-warehouse {{ $order->companyGst->city ?? 'Delhi/Noida' }}.
  2. In case of any discrepancies, Please inform us with (07) days upon receiving the material. Material will not be taken back in any condition if it crosses seven(07) days.
  3. Freight will be charged extra
  4. GST will be charged extra :-
  5. {{ $order->payment_terms ?? 'Payment terms as per agreement' }}
  6. @if($order->remarks)
  7. {{ $order->remarks }}
  8. @endif
{{-- Signature Section --}}
For {{ strtoupper($order->company->company_name ?? 'COMPANY NAME') }}