phpvms icon indicating copy to clipboard operation
phpvms copied to clipboard

Daily / Monthly Expenses Not Working

Open FatihKoz opened this issue 1 year ago • 0 comments

Daily and monthly expenses defined via admin > expenses are not applied during nightly and monthly cron runs.

Version 7.0.0-dev+231215.655f15

To Reproduce Steps to reproduce the behavior:

  1. Admin > Expenses
  2. Create a new daily expense for one of your airlines, make it active
  3. Either wait for daily cron to run at midnight or force run it
  4. Check your cron log, it will state that the expenses are being charged (!)
  5. Check your finances, or better transactions, you will see that the expense is not applied at all

Expected behavior Expenses should be calculated and applied to relevant airlines (or all if no airline is selected)

Additional context Looks like we have some problems in the trait as it is not getting the proper object, thus causing the rest of the code simply skip calculation because of missing data. (conditional checks in recurring expenses)

image

image

[2023-12-16 15:51:51] production.INFO: Found 1 pending migrations, update available  
[2023-12-16 15:51:51] production.INFO: Upgrade is pending  
[2023-12-16 15:51:53] production.INFO: Running seeder  
[2023-12-16 15:52:21] production.INFO: Nightly: Applying daily expenses  
[2023-12-16 15:52:21] production.INFO: Charging to DSH  
[2023-12-16 15:52:21] production.INFO: Charging to DSC  
[2023-12-16 15:52:21] production.INFO: Nightly: Recalculating balances  

Even though the airline codes are mentioned, generic expenses does NOT gets charged.

image

FatihKoz avatar Dec 16 '23 15:12 FatihKoz