// Fix problems with display of PDF with multishop #PSFV-643 admin/pdf.php is now deprecated

This commit is contained in:
rMalie
2012-03-26 16:00:05 +00:00
parent 081470629d
commit 6cf9ef197d
17 changed files with 240 additions and 171 deletions
@@ -224,7 +224,7 @@ class AdminInvoicesControllerCore extends AdminController
if (!count($this->errors))
{
if (count(OrderInvoice::getByDateInterval(Tools::getValue('date_from'), Tools::getValue('date_to'))))
Tools::redirectAdmin('pdf.php?invoices&date_from='.urlencode(Tools::getValue('date_from')).'&date_to='.urlencode(Tools::getValue('date_to')).'&token='.$this->token);
Tools::redirectAdmin($this->context->link->getAdminLink('AdminPdf').'&submitAction=generateInvoicesPDF&date_from='.urlencode(Tools::getValue('date_from')).'&date_to='.urlencode(Tools::getValue('date_to')));
$this->errors[] = $this->l('No invoice found for this period');
}
@@ -237,7 +237,7 @@ class AdminInvoicesControllerCore extends AdminController
{
foreach ($status_array as $id_order_state)
if (count(OrderInvoice::getByStatus((int)$id_order_state)))
Tools::redirectAdmin('pdf.php?invoices2&id_order_state='.implode('-', $status_array).'&token='.$this->token);
Tools::redirectAdmin($this->context->link->getAdminLink('AdminPdf').'&submitAction=generateInvoicesPDF2&id_order_state='.implode('-', $status_array));
$this->errors[] = $this->l('No invoice found for this status');
}