Skip to content

Commit

Permalink
Merge pull request #3752 from prestamodule/patch-22
Browse files Browse the repository at this point in the history
[-] BO: Fix #PSCSX-6583 / You can now have a "from" date and a "to" d…
  • Loading branch information
Jérôme Nadaud committed Sep 21, 2015
2 parents 00a90e7 + 6ce804f commit 09575a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/admin/AdminProductsController.php
Expand Up @@ -1142,7 +1142,7 @@ public function processPriceAddition()

if (($price == '-1') && ((float)$reduction == '0')) {
$this->errors[] = Tools::displayError('No reduction value has been submitted');
} elseif (strtotime($to) < strtotime($from)) {
} elseif ($to != '0000-00-00 00:00:00' && strtotime($to) < strtotime($from)) {
$this->errors[] = Tools::displayError('Invalid date range');
} elseif ($reduction_type == 'percentage' && ((float)$reduction <= 0 || (float)$reduction > 100)) {
$this->errors[] = Tools::displayError('Submitted reduction value (0-100) is out-of-range');
Expand Down

0 comments on commit 09575a3

Please sign in to comment.