fix laporan penagihan

This commit is contained in:
daengdeni 2024-04-04 15:13:47 +07:00
parent db9357c7b8
commit 88a5f87673

View File

@ -236,20 +236,35 @@
$date = Carbon::create($row->tanggal_hapus_buku);
return $date->locale('id')->translatedFormat('d F Y');
})->editColumn('branch', function ($row) {
return 'A';
//return $row->branch->kode . ' - ' . $row->branch->name;
if(isset($row->branch->kode) && isset($row->branch->name)){
return $row->branch->kode . ' - ' . $row->branch->name;
}else{
return '-';
}
})->editColumn('debitur', function ($row) {
return 'B';
//return $row->debitur->kode . ' - ' . $row->debitur->name;
if (isset($row->debitur->kode) && isset($row->debitur->name)) {
return $row->debitur->kode . ' - ' . $row->debitur->name;
} else {
return '-';
}
})->editColumn('alamat', function ($row) {
return 'E';
//return $row->debitur->address;
if (isset($row->debitur->address)) {
return $row->debitur->address;
} else {
return '-';
}
})->editColumn('facility_type', function ($row) {
return 'C';
//return $row->facility_type->kode . ' - ' . $row->facility_type->name;
if (isset($row->facility_type->kode) && isset($row->facility_type->name)) {
return $row->facility_type->kode . ' - ' . $row->facility_type->name;
} else {
return '-';
}
})->editColumn('loan_type', function ($row) {
return 'D';
//return $row->loan_type->kode . ' - ' . $row->loan_type->name;
if (isset($row->loan_type->kode) && isset($row->loan_type->name)) {
return $row->loan_type->kode . ' - ' . $row->loan_type->name;
} else {
return '-';
}
})->editColumn('guarantee_type', function ($row) {
$guarantee = GuaranteeType::where('id', $row->guarantee_type_id)->first();
if (isset($guarantee->id)) {