Receipt match
Shows a file next to the item it belongs to, and whether they match.
Examples
Corner Market
Oct 2, Receipt matched
Corner Market
Oct 2, Receipt matched
Harbor Cafe
Oct 3, Receipt says $16.50
Paper Lane
Oct 4, No receipt yet
State
- minus 41.20 US dollars
Corner Market
Oct 2, Receipt matched
matched
- minus 41.20 US dollars
Corner Market
Oct 2, Receipt says $44.20
review
- minus 41.20 US dollars
Corner Market
Oct 2, No receipt yet
missing
Usage
When to use it
- Use
- The assistant paired a receipt photo with a card payment.
- Use
- A list of payments that still need a receipt, for expenses or taxes.
- Use
- A receipt that does not agree with its payment and needs a look.
- Not for
- A payment with no receipt involved. Use List.
- Not for
- Uploading the receipt file itself. Use Dropzone.
Rules
6 rules
- Must
- Give a review match a note that says what differs. Because the default review note is "Check the receipt", which never says what to check.
- Must
- Pass onAdd with a missing match; the empty paper is the add button. Because without onAdd the paper is still a focusable button that does nothing.
- Must
- Pass the amount signed, negative for money out. Because Amount prints a positive value with no minus, so a payment reads as money in.
- Should
- Pass the receipt photo as src when you have it; the drawn paper is a stand-in.
- Should
- Stack matches with a 12px gap and no hairlines; the papers already set the rhythm.
- Never
- Wrap a match in a Card or a grey panel; it is a row. Because the paper thumbnail is already the frame, so a card puts a box around a box.
Accessibility
3 checks
- The match is said in the note, not only by the mark.
- The empty paper is a button named "Add a receipt for" and the merchant.
- The drawn paper is decorative and hidden from screen readers.
Edge cases
3 edge cases
- Long merchant name
- Truncates with an ellipsis; the amount keeps its width.
- Narrow screen
- The note truncates; the paper stays 40 by 48.
- Right to left
- The paper sits at the start and its mark moves to the other corner.
API
7 props
merchantstringdefaultrequireddatestringdefaultrequiredamountnumberdefaultrequiredstate'matched' | 'review' | 'missing'defaultrequirednotestringdefaulta word for the statesrcstringonAdd() => void
Tokens
9 tokens
--raised- #ffffff
--line- #e6e4df
--surface-3- #e6e4df
--success-text- #17703a
--warn-text- #8a5200
--warn- #c27a00
--control- #85827a
--fg-3- #6b6a63
--radius-field- 12px