fix actionbuttons on editline or presend

This commit is contained in:
Christian Foellmann 2022-07-08 10:05:55 +02:00
parent d97b882cf8
commit aeb86a4faf
2 changed files with 182 additions and 182 deletions

View File

@ -2013,12 +2013,15 @@ if ($action == 'create') {
print dol_get_fiche_end(); print dol_get_fiche_end();
// Select mail models is same action as presend
if (GETPOST('modelselected')) {
$action = 'presend';
}
/* /*
* Buttons * Buttons
*/ */
if ($user->socid == 0 && $action != 'presend' && $action != 'editline') {
if ($user->socid == 0) {
print '<div class="tabsAction">'; print '<div class="tabsAction">';
$parameters = array(); $parameters = array();
@ -2130,11 +2133,6 @@ if ($action == 'create') {
print "</div>"; print "</div>";
} }
// Select mail models is same action as presend
if (GETPOST('modelselected')) {
$action = 'presend';
}
if ($action != 'presend') { if ($action != 'presend') {
print '<div class="fichecenter"><div class="fichehalfleft">'; print '<div class="fichecenter"><div class="fichehalfleft">';

View File

@ -2433,7 +2433,9 @@ if ($action == 'create') {
* Buttons for actions * Buttons for actions
*/ */
if ($user->socid == 0 && $action != 'editline' && $action != 'delete') { if ($user->socid == 0 && $action != 'delete') {
if ($action != 'makeorder' && $action != 'presend' && $action != 'editline') {
print '<div class="tabsAction">'; print '<div class="tabsAction">';
$parameters = array(); $parameters = array();
@ -2631,7 +2633,7 @@ if ($action == 'create') {
print "</div>"; print "</div>";
}
if ($usercanorder && $object->statut == CommandeFournisseur::STATUS_ACCEPTED && $action == 'makeorder') { if ($usercanorder && $object->statut == CommandeFournisseur::STATUS_ACCEPTED && $action == 'makeorder') {
// Set status to ordered (action=commande) // Set status to ordered (action=commande)
@ -2668,7 +2670,12 @@ if ($action == 'create') {
print "<br>"; print "<br>";
} }
if ($action != 'makeorder') { // Select mail models is same action as presend
if (GETPOST('modelselected')) {
$action = 'presend';
}
if ($action != 'makeorder' && $action != 'presend' ) {
print '<div class="fichecenter"><div class="fichehalfleft">'; print '<div class="fichecenter"><div class="fichehalfleft">';
// Generated documents // Generated documents
@ -2917,11 +2924,6 @@ if ($action == 'create') {
} }
} }
// Select mail models is same action as presend
if (GETPOST('modelselected')) {
$action = 'presend';
}
// Presend form // Presend form
$modelmail = 'order_supplier_send'; $modelmail = 'order_supplier_send';
$defaulttopic = 'SendOrderRef'; $defaulttopic = 'SendOrderRef';