feat: transaction attachments/receipts (#7) #15
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/issue-7-attachments"
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?
Transaction attachments / receipts
Second item of the P1 double-entry tier (#7): Beancount
document-style attachments.Attach a reference (URI or file path) to a transaction, plus an optional
mime_typeandnote. The ledger stores only the reference — never an embedded blob — so the database stayslean and Litestream-replication-friendly (relevant to #1). No money is involved; pure metadata.
Surfaces (server-depth, mirroring the payees feature)
attachmentstable (transaction_idFKON DELETE CASCADE) + index +changelog trigger (
entity_kind = 'attachment').Commands.attachmentAdd/attachmentList/attachmentRemove+LedgerStoreSQL.AddAttachment/ListAttachments/RemoveAttachment(+ proto messages).LedgerClient.addAttachment/listAttachments/removeAttachment+AttachmentInfo.add_attachment/list_attachments/remove_attachmenttools — no moneymoves, so no propose/commit split;
remove_attachmentcarriesdestructiveHint.Notes
attachmentAddtrims and rejects an empty URI, and rejects an unknown transaction (the FK wouldalso reject it; pre-checked for a clean error).
mime_type/noteround-trip as SQLNULL(not"") via the.text(nil)→.nullbinding and
nilIfEmptyon the client.make testgreen (197 package + app tests, 0 failures; 8 new attachment tests across the store,gRPC, and MCP layers). Independent critic + architect review.
Scope / merge note
Delivers exactly one item of #7 (does not close it). Branches off
mainand touches the samecore files as the still-open #14 (opening-balance pad); the changes are additive, so the two should
merge cleanly (rebase whichever lands second). Remaining P1 items — budgets/envelopes,
pending/cleared, bitemporal dates — stay open.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.