Close #9674 by keeping old code present (this help for transition tests)
This commit is contained in:
parent
09fbe479d1
commit
ebba33635b
@ -302,7 +302,7 @@ if (GETPOST('save') && ! $cancel && $user->rights->banque->modifier)
|
||||
$error++;
|
||||
}*/
|
||||
|
||||
if (! $error)
|
||||
if (! $error && ! empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT))
|
||||
{
|
||||
$objecttmp = new Account($db);
|
||||
$objecttmp->fetch($bankaccountid);
|
||||
@ -630,7 +630,7 @@ if ($resql)
|
||||
}
|
||||
|
||||
// Form to add a transaction with no invoice
|
||||
if ($user->rights->banque->modifier && $action == 'addline')
|
||||
if ($user->rights->banque->modifier && $action == 'addline' && ! empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT))
|
||||
{
|
||||
print load_fiche_titre($langs->trans("AddBankRecordLong"),'','');
|
||||
|
||||
@ -729,7 +729,7 @@ if ($resql)
|
||||
{
|
||||
if (empty($conf->global->BANK_DISABLE_DIRECT_INPUT))
|
||||
{
|
||||
if (! empty($conf->global->BANK_USE_VARIOUS_PAYMENT)) // If direct entries is done using miscellaneous payments
|
||||
if (empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)) // If direct entries is done using miscellaneous payments
|
||||
{
|
||||
if ($user->rights->banque->modifier) {
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create&accountid='.$search_account.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.urlencode($search_account)).'"><span class="valignmiddle">'.$langs->trans("AddBankRecord").'</span>';
|
||||
|
||||
@ -155,7 +155,8 @@ if (empty($reshook))
|
||||
if ($ret > 0)
|
||||
{
|
||||
$db->commit();
|
||||
header("Location: index.php");
|
||||
$urltogo=($backtopage ? $backtopage : DOL_URL_ROOT.'/compta/bank/various_payment/index.php');
|
||||
header("Location: ".$urltogo);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
|
||||
@ -959,7 +959,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
}
|
||||
|
||||
// Various payment
|
||||
if (! empty($conf->banque->enabled) && $conf->global->MAIN_FEATURES_LEVEL >= 1)
|
||||
if (! empty($conf->banque->enabled) && empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT))
|
||||
{
|
||||
$langs->load("banks");
|
||||
$newmenu->add("/compta/bank/various_payment/index.php?leftmenu=tax_various&mainmenu=billing",$langs->trans("MenuVariousPayment"),1,$user->rights->banque->lire, '', $mainmenu, 'tax_various');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user