phpvms
phpvms copied to clipboard
Daily / Monthly Expenses Not Working
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:
- Admin > Expenses
- Create a new daily expense for one of your airlines, make it active
- Either wait for daily cron to run at midnight or force run it
- Check your cron log, it will state that the expenses are being charged (!)
- 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)
[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.