dreautall / waterfly-iii

Unofficial Android App for Firefly III, a free and open source personal finance manager.
MIT License
359 stars 29 forks source link

Saving selected bill #265

Closed dballagi closed 10 months ago

dballagi commented 10 months ago

Changelog

Made sure the selected bill details for a transaction are passed to the API.

Test

The current prod version does not pass the selected bill details to the create/update API call when a transaction is saved. The UI shows a bill selected until the transaction view is closed after saving, but opening it again in the app or in the Firefly III web UI will show the field empty. The information was already stored in memory, it simply needed to be passed to the API call. It now works like a charm.

dreautall commented 10 months ago

I.. honestly have no idea how I missed that one. Thank you for noticing it! I think we can skip billName though, billId should be enough, no?

dballagi commented 10 months ago

I am not sure if we can skip it, I just passed it along, thinking it wouldn't hurt and did not test it without. I can give it a try later today.

dreautall commented 10 months ago

Looks like yes, it is ignored by Firefly if the billId is found: https://github.com/firefly-iii/firefly-iii/blob/main/app/Repositories/Bill/BillRepository.php#L116.

I'd just remove it then, no need to send it (but of course doesn't hurt either as it's just ignored).

dballagi commented 10 months ago

I will leave it to your judgement. :)

dreautall commented 10 months ago

any objections against the latest commit? if not I'll merge, thank you very much again!

dballagi commented 10 months ago

Nope, looks good to me!