[-] CORE : Currency conversion rate can not be 0

This commit is contained in:
gRoussac
2013-10-29 15:39:17 +01:00
parent 64706075d5
commit a43851469e
2 changed files with 15 additions and 4 deletions
@@ -346,6 +346,8 @@ class AdminCurrenciesControllerCore extends AdminController
}
if (Tools::isSubmit('submitAddcurrency') && !Tools::getValue('id_currency') && Currency::exists(Tools::getValue('iso_code'), Tools::getValue('iso_code_num')))
$this->errors[] = Tools::displayError('This currency already exists.');
if (Tools::isSubmit('submitAddcurrency') && (float)Tools::getValue('conversion_rate') <= 0)
$this->errors[] = Tools::displayError('This currency conversion rate can not be equal to 0.');
parent::initProcess();
}
}