phpvms
phpvms copied to clipboard
Subfleet and Aircraft Expenses Being Applied to Wrong Airline
Subfleet and Aircraft based expenses are being applied to all airlines, even to airlines without subfleets/aircraft.
Version 7.0.0-dev+231215.655f15
To Reproduce Steps to reproduce the behavior:
- Go to Admin > Fleets, pick one subfleet and click edit
- Add some daily expenses to the subfleet
- Either wait for daily cron to run at midnight or force run it
- Check your cron log, you will see that the expense is applied to other airlines and subfleets too (!)
- Also check your finances, or better transactions, you will see that the expense is applied at all assets (!)
Expected behavior Daily / Monthly expenses should be applied to relevant subfleets / aircraft, not to all.
Additional context Looks like there are logical problems while picking up proper objects.
[2023-12-16 16:02:49] production.INFO: Nightly: Applying daily expenses
[2023-12-16 16:02:49] production.INFO: Charging to DSH
[2023-12-16 16:02:49] production.INFO: Charging to DSC
[2023-12-16 16:02:49] production.INFO: Charging to DSH
[2023-12-16 16:02:49] production.INFO: Expense memo: "Subfleet Expense: Daily Check"; group: "Subfleet: Daily Check" charged!
[2023-12-16 16:02:49] production.INFO: Charging to DSC
[2023-12-16 16:02:49] production.INFO: Expense memo: "Subfleet Expense: Daily Check"; group: "Subfleet: Daily Check" charged!
[2023-12-16 16:02:49] production.INFO: Nightly: Recalculating balances
[2023-12-16 16:02:59] production.INFO: Monthly: Applying monthly expenses
[2023-12-16 16:02:59] production.INFO: Charging to DSH
[2023-12-16 16:02:59] production.INFO: Charging to DSC
[2023-12-16 16:02:59] production.INFO: Charging to DSH
[2023-12-16 16:02:59] production.INFO: Expense memo: "Subfleet Expense: Leasing Payments"; group: "Subfleet: Leasing Payments" charged!
[2023-12-16 16:02:59] production.INFO: Charging to DSC
[2023-12-16 16:02:59] production.INFO: Expense memo: "Subfleet Expense: Leasing Payments"; group: "Subfleet: Leasing Payments" charged!
[2023-12-16 16:02:59] production.INFO: Charging to DSH
[2023-12-16 16:02:59] production.INFO: Expense memo: "Aircraft Expense: Aircraft Leasing Expenses (TC-DSP)"; group: "Aircraft: Aircraft Leasing Expenses (TC-DSP-TC-DSP)" charged!
[2023-12-16 16:02:59] production.INFO: Charging to DSC
[2023-12-16 16:02:59] production.INFO: Expense memo: "Aircraft Expense: Aircraft Leasing Expenses (TC-DSP)"; group: "Aircraft: Aircraft Leasing Expenses (TC-DSP-TC-DSP)" charged!