Files
spliit/src
Derek 157ed4fd96 bugfix: Fix share values being incorrectly divided by 100 in expense form (#453)
* Update expense-form.tsx to handle shares as strings

Proposing fix to #424

The issue is in the data flow between the form and the schema transform function:

When editing existing expenses: Form loads shares by dividing database values by 100 (e.g., 200 / 100 = 2), but loads them as numbers
When users change values: Input fields return strings via enforceCurrencyPattern
Schema transform: Only multiplies by 100 for string values, not number values
Result: Modified shares (strings) get multiplied by 100, unmodified shares (numbers) stay as-is

Proposed fix: handle all shares consistently as strings throughout the form

* Add type assertions to fix TypeScript errors in expense form

Fix formatting.

---------

Co-authored-by: yllar <yllar.pajus@gmail.com>
2025-11-08 09:34:57 +01:00
..