Removed the number_format() useage from the AdminSpecificPriceRuleController
This commit is contained in:
@@ -171,7 +171,6 @@ class AdminSpecificPriceRuleControllerCore extends AdminController
|
||||
'label' => $this->l('Name'),
|
||||
'name' => 'name',
|
||||
'maxlength' => 32,
|
||||
'col' => 3,
|
||||
'required' => true,
|
||||
'hint' => $this->l('Forbidden characters').' <>;=#{}'
|
||||
),
|
||||
@@ -223,8 +222,8 @@ class AdminSpecificPriceRuleControllerCore extends AdminController
|
||||
'name' => 'price',
|
||||
'disabled' => ($this->object->price == -1 ? 1 : 0),
|
||||
'maxlength' => 10,
|
||||
'suffix' => $this->context->currency->sign,
|
||||
'col' => 3,
|
||||
'suffix' => $this->context->currency->getSign('right'),
|
||||
|
||||
),
|
||||
array(
|
||||
'type' => 'checkbox',
|
||||
@@ -280,7 +279,6 @@ class AdminSpecificPriceRuleControllerCore extends AdminController
|
||||
'type' => 'text',
|
||||
'label' => $this->l('Reduction'),
|
||||
'name' => 'reduction',
|
||||
'col' => 3,
|
||||
'required' => true,
|
||||
),
|
||||
),
|
||||
@@ -299,16 +297,12 @@ class AdminSpecificPriceRuleControllerCore extends AdminController
|
||||
);
|
||||
|
||||
$price = $this->getFieldValue($this->object, 'price');
|
||||
if ($price != -1 && Validate::isPrice($price)) {
|
||||
$price = number_format($price, 6, '.', '');
|
||||
} else {
|
||||
if ($price == -1 || !Validate::isPrice($price)) {
|
||||
$price = '';
|
||||
}
|
||||
|
||||
$reduction = $this->getFieldValue($this->object, 'reduction');
|
||||
if (Validate::isPrice($reduction)) {
|
||||
$reduction = number_format($reduction, 6, '.', '');
|
||||
} else {
|
||||
if (!Validate::isPrice($reduction)) {
|
||||
$reduction = 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user