[-] 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
+7 -4
View File
@@ -146,7 +146,7 @@ function generateDeliverySlipPDFByIdOrderInvoice($id_order_invoice)
function generateInvoicesPDF()
{
$order_invoice_collection = OrderInvoice::getByDateInterval($_GET['date_from'], $_GET['date_to'], NULL, 'invoice');
$order_invoice_collection = OrderInvoice::getByDateInterval($_GET['date_from'], $_GET['date_to']);
if (!sizeof($order_invoice_collection))
die(Tools::displayError('No invoices found'));
@@ -182,9 +182,12 @@ function generateOrderSlipsPDF()
function generateDeliverySlipsPDF()
{
$slips = unserialize(urldecode($_GET['deliveryslips']));
if (is_array($slips))
generatePDF($slips, PDF::TEMPLATE_DELIVERY_SLIP);
$order_invoice_collection = OrderInvoice::getByDeliveryDateInterval(Tools::getValue('date_from'), Tools::getValue('date_to'));
if (!sizeof($order_invoice_collection))
die(Tools::displayError('No invoices found'));
generatePDF($order_invoice_collection, PDF::TEMPLATE_DELIVERY_SLIP);
}
function generatePDF($object, $template)