From e0f5a3cfe980ac79b86dda1083e0131cd357e745 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Mon, 25 Jul 2016 21:51:29 +0200 Subject: [PATCH] Fix send email in mass action --- htdocs/compta/facture/list.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 0e9c6874103..67e3d0aabc9 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -173,7 +173,7 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab */ if (GETPOST('cancel')) { $action='list'; $massaction=''; } -if (! GETPOST('confirmmassaction')) { $massaction=''; } +if (! GETPOST('confirmmassaction') && $massaction != 'confirm_presend') { $massaction=''; } $parameters=array('socid'=>$socid); $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks @@ -324,6 +324,7 @@ if (empty($reshook)) if ($object->statut != Facture::STATUS_VALIDATED) { $nbignored++; + $resaction.='<div class="error">'.$langs->trans('ErrorOnlyInvoiceValidatedCanBeSentInMassAction',$object->ref).'</div><br>'; continue; // Payment done or started or canceled } @@ -366,8 +367,8 @@ if (empty($reshook)) else { $nbignored++; - $langs->load("other"); - $resaction.='<div class="error">'.$langs->trans('ErrorCantReadFile',$file).'</div>'; + $langs->load("errors"); + $resaction.='<div class="error">'.$langs->trans('ErrorCantReadFile',$file).'</div><br>'; dol_syslog('Failed to read file: '.$file, LOG_WARNING); continue; } -- GitLab