Skip to content

release: develop → main (2026-10-29, third) - #1197

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

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

Conversation

@waritctd

Copy link
Copy Markdown
Owner

Forwards develop to main.

Carries

Main's #1193 merge commit is merged into this branch, so main stays inside develop.

Deploy order

  • No Flyway migrations.
  • The backend changed (PDF engine, import request, deal quotation, factory config, pricing request), so a new image is needed. render.yaml now points at ghcr.io/waritctd/glr-hr-backend:v2026-10-29b.
  • Before merging: build and push v2026-10-29b (linux/amd64, with the licensed fonts), switch Render to it, and check health. A merge to main deploys the frontend only (Vercel).

🤖 Generated with Claude Code

waritctd and others added 12 commits October 29, 2026 10:31
…he quotation stack

Owner ruling 2026-10-28: ignore the old deposit/remaining generator and start
fresh on the quotation stack: POI fill of the real .xls template, then
LibreOffice to PDF.

- New DepositNoticePdfRenderer / RemainingInvoicePdfRenderer, with a shared
  DocumentSheet helper. The old renderers and RemainingInvoiceDto are deleted.
- Every printed value is the stored one: totals, line amounts, the customer
  line with its tax id, and the reference beside its label. No template
  formulas.
- หมายเหตุ is the template's own block, printed once. The signature date is the
  document date. The preparer prints as "( name )".
- Descriptions wrap (measured with LibreOfficeMetrics/FontResolver, Thai
  BreakIterator). Long documents flow onto more pages with a repeated header,
  and the notes/totals/signature block is never split.
- ส่วนลด prints one total "ลด X" (X = unit - net) in a fixed column as wide as
  ราคา.
- Legacy remaining invoice: the reference defaults to the issued deposit
  notice's reference. GET /remaining-invoices/{id}/file?format=pdf is added,
  and the frontend downloads the PDF.
- The capacity cap is removed (maxItems dropped; response-fields digest
  regenerated).
- Templates are rebuilt from the owner's 2026-10-28 files: the Update sheet
  only, with the logo and the cropped signature as the only pictures. The
  customer list, the example data, the embedded customer screenshots and the
  author/printer records are removed.

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

CI's LibreOffice (Ubuntu apt) read fitHeight=0 as one page and printed a
40-item deposit notice / remaining invoice on a single squeezed page
(pdfManyItemsPaginate... red on CI only). Multi-page documents now set the
already-computed fit-width zoom as a fixed scale, so the manual row breaks
hold in every LibreOffice version. Single-page documents are unchanged.

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

CI has no licensed fonts. LibreOffice substitutes wider ones, so the
fit-to-width scale drops and 40 items legitimately fit on one page there,
while they take two pages with the licensed fonts (local and the prod
image). 120 items overflow at any realistic scale. This also reverts
6fe7eab (explicit zoom), which rested on a wrong diagnosis; the reviewed
fit-to-width setup is back.

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

feat(sales-pdf): rebuild deposit notice + remaining invoice PDFs on the quotation stack
…he factory; factory picker on the IR draft; legacy one-click import chain removed (walk3 2026-10-29)

- W3-01/02: nextFulfilmentActionCode no longer offers issueImportRequest, so the import dashboard, worklist and deal panel only list deals with an issued IR (same as /fulfilment). ImportOverview counts and lists per-factory IN_TRANSIT shipments.
- W3-03: confirm-order on a DEAL_DIRECT quotation copies catalog_price_id and the catalogue factory onto ticket_item. Free-text lines get a factory picker on the IR draft (createDrafts itemFactories; GET /api/factory-configs/names, id + name only, for ceo/import/sales/sales_manager). Lines fully covered from stock are never asked.
- W3-04: legacy issueImportRequest is refused (409); ir-sent/shipping/goods-received are refused once a deal has any live per-factory row. Legacy buttons removed from ImportDealPage and DealFulfilmentPanel. Pre-V184 in-flight deals can still finish.
- Fixtures that started the legacy chain now use recordFirstImportRequestIssued; e2e-real Case A walks the per-factory flow. API digests regenerated.

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

DealFulfilmentPanel's imperative createIrDrafts() now calls requestCreateIrDrafts(), the one create
entry point, so a free-text line without a factory blocks the create from the deal page too.

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

fix(import): dashboard = issued IRs only, direct deals get factories + IR-draft picker, legacy one-click chain removed
…t (QA-06/07/11)

QA-06: carried-forward factory quotes are their own chain root; createRevision
treats a NULL root as the quote's own id, so existing rows re-price without a
backfill (Ploy 2026-10-29).
QA-07: the deal's first สร้างคำขอราคา pre-fills ผู้รับ with the first party on
the deal's served route; still changeable.
QA-11: a deal whose only open request is a DRAFT offers ส่งคำขอราคาถึง<party>
(sends it) instead of a new request; the DRAFT PCR page gets ส่งให้ฝ่ายนำเข้า.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- No สร้างคำขอราคา while the deal's request list is unread (loading or
  failed): a DRAFT may be hiding in it.
- Closing the create form re-reads the deal's requests (it may already have
  saved a DRAFT whose send then failed).
- Several DRAFTs: the customer-change revision's draft is sent first.
- QA-07: the ผู้รับ default comes from the deal's entry channel inside the
  create form (recipientForEntryChannel), so it no longer waits for the stage
  catalog; firstRouteParty is gone.
- Tests: pin CREATE_PCR for an in-chain deal whose requests are all dead;
  FactoryContactFlowIntegrationTest reads the contacted date once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(pcr): revision PCR re-price, first-request ผู้รับ, DRAFT submit (QA-06/07/11)
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 4:39am UTC

Request Review

@waritctd
waritctd merged commit 181a7ac into main Oct 29, 2026
7 checks passed

This branch was successfully deployed

1 active deployment
Preview — d32e6269 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