1
0
Fork 0
mirror of synced 2025-04-20 01:21:01 +00:00

Fix a bug with 100% discount. v5

This commit is contained in:
Dmitry Mamontov 2018-01-22 18:42:00 +03:00 committed by GitHub
parent 45779bac5c
commit 26cd3bc7d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
}
}
}
}
}