diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php
index db751735bb0..03bc3d8754e 100644
--- a/htdocs/compta/prelevement/create.php
+++ b/htdocs/compta/prelevement/create.php
@@ -47,6 +47,8 @@ $type = GETPOST('type', 'aZ09');
// Get supervariables
$action = GETPOST('action', 'aZ09');
+$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
+$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
$mode = GETPOST('mode', 'alpha') ?GETPOST('mode', 'alpha') : 'real';
$format = GETPOST('format', 'aZ09');
$id_bankaccount = GETPOST('id_bankaccount', 'int');
@@ -61,6 +63,7 @@ $hookmanager->initHooks(array('directdebitcreatecard', 'globalcard'));
/*
* Actions
*/
+if (GETPOST('cancel', 'alpha')) { $massaction = ''; }
$parameters = array('mode' => $mode, 'format' => $format, 'limit' => $limit, 'page' => $page, 'offset' => $offset);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@@ -122,6 +125,9 @@ if (empty($reshook)) {
exit;
}
}
+ $objectclass = "BonPrelevement";
+ $uploaddir = $conf->prelevement->dir_output;
+ include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
@@ -138,6 +144,12 @@ if ($type != 'bank-transfer') {
$invoicestatic = new FactureFournisseur($db);
}
$bprev = new BonPrelevement($db);
+$arrayofselected = is_array($toselect) ? $toselect : array();
+// List of mass actions available
+$arrayofmassactions = array(
+);
+if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
+$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
llxHeader('', $langs->trans("NewStandingOrder"));
@@ -273,7 +285,7 @@ print '
';
*/
$sql = "SELECT f.ref, f.rowid, f.total_ttc, s.nom as name, s.rowid as socid,";
-$sql .= " pfd.date_demande, pfd.amount";
+$sql .= " pfd.rowid as request_row_id, pfd.date_demande, pfd.amount";
if ($type == 'bank-transfer') {
$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f,";
} else {
@@ -332,7 +344,7 @@ if ($resql)
if ($type == 'bank-transfer') {
$title = $langs->trans("InvoiceWaitingPaymentByBankTransfer");
}
- print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, '', '', '', $num, $nbtotalofrecords, 'bill', 0, '', '', $limit);
+ print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, '', '', $massactionbutton, $num, $nbtotalofrecords, 'bill', 0, '', '', $limit);
$tradinvoice = "Invoice";
if ($type == 'bank-transfer') {
@@ -347,6 +359,10 @@ if ($resql)
print '