quantity issue in discount

This commit is contained in:
rahul shukla 2019-06-20 17:49:14 +05:30
parent 048585853d
commit 12846df91c
3 changed files with 6 additions and 0 deletions

View File

@ -23,6 +23,8 @@ class BuyAGetB extends Action
if ($realQty > $disc_quantity) {
$amountDiscounted = $amountDiscounted * $disc_quantity;
} else {
$amountDiscounted = $amountDiscounted * $realQty;
}
if ($amountDiscounted > $item['base_price']) {

View File

@ -23,6 +23,8 @@ class FixedAmount extends Action
if ($realQty > $disc_quantity) {
$amountDiscounted = $amountDiscounted * $disc_quantity;
} else {
$amountDiscounted = $amountDiscounted * $realQty;
}
if ($amountDiscounted > $item['base_price']) {

View File

@ -20,6 +20,8 @@ class PercentOfProduct extends Action
if ($realQty > $disc_quantity) {
$amountDiscounted = $amountDiscounted * $disc_quantity;
} else {
$amountDiscounted = $amountDiscounted * $realQty;
}
if ($amountDiscounted > $item['base_price']) {