Update Module Permohonan

- Update Automaticly get branch id by user login
- change static status permohonan to dynamic and database base
- update create permohonan, update selection debiture to table base
This commit is contained in:
Daeng Deni Mardaeni
2024-09-03 13:41:05 +07:00
parent 3c59943a08
commit be47e0678a
8 changed files with 266 additions and 78 deletions

View File

@@ -40,10 +40,11 @@
if (!$this->id) {
$this->merge([
'nomor_registrasi' => IdGenerator::generate(
['table' => 'permohonan', 'length' => 10, 'prefix'=>'REG', 'field' => 'nomor_registrasi'],
['table' => 'permohonan', 'length' => 10, 'prefix' => 'REG', 'field' => 'nomor_registrasi'],
),
'tanggal_permohonan' => date('Y-m-d'),
'user_id' => auth()->user()->id,
'branch_id' => auth()->user()->branch_id,
]);
}
}