[core] Day 2: capture parsing, splits, share links, QR Platba, sharing boundary; v0.2.0 #2
Reference in New Issue
Block a user
Delete Branch "feature/phones-sharing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Day 2's core: what the phones send, splits, QR Platba, and what a shared budget may receive. Design note:
docs/02_capture_sharing.md.What changes
fiscus-ledgerpayment.shared/payment.unshared(a shared budget's log)split.created/split.settledcapture.token_added/capture.token_revoked(hashes only)share.link_created(hash only)account.setapply()stays total: anything that does not add up is rejected with a reason.split::split_equal: sorted and deduplicated by person id, then the day-1 largest-remaindersplit().share::shared_payment: the only way a payment goes into a shared budget. It carries the effective payment and leaves the card, note and statement details home.pay: a checked Czech IBAN (mod 97, plus the BBAN's mod 11; also fromprefix-number/bank) andspayd().State::share_view: exactly one person's open share, or nothing.fiscus-capture(new)fixtures/notifications/README.md).fiscus-insight:household_duplicates, on shared names only.Tests (written first): 85 pass, 0 fail
splitspaysharingpayment.sharedonly for a payment in that budget, without its card; unshare; a split payment stays sharedshortcutnotificationhouseholdSelf-review
no_floatscan still passes over the new crate. Amounts go throughHaler::parse_czk, and JSON numbers are read as raw text (RawValue). This avoidsarbitrary_precision, which would changeserde_jsonfor every crate that links it.apply()arm checks first and mutates last. The share-link test serialises the whole page model and looks for the other people's names and amounts.service_key(the first word of the merchant key) may group two products of one company ("google").merchant.rs,money.rs,subscriptions.rs), untouched here. Day-1 code isn't rustfmt-formatted, so I didn't reformat anything.