Update AdminSpecificPriceRuleController.php

This commit is contained in:
Abhishek Kumar
2023-09-22 16:43:35 +05:30
parent 0c291869eb
commit 84f31d5af4

View File

@@ -288,14 +288,18 @@ class AdminSpecificPriceRuleControllerCore extends AdminController
);
$price = $this->getFieldValue($this->object, 'price');
if ($price != -1 && floatval($price) != 0) {
if ($price != -1 && Validate::isPrice($price)) {
$price = number_format($price, 6);
} else {
$price = '';
}
$reduction = floatval($this->getFieldValue($this->object, 'reduction'));
$reduction = number_format($reduction, 6);
$reduction = $this->getFieldValue($this->object, 'reduction');
if (Validate::isPrice($reduction)) {
$reduction = number_format($reduction, 6);
} else {
$reduction = 0;
}
$this->fields_value = array(
'price' => $price,