@extends('admin.layouts.app') @section('page-title', 'Edit Invoice') @section('content')

Invoice Overview

@include('admin.popup_invoice', [ 'invoice' => $invoice, 'shipment' => $shipment, 'embedded' => true ])

Edit Invoice Details

@csrf
tax_type === 'gst')>
tax_type === 'igst')>
@can('invoice.edit') @endcan
@php $totalPaid = $invoice->installments->sum('amount'); $remaining = $invoice->final_amount_with_gst - $totalPaid; @endphp
Amount Breakdown
Total Amount (Before Tax): ₹{{ number_format($invoice->final_amount, 2) }}
Tax Type: @if($invoice->tax_type === 'gst') GST (CGST + SGST) @else IGST @endif
Tax Percentage: @if($invoice->tax_type === 'gst') {{ $invoice->cgst_percent + $invoice->sgst_percent }}% @else {{ $invoice->igst_percent }}% @endif
GST Amount: ₹{{ number_format($invoice->gst_amount, 2) }}
Total Invoice Amount (Including GST): ₹{{ number_format($invoice->final_amount_with_gst, 2) }}
Total Paid: ₹{{ number_format($totalPaid, 2) }}
Remaining: ₹{{ number_format($remaining, 2) }}
₹{{ number_format($invoice->final_amount_with_gst, 2) }}
Total Amount
₹{{ number_format($remaining, 2) }}
Remaining

Installment Payments

@can('invoice.add_installment') @if($remaining > 0) @endif @endcan

Add New Installment

@csrf
Installment History
@foreach($invoice->installments as $i) @endforeach
# Date Payment Method Reference No Amount Action
{{ $loop->iteration }} {{ $i->installment_date }} {{ ucfirst($i->payment_method) }} @if($i->reference_no) {{ $i->reference_no }} @else - @endif ₹{{ number_format($i->amount, 2) }}
No installments found. Click "Add Installment" to create one.
@foreach($invoice->installments as $i) ... @endforeach
@endsection