Merge pull request #4067 from jaseelbavu/issue-4024

Fixed customer group price discount issue
This commit is contained in:
Jitendra Singh 2020-10-15 15:12:03 +05:30 committed by GitHub
commit 773422a368
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 6 deletions

View File

@ -659,16 +659,22 @@ abstract class AbstractType
continue;
}
if ($price->value < $lastPrice) {
if ($price->value_type == 'discount') {
if ($price->value_type == 'discount') {
if ($price->value >= 0 && $price->value <= 100) {
$lastPrice = $product->price - ($product->price * $price->value) / 100;
} else {
$lastPrice = $price->value;
$lastQty = $price->qty;
$lastCustomerGroupId = $price->customer_group_id;
}
} else {
if ($price->value >= 0 && $price->value < $lastPrice) {
$lastPrice = $price->value;
$lastQty = $price->qty;
$lastQty = $price->qty;
$lastCustomerGroupId = $price->customer_group_id;
$lastCustomerGroupId = $price->customer_group_id;
}
}
}