diff --git a/app/Http/Controllers/Admin/AdminInvoiceController.php b/app/Http/Controllers/Admin/AdminInvoiceController.php index 367fa1c..113218f 100644 --- a/app/Http/Controllers/Admin/AdminInvoiceController.php +++ b/app/Http/Controllers/Admin/AdminInvoiceController.php @@ -429,8 +429,10 @@ class AdminInvoiceController extends Controller 'grand_total_with_charges'=> $invoice->grand_total_with_charges, ]); - return redirect() - ->back() - ->with('success', 'Charge group saved successfully.'); + return response()->json([ + 'success' => true, + 'message' => 'Charge group saved successfully.', + 'group_id' => $group->id, + ]); } } \ No newline at end of file diff --git a/database/migrations/2026_03_12_053830_add_charge_columns_to_invoices_table.php b/database/migrations/2026_03_12_053830_add_charge_columns_to_invoices_table.php new file mode 100644 index 0000000..567740f --- /dev/null +++ b/database/migrations/2026_03_12_053830_add_charge_columns_to_invoices_table.php @@ -0,0 +1,23 @@ +decimal('charge_groups_total', 15, 2)->nullable()->after('final_amount_with_gst'); + $table->decimal('grand_total_with_charges', 15, 2)->nullable()->after('charge_groups_total'); + }); + } + + public function down() + { + Schema::table('invoices', function (Blueprint $table) { + $table->dropColumn(['charge_groups_total', 'grand_total_with_charges']); + }); + } +} \ No newline at end of file diff --git a/public/invoices/invoice-INV-2026-000007.pdf b/public/invoices/invoice-INV-2026-000007.pdf new file mode 100644 index 0000000..da6cb08 Binary files /dev/null and b/public/invoices/invoice-INV-2026-000007.pdf differ diff --git a/resources/views/admin/popup_invoice.blade.php b/resources/views/admin/popup_invoice.blade.php index b7fb5a3..af671af 100644 --- a/resources/views/admin/popup_invoice.blade.php +++ b/resources/views/admin/popup_invoice.blade.php @@ -476,47 +476,6 @@ gap: 0.5rem; } - /* ── SUMMARY ── */ - /* .summary-wrap { - padding: 0 2.5rem 2rem; - } - - .summary-card { - background: var(--surface); - border: 1px solid var(--border); - border-radius: var(--radius); - overflow: hidden; - box-shadow: var(--shadow); - } - - .summary-header-row { - background: var(--primary); - color: white; - padding: 0.85rem 1.25rem; - font-weight: 700; - font-size: 0.88rem; - display: flex; - align-items: center; - gap: 0.5rem; - } - - .summary-body { padding: 1.25rem; } - - .summary-row { - display: flex; - justify-content: space-between; - align-items: center; - padding: 0.6rem 0; - border-bottom: 1px solid var(--border); - font-size: 0.88rem; - } - - .summary-row:last-child { border-bottom: none; padding-top: 0.85rem; } - .summary-row .label { color: var(--text-secondary); font-weight: 500; } - .summary-row .value { font-weight: 700; color: var(--primary); } - .summary-row.total .label { font-size: 1rem; font-weight: 700; color: var(--primary); } - .summary-row.total .value { font-size: 1.15rem; color: #10b981; } - .summary-row .value.red { color: #ef4444; } */ .summary-card-compact { margin: 1.5rem 2.5rem 1.5rem; border: 1px solid var(--border); @@ -724,105 +683,6 @@ - - - - - - - - - - -
@@ -920,12 +780,6 @@ Invoice Items
- -
@@ -1180,10 +1034,10 @@ - - + + @@ -1224,27 +1078,29 @@ {{ number_format($group->rate, 2) }} + {{-- Base total without GST --}} + + {{-- GST % --}} - {{-- Base total without GST --}} - + {{-- Group total with GST --}} - {{-- Group tax type --}} - - +
Basis Basis Value RateGST % Total ChargeTotal With GSTGST % Tax TypeTotal With GST Action
+ ₹{{ number_format($groupBaseTotal, 2) }} + {{ number_format($groupGstPercent, 2) }}% - ₹{{ number_format($groupBaseTotal, 2) }} + {{-- Group tax type --}} + + {{ $group->tax_type ?? '-' }} ₹{{ number_format($groupTotalWithGst, 2) }} - {{ $group->tax_type ?? '-' }} -