From 261024b8ea733e11aae3f621ae1faec038b441d8 Mon Sep 17 00:00:00 2001 From: Hafifie PKB Date: Tue, 20 Aug 2024 08:03:35 +0800 Subject: [PATCH] fix year to get last year only --- app/Services/Reports/ImbangDugaService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/Reports/ImbangDugaService.php b/app/Services/Reports/ImbangDugaService.php index 13e2e4d..9373c42 100644 --- a/app/Services/Reports/ImbangDugaService.php +++ b/app/Services/Reports/ImbangDugaService.php @@ -853,7 +853,7 @@ class ImbangDugaService $reports = new ReportOne($this->kodcaw); $previous_date = new Carbon($this->tarikh); - $previous_date->subMonth()->endOfMonth()->toDateString(); + $previous_date->subYear()->endOfYear()->toDateString(); $onepercent = $reports->getTotalKeuntungan('B',$previous_date); $ujrah = $reports->getTotalUjrah('B',$previous_date);