|
@@ -228,7 +228,7 @@ if ((empty($user->rights->fournisseur->facture->lire) && empty($conf->global->MA
|
|
|
if (GETPOST('cancel', 'alpha')) {
|
|
|
$action = 'list'; $massaction = '';
|
|
|
}
|
|
|
-if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createbills') {
|
|
|
+if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') {
|
|
|
$massaction = '';
|
|
|
}
|
|
|
|
|
@@ -829,7 +829,7 @@ if ($resql) {
|
|
|
//'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
|
|
|
//'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
|
|
|
);
|
|
|
- //if($user->rights->fournisseur->facture->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer");
|
|
|
+
|
|
|
if (!empty($conf->paymentbybanktransfer->enabled) && !empty($user->rights->paymentbybanktransfer->create)) {
|
|
|
$langs->load('withdrawals');
|
|
|
$arrayofmassactions['banktransfertrequest'] = img_picto('', 'payment', 'class="pictofixedwidth"').$langs->trans("MakeBankTransferOrder");
|
|
@@ -837,7 +837,7 @@ if ($resql) {
|
|
|
if ($user->rights->fournisseur->facture->supprimer) {
|
|
|
$arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
|
|
}
|
|
|
- if (in_array($massaction, array('presend', 'predelete', 'createbills'))) {
|
|
|
+ if (in_array($massaction, array('presend', 'predelete'))) {
|
|
|
$arrayofmassactions = array();
|
|
|
}
|
|
|
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
|
@@ -868,45 +868,6 @@ if ($resql) {
|
|
|
$trackid = 'sinv'.$object->id;
|
|
|
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
|
|
|
|
|
- if ($massaction == 'createbills') {
|
|
|
- //var_dump($_REQUEST);
|
|
|
- print '<input type="hidden" name="massaction" value="confirm_createbills">';
|
|
|
-
|
|
|
- print '<table class="border" width="100%" >';
|
|
|
- print '<tr>';
|
|
|
- print '<td class="titlefieldmiddle">';
|
|
|
- print $langs->trans('DateInvoice');
|
|
|
- print '</td>';
|
|
|
- print '<td>';
|
|
|
- print $form->selectDate('', '', '', '', '', '', 1, 1);
|
|
|
- print '</td>';
|
|
|
- print '</tr>';
|
|
|
- print '<tr>';
|
|
|
- print '<td>';
|
|
|
- print $langs->trans('CreateOneBillByThird');
|
|
|
- print '</td>';
|
|
|
- print '<td>';
|
|
|
- print $form->selectyesno('createbills_onebythird', '', 1);
|
|
|
- print '</td>';
|
|
|
- print '</tr>';
|
|
|
- print '<tr>';
|
|
|
- print '<td>';
|
|
|
- print $langs->trans('ValidateInvoices');
|
|
|
- print '</td>';
|
|
|
- print '<td>';
|
|
|
- print $form->selectyesno('validate_invoices', 1, 1);
|
|
|
- print '</td>';
|
|
|
- print '</tr>';
|
|
|
- print '</table>';
|
|
|
-
|
|
|
- print '<br>';
|
|
|
- print '<div class="center">';
|
|
|
- print '<input type="submit" class="button" id="createbills" name="createbills" value="'.$langs->trans('CreateInvoiceForThisCustomer').'"> ';
|
|
|
- print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
|
|
|
- print '</div>';
|
|
|
- print '<br>';
|
|
|
- }
|
|
|
-
|
|
|
if ($search_all) {
|
|
|
foreach ($fieldstosearchall as $key => $val) {
|
|
|
$fieldstosearchall[$key] = $langs->trans($val);
|