modif invoices for multi expe48h

This commit is contained in:
Marion Muszynski 2016-06-09 10:31:52 +02:00
parent 77023fdbcb
commit dbe607dccc
2 changed files with 23 additions and 4 deletions

View File

@ -131,10 +131,7 @@ function generateInvoicesPDFPrivateSales48h()
}
}
PDF::multipleInvoices($orders, false, true, true);
if (!empty($orders2)) {
PDF::multipleInvoices($orders2, true, true, true);
}
PDF::multipleInvoices2($orders, $orders2, true, true);
}
}
}

View File

@ -341,6 +341,28 @@ class PDFCore extends PDF_PageGroupCore
return $pdf->Output('invoices.pdf', 'D');
}
public static function multipleInvoices2($invoices_single, $invoices_multi, $tri = false, $expe48 = false)
{
$pdf = new PDF('P', 'mm', 'A4');
// invoice for single sale orders
foreach ($invoices_single AS $id_order)
{
$orderObj = new Order((int)$id_order);
if (Validate::isLoadedObject($orderObj))
PDF::invoice($orderObj, 'D', true, $pdf, false, false, false, $tri, $expe48);
}
// invoice for multi sale orders
foreach ($invoices_multi AS $id_order)
{
$orderObj = new Order((int)$id_order);
if (Validate::isLoadedObject($orderObj))
PDF::invoice($orderObj, 'D', true, $pdf, false, false, true, $tri, $expe48);
}
return $pdf->Output('invoices.pdf', 'D');
}
public static function multipleOrderSlips($orderSlips)
{
$pdf = new PDF('P', 'mm', 'A4');