Merge pull request #1419 from prashant-webkul/development
Rogue statement found in discount amount initialization
This commit is contained in:
commit
7d53452bd1
|
|
@ -90,7 +90,7 @@ class CartRuleDataGrid extends DataGrid
|
|||
|
||||
$this->addColumn([
|
||||
'index' => 'disc_amount',
|
||||
'label' => 'Quantity',
|
||||
'label' => 'Discount Amount',
|
||||
'type' => 'number',
|
||||
'searchable' => false,
|
||||
'sortable' => true,
|
||||
|
|
|
|||
|
|
@ -66,10 +66,10 @@ class PercentOfProduct extends Action
|
|||
if ($rule->disc_amount > 100) {
|
||||
$discount_amount = 100;
|
||||
} else {
|
||||
$discount_amount = 100;
|
||||
$discount_amount = $rule->disc_amount;
|
||||
}
|
||||
|
||||
$discount = round(($itemPrice * $discount_amount) / 100, 4) * $discQuantity;
|
||||
$discount = $itemPrice * ($discount_amount / 100) * $discQuantity;
|
||||
|
||||
$discount = $discount <= $itemPrice * $discQuantity ? $discount : $itemPrice * $discQuantity;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue