ledgersmb / LedgerSMB

Double-entry accounting & ERP for the web
https://ledgersmb.org
Other
414 stars 150 forks source link

Can't turn off FX checkmark on (saved) GL journal #8294

Open ehuelsmann opened 1 month ago

ehuelsmann commented 1 month ago

Version

1.11.14

What browsers are you seeing the problem on?

This problem isn't browser related

What happened?

When unchecking the FX checkmark, followed by Save, the FX lines reappear.

What should have happened?

The FX-ness of the transaction should have been removed.

ehuelsmann commented 1 month ago

I've identified the cause to be

https://github.com/ledgersmb/LedgerSMB/blob/a8ff6d69e642d8ea65f9afc6fd381851b3ec641a/old/lib/LedgerSMB/GL.pm#L278

in combination with

https://github.com/ledgersmb/LedgerSMB/blob/a8ff6d69e642d8ea65f9afc6fd381851b3ec641a/old/lib/LedgerSMB/GL.pm#L315-L316

Which means that on saved transactions the fx setting is overruled with the saved data on every "Update" roundtrip.