Merge pull request #2091 from frederic34/patch-3
Fix 1721 Missing translation on proposal creation
This commit is contained in:
commit
f9953d52f6
@ -163,6 +163,22 @@ if ($action == 'setdefaultduration')
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'set_ASK_PAYMENT_BANK_DURING_PROPOSAL')
|
||||
{
|
||||
$res = dolibarr_set_const($db, "ASK_PAYMENT_BANK_DURING_PROPOSAL",$value,'chaine',0,'',$conf->entity);
|
||||
|
||||
if (! $res > 0) $error++;
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
setEventMessage($langs->trans("SetupSaved"));
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($langs->trans("Error"),'errors');
|
||||
}
|
||||
}
|
||||
|
||||
// Define constants for submodules that contains parameters (forms with param1, param2, ... and value1, value2, ...)
|
||||
if ($action == 'setModuleOptions')
|
||||
{
|
||||
@ -582,6 +598,35 @@ print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'
|
||||
print "</td></tr>\n";
|
||||
print '</form>';
|
||||
|
||||
if ($conf->banque->enabled)
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("ASK_PAYMENT_BANK_DURING_PROPOSAL").'</td><td> </td><td align="center">';
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
{
|
||||
print ajax_constantonoff('ASK_PAYMENT_BANK_DURING_PROPOSAL');
|
||||
}
|
||||
else
|
||||
{
|
||||
if (empty($conf->global->ASK_PAYMENT_BANK_DURING_PROPOSAL))
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_ASK_PAYMENT_BANK_DURING_PROPOSAL&value=1">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_ASK_PAYMENT_BANK_DURING_PROPOSAL&value=0">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("ASK_PAYMENT_BANK_DURING_PROPOSAL").'</td><td> </td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
|
||||
@ -1310,9 +1310,11 @@ if ($action == 'create')
|
||||
print '</td></tr>';
|
||||
|
||||
// Bank Account
|
||||
print '<tr><td>' . $langs->trans('BankAccount') . '</td><td colspan="2">';
|
||||
$form->select_comptes($fk_account, 'fk_account', 0, '', 1);
|
||||
print '</td></tr>';
|
||||
if (! empty($conf->global->ASK_PAYMENT_BANK_DURING_PROPOSAL) && $conf->module->banque->enabled) {
|
||||
print '<tr><td>' . $langs->trans('BankAccount') . '</td><td colspan="2">';
|
||||
$form->select_comptes($fk_account, 'fk_account', 0, '', 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// What trigger creation
|
||||
print '<tr><td>' . $langs->trans('Source') . '</td><td>';
|
||||
@ -1892,7 +1894,7 @@ if ($action == 'create')
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL))
|
||||
if (! empty($conf->global->ASK_PAYMENT_BANK_DURING_PROPOSAL) && $conf->banque->enabled)
|
||||
{
|
||||
// Bank Account
|
||||
print '<tr><td>';
|
||||
|
||||
@ -1139,6 +1139,7 @@ AddDeliveryAddressAbility=Add delivery date ability
|
||||
UseOptionLineIfNoQuantity=A line of product/service with a zero amount is considered as an option
|
||||
FreeLegalTextOnProposal=Free text on commercial proposals
|
||||
WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty)
|
||||
ASK_PAYMENT_BANK_DURING_PROPOSAL=Ask for bank account destination of proposal
|
||||
##### Orders #####
|
||||
OrdersSetup=Order management setup
|
||||
OrdersNumberingModules=Orders numbering models
|
||||
|
||||
Loading…
Reference in New Issue
Block a user