|
@@ 172-178 (lines=7) @@
|
| 169 |
|
|
| 170 |
|
if ($type == 'normal') { |
| 171 |
|
// price |
| 172 |
|
if ($selectedField == 'price' || $selectedField == 'all') { |
| 173 |
|
$calcPrice = $calculator($calcPrice, $value); |
| 174 |
|
if (!$this->checkAndRound($calcPrice)) { |
| 175 |
|
$fError = true; |
| 176 |
|
$report['errors'][$errorKey][Yii::t('app', 'Price')] = Yii::t('app', 'Сalculated value is less than zero'); |
| 177 |
|
} |
| 178 |
|
} |
| 179 |
|
// old price |
| 180 |
|
if ($selectedField == 'old_price' || $selectedField == 'all') { |
| 181 |
|
$calcOldPrice = $calculator($calcOldPrice, $value); |
|
@@ 180-186 (lines=7) @@
|
| 177 |
|
} |
| 178 |
|
} |
| 179 |
|
// old price |
| 180 |
|
if ($selectedField == 'old_price' || $selectedField == 'all') { |
| 181 |
|
$calcOldPrice = $calculator($calcOldPrice, $value); |
| 182 |
|
if (!$this->checkAndRound($calcOldPrice)) { |
| 183 |
|
$fError = true; |
| 184 |
|
$report['errors'][$errorKey][Yii::t('app', 'Old Price')] = Yii::t('app', 'Сalculated value is less than zero'); |
| 185 |
|
} |
| 186 |
|
} |
| 187 |
|
} else { // type == relative |
| 188 |
|
if ($selectedField == 'price') { |
| 189 |
|
$calcOldPrice = $calculator($calcPrice, $value); |