fix laporan outstanding debitur
This commit is contained in:
parent
53dd959060
commit
1c07e5d494
@ -94,15 +94,35 @@
|
||||
$date = Carbon::create($row->tanggal_hapus_buku);
|
||||
return $date->locale('id')->translatedFormat('d F Y');
|
||||
})->editColumn('branch', function ($row) {
|
||||
if(isset($row->branch->kode) && isset($row->branch->name)){
|
||||
return $row->branch->kode . ' - ' . $row->branch->name;
|
||||
}else{
|
||||
return '-';
|
||||
}
|
||||
})->editColumn('debitur', function ($row) {
|
||||
if (isset($row->debitur->kode) && isset($row->debitur->name)) {
|
||||
return $row->debitur->kode . ' - ' . $row->debitur->name;
|
||||
} else {
|
||||
return '-';
|
||||
}
|
||||
})->editColumn('alamat', function ($row) {
|
||||
if (isset($row->debitur->address)) {
|
||||
return $row->debitur->address;
|
||||
} else {
|
||||
return '-';
|
||||
}
|
||||
})->editColumn('facility_type', function ($row) {
|
||||
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) {
|
||||
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)) {
|
||||
@ -209,7 +229,7 @@
|
||||
->leftJoin('detail_jaminan', 'hapus_buku.nomor_pinjaman', '=', 'detail_jaminan.nomor_pinjaman')
|
||||
->whereMonth('tanggal_hapus_buku', '<=', request()->get('bulan'))
|
||||
->whereYear('tanggal_hapus_buku', '<=', request()->get('tahun'))
|
||||
->whereRelation('debitur', 'name', 'like', request()->get('debitur'))
|
||||
->whereRelation('debitur', 'name', 'like', '%' . request()->get('debitur') . '%')
|
||||
->get();
|
||||
} else {
|
||||
$data = HapusBuku::with([
|
||||
@ -226,7 +246,7 @@
|
||||
->whereMonth('tanggal_hapus_buku', '<=', request()->get('bulan'))
|
||||
->whereYear('tanggal_hapus_buku', '<=', request()->get('tahun'))
|
||||
->where('kode_cabang', request()->get('kode_cabang'))
|
||||
->whereRelation('debitur', 'name', 'like', request()->get('debitur'))
|
||||
->whereRelation('debitur', 'name', 'like', '%' . request()->get('debitur') . '%')
|
||||
->get();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user