✨ feat: Tambah kolom nomor tiket dan perbaiki null safety NOC
- Tambahkan kolom 'nomor_tiket' di tabel NOC (index, pembayaran, penyelesaian) - Perbaiki null safety dengan operator ?-> untuk mencegah error - Update model Noc: ganti fillable dengan guarded, tambah relasi debiture & branch - Hapus filter whereDoesntHave untuk memo_penyelesaian (commented out) - Tambah fallback data dari noc->debiture dan noc->branch - Perbaiki sorting dengan ->values() untuk reset array keys - Update view pembayaran.blade.php dengan kolom nomor tiket
This commit is contained in:
@@ -8,39 +8,7 @@ class Noc extends Base
|
||||
{
|
||||
protected $table = 'noc';
|
||||
|
||||
protected $fillable = [
|
||||
'permohonan_id',
|
||||
'persetujuan_penawaran_id',
|
||||
'nomor_tiket',
|
||||
'bukti_bayar',
|
||||
'nominal_bayar',
|
||||
'total_pembukuan',
|
||||
'status_bayar',
|
||||
'status_kurang_bayar',
|
||||
'nominal_kurang_bayar',
|
||||
'status_lebih_bayar',
|
||||
'nominal_lebih_bayar',
|
||||
'bukti_pengembalian',
|
||||
'tanggal_pembayaran',
|
||||
'nominal_penyelesaian',
|
||||
'status_penyelesaiaan',
|
||||
'tanggal_penyelesaian',
|
||||
'bukti_penyelesaian',
|
||||
'bukti_ksl',
|
||||
'memo_penyelesaian',
|
||||
'memo_penyelesaian_number',
|
||||
'memo_penyelesaian_date',
|
||||
'memo_penyelesaian_payment_date',
|
||||
'memo_penyelesaian_created_at',
|
||||
'catatan_noc',
|
||||
'status',
|
||||
'authorized_status',
|
||||
'authorized_at',
|
||||
'authorized_by',
|
||||
'nomor_rekening_lebih_bayar',
|
||||
'bukti_ksl_lebih_bayar',
|
||||
'bukti_ksl_kurang_bayar'
|
||||
];
|
||||
protected $guarded = ['id'];
|
||||
|
||||
protected $casts = [
|
||||
'nominal_bayar' => 'decimal:2',
|
||||
@@ -78,4 +46,12 @@ class Noc extends Base
|
||||
{
|
||||
return $this->belongsTo(User::class, 'authorized_by');
|
||||
}
|
||||
|
||||
public function debiture(){
|
||||
return $this->belongsTo(Debiture::class,'debiture_id');
|
||||
}
|
||||
|
||||
public function branch(){
|
||||
return $this->belongsTo(Branch::class,'branch_id');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user