[-] BO : fixed bug on Delivery slip generation in AdminDeliverySlip

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12023 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
aFolletete
2012-01-02 18:16:09 +00:00
parent e20374e6f7
commit bc631a0e42
5 changed files with 46 additions and 24 deletions
@@ -108,9 +108,8 @@ class AdminDeliverySlipControllerCore extends AdminController
$this->_errors[] = Tools::displayError('Invalid end date');
if (!count($this->_errors))
{
$orders = Order::getOrdersIdByDate(Tools::getValue('date_from'), Tools::getValue('date_to'), null, 'delivery');
if (count($orders))
Tools::redirectAdmin('pdf.php?deliveryslips='.urlencode(serialize($orders)).'&token='.$this->token);
if (count(OrderInvoice::getByDeliveryDateInterval(Tools::getValue('date_from'), Tools::getValue('date_to'))))
Tools::redirectAdmin('pdf.php?deliveryslips&date_from='.urlencode(Tools::getValue('date_from')).'&date_to='.urlencode(Tools::getValue('date_to')).'&token='.$this->token);
else
$this->_errors[] = Tools::displayError('No delivery slip found for this period');
}