Skip to content

billing: upload slip + WHT cert together via Pay (no dead-end attach) - #333

Merged
acoshift merged 1 commit into
mainfrom
fix/wht-slip-together
Jul 31, 2026
Merged

billing: upload slip + WHT cert together via Pay (no dead-end attach)#333
acoshift merged 1 commit into
mainfrom
fix/wht-slip-together

Conversation

@acoshift

Copy link
Copy Markdown
Member

Summary

  • Stop showing Attach WHT certificate on open company invoices. That path calls billing.uploadWHTCertificate, which requires an existing transfer slip, so customers who still needed to pay hit api: upload your payment slip before attaching a withholding tax certificate.
  • Keep the button for late attach only: company invoices already paid with withholding (withholdingTaxAmount > 0).
  • On open invoices, slip + optional 50 ทวิ ride together on billing.uploadTransferSlip in the Pay modal (existing behavior).

Test plan

  • Playwright: WHT modal + attach gating tests (tests/billing.spec.js WHT cases)
  • Open company invoice → no page-level Attach; Pay → withhold 3% → attach cert optional → upload slip works with both files
  • Company invoice paid with WHT → Attach WHT certificate still visible and uploads

Requested via Grok Work
Prompter: ACS

The invoice page showed "Attach WHT certificate" for open company invoices.
That endpoint requires an existing transfer slip, so customers who still
needed to pay got "upload your payment slip before attaching a withholding
tax certificate" instead of uploading both files in one step.

Show the page-level attach button only after the invoice was paid with
withholding (late 50 ทวิ). On open invoices, slip + optional cert ride
together on billing.uploadTransferSlip in the Pay modal.

Prompter: ACS
@deploys-app
deploys-app Bot temporarily deployed to pr-333 July 31, 2026 15:29 Destroyed
@deploys-app

deploys-app Bot commented Jul 31, 2026

Copy link
Copy Markdown

Preview deleted (PR closed).

@acoshift
acoshift merged commit 7460b23 into main Jul 31, 2026
5 checks passed
@acoshift
acoshift deleted the fix/wht-slip-together branch July 31, 2026 15:35
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