Fix a bug with 100% discount. v5
This commit is contained in:
parent
45779bac5c
commit
26cd3bc7d7
1 changed files with 2 additions and 2 deletions
|
@ -672,7 +672,7 @@ class RetailCrmHistory
|
|||
|
||||
if (array_key_exists('discountTotal', $product)) {
|
||||
$itemCost = $item->getField('BASE_PRICE');
|
||||
if (isset($itemCost) && $itemCost > 0) {
|
||||
if (isset($itemCost) && $itemCost >= 0) {
|
||||
$item->setField('CUSTOM_PRICE', 'Y');
|
||||
$item->setField('PRICE', $itemCost - $product['discountTotal']);
|
||||
$item->setField('DISCOUNT_PRICE', $product['discountTotal']);
|
||||
|
@ -1240,4 +1240,4 @@ class RetailUser extends CUser
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue