From a61b62edc377c88ce840f580866697a7257f842f Mon Sep 17 00:00:00 2001 From: Afiq Date: Tue, 12 Apr 2022 11:41:58 +0800 Subject: [PATCH] fix calculate jbg --- app/Http/Controllers/GadaiController.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/GadaiController.php b/app/Http/Controllers/GadaiController.php index 0f4dbbd..84f2d03 100644 --- a/app/Http/Controllers/GadaiController.php +++ b/app/Http/Controllers/GadaiController.php @@ -3286,14 +3286,14 @@ class GadaiController extends Controller if($gadai['t_gadai'] == $current->toDateString()){ $tempoh_gadai = 0.5; } - if($tempoh_gadai >= 6.0){ - if($gadai['t_matang'] >= $current->toDateString()){ - $tempoh_gadai = 6.0; - } - }else if($tempoh_gadai >= 12){ + if($tempoh_gadai >= 12.0){ if($gadai['t_matang1'] >= $current->toDateString()){ $tempoh_gadai = 12.0; } + }else if($tempoh_gadai >= 6.0){ + if($gadai['t_matang'] >= $current->toDateString()){ + $tempoh_gadai = 6.0; + } } $upah_semasa = $this->kiraupahTawarruqStokAudit($tempoh_gadai,$gadai['tempohbayar'],$gadai['kadarupah'],$gadai['bakipjm']);