Skip to content
Snippets Groups Projects
Commit 22a7123c authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #2164 from frederic34/patch-5

Admin config for ask for payment bank during order
parents e6d2bc0b 82d403c3
No related branches found
No related tags found
No related merge requests found
...@@ -147,7 +147,7 @@ if ($action == 'setModuleOptions') ...@@ -147,7 +147,7 @@ if ($action == 'setModuleOptions')
} }
// Activate a model // Activate a model
if ($action == 'set') else if ($action == 'set')
{ {
$ret = addDocumentModel($value, $type, $label, $scandir); $ret = addDocumentModel($value, $type, $label, $scandir);
} }
...@@ -234,6 +234,23 @@ else if ($action=="setshippableiconinlist") { ...@@ -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 * View
...@@ -576,6 +593,36 @@ if (!empty($conf->global->SHIPPABLE_ORDER_ICON_IN_LIST)) { ...@@ -576,6 +593,36 @@ if (!empty($conf->global->SHIPPABLE_ORDER_ICON_IN_LIST)) {
print '</a></td>'; print '</a></td>';
print '</tr>'; print '</tr>';
// Ask for payment bank during order
if ($conf->banque->enabled)
{
$var=!$var;
print '<tr '.$bc[$var].'><td>';
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_ORDER").'</td><td>&nbsp</td><td align="center">';
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 '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_ORDER&amp;value=1">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
}
else
{
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_ORDER&amp;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_ORDER").'</td><td>&nbsp;</td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
}
print '</table>'; print '</table>';
print '<br>'; print '<br>';
......
...@@ -1152,6 +1152,7 @@ ValidOrderAfterPropalClosed=To validate the order after proposal closer, makes i ...@@ -1152,6 +1152,7 @@ ValidOrderAfterPropalClosed=To validate the order after proposal closer, makes i
FreeLegalTextOnOrders=Free text on orders FreeLegalTextOnOrders=Free text on orders
WatermarkOnDraftOrders=Watermark on draft orders (none if empty) WatermarkOnDraftOrders=Watermark on draft orders (none if empty)
ShippableOrderIconInList=Add an icon in Orders list which indicate if order is shippable 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 ##### ##### Clicktodial #####
ClickToDialSetup=Click To Dial module setup ClickToDialSetup=Click To Dial module setup
ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags<br><b>__PHONETO__</b> that will be replaced with the phone number of person to call<br><b>__PHONEFROM__</b> that will be replaced with phone number of calling person (yours)<br><b>__LOGIN__</b> that will be replaced with your clicktodial login (defined on your user card)<br><b>__PASS__</b> that will be replaced with your clicktodial password (defined on your user card). ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags<br><b>__PHONETO__</b> that will be replaced with the phone number of person to call<br><b>__PHONEFROM__</b> that will be replaced with phone number of calling person (yours)<br><b>__LOGIN__</b> that will be replaced with your clicktodial login (defined on your user card)<br><b>__PASS__</b> that will be replaced with your clicktodial password (defined on your user card).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment