Commit Graph
3 Commits
Author SHA1 Message Date
Herculino Trotta 1298e38772 refactor(splits): delete attachment files when their rows are deleted
A post_delete receiver replaces the file deletes in each view, so the files
also go when an attachment is deleted through a cascade from the Django admin
or the organizer's account, and are only removed once the row is.
2026-12-05 15:34:41 -03:00
Asish Kumar d9142f6872 fix(splits): let events with expenses or payments be deleted
Deleting a split event failed with a server error as soon as it had an
expense or a payment, from the event page and from the API alike
(DELETE /api/splits/events/{id}/). Deleting the event cascades to its
participants, and the expenses, shares and payments pointing at them
used on_delete=PROTECT, which refuses even when those rows are being
deleted with the same event. Only empty events could be removed, and an
admin couldn't delete a user who organized one.

- The participant foreign keys on expenses, shares and payments now use
  RESTRICT. A participant with expenses or payments still can't be
  deleted on their own (the people screen and the API already check
  this first), but they now go along with their event. The migration
  only changes Django's state; the database is untouched.
- Deleting an event also removes its attachments' files, as deleting an
  expense or a payment already does, so receipts aren't left behind in
  the private media folder.
2026-12-05 05:51:12 +05:30
Herculino Trotta 77bf2d7bdb feat(splits): add split expenses for shared group costs
Track expenses shared with other people (trips, flats, dinners) and settle
up with the fewest payments.

- Events with WYGIWYH users and people without an account, who join through
  a share link and pick a password on first sign-in
- Equal, exact, percentage and share-weight splits that always add up
- Balances, a minimal settle-up plan and an activity feed showing what each
  item means for you
- Link items to your own transactions; recording a payment marks planned
  ones as paid
- Share menu: printable PDF report and PNG images of the summary, settle-up
  and balances (adds modern-screenshot)
- Only the two people involved or the organizer can record a payment;
  members can leave events they don't organize
2026-11-20 19:43:23 -03:00