Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expenses in a specific Subfleet #1833

Open
nobleaviation opened this issue Jul 3, 2024 · 11 comments
Open

Expenses in a specific Subfleet #1833

nobleaviation opened this issue Jul 3, 2024 · 11 comments

Comments

@nobleaviation
Copy link

Hello,
we have added and want to add Subfleet specific Expenses.
When we export the CVS file, we can't see them in the file.
Is that correct or could that be a bug - yes I know we are running an older version, updates will be done in the next weeks.

Thank you for the Support!

@FatihKoz
Copy link
Contributor

Did you updated your phpvms and tried to replicate the issue ? If it is not there please consider closing this issue, if it is still happening we can check and try to replicate the scenario to find a fix :)

Thanks

@nobleaviation
Copy link
Author

Hello, should that be fixed in the last days or long time ago?
I will talk with my IT support (Thorsten Sass).

@FatihKoz
Copy link
Contributor

I have no idea, you told that your phpvms is old at July the 3rd, I am asking if you were able to update and test this. Just ask him if you are on latest dev and can replicate the issue :)

@nobleaviation
Copy link
Author

ok thanks... yes we were old, he did many updates, will ask him if we are on the latest one. Thanks for your support! :)

@PaintSplasher
Copy link

PaintSplasher commented Nov 14, 2024

Hey, it is not a bug or similar, it is just not implemented yet :) Custom-added expenses to any subfleet are not getting exported.

Just for reference, Noble is using build 7.0.0-dev.g572a65fe82, and there have been no changes related to the CSV/expenses since September 12th.

And even if you want to import them, there are just not observed: app/Services/ImportExport/SubfleetImporter.php

@FatihKoz
Copy link
Contributor

Understood :) Can you define "Custom added" a little bit more ? If they are defined by stock expense system then maybe we can add support there. (Both for export and import phases)

But if they are really custom, then it may be tricky to find a solution 😉

@PaintSplasher
Copy link

He is just talking about those, you can add to the subfleet, as the fares are part of the csv, the expenses aren't.

Admin -> fleet -> Edit Subfleet
image

@FatihKoz
Copy link
Contributor

Ok will check this, I think expenses are not considered at all (for import/export), never did so we only have fares.

https://github.com/nabeelio/phpvms/blob/dev/app/Services/ImportExport/SubfleetExporter.php
https://github.com/nabeelio/phpvms/blob/dev/app/Services/ImportExport/SubfleetImporter.php

@FatihKoz
Copy link
Contributor

Question will be, do we need to export/import them, I mean if they are being related/matched by subfleet code (not id) then it should work automatically as long as the subfleet uses the same code after import.

But most probably the relationship is tied to the id (as like most of the stuff), so a new subfleet, even with the same code, will have a new/different id (braking all old expense <> subfleet relationships).

@PaintSplasher
Copy link

Hm, does it not work the same way? Just ref_model_id <-> subfleet_id ? So this should always match.
image

@FatihKoz
Copy link
Contributor

Yeah, id it is ... Which can change during an import :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants