Update list.php

This commit is contained in:
Laurent Destailleur 2018-05-05 14:25:44 +02:00 committed by GitHub
parent 8baa529719
commit 97f161b276
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -585,22 +585,19 @@ if ($resql)
'presend'=>$langs->trans("SendByMail"),
'builddoc'=>$langs->trans("PDFMerge"),
);
if ($conf->prelevement->enabled) {
$langs->load("withdrawals");
$arrayofmassactions['withdrawrequest'] = $langs->trans("MakeWithdrawRequest");
}
if ($user->rights->facture->supprimer) {
//if (! empty($conf->global->STOCK_CALCULATE_ON_BILL) || empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED))
if (!empty($conf->global->INVOICE_CAN_REMOVE_DRAFT_ONLY)) {
$arrayofmassactions['predeletedraft'] = $langs->trans("Deletedraft");
}
elseif (!empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED)) {
// mass deletion never possible on invoices on such situation
$arrayofmassactions['predelete'] = $langs->trans("Delete");
}
}
if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
if ($conf->prelevement->enabled) {
$langs->load("withdrawals");
$arrayofmassactions['withdrawrequest'] = $langs->trans("MakeWithdrawRequest");
}
if ($user->rights->facture->supprimer) {
if (!empty($conf->global->INVOICE_CAN_REMOVE_DRAFT_ONLY)) {
$arrayofmassactions['predeletedraft'] = $langs->trans("Deletedraft");
}
elseif (!empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED)) { // mass deletion never possible on invoices on such situation
$arrayofmassactions['predelete'] = $langs->trans("Delete");
}
}
if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
$newcardbutton='';