diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php
index a0f535c2b7b..aaa1949d7dd 100644
--- a/htdocs/admin/commande.php
+++ b/htdocs/admin/commande.php
@@ -147,7 +147,7 @@ if ($action == 'setModuleOptions')
}
// Activate a model
-if ($action == 'set')
+else if ($action == 'set')
{
$ret = addDocumentModel($value, $type, $label, $scandir);
}
@@ -222,7 +222,7 @@ else if ($action == 'set_COMMANDE_FREE_TEXT')
}
}
-//Activate Set Shippable Icon In List
+// Activate Set Shippable Icon In List
else if ($action=="setshippableiconinlist") {
$setshippableiconinlist = GETPOST('value','int');
$res = dolibarr_set_const($db, "SHIPPABLE_ORDER_ICON_IN_LIST", $setshippableiconinlist,'yesno',0,'',$conf->entity);
@@ -234,6 +234,23 @@ else if ($action=="setshippableiconinlist") {
}
}
+// Activate ask for payment bank
+else if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ORDER')
+{
+ $res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_ORDER",$value,'chaine',0,'',$conf->entity);
+
+ if (! $res > 0) $error++;
+
+ if (! $error)
+ {
+ setEventMessage($langs->trans("SetupSaved"));
+ }
+ else
+ {
+ setEventMessage($langs->trans("Error"),'errors');
+ }
+}
+
/*
* View
@@ -576,6 +593,36 @@ if (!empty($conf->global->SHIPPABLE_ORDER_ICON_IN_LIST)) {
print '';
print '';
+// Ask for payment bank during order
+if ($conf->banque->enabled)
+{
+ $var=!$var;
+ print '
| ';
+ print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_ORDER").' |   | ';
+ if (! empty($conf->use_javascript_ajax))
+ {
+ print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_ORDER');
+ }
+ else
+ {
+ if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER))
+ {
+ print ''.img_picto($langs->trans("Disabled"),'switch_off').'';
+ }
+ else
+ {
+ print ''.img_picto($langs->trans("Enabled"),'switch_on').'';
+ }
+ }
+ print ' |
';
+}
+else
+{
+ $var=!$var;
+ print '| ';
+ print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_ORDER").' | | '.$langs->trans('NotAvailable').' |
';
+}
+
print '';
print '
';
diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php
index 0143e20ba77..5d20743d029 100644
--- a/htdocs/comm/propal.php
+++ b/htdocs/comm/propal.php
@@ -1312,7 +1312,7 @@ if ($action == 'create')
print '';
// Bank Account
- if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL) && $conf->module->banque->enabled) {
+ if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL) && $conf->banque->enabled) {
print '| ' . $langs->trans('BankAccount') . ' | ';
$form->select_comptes($fk_account, 'fk_account', 0, '', 1);
print ' |
';
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index f0dd8219f06..cbf898a67fc 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1152,6 +1152,7 @@ ValidOrderAfterPropalClosed=To validate the order after proposal closer, makes i
FreeLegalTextOnOrders=Free text on orders
WatermarkOnDraftOrders=Watermark on draft orders (none if empty)
ShippableOrderIconInList=Add an icon in Orders list which indicate if order is shippable
+BANK_ASK_PAYMENT_BANK_DURING_ORDER=Ask for bank account destination of order
##### Clicktodial #####
ClickToDialSetup=Click To Dial module setup
ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
__PHONETO__ that will be replaced with the phone number of person to call
__PHONEFROM__ that will be replaced with phone number of calling person (yours)
__LOGIN__ that will be replaced with your clicktodial login (defined on your user card)
__PASS__ that will be replaced with your clicktodial password (defined on your user card).