Dependent currency field not storing value as minor units #6699
Replies: 3 comments
-
Can you show a screen video describing the issue. |
Beta Was this translation helpful? Give feedback.
-
Yes sure. First I show you the buggy set up. You can see it stores 0,02€ (2 in DB) instead of 200 which means 2€. After switching the order of the fields it properly stores 200 which is 2€. Gravacio.de.pantalla.2025-01-30.a.les.9.28.38.mov |
Beta Was this translation helpful? Give feedback.
-
I don't think we can do anything at the moment since both Field has different formatting but rely on the same The best way to handle this is by using a unique name and handle the calculation/format via Model Observer. |
Beta Was this translation helpful? Give feedback.
-
Description:
When toggling visibility of two fields and one of them is a currency field even though I have specified that the currency is in minor units it's not properly storing the value correctly. When typing 2, it stores 2 instead of 200. This bug does not occur when switching the order of the dependOn fields. I think it only happens when these two dependent fields share the same column.
Detailed steps to reproduce the issue on a fresh Nova installation:
Create a resource that has 3 fields. The first one is a select with two options. After this field add Currency field that has ->asMinorUnits(). After this one add a Number field. These last two fields dependOn the value of the first one, only one of them is shown depending on the option selected on the first field.
Beta Was this translation helpful? Give feedback.
All reactions