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>
This commit is contained in:
@@ -705,7 +705,7 @@ def get_prices_for_order(items: list[dict], app_settings: dict, conn=None) -> di
|
||||
|
||||
is_kit = len(codmat_details) > 1 or (
|
||||
len(codmat_details) == 1
|
||||
and float(codmat_details[0].get("cantitate_roa") or 1) > 1
|
||||
and float(codmat_details[0].get("cantitate_roa") or 1) != 1
|
||||
)
|
||||
|
||||
pret_roa_total = 0.0
|
||||
|
||||
Reference in New Issue
Block a user