Merge branch 'ticket-simplemulti_invoice' into develop
This commit is contained in:
commit
94dc4f3b40
@ -156,7 +156,7 @@ class AdminInvoices extends AdminTab
|
||||
<img src="../img/admin/pdf.gif" alt="">
|
||||
</a>
|
||||
</td>*/
|
||||
echo '<td align="center"><input id="multi_'. $sale['id_sale'].'" type="checkbox" name="multi2[]" value="'.$sale['id_sale'].'" /></td>
|
||||
echo '<td align="center"><input id="multi_'. $sale['id_sale'].'" type="checkbox" name="multi2[]" value="'.$sale['id_sale'].'" '.(isset($_COOKIE['checked_sale_'.(int)$sale['id_sale']])?'checked':'').'/></td>
|
||||
<td align="center">
|
||||
<a onclick="this.target=\'_blank\'" href="'.$currentIndex.'&printAll=1&id_sale='. $sale['id_sale'] .'&token='.$this->token.'">
|
||||
<img src="../img/admin/pdf.gif" alt="">
|
||||
@ -467,6 +467,12 @@ class AdminInvoices extends AdminTab
|
||||
elseif (Tools::isSubmit('submitPrintM2Plus')) {
|
||||
include_once(dirname(__FILE__).'/../../modules/privatesales/Sale.php');
|
||||
$id_sales = Tools::getValue('multi2');
|
||||
|
||||
// Save Sales as checked
|
||||
foreach ($id_sales as $id) {
|
||||
setcookie('checked_sale_'.(int)$id, (int)$id, time()+(60*60*24*360));
|
||||
}
|
||||
|
||||
if (empty($id_sales) || (count($id_sales) < 2) ) {
|
||||
$this->_errors[] = $this->l('You must select 2 sales minimum for print M2+');
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user