Repository navigation
fix(sales): UI-walk P0s + SK-02/SK-07 (owner rulings 2026-10-28) - #1182
Merged
Merged
Conversation
…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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…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>
This was referenced Oct 28, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the P0s found by clicking every sales-pipeline path on main against a real backend (2026-10-28), plus SK-02 and SK-07 from the designer → buyer skip-route walk. Owner rulings 2026-10-28.
Changes
totalPayable(was pre-VATdepositAmount).CommissionCalculatormath unchanged; it matches the owner's commission workbooks (received incl. VAT − deductions) ÷ 1.07. Commissions recorded before this stay as they are (ruling).payableAmountSelect,paymentTermsRowSqlandfindPayableQuotation. Once the order is confirmed from a direct quotation, it can't be revised or cloned, and no other direct quotation on the deal can be submitted or approved (409). The now-dead post-confirm deposit-policy sync inapproveis removed. Revise is hidden while the confirmation state is unknown.stockSource: IN_THAILAND; stock lines don't need ประเทศต้นทาง; the CEO types the price.total_payable+ remaining invoicegrand_total, so outstanding and the final receipt follow the issued documents. The remaining-invoice workbook/PDF prints the stored VAT and total instead of template formulas.Test coverage (tests written first, each shown red before its fix; Opus reverted every fix hunk and saw its tests go red)
OrderConfirmationIntegrationTest.fullChain_…,PaymentTrackIntegrationTest.requiredPath_…(revised; they pinned the pre-VAT value).FinanceDealPage.test.jsxRECORD_INVOICE (pre-fill, label, submitted amount),CommissionPage.test.jsx,CommissionAutoCreateIntegrationTest(default),CommissionDealLinkageIntegrationTest(gross = payable → no mismatch; 7% below → mismatch).FinancePayableVatAndDueIntegrationTestA2 (payable, payable document, not fully paid after deposit, payment terms + account scope, guards: approved PCR quotation and unconfirmed direct quotation not payable, ACCEPTED outranks in all three queries);DealQuotationConfirmOrderIntegrationTest(revise/clone/submit/approve after confirm → 409, v1 stays payable, policy unchanged; pre-confirm flows still work);quotationMeta.test,QuotationEditorPage.test,mockApi.promoteToDeal.test.PricingRequestCreateModal.test.jsx"stock flag per line" (seed, toggle on/off, payload, no origin country needed).StageDecisionIntegrationTest(below-10 refused + not offered after order; ≥10 moves and pre-order 5→3 still work),mockApi.stageDecisionsRoute.test.js.TicketDetailPage.test.jsx(sticky primary + accepted-designer primary),PricingRequestDetailPage.test.jsx(dialog shown, cancel → no call, confirm → one call).RemainingInvoiceServiceIntegrationTest.issuedRemainingInvoice_outstandingAndFinalPaymentFollowTheIssuedDocuments,RemainingInvoiceRendererTest.storedVatAndGrandTotal_areWrittenAsValues_deal11,DepositNoticeServiceTest(deal 11 numbers; pins existing per-document VAT, not red-first).Deliberately not covered:
CommissionCalculator(unchanged); IN_TRANSIT/ETA in the PCR modal (the tick means in Thailand); the BALANCE receipt on its own (derived); the old-engine "0% deal whose revision adds a deposit" case (now unreachable; 5 #1173 tests that revised a confirmed quotation were deleted for that reason).Known, not in this PR
DashboardRepository) disagrees with finance; separate follow-up.🤖 Generated with Claude Code