Debug v21

This commit is contained in:
Laurent Destailleur 2024-11-25 03:11:31 +01:00
parent 6e295687a1
commit bc83d330b6
8 changed files with 14 additions and 10 deletions

View file

@ -990,7 +990,7 @@ if ($object->id > 0) {
// Iban
print '<td class="center"><span class="iban">';
print $obj->iban;
print dolDecrypt($obj->iban);
if ($obj->iban && $obj->bic) {
print " / ";
}
@ -1119,7 +1119,7 @@ if ($object->id > 0) {
// Iban
print '<td class="center"><span class="iban">';
print $obj->iban;
print dolDecrypt($obj->iban);
if ($obj->iban && $obj->bic) {
print " / ";
}

View file

@ -1205,7 +1205,7 @@ class BonPrelevement extends CommonObject
$factures[$i] = $row;
// Decode BAN
$factures[11] = dolDecrypt($factures[11]);
$factures[$i][11] = dolDecrypt($factures[$i][11]);
if ($row[7] == 0) {
$error++;
@ -1254,7 +1254,7 @@ class BonPrelevement extends CommonObject
$verif = checkSwiftForAccount(null, $fac[10]);
if ($verif || (empty($fac[10]) && getDolGlobalInt("WITHDRAWAL_WITHOUT_BIC"))) {
dol_syslog(__METHOD__." now call checkIbanForAccount");
dol_syslog(__METHOD__." now call checkIbanForAccount(null, ".$fac[11].")");
$verif = checkIbanForAccount(null, $fac[11]);
}

View file

@ -5263,14 +5263,15 @@ class Form
while ($i < $num) {
$obj = $this->db->fetch_object($result);
$iban = dolDecrypt($obj->iban_prefix);
if ($selected == $obj->rowid || ($useempty == 2 && $num == 1 && empty($selected))) {
$out .= '<option value="' . $obj->rowid . '" data-iban-prefix="' . $obj->iban_prefix . ' data-bic="' . $obj->bic . '" selected>';
$out .= '<option value="' . $obj->rowid . '" data-iban-prefix="' . $iban . ' data-bic="' . $obj->bic . '" selected>';
} else {
$out .= '<option value="' . $obj->rowid . '" data-iban-prefix="' . $obj->iban_prefix . ' data-bic="' . $obj->bic . '">';
$out .= '<option value="' . $obj->rowid . '" data-iban-prefix="' . $iban . ' data-bic="' . $obj->bic . '">';
}
$out .= trim($obj->label);
if ($showibanbic) {
$out .= ' (' . $obj->iban_prefix . '/' .$obj->bic. ')';
$out .= ' (' . $iban . '/' .$obj->bic. ')';
}
$out .= '</option>';
$i++;

View file

@ -82,6 +82,8 @@ ALTER TABLE llx_product DROP FOREIGN KEY fk_product_default_warehouse;
DROP TABLE llx_contratdet_log;
ALTER TABLE llx_societe_rib MODIFY COLUMN iban_prefix varchar(80);
ALTER TABLE llx_bank_account MODIFY COLUMN iban_prefix varchar(80);
ALTER TABLE llx_user_rib MODIFY COLUMN iban_prefix varchar(80);
ALTER TABLE llx_bom_bom ADD COLUMN last_main_doc varchar(255) AFTER model_pdf;

View file

@ -39,7 +39,7 @@ create table llx_bank_account
cle_rib varchar(5),
bic varchar(11), -- 11 according to ISO 9362
bic_intermediate varchar(11), -- 11 according to ISO 9362. Same as bic but for intermediate bank
iban_prefix varchar(34), -- full iban. 34 according to ISO 13616
iban_prefix varchar(80), -- full iban. 34 according to ISO 13616 but we set 80 to allow to store it with encryption information
country_iban varchar(2), -- deprecated
cle_iban varchar(2),
domiciliation varchar(255),

View file

@ -31,7 +31,7 @@ create table llx_user_rib
cle_rib varchar(5), -- key of bank account
bic varchar(11), -- 11 according to ISO 9362
bic_intermediate varchar(11), -- 11 according to ISO 9362. Same as bic but for intermediate bank
iban_prefix varchar(34), -- full iban. 34 according to ISO 13616
iban_prefix varchar(80), -- full iban. 34 according to ISO 13616 but we set 80 to allow to store it with encryption information
domiciliation varchar(255),
proprio varchar(60),
owner_address varchar(255),

View file

@ -1410,6 +1410,7 @@ class Thirdparties extends DolibarrApi
$num = $this->db->num_rows($result);
while ($i < $num) {
$obj = $this->db->fetch_object($result);
$account = new CompanyBankAccount($this->db);
if ($account->fetch($obj->rowid)) {
$accounts[] = $account;

View file

@ -223,7 +223,7 @@ class UserBankAccount extends Account
$this->number = $obj->number;
$this->cle_rib = $obj->cle_rib;
$this->bic = $obj->bic;
$this->iban = $obj->iban;
$this->iban = dolDecrypt($obj->iban);
$this->courant = self::TYPE_CURRENT;
$this->type = self::TYPE_CURRENT;