Skip to content

uid: T-182 title: Declare payment method at submission β€” Telegram /command + web Review-step flag status: todo area: accounting created: 2026-07-25 updated: 2026-07-25 owner: girafeev1 related: T-178


T-182 β€” The submitter says whether it was the company card

Why β€” the circularity this removes

Verified in the repo on 2026-07-25: the submitter can never say how an expense was paid. components/records/ReceiptUploadModal.tsx says so outright β€” "Payment method is NOT picked at upload time β€” every receipt lands as paymentMethod: 'reimbursement'." The Telegram path doesn't set the field at all.

paymentMethod only becomes company_card afterwards: the strict upload-document matcher may infer it, matching a receipt to a bank tx flips it (receiptStore.ts:1122), unmatching restores it (:1169), or a bookkeeper sets it by hand in ReceiptDetailDrawer.

So it is a bookkeeping conclusion, not a declaration β€” a receipt reads "company card" largely because someone matched it there, which is close to circular when you are trying to use it to establish what a transaction means. The owner's fix (2026-07-25):

"I think THEN we can fully utilize the paymentMethod field without building additional infrastructure or adding things that weren't needed in the first place"

No new Firestore field is required. This makes the existing one trustworthy.

Scope

Telegram β€” a /command, not a caption flag. The owner first proposed a [Company tx] caption prefix, then replaced it (2026-07-25): "How about we utilize the / command on Telegram and to apply the command on a specific submitted receipt so that the flag doesn't mess up or trap anyone with typo or whatever else". A command applied to an already-submitted receipt avoids parsing free text, cannot leak into the substantiation note, and fails loudly rather than silently. Fold it into the existing bot surface (T-174 category picker, T-176 one morphing message per receipt) so the confirmation is visible.

Web β€” at the Review step, per receipt. Verified: ReceiptUploadModal runs three stages and stage 3 is a Review paginator stepping through each uploaded receipt with editable fields. That is the entry point (owner: "the entry point to flag a receipt for company tx is to do so after a single or batch receipt(s) has been uploaded and for the user's review"), and it is per receipt, not per batch β€” one upload can legitimately mix a taxi fare with a company-card lunch.

Open question for the owner

A receipt flagged company-card that never matches a bank transaction posts no journal at all today, so it would sit silently. It probably belongs in an Unmatched lens rather than nowhere.

Depends on

T-180, for the definition that makes the flag meaningful.

Source

Split out of T-178 on 2026-07-25 at the owner's request β€” verbatim: "Please, if you feel the need, separate the tasks into multiple more tasks as I feel like this one/ two tasks with so many different things might come off as confusing (it's not a bill passed in the senate)." T-178 keeps the reimbursement payment pipeline (WOPC document, Reimbursements tab, issuance); everything about how expense documents are submitted and housed moved here.

Source: Records (Infrastructure) Β· https://claude.ai/code/session_018RDB37kCqfouHdygVXTAtD