Merge branch 'staging' of https://git.putrakuningan.com/daengdeni/lpj into tender
This commit is contained in:
@@ -21,6 +21,7 @@
|
|||||||
{
|
{
|
||||||
$permohonan = Permohonan::with(['documents.jenisJaminan','penilaian._user_penilai','penilai','documents.detail.jenisLegalitasJaminan'])->where(['status'=>'done'])->get();
|
$permohonan = Permohonan::with(['documents.jenisJaminan','penilaian._user_penilai','penilai','documents.detail.jenisLegalitasJaminan'])->where(['status'=>'done'])->get();
|
||||||
foreach($permohonan as $_permohonan){
|
foreach($permohonan as $_permohonan){
|
||||||
|
$npw = 0;
|
||||||
if(isset($_permohonan->penilai->lpj)){
|
if(isset($_permohonan->penilai->lpj)){
|
||||||
$npw = json_decode($_permohonan->penilai->lpj, true);
|
$npw = json_decode($_permohonan->penilai->lpj, true);
|
||||||
$npw = $npw['total_nilai_pasar_wajar'] ?? 0;
|
$npw = $npw['total_nilai_pasar_wajar'] ?? 0;
|
||||||
@@ -38,7 +39,9 @@
|
|||||||
'nilai_pasar_wajar' => str_replace('.', '', $npw),
|
'nilai_pasar_wajar' => str_replace('.', '', $npw),
|
||||||
'bukti_kepemilikan' => $_permohonan->documents->flatMap(function ($document) {
|
'bukti_kepemilikan' => $_permohonan->documents->flatMap(function ($document) {
|
||||||
return $document->detail->map(function ($detail) {
|
return $document->detail->map(function ($detail) {
|
||||||
return $detail->jenisLegalitasJaminan->name ?? null;
|
return (!empty($detail->dokumen_nomor) && is_array($detail->dokumen_nomor))
|
||||||
|
? ($detail->jenisLegalitasJaminan->name ?? '') . "\n" . implode(', ', $detail->dokumen_nomor)
|
||||||
|
: null;
|
||||||
});
|
});
|
||||||
})->filter()->unique()->implode(', '),
|
})->filter()->unique()->implode(', '),
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user