Skip to content

billing: show invoice payment method in the UI#269

Merged
acoshift merged 2 commits into
mainfrom
invoice-payment-method
Jun 21, 2026
Merged

billing: show invoice payment method in the UI#269
acoshift merged 2 commits into
mainfrom
invoice-payment-method

Conversation

@acoshift

@acoshift acoshift commented Jun 21, 2026

Copy link
Copy Markdown
Member

What

Surfaces the invoice payment method (the seller's bank-transfer + PromptPay details) directly in the console, so customers no longer have to download the invoice PDF to find out where to pay.

  • Invoice page — a "How to pay" panel on open (payable) invoices: the amount to transfer and the destination account (bank / account name / account no. / PromptPay).
  • Pay modal — a "Transfer to" block showing the amount due and the same account. Previously the modal asked the customer to upload a transfer slip without ever showing which account to transfer to.

Both surfaces read the new InvoiceItem.payment field (companion api/apiserver PRs) and are defensively guarded on the data being present, so they cleanly no-op until the apiserver field is deployed.

Why

The payment instructions existed only on the rendered PDF — users didn't realize they had to download it to see where to pay. This closes that gap.

Notes

  • Mock fixture (mock.ts, fixtures/mocks.js) updated to mirror the real API shape; 3 new Playwright tests added (panel shown on open, hidden on paid, modal shows the destination account). bun lint, bun check, and the billing suite (10 tests) pass.
  • Depends on api#104 + apiserver#179 for the live payment field.

Screenshots

Invoice page — How to pay panel (new)

Before After
before after

Pay modal — Transfer-to account (new)

Before After
before after

Dark mode

dark

🤖 Generated with Claude Code

Long file-name handling (pre-existing modal bug, fixed here)

A long, unbreakable slip file name previously pushed the row — and the whole modal — wider than its panel (the selected-file row is a grid item, which defaults to min-width:auto), clipping the button labels. Added min-width:0 so the existing .file-name ellipsis kicks in; the name now truncates and the modal keeps its size. Regression test added.

long filename

@deploys-app deploys-app Bot temporarily deployed to pr-269 June 21, 2026 11:16 Destroyed
@deploys-app

deploys-app Bot commented Jun 21, 2026

Copy link
Copy Markdown

Preview deleted (PR closed).

Surface the seller's bank-transfer + PromptPay details (the new
InvoiceItem.payment field) directly in the console so customers no
longer have to download the PDF to learn where to pay:

- Invoice page: a "How to pay" panel on open (payable) invoices, with
  the amount to transfer and the destination account.
- Pay modal: a "Transfer to" block (amount due + account) — previously
  the modal asked for a transfer slip without ever showing the account.

Both surfaces are defensively guarded on payment data being present, so
they no-op until the apiserver field ships. Mock fixture + Playwright
coverage added.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N9FhPEapaKr4VugQBEdisj
@acoshift acoshift force-pushed the invoice-payment-method branch from 9478dfa to 1ae9372 Compare June 21, 2026 11:23
The selected-file row is a grid item in the modal's button column, and
grid items default to min-width:auto — so a long, unbreakable file name
pushed the row (and the whole modal) wider than its panel, clipping the
Choose-file / Upload-slip button labels. Add min-width:0 so the existing
.file-name ellipsis actually kicks in. Pre-existing bug, fixed here since
this PR already touches the modal. Adds a regression test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N9FhPEapaKr4VugQBEdisj
@acoshift acoshift merged commit 71a8888 into main Jun 21, 2026
5 checks passed
@acoshift acoshift deleted the invoice-payment-method branch June 21, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant