|
@@ 162-168 (lines=7) @@
|
| 159 |
|
|
| 160 |
|
if ($type == 'normal') { |
| 161 |
|
// price |
| 162 |
|
if ($selectedField == 'price' || $selectedField == 'all') { |
| 163 |
|
$calcPrice = $calculator($calcPrice, $value); |
| 164 |
|
if (!$this->checkAndRound($calcPrice)) { |
| 165 |
|
$fError = true; |
| 166 |
|
$report['errors'][$errorKey][Yii::t('app', 'Price')] = Yii::t('app', 'Сalculated value is less than zero'); |
| 167 |
|
} |
| 168 |
|
} |
| 169 |
|
// old price |
| 170 |
|
if ($selectedField == 'old_price' || $selectedField == 'all') { |
| 171 |
|
$calcOldPrice = $calculator($calcOldPrice, $value); |
|
@@ 170-176 (lines=7) @@
|
| 167 |
|
} |
| 168 |
|
} |
| 169 |
|
// old price |
| 170 |
|
if ($selectedField == 'old_price' || $selectedField == 'all') { |
| 171 |
|
$calcOldPrice = $calculator($calcOldPrice, $value); |
| 172 |
|
if (!$this->checkAndRound($calcOldPrice)) { |
| 173 |
|
$fError = true; |
| 174 |
|
$report['errors'][$errorKey][Yii::t('app', 'Old Price')] = Yii::t('app', 'Сalculated value is less than zero'); |
| 175 |
|
} |
| 176 |
|
} |
| 177 |
|
} else { // type == relative |
| 178 |
|
if ($selectedField == 'price') { |
| 179 |
|
$calcOldPrice = $calculator($calcPrice, $value); |