From 6ed88a908a15358c51264f8e0b8ba2a3d088efac Mon Sep 17 00:00:00 2001 From: root Date: Thu, 12 Jan 2023 00:24:31 +0800 Subject: [PATCH] Fix cron, tempoh >= tempohbayar for fasa 2 --- app/Console/Commands/kemaskiniLelong.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/kemaskiniLelong.php b/app/Console/Commands/kemaskiniLelong.php index 2702e6a0..1226d3ed 100644 --- a/app/Console/Commands/kemaskiniLelong.php +++ b/app/Console/Commands/kemaskiniLelong.php @@ -10,6 +10,7 @@ use App\Models\TransaksiKeuntungan; use App\Models\LelongTebus; use App\Models\LogUser; use App\Models\User; +use Illuminate\Support\Facades\Http; class kemaskiniLelong extends Command { @@ -99,7 +100,7 @@ class kemaskiniLelong extends Command $total_untung_rebet = TransaksiKeuntungan::on('main')->where('norujukan',$lelongbid->norujukan)->sum('keuntungan_rebet'); $total_untung_asal = TransaksiKeuntungan::on('main')->where('norujukan',$lelongbid->norujukan)->sum('bayaran_keuntungan'); $beza_keuntungan = $total_untung_asal - $total_untung_rebet; - if($gadai->tempohbayar == $gadai->tempoh ){ + if($gadai->tempoh >= $gadai->tempohbayar ){ $keuntungan = 0.00; }else{ $jbg = $gadai->tempoh - $gadai->tempohbayar;