fix rebate in laporan and added imbang duga harian checkup

This commit is contained in:
Hafifie PKB
2024-09-02 01:51:40 +08:00
parent 69167164db
commit 275cebf4f0
8 changed files with 90 additions and 12 deletions
+11
View File
@@ -1015,10 +1015,21 @@ class GadaiController extends Controller
"teller" => $ansuranData['teller'],
"ansuranujrah" => $ansuranData['ujrah'],
"ansuranonepercent" => $ansuranData['onepercent'],
"t_gadai" => $gadai['t_gadai'],
]);
}
}
usort($ansuran, function ($a, $b) {
$compare_teller = strcmp($a['teller'], $b['teller']);
if ($compare_teller === 0) {
return strcmp($a['tarikh_bayaran'], $b['tarikh_bayaran']);
}
return $compare_teller;
});
return response()->json($ansuran);
}