|
@@ -199,6 +199,23 @@ else if ($action == 'set_SUPPLIER_ORDER_OTHER')
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+// Activate ask for payment bank
|
|
|
+else if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER')
|
|
|
+{
|
|
|
+ $res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER",$value,'chaine',0,'',$conf->entity);
|
|
|
+
|
|
|
+ if (! $res > 0) $error++;
|
|
|
+
|
|
|
+ if (! $error)
|
|
|
+ {
|
|
|
+ setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ setEventMessages($langs->trans("Error"), null, 'errors');
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
/*
|
|
|
* View
|
|
@@ -487,6 +504,36 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0)
|
|
|
$var=!$var;
|
|
|
}
|
|
|
|
|
|
+// Ask for payment bank during supplier order
|
|
|
+if ($conf->banque->enabled)
|
|
|
+{
|
|
|
+ $var=!$var;
|
|
|
+ print '<tr '.$bc[$var].'><td>';
|
|
|
+ print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER").'</td><td> </td><td align="center">';
|
|
|
+ if (! empty($conf->use_javascript_ajax))
|
|
|
+ {
|
|
|
+ print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER');
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER))
|
|
|
+ {
|
|
|
+ print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER&value=1">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER&value=0">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ print '</td></tr>';
|
|
|
+}
|
|
|
+else
|
|
|
+{
|
|
|
+ $var=!$var;
|
|
|
+ print '<tr '.$bc[$var].'><td>';
|
|
|
+ print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER").'</td><td> </td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
|
|
|
+}
|
|
|
+
|
|
|
print '<tr '.$bc[$var].'><td colspan="2">';
|
|
|
print $langs->trans("FreeLegalTextOnOrders").' ('.$langs->trans("AddCRIfTooLong").')<br>';
|
|
|
$variablename='SUPPLIER_ORDER_FREE_TEXT';
|