Skip to content

Shared receipts & invoices across group members

Shared receipts & invoices across group members

Status: Delivered
CAS: CAS-722
Delivered: 2026-04-26
Sub-tasks: CAS-724 (B1), CAS-727 (B2), CAS-728 (B3), CAS-729 (B4), CAS-730 (B5), CAS-731 (F1), CAS-732 (F2)

What’s new

Group members can now share receipts and invoices with each other. An invoice assigned to a group becomes visible to all group members on their devices. The uploader can optionally share the original file (PDF, image) in addition to the metadata. A new filter bar in the invoice queue lets you slice by Shared / Mine / All. Automatic rules can assign incoming invoices to a group so shared vendor bills land in the right group without manual sorting.

How to use it

Assigning an invoice to a group:

  1. Open any invoice in the queue.
  2. The new Group picker in the document detail panel lists your active groups. Select the group that should own this invoice.
  3. The invoice is now visible to all members of that group on their next sync.

Sharing the original file:

  1. With a group selected, enable the Share original file with group toggle.
  2. A confirmation modal appears (this action cannot be undone per session).
  3. After confirming, group members will receive the file on sync in addition to the invoice metadata.
  4. The uploader’s name is shown beneath the toggle for attribution.

Filtering the invoice queue:

Use the new scope selector in the queue header:

  • Mine — invoices you uploaded, not shared with any group
  • Shared — invoices visible to you from group members
  • All — no filter (previous behaviour)

A group chip appears next to each shared invoice to show which group it belongs to.

Automatic group assignment via rules:

In Settings → Rules, the rule engine now exposes an assign_to_group action. Create a rule targeting an invoice pattern (merchant, amount range, etc.) and set the action to assign matching items to a group automatically on import.

What changed under the hood

  • Migration: added group_id (nullable FK → groups) and share_file_with_group (boolean, default false) columns to invoice_queue.
  • Encryption: invoice queue items now use the group envelope — shared fields are encrypted with the group key; sensitive fields (account number, reference) retain the personal-scope key so they never leave the uploader’s device.
  • Five new Tauri commands: get_invoice_queue_items_by_scope, assign_invoice_to_group, toggle_share_file_with_group, get_group_invoice_items, get_invoice_queue_item.
  • Permission enforcement: only group members can read a shared invoice; only the uploader can toggle file sharing.
  • Rule engine: new AssignToGroup { group_uuid } action variant in the rule expression evaluator, with corresponding migration and Tauri command.
  • Sync: group invoice changesets are included in the member device sync payload; tombstones propagate when an invoice is removed from a group.
  • Frontend: new InvoiceGroupSection component (group picker, share toggle, uploader attribution) injected into the document detail panel. New ScopeToggle + group chip components in the invoice queue header. useInvoiceQueueStore extended with scope state and toggleShareFileWithGroup action.