Skip to content

release: develop → main (2026-10-29) - #1190

Merged
waritctd merged 17 commits into
mainfrom
release/2026-10-29-develop-to-main
Oct 29, 2026
Merged

waritctd merged 17 commits into
mainfrom
release/2026-10-29-develop-to-main

Conversation

@waritctd

Copy link
Copy Markdown
Owner

This PR forwards develop to main. It doesn't include #1189 (QA-09), which is still open on develop.

Carries (develop since the last forward-port, #1181)

Deploy order

  • No Flyway migrations.
  • The backend changed (commission, deal quotation, deposit / remaining invoice, finance, ticket), so a new image is needed. render.yaml now points at ghcr.io/waritctd/glr-hr-backend:v2026-10-29.
  • Before you merge: build and push v2026-10-29 (with the classic PAT that has write:packages), then switch Render to it and check health. A merge to main deploys the frontend only (Vercel).

🤖 Generated with Claude Code

waritctd and others added 17 commits October 28, 2026 16:16
…0-28

chore: forward-port main → develop after release 2026-10-28 (#1149 attendance email)
…on gross, direct-quote payable, stock flag at PCR, no rewind below ขั้น 10 (owner rulings 2026-10-28)

- QA-01 confirmDepositPaid books the notice's VAT-inclusive totalPayable.
- QA-02 commission gross pre-fill/compare/default = VAT-inclusive payable, labelled ยอดรับจริง (รวม VAT); CommissionCalculator unchanged (matches the owner's workbooks).
- QA-03 a confirmed DEAL_DIRECT quotation counts toward payable; ACCEPTED > APPROVED in all three payable queries; a confirmed direct quotation can't be revised, cloned, or superseded by another direct quotation.
- QA-04 pricing-request lines carry จากสต็อก (stockSource IN_THAILAND) seeded from the deal; stock lines skip ประเทศต้นทาง; CEO types the price.
- QA-05 ⋯ แก้ไขสถานะ can't move a deal at/after ORDER_RECEIVED below it (409, not offered).
- SK-02 ยืนยันคำสั่งซื้อ always asks first.
- SK-07 each tax invoice keeps round2(net x 7%) VAT; once a remaining invoice is issued, outstanding and the final receipt follow the issued documents; the remaining-invoice workbook prints stored VAT/total.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…confirm, one answered-quotation rule keyed on the promotion event, keep IN_TRANSIT on re-tick, shared ConfirmOrderDialog

- Confirm-order cancels the deal's other DEAL_DIRECT quotations in DRAFT/PENDING_APPROVAL (one CANCELLED event each), so none is stranded in the approver's queue.
- TicketRepository.ANSWERED_QUOTATION_SQL: ACCEPTED, or an APPROVED DEAL_DIRECT quotation named by the DEAL_PROMOTED_FROM_QUOTATION event; used by payableAmountSelect, paymentTermsRowSql and FinanceDealRepository.findPayableQuotation (inline copy removed).
- PCR modal: re-ticking จากสต็อก restores a loaded IN_TRANSIT source.
- ConfirmOrderDialog shared by DealQuotationPanel, PricingRequestDetailPage and TicketDetailPage.
- Javadoc fixes (GLA-136 doc back on hasPromotionFromQuotationEvent; orderConfirmationOf).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ับจริง (QA-02 ruling 2026-10-28)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(sales): UI-walk P0s + SK-02/SK-07 (owner rulings 2026-10-28)
…iland stock lines need no import lead time (UI re-walk 2026-10-29)

- SK-02/VW-05: the direct-quotation confirm dialogs (TicketDetailPage, QuotationEditorPage) close before mutating, like the pricing-request door, and call /confirm-order (the backend /promote-to-deal alias stays for one deploy).
- VW-01: DealQuotationItemDto exposes stockSource; submit and the editor skip the import lead-time requirement for IN_THAILAND stock lines only. IN_TRANSIT and import lines still need one (owner ruling 2026-10-29). A copied quotation drops stockSource, as the server does.
- API digests regenerated (response-fields: DealQuotationItemDto.stockSource; ui-reachable: confirm-order).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…k-stock-lead-time

fix(sales): direct confirm-order sends once; in-Thailand stock lines need no lead time
…้น 13 (remaining invoice)

UI-walk QA-08 / QA-10, owner rulings 2026-10-28.

- ขั้น 10: once the order is confirmed and a deposit notice is needed, the owning rep's main button
  reads สร้างใบแจ้งยอดเงินรับมัดจำ. It creates the draft (pricing-request route, or the deal-level
  draft for a direct-quotation deal) and opens it. With a draft it reads ออกใบแจ้งยอดเงินรับมัดจำ.
  On a confirmed direct-quotation deal it outranks แก้ใบเสนอราคา.
- ขั้น 13: once the goods are in hand and no remaining invoice is issued, the button reads
  สร้างใบแจ้งหนี้ (ออกใบแจ้งหนี้ with a draft) and opens the remaining-invoice dialog. It comes
  before บันทึกส่งมอบ (ruling 2026-10-22). The stage link reads สร้างใบแจ้งหนี้ส่วนที่เหลือ until
  the invoice is issued, then ดาวน์โหลดใบแจ้งหนี้ส่วนที่เหลือ.
- One copy per page: the การเงิน deposit panel drops its own create button while the main button
  offers it; the เอกสาร hint points at the main button only while it exists.
- The legacy ลูกค้ายืนยัน re-confirm shows only while paymentStatus is null.
- DepositNoticePage's create logic moves to createDepositNoticeDraft.js, shared with the deal page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ailPage

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…one notice-list query

Code-review findings on #1184:
- The main button read the deposit-notice list with ensureQueryData, which returns the cached list.
  The backend accepts a second DRAFT, so a draft made in another tab gave the deal two drafts. It now
  fetches fresh (staleTime 0); a test pins the stale-cache case (red with the old call).
- DealDepositPanel exports depositNoticesQueryOptions; the panel and the deal page share it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(sales): main deal-page button at ขั้น 10 (deposit notice) and ขั้น 13 (remaining invoice)
…usive payable, derived due date)

The dashboard computed what a deal owes with its own SQL: pre-VAT quotation total, ACCEPTED only,
no issued-remaining-invoice branch, and the stored due_date. It now calls
TicketRepository.paymentOverduePredicate, the one rule the account list scope also uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…finance

fix(dashboard): payment_overdue matches the finance page
frontend/public/templates/deposit_notice_template.xlsx was deployed as a static
asset (https://www.glr-portal.com/templates/..., no login). Its second sheet is
a customer list with tax ids and phone numbers. The other two files there and
the docs/ copies carry the same list or filled-in real customer documents.

Nothing reads any of these files. The backend renders from
backend/src/main/resources/templates/.

No test: deletes unreferenced static files only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 1fe8c67)
…-files-develop

fix(security): stop serving customer data from the public site (forward-port #1186)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
demo-glr Ready Ready Preview Oct 29, 2026 2:29am UTC

Request Review

@waritctd
waritctd merged commit 34dc9aa into main Oct 29, 2026
7 checks passed
waritctd added a commit that referenced this pull request Oct 29, 2026
…cket-level draft

createDepositNoticeDraft swallowed a failed listForTicket and fell through to
the ticket-level createDraft, so a network blip on a PCR deal built the
deposit notice from the wrong source. The error now propagates: the caller's
onError shows it and nothing is created. A deal with no pricing requests still
takes the ticket-level route. (Release review of #1190, 2026-10-29.)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — e74fc9ce Deployed Oct 29, 2026 by vercel[bot]
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