fix(budget): a custom split in a foreign currency adds up to what was paid

Each member's amount was converted and rounded to a cent on its own, so four 34,000 ISK quarters of a 136,000 ISK bill came to 997.52 EUR against the 997.51 the payer was credited. The balances ended a few cents off zero and settle-up had no payment for them. A split whose amounts match the payers in the bill's own currency is now converted as one set by largest remainder, in the settlement and in the per-person summary alike.
This commit is contained in:
Maurice
2026-10-25 10:22:03 +01:00
parent 2d398568da
commit e3eec8d6d1
5 changed files with 170 additions and 15 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
"src/db/repositories/Users.repository.ts": 1445,
"src/nest/atlas/atlas.service.ts": 1182,
"src/nest/auth/auth.service.ts": 1143,
"src/nest/budget/budget.service.ts": 1622,
"src/nest/budget/budget.service.ts": 1617,
"src/nest/collections/collections.service.ts": 1478,
"src/nest/doc-sync/doc-sync.service.ts": 1060,
"src/nest/doc-sync/providers/synology-drive.client.ts": 1160,