Commit Graph

2 Commits

Author SHA1 Message Date
Claude Agent
1a912b5fa4 fix(price): normalize cantitate_roa < 1 in price comparison (false mismatch)
Kit detection only checked cantitate_roa > 1, missing fractional values
like 0.5 (GoMag 50buc/set → ROA 100buc/set). This caused false price
difference alerts (e.g. GoMag 7.00 vs ROA 14.00 for order #481595156).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 10:23:09 +00:00
Claude Agent
61193b793f test(business-rules): add 44 regression tests for kit pricing, discount, and SKU mapping
38 unit tests (no Oracle) covering: discount VAT split, build_articles_json,
kit detection pattern, sync_prices skip logic, VAT included normalization,
validate_kit_component_prices (pret=0 allowed), dual policy assignment,
and resolve_codmat_ids deduplication.

6 Oracle integration tests covering: multi-kit discount merge, per-kit
discount placement, distributed mode total, markup no negative discount,
price=0 component import, and duplicate CODMAT different prices.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 13:30:52 +00:00