{{ $branchInfo['name'] }}

{{ $branchInfo['address'] }}
Phone: {{ $branchInfo['phone'] }}
Email: {{ $branchInfo['email'] }}

Purchase Invoice

{{-- Invoice No: {{ $myPurchase->invoice_number }}
--}} Date: {{ \Carbon\Carbon::parse($myPurchase->purchase_date)->format('d-M-Y H:i') }}

SALES RECEIPT

Bill No: {{ $myPurchase->invoice_number }}

Date: {{ \Carbon\Carbon::parse($myPurchase->created_at)->format('d/m/Y H:i') }}

{{--

Customer: {{ $myPurchase->customer_details['name'] ?? 'Walk-in' }}

@if(isset($myPurchase->customer_details['phone_number']))

Phone: {{ $myPurchase->customer_details['phone_number'] }}

@endif --}} Supplier: {{ $myPurchase->purchaseParty->customer_name ?? 'N/A' }}
@if($myPurchase->purchaseParty->phone_number ?? false) Phone: {{ $myPurchase->purchaseParty->phone_number }}
@endif @if($myPurchase->purchaseParty->address ?? false) Address: {{ $myPurchase->purchaseParty->address }} @endif
@if (!empty($myPurchase->items) && is_iterable($myPurchase->items)) @foreach ($myPurchase->items as $item) @endforeach @endif
Qty Item Amount
{{ $item->quantity }} {{ $item->product->title ?? 'Product N/A' }}
₹{{ number_format($item->sell_price * $item->quantity, 2) }}

Sub Total: ₹ {{ number_format($myPurchase->sub_total_excluding_gst, 2) }}

{{--

Tax Amount: ₹ {{ number_format($myPurchase->tax_amount, 2) }}

--}} @if (auth()->user()->role == 'admin' && $is_gst == 1)

Tax: ₹{{ number_format($myPurchase->gst_total, 2) }}

@else

CGST: ₹{{ number_format($myPurchase->gst_total/2, 2) }}

SGST: ₹{{ number_format($myPurchase->gst_total/2, 2) }}

@endif @if($myPurchase->discount > 0)

Discount: -₹ {{ number_format($myPurchase->discount, 2) }}

@endif @if($myPurchase->additional_charge > 0)

Add. Charge: +₹ {{ number_format($myPurchase->additional_charge, 2) }}

@endif @if($myPurchase->cash_wallet_deduction > 0)

Cash Wallet: -₹ {{ number_format($myPurchase->cash_wallet_deduction, 2) }}

@endif @if($myPurchase->shopping_wallet_deduction > 0)

Shop. Wallet: -₹ {{ number_format($myPurchase->shopping_wallet_deduction, 2) }}

@endif

TOTAL: ₹ {{ number_format($myPurchase->total_amount, 2) }}

{{--

Paid By: {{ ucfirst($myPurchase->payment_mode) }}

--}} {{--

Received: ₹ {{ number_format($myPurchase->receivedAmount ?? $myPurchase->amount_payable, 2) }}

--}} {{--

Change: ₹ {{ number_format(($myPurchase->receivedAmount ?? $myPurchase->amount_payable) - $myPurchase->amount_payable, 2) }}

--}}
{{-- Optional Print Script --}} {{-- --}}