[-] BO : fixed bug #PSFV-504 - Even if the invoices management is disabled, you can create an invoice

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14627 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
aFolletete
2012-04-13 10:01:21 +00:00
parent 886ab283de
commit d7777f270e
2 changed files with 7 additions and 2 deletions
+4 -1
View File
@@ -825,7 +825,9 @@ class AdminOrdersControllerCore extends AdminController
}
elseif (Tools::isSubmit('submitGenerateInvoice') && isset($order))
{
if ($order->hasInvoice())
if (!Configuration::get('PS_INVOICE'))
$this->errors[] = Tools::displayError('Invoice management has been disabled');
elseif ($order->hasInvoice())
$this->errors[] = Tools::displayError('This order already has an invoice');
else
{
@@ -1179,6 +1181,7 @@ class AdminOrdersControllerCore extends AdminController
'invoices_collection' => $order->getInvoicesCollection(),
'not_paid_invoices_collection' => $order->getNotPaidInvoicesCollection(),
'payment_methods' => $payment_methods,
'invoice_management_active' => Configuration::get('PS_INVOICE')
);
return parent::renderView();