Debug v18

This commit is contained in:
Laurent Destailleur 2023-02-27 16:09:52 +01:00
parent 570748ad79
commit 848e9df241
4 changed files with 31 additions and 9 deletions

View File

@ -210,12 +210,13 @@ if ($id > 0 || $ref) {
print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent tableforfield">';
if ($object->fk_bank_account > 0) {
$acc = new Account($db);
$result = $acc->fetch($object->fk_bank_account);
} else { // For backward compatibility
$acc = new Account($db);
$fk_bank_account = ($object->type == 'bank-transfer' ? $conf->global->PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT : $conf->global->PRELEVEMENT_ID_BANKACCOUNT);
// Get bank account for the payment
$acc = new Account($db);
$fk_bank_account = $object->fk_bank_account;
if (empty($fk_bank_account)) {
$fk_bank_account = ($object->type == 'bank-transfer' ? getDolGlobalInt('PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT') : getDolGlobalInt('PRELEVEMENT_ID_BANKACCOUNT'));
}
if ($fk_bank_account > 0) {
$result = $acc->fetch($fk_bank_account);
}

View File

@ -129,8 +129,15 @@ if ($id > 0 || $ref) {
print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent tableforfield">';
// Get bank account for the payment
$acc = new Account($db);
$result = $acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT);
$fk_bank_account = $object->fk_bank_account;
if (empty($fk_bank_account)) {
$fk_bank_account = ($object->type == 'bank-transfer' ? getDolGlobalInt('PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT') : getDolGlobalInt('PRELEVEMENT_ID_BANKACCOUNT'));
}
if ($fk_bank_account > 0) {
$result = $acc->fetch($fk_bank_account);
}
print '<tr><td class="titlefieldcreate">';
$labelofbankfield = "BankToReceiveWithdraw";

View File

@ -124,8 +124,15 @@ if ($id > 0 || $ref) {
print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent tableforfield">';
// Get bank account for the payment
$acc = new Account($db);
$result = $acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT);
$fk_bank_account = $object->fk_bank_account;
if (empty($fk_bank_account)) {
$fk_bank_account = ($object->type == 'bank-transfer' ? getDolGlobalInt('PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT') : getDolGlobalInt('PRELEVEMENT_ID_BANKACCOUNT'));
}
if ($fk_bank_account > 0) {
$result = $acc->fetch($fk_bank_account);
}
print '<tr><td class="titlefieldcreate">';
$labelofbankfield = "BankToReceiveWithdraw";

View File

@ -118,8 +118,15 @@ if ($id > 0 || $ref) {
print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent tableforfield">';
// Get bank account for the payment
$acc = new Account($db);
$result = $acc->fetch($conf->global->PRELEVEMENT_ID_BANKACCOUNT);
$fk_bank_account = $object->fk_bank_account;
if (empty($fk_bank_account)) {
$fk_bank_account = ($object->type == 'bank-transfer' ? getDolGlobalInt('PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT') : getDolGlobalInt('PRELEVEMENT_ID_BANKACCOUNT'));
}
if ($fk_bank_account > 0) {
$result = $acc->fetch($fk_bank_account);
}
print '<tr><td class="titlefieldcreate">';
$labelofbankfield = "BankToReceiveWithdraw";