diff --git a/app/Http/Controllers/NocController.php b/app/Http/Controllers/NocController.php index e1671d3..4370575 100644 --- a/app/Http/Controllers/NocController.php +++ b/app/Http/Controllers/NocController.php @@ -56,6 +56,7 @@ $dataNoc = [ 'nominal_bayar' => $validated['nominal_bayar'], + 'total_pembukuan' => $validated['total_pembukuan'], 'tanggal_pembayaran' => $validated['tanggal_pembayaran'] ?? date('Y-m-d'), 'status_bayar' => $validated['nominal_bayar'] < $validated['total_harus_bayar'] ? false : true, 'catatan_noc' => $validated['catatan_noc'], @@ -131,6 +132,7 @@ ->route('laporan.index')->with('success', 'Memo Penyelesaian updated successfully'); } $dataNoc = [ + 'total_pembukuan' => $validated['total_pembukuan'], 'nominal_penyelesaian' => $validated['nominal_penyelesaian'], 'tanggal_penyelesaian' => $validated['tanggal_penyelesaian'] ?? date('Y-m-d'), 'status_pelunasan' => ((int)$validated['nominal_bayar'] + (int)$validated['nominal_penyelesaian']) === (int)$validated['total_harus_bayar'] ? true : false, diff --git a/app/Http/Requests/NocRequest.php b/app/Http/Requests/NocRequest.php index 13b76af..02a80e9 100644 --- a/app/Http/Requests/NocRequest.php +++ b/app/Http/Requests/NocRequest.php @@ -72,6 +72,7 @@ return [ 'total_harus_bayar' => 'nullable|numeric|min:0', 'nominal_bayar' => 'nullable|numeric|min:0', + 'total_pembukuan' => 'nullable|numeric|min:0', 'bukti_ksl' => $fileRule, 'bukti_bayar' => $fileRule, 'status_bayar' => 'nullable|boolean', diff --git a/app/Models/Noc.php b/app/Models/Noc.php index edc266a..53ea65b 100644 --- a/app/Models/Noc.php +++ b/app/Models/Noc.php @@ -14,6 +14,7 @@ class Noc extends Base 'persetujuan_penawaran_id', 'bukti_bayar', 'nominal_bayar', + 'total_pembukuan', 'status_bayar', 'tanggal_pembayaran', 'nominal_penyelesaian', diff --git a/database/migrations/2025_07_30_032141_add_total_pembukuan_field_to_noc_table.php b/database/migrations/2025_07_30_032141_add_total_pembukuan_field_to_noc_table.php new file mode 100644 index 0000000..4cb411d --- /dev/null +++ b/database/migrations/2025_07_30_032141_add_total_pembukuan_field_to_noc_table.php @@ -0,0 +1,28 @@ +decimal('total_pembukuan', 10, 2)->after('nominal_bayar'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('noc', function (Blueprint $table) { + $table->dropColumn('total_pembukuan'); + }); + } +}; diff --git a/module.json b/module.json index c187f88..a751cec 100644 --- a/module.json +++ b/module.json @@ -391,7 +391,7 @@ ], "sub": [ { - "title": "Pembayaran", + "title": "Pembukuan", "path": "noc.pembayaran", "icon": "ki-filled ki-two-credit-cart text-lg text-primary", "classes": "", diff --git a/resources/views/noc/form.blade.php b/resources/views/noc/form.blade.php index 9a7d28f..9308ec3 100644 --- a/resources/views/noc/form.blade.php +++ b/resources/views/noc/form.blade.php @@ -80,7 +80,7 @@