diff --git a/app/Http/Controllers/Admin/AdminInvoiceController.php b/app/Http/Controllers/Admin/AdminInvoiceController.php index 82e06c4..d2cc567 100644 --- a/app/Http/Controllers/Admin/AdminInvoiceController.php +++ b/app/Http/Controllers/Admin/AdminInvoiceController.php @@ -444,8 +444,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 616b176..4146f1d 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 @@ - - - - - - - - - - -
| Basis | Basis Value | Rate | -GST % | Total Charge | -Total With GST | +GST % | Tax Type | +Total With GST | Action | @@ -1229,27 +1083,29 @@ {{ number_format($group->rate, 2) }} + {{-- Base total without GST --}} ++ ₹{{ number_format($groupBaseTotal, 2) }} + | + {{-- GST % --}}{{ number_format($groupGstPercent, 2) }}% | - {{-- Base total without GST --}} -- ₹{{ number_format($groupBaseTotal, 2) }} + {{-- Group tax type --}} + | + {{ $group->tax_type ?? '-' }} | + {{-- Group total with GST --}}₹{{ number_format($groupTotalWithGst, 2) }} | - {{-- Group tax type --}} -- {{ $group->tax_type ?? '-' }} - | - +
|---|