Merge pull request #10783 from turbo124/v5-develop

Fixes for Profit Loss
This commit is contained in:
David Bomba 2025-03-18 11:24:44 +11:00 committed by GitHub
commit ef7a64b81b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -629,6 +629,11 @@ class ProfitLoss
$this->end_date = (new \Carbon\Carbon('-3 months'))->endOfQuarter(); $this->end_date = (new \Carbon\Carbon('-3 months'))->endOfQuarter();
break; 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': case 'this_year':
$this->start_date = now()->startOfYear(); $this->start_date = now()->startOfYear();
$this->end_date = now(); $this->end_date = now();