From 254dce5aad93155f357428d0fa5ed3fa142bd93d Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 18 Mar 2025 10:53:14 +1100 Subject: [PATCH] Fixes for Profit Loss --- app/Services/Report/ProfitLoss.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Services/Report/ProfitLoss.php b/app/Services/Report/ProfitLoss.php index bc3d570a70..f49ca73edb 100644 --- a/app/Services/Report/ProfitLoss.php +++ b/app/Services/Report/ProfitLoss.php @@ -629,6 +629,11 @@ class ProfitLoss $this->end_date = (new \Carbon\Carbon('-3 months'))->endOfQuarter(); break; + case 'last_year': + $this->start_date = (new \Carbon\Carbon('-1 year'))->startOfYear(); + $this->end_date = (new \Carbon\Carbon('-1 year'))->endOfYear(); + break; + case 'this_year': $this->start_date = now()->startOfYear(); $this->end_date = now();