Process Shopify sale only if the authorized payment amount is greater than the amount to pay

The correction of #14816 was wrong and the amount to pay should be modified if
there is a global refund.
This commit is contained in:
Cédric Krier
2026-06-03 15:06:05 +02:00
parent 99b6830032
commit bc8151c822
+1 -2
View File
@@ -880,8 +880,7 @@ class Shop(metaclass=PoolMeta):
for sale in to_update:
if sale.party == sale.web_shop.guest_party:
continue
if (sale.payment_amount_authorized >= sale.amount_to_pay
or sale.state in {'processing', 'done'}):
if sale.payment_amount_authorized >= sale.amount_to_pay:
to_process.append(sale)
else:
to_quote.append(sale)