changes of invoice and shipment

This commit is contained in:
divya abdar
2025-12-23 00:30:18 +05:30
parent 044bfe5563
commit 7fa03688aa
6 changed files with 196 additions and 40 deletions

View File

@@ -550,46 +550,71 @@
</div>
</div>
<!-- ============================
SIMPLIFIED INVOICE SUMMARY
============================ -->
<div class="summary-container">
<div class="row justify-content-center">
<div class="col-lg-8">
<!-- Subtotal -->
<div class="amount-row mb-2">
<span>Subtotal Amount</span>
<span class="fw-bold">{{ number_format($invoice->final_amount,2) }}</span>
</div>
<!-- GST -->
<div class="amount-row mb-2">
<span>GST Amount</span>
<span class="fw-bold text-danger">{{ number_format($invoice->gst_amount, 2) }}</span>
</div>
<!-- Total Payable -->
<div class="amount-row mb-2 pt-2 border-top">
<span class="fw-bold">Total Payable Amount</span>
<span class="fw-bold text-success fs-5">{{ number_format($invoice->final_amount_with_gst,2) }}</span>
</div>
</div>
</div>
@php
$totalAmount = $invoice->final_amount;
$gstAmount = $invoice->gst_amount;
$totalPayable = $invoice->final_amount_with_gst;
$paidAmount = $invoice->totalPaid();
$remaining = $invoice->remainingAmount();
@endphp
<div class="summary-container">
<div class="row justify-content-center">
<div class="col-lg-8">
<div class="amount-row">
<span>Total Amount</span>
<span class="fw-bold">{{ number_format($totalAmount,2) }}</span>
</div>
<div class="amount-row">
<span>GST Amount</span>
<span class="fw-bold text-danger">
+ {{ number_format($gstAmount,2) }}
</span>
</div>
<div class="amount-row border-top pt-2">
<span class="fw-bold">Total Payable</span>
<span class="fw-bold text-success">
{{ number_format($totalPayable,2) }}
</span>
</div>
<div class="amount-row">
<span>Paid Amount</span>
<span class="fw-bold text-primary">
{{ number_format($paidAmount,2) }}
</span>
</div>
<div class="amount-row border-top pt-2">
<span class="fw-bold text-danger">Remaining Amount</span>
<span class="fw-bold text-danger fs-5">
{{ number_format($remaining,2) }}
</span>
</div>
</div>
</div>
</div>
<!-- ============================
FOOTER DOWNLOAD & SHARE
============================ -->
<div class="mt-4 pt-3 border-top text-center">
@if($invoice->pdf_path)
<a href="{{ asset($invoice->pdf_path) }}" class="btn btn-primary me-2" download>
<a href="{{ route('admin.invoices.download', $invoice->id) }}"
class="btn btn-primary me-2">
<i class="fas fa-download me-1"></i> Download PDF
</a>
<button class="btn btn-success" onclick="shareInvoice()">
<i class="fas fa-share me-1"></i> Share
</button>
@endif
</div>
</div>
</div>
@@ -599,12 +624,12 @@
<!-- ============================
SHARE SCRIPT
============================ -->
<script>
<script>
function shareInvoice() {
const shareData = {
title: "Invoice {{ $invoice->invoice_number }}",
text: "Sharing invoice {{ $invoice->invoice_number }}",
url: "{{ asset($invoice->pdf_path) }}"
url: "{{ route('admin.invoices.download', $invoice->id) }}"
};
if (navigator.share) {
@@ -614,6 +639,7 @@
alert("Link copied! Sharing not supported on this browser.");
}
}
</script>
</script>
</body>
</html>