QUAL The property ->domiciliation and ->propio on bank accounts has been

deprecated and replaced with property ->address and ->owner_name
This commit is contained in:
Laurent Destailleur 2024-10-24 12:38:41 +02:00
parent c44e0e1d0c
commit 3bc1d35236
18 changed files with 71 additions and 75 deletions

View File

@ -26,6 +26,7 @@ The following changes may create regressions for some external modules, but were
be set (not allowed by PHP 8.2). A module can already return an array with key 'no_button_delete', 'no_button_edit', 'no_button_copy' for same purpose.
* The old function dol_bc($var, $moreclass = '') has been removed. If you called it, just stop to call it.
* The trigger code CATEGORY_LINK and CATEGORY_UNLINK has been replaced with code CATEGORY_MODIFY. You can read ->context['linkto'] or ->context['unlinkoff' to detect we want to make a link or unlink.
* The property ->domiciliation and ->propio on bank accounts has been deprecated and replaced with property ->address and ->owner_name
***** ChangeLog for 20.0.1 compared to 20.0.0 *****

View File

@ -71,7 +71,7 @@ if ($action == "set") {
if (! $res > 0) $error++;
$res = dolibarr_set_const($db, "PRELEVEMENT_BIC", $account->bic,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
$res = dolibarr_set_const($db, "PRELEVEMENT_RAISON_SOCIALE", $account->proprio,'chaine',0,'',$conf->entity);
$res = dolibarr_set_const($db, "PRELEVEMENT_RAISON_SOCIALE", $account->owner_address,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
*/
} else {

View File

@ -72,7 +72,7 @@ if ($action == "set") {
if (! $res > 0) $error++;
$res = dolibarr_set_const($db, "PRELEVEMENT_BIC", $account->bic,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
$res = dolibarr_set_const($db, "PRELEVEMENT_RAISON_SOCIALE", $account->proprio,'chaine',0,'',$conf->entity);
$res = dolibarr_set_const($db, "PRELEVEMENT_RAISON_SOCIALE", $account->owner_address,'chaine',0,'',$conf->entity);
if (! $res > 0) $error++;
*/
} else {

View File

@ -145,9 +145,7 @@ if (empty($reshook)) {
$object->pti_in_ctti = empty(GETPOST("pti_in_ctti")) ? 0 : 1;
$object->address = trim(GETPOST("account_address", "alphanohtml"));
$object->domiciliation = $object->address; // deprecated
$object->proprio = trim(GETPOST("proprio", 'alphanohtml'));
$object->owner_name = trim(GETPOST("proprio", 'alphanohtml'));
$object->owner_address = trim(GETPOST("owner_address", 'alphanohtml'));
$object->owner_zip = trim(GETPOST("owner_zip", 'alphanohtml'));
@ -263,7 +261,6 @@ if (empty($reshook)) {
$object->iban = trim(GETPOST("iban"));
$object->pti_in_ctti = empty(GETPOST("pti_in_ctti")) ? 0 : 1;
$object->proprio = trim(GETPOST("proprio", 'alphanohtml'));
$object->owner_name = trim(GETPOST("proprio", 'alphanohtml'));
$object->owner_address = trim(GETPOST("owner_address", 'alphanohtml'));
$object->owner_zip = trim(GETPOST("owner_zip", 'alphanohtml'));

View File

@ -737,20 +737,11 @@ class Account extends CommonObject
if (empty($balance)) {
$balance = 0;
}
if (empty($this->address && !empty($this->domiciliation))) {
dol_syslog(get_class($this)."::create domiciliation is deprecated use address", LOG_NOTICE);
$this->address = $this->domiciliation;
}
if (empty($this->status && !empty($this->clos))) {
dol_syslog(get_class($this)."::create clos is deprecated use status", LOG_NOTICE);
$this->status = $this->clos;
}
if (empty($this->address && !empty($this->domiciliation))) {
dol_syslog(get_class($this)."::create domiciliation is deprecated use address", LOG_NOTICE);
$this->address = $this->domiciliation;
}
// Load the library to validate/check a BAN account
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
@ -804,7 +795,7 @@ class Account extends CommonObject
$sql .= ", '".$this->db->escape($this->iban)."'";
$sql .= ", '".$this->db->escape($this->address)."'";
$sql .= ", ".((int) $this->pti_in_ctti);
$sql .= ", '".$this->db->escape($this->owner_name ? $this->owner_name : $this->proprio)."'";
$sql .= ", '".$this->db->escape($this->owner_name)."'";
$sql .= ", '".$this->db->escape($this->owner_address)."'";
$sql .= ", '".$this->db->escape($this->owner_zip)."'";
$sql .= ", '".$this->db->escape($this->owner_town)."'";
@ -928,7 +919,7 @@ class Account extends CommonObject
$sql .= ",iban_prefix = '".$this->db->escape($this->iban)."'";
$sql .= ",domiciliation='".$this->db->escape($this->address)."'";
$sql .= ",pti_in_ctti=".((int) $this->pti_in_ctti);
$sql .= ",proprio = '".$this->db->escape($this->owner_name ? $this->owner_name : $this->proprio)."'";
$sql .= ",proprio = '".$this->db->escape($this->owner_name)."'";
$sql .= ",owner_address = '".$this->db->escape($this->owner_address)."'";
$sql .= ",owner_zip = '".$this->db->escape($this->owner_zip)."'";
$sql .= ",owner_town = '".$this->db->escape($this->owner_town)."'";
@ -1035,8 +1026,8 @@ class Account extends CommonObject
$sql .= ",cle_rib='".$this->db->escape($this->cle_rib)."'";
$sql .= ",bic='".$this->db->escape($this->bic)."'";
$sql .= ",iban_prefix = '".$this->db->escape($this->iban)."'";
$sql .= ",domiciliation='".$this->db->escape($this->address ? $this->address : $this->domiciliation)."'";
$sql .= ",proprio = '".$this->db->escape($this->owner_name ? $this->owner_name : $this->proprio)."'";
$sql .= ",domiciliation='".$this->db->escape($this->address)."'";
$sql .= ",proprio = '".$this->db->escape($this->owner_name)."'";
$sql .= ",owner_address = '".$this->db->escape($this->owner_address)."'";
$sql .= ",owner_zip = '".$this->db->escape($this->owner_zip)."'";
$sql .= ",owner_town = '".$this->db->escape($this->owner_town)."'";
@ -1108,7 +1099,7 @@ class Account extends CommonObject
$this->courant = $obj->type;
$this->bank = $obj->bank;
$this->clos = $obj->status;
$this->status = $obj->status;
$this->status = $obj->status;
$this->rappro = $obj->rappro;
$this->url = $obj->url;
@ -1118,16 +1109,17 @@ class Account extends CommonObject
$this->cle_rib = $obj->cle_rib;
$this->bic = $obj->bic;
$this->iban = $obj->iban;
$this->domiciliation = $obj->address;
$this->address = $obj->address;
$this->pti_in_ctti = $obj->pti_in_ctti;
$this->proprio = $obj->owner_name;
$this->owner_name = $obj->owner_name;
$this->proprio = $this->owner_name;
$this->owner_address = $obj->owner_address;
$this->owner_zip = $obj->owner_zip;
$this->owner_town = $obj->owner_town;
$this->owner_country_id = $obj->owner_country_id;
$this->pti_in_ctti = $obj->pti_in_ctti;
$this->state_id = $obj->state_id;
$this->state_code = $obj->state_code;
$this->state = $obj->state;
@ -1961,7 +1953,6 @@ class Account extends CommonObject
$this->bank = 'MyBank';
$this->address = 'Rue de Paris';
$this->proprio = 'Owner';
$this->owner_name = 'Owner';
$this->owner_address = 'Owner address';
$this->owner_zip = 'Owner zip';

View File

@ -1458,7 +1458,7 @@ class BonPrelevement extends CommonObject
$this->emetteur_ics = (($type == 'bank-transfer' && getDolGlobalString("SEPA_USE_IDS")) ? $account->ics_transfer : $account->ics); // Example "FR78ZZZ123456"
$this->raison_sociale = $account->proprio;
$this->raison_sociale = $account->owner_name;
}
$this->factures = $factures_prev_id;
$this->context['factures_prev'] = $factures_prev;
@ -2533,7 +2533,7 @@ class BonPrelevement extends CommonObject
$this->emetteur_ics = (($type == 'bank-transfer' && getDolGlobalString("SEPA_USE_IDS")) ? $account->ics_transfer : $account->ics); // Ex: PRELEVEMENT_ICS = "FR78ZZZ123456";
$this->raison_sociale = $account->proprio;
$this->raison_sociale = $account->owner_name;
}
// Get pending payments

View File

@ -760,7 +760,7 @@ abstract class CommonDocGenerator
$resarray[$array_key.'_bank_bic'] = (empty($bank_account) ? '' : $bank_account->bic);
$resarray[$array_key.'_bank_label'] = (empty($bank_account) ? '' : $bank_account->label);
$resarray[$array_key.'_bank_number'] = (empty($bank_account) ? '' : $bank_account->number);
$resarray[$array_key.'_bank_proprio'] = (empty($bank_account) ? '' : $bank_account->proprio);
$resarray[$array_key.'_bank_proprio'] = (empty($bank_account) ? '' : $bank_account->owner_name);
$resarray[$array_key.'_bank_address'] = (empty($bank_account) ? '' : $bank_account->address);
$resarray[$array_key.'_bank_state'] = (empty($bank_account) ? '' : $bank_account->state);
$resarray[$array_key.'_bank_country'] = (empty($bank_account) ? '' : $bank_account->country);

View File

@ -1884,7 +1884,7 @@ abstract class CommonInvoice extends CommonObject
// If a bank account is provided and we ask to use it as creditor, we use the bank address
// TODO In a future, we may always use this address, and if name/address/zip/town/country differs from $mysoc, we can use the address of $mysoc into the final seller field ?
$s .= "S\n";
$s .= dol_trunc($bankaccount->proprio, 70, 'right', 'UTF-8', 1)."\n";
$s .= dol_trunc($bankaccount->owner_name, 70, 'right', 'UTF-8', 1)."\n";
$addresslinearray = explode("\n", $bankaccount->owner_address);
$s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1)."\n"; // address line 1
$s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1)."\n"; // address line 2

View File

@ -951,9 +951,9 @@ function pdf_bank(&$pdf, $outputlangs, $curx, $cury, $account, $onlynumber = 0,
$pdf->SetFont('', '', $default_font_size - $diffsizecontent);
if (empty($onlynumber) && (!empty($account->domiciliation) || !empty($account->address))) {
if (empty($onlynumber) && !empty($account->address)) {
$pdf->SetXY($curx, $cury);
$val = $outputlangs->transnoentities("Residence").': '.$outputlangs->convToOutputCharset(empty($account->address) ? $account->domiciliation : $account->address);
$val = $outputlangs->transnoentities("Residence").': '.$outputlangs->convToOutputCharset($account->address);
$pdf->MultiCell(100, 3, $val, 0, 'L', 0);
//$nboflines=dol_nboflines_bis($val,120);
//$cury+=($nboflines*3)+2;

View File

@ -34,7 +34,7 @@
* @param string $chain string to encode
* @param string $key rule to use for delta ('0', '1' or 'myownkey')
* @return string encoded string
* @see dol_decode()
* @see dol_decode(), dolEncrypt()
*/
function dol_encode($chain, $key = '1')
{
@ -65,7 +65,7 @@ function dol_encode($chain, $key = '1')
* @param string $chain string to decode
* @param string $key rule to use for delta ('0', '1' or 'myownkey')
* @return string decoded string
* @see dol_encode()
* @see dol_encode(), dolDecrypt
*/
function dol_decode($chain, $key = '1')
{

View File

@ -1491,7 +1491,7 @@ class pdf_octopus extends ModelePDFFactures
$pdf->SetXY($this->marge_gauche, $posy);
$pdf->SetFont('', 'B', $default_font_size - $diffsizetitle);
$pdf->MultiCell($posxend - $this->marge_gauche, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo', $account->proprio), 0, 'L', 0);
$pdf->MultiCell($posxend - $this->marge_gauche, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo', $account->owner_name), 0, 'L', 0);
$posy = $pdf->GetY() + 1;
if (!getDolGlobalString('MAIN_PDF_HIDE_CHQ_ADDRESS')) {

View File

@ -708,21 +708,22 @@ if ($event->type == 'payout.created') {
if ($idthirdparty > 0) {
// If the payment mode attached is to a stripe account owned by an external customer in societe_account (so a thirdparty that has a Stripe account),
// we can create the payment mode
$companypaymentmode->stripe_card_ref = $db->escape($event->data->object->id);
$companypaymentmode->stripe_card_ref = $event->data->object->id;
$companypaymentmode->fk_soc = $idthirdparty;
$companypaymentmode->bank = null;
$companypaymentmode->label = '';
$companypaymentmode->number = $db->escape($event->data->object->id);
$companypaymentmode->last_four = $db->escape($event->data->object->card->last4);
$companypaymentmode->card_type = $db->escape($event->data->object->card->branding);
$companypaymentmode->proprio = $db->escape($event->data->object->billing_details->name);
$companypaymentmode->exp_date_month = $db->escape($event->data->object->card->exp_month);
$companypaymentmode->exp_date_year = $db->escape($event->data->object->card->exp_year);
$companypaymentmode->number = $event->data->object->id;
$companypaymentmode->last_four = $event->data->object->card->last4;
$companypaymentmode->card_type = $event->data->object->card->branding;
$companypaymentmode->owner_name = $event->data->object->billing_details->name;
$companypaymentmode->proprio = $companypaymentmode->owner_name; // We still need this formodulebuilder because name of field is "proprio"
$companypaymentmode->exp_date_month = $event->data->object->card->exp_month;
$companypaymentmode->exp_date_year = $event->data->object->card->exp_year;
$companypaymentmode->cvn = null;
$companypaymentmode->datec = $db->escape($event->data->object->created);
$companypaymentmode->datec = $event->data->object->created;
$companypaymentmode->default_rib = 0;
$companypaymentmode->type = $db->escape($event->data->object->type);
$companypaymentmode->country_code = $db->escape($event->data->object->card->country);
$companypaymentmode->type = $event->data->object->type;
$companypaymentmode->country_code = $event->data->object->card->country;
$companypaymentmode->status = $servicestatus;
// TODO Check that a payment mode $companypaymentmode->stripe_card_ref does not exists yet to avoid to create duplicates

View File

@ -390,9 +390,6 @@ class CompanyBankAccount extends Account
return -1;
}
if (!empty($this->domiciliation) && dol_strlen($this->domiciliation) > 255) {
$this->domiciliation = dol_trunc($this->domiciliation, 254, 'right', 'UTF-8', 1);
}
if (!empty($this->address) && dol_strlen($this->address) > 255) {
$this->address = dol_trunc($this->address, 254, 'right', 'UTF-8', 1);
}
@ -413,9 +410,9 @@ class CompanyBankAccount extends Account
$sql .= ",number='".$this->db->escape($this->number)."'";
$sql .= ",cle_rib='".$this->db->escape($this->cle_rib)."'";
$sql .= ",bic='".$this->db->escape($this->bic)."'";
$sql .= ",iban_prefix = '".$this->db->escape($this->iban)."'";
$sql .= ",domiciliation = '".$this->db->escape($this->address ? $this->address : $this->domiciliation)."'";
$sql .= ",proprio = '".$this->db->escape($this->proprio)."'";
$sql .= ",iban_prefix = '".$this->db->escape(dolEncrypt($this->iban))."'";
$sql .= ",domiciliation = '".$this->db->escape($this->address)."'";
$sql .= ",proprio = '".$this->db->escape($this->owner_name)."'";
$sql .= ",owner_address = '".$this->db->escape($this->owner_address)."'";
$sql .= ",default_rib = ".((int) $this->default_rib);
if (isModEnabled('prelevement')) {
@ -517,11 +514,10 @@ class CompanyBankAccount extends Account
$this->bic = $obj->bic;
$this->iban = $obj->iban;
$this->domiciliation = $obj->address;
$this->address = $obj->address;
$this->owner_name = $obj->owner_name;
$this->proprio = $obj->owner_name;
$this->owner_name = $obj->owner_name;
$this->owner_address = $obj->owner_address;
$this->label = $obj->label;
$this->default_rib = $obj->default_rib;

View File

@ -150,9 +150,16 @@ class CompanyPaymentMode extends CommonObject
* @var string
*/
public $iban_prefix;
/** @deprecated Use address */
public $domiciliation;
public $address;
/** @deprecated Use owner_name*/
public $proprio;
public $owner_name;
public $owner_address;
public $default_rib;
public $rum;
public $date_rum;

View File

@ -184,7 +184,6 @@ if (empty($reshook)) {
$companybankaccount->iban = GETPOST('iban', 'alpha');
$companybankaccount->address = GETPOST('address', 'alpha');
$companybankaccount->domiciliation = $companybankaccount->address;
$companybankaccount->owner_name = GETPOST('proprio', 'alpha');
$companybankaccount->proprio = $companybankaccount->owner_name;
@ -254,7 +253,8 @@ if (empty($reshook)) {
$companypaymentmode->label = GETPOST('label', 'alpha');
$companypaymentmode->number = GETPOST('cardnumber', 'alpha');
$companypaymentmode->last_four = substr(GETPOST('cardnumber', 'alpha'), -4);
$companypaymentmode->proprio = GETPOST('proprio', 'alpha');
$companypaymentmode->owner_name = GETPOST('proprio', 'alpha');
$companypaymentmode->proprio = $companypaymentmode->owner_name;
$companypaymentmode->exp_date_month = GETPOSTINT('exp_date_month');
$companypaymentmode->exp_date_year = GETPOSTINT('exp_date_year');
$companypaymentmode->cvn = GETPOST('cvn', 'alpha');
@ -315,10 +315,10 @@ if (empty($reshook)) {
$companybankaccount->bic = GETPOST('bic', 'alpha');
$companybankaccount->iban = GETPOST('iban', 'alpha');
$companybankaccount->domiciliation = GETPOST('address', 'alpha');
$companybankaccount->address = GETPOST('address', 'alpha');
$companybankaccount->proprio = GETPOST('proprio', 'alpha');
$companybankaccount->owner_name = GETPOST('proprio', 'alpha');
$companybankaccount->proprio = $companybankaccount->owner_name;
$companybankaccount->owner_address = GETPOST('owner_address', 'alpha');
$companybankaccount->frstrecur = GETPOST('frstrecur', 'alpha');
$companybankaccount->rum = GETPOST('rum', 'alpha');
@ -1276,8 +1276,8 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
print '</td>';
// Information (Owner, ...)
print '<td class="minwidth100">';
if ($companypaymentmodetemp->proprio) {
print '<span class="opacitymedium">'.$companypaymentmodetemp->proprio.'</span><br>';
if ($companypaymentmodetemp->owner_name) {
print '<span class="opacitymedium">'.$companypaymentmodetemp->owner_name.'</span><br>';
}
if ($companypaymentmodetemp->last_four) {
print '....'.$companypaymentmodetemp->last_four;
@ -1819,28 +1819,28 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
print '<td>';
print'</td>';
// Account number
print '<td valign="middle">';
print '<td>';
print '</td>';
// IBAN
print '<td valign="middle">';
print '<td>';
//var_dump($src);
print '</td>';
// BIC
print '<td valign="middle">';
print '<td>';
//var_dump($src);
print '</td>';
if (isModEnabled('prelevement')) {
// RUM
print '<td valign="middle">';
print '<td>';
//var_dump($src);
print '</td>';
// Date
print '<td valign="middle">';
print '<td>';
//var_dump($src);
print '</td>';
// Mode mandate
print '<td valign="middle">';
print '<td>';
//var_dump($src);
print '</td>';
}
@ -1889,6 +1889,9 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard'
if (isModEnabled('prelevement')) {
$colspan += 3;
}
if (!getDolGlobalInt('SOCIETE_DISABLE_BANKACCOUNT') && getDolGlobalInt("SOCIETE_RIB_ALLOW_ONLINESIGN")) {
$colspan++;
}
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoBANRecord").'</span></td></tr>';
}
@ -2111,7 +2114,7 @@ if ($socid && $action == 'editcard' && $permissiontoaddupdatepaymentinformation)
print '<td><input class="minwidth300" type="text" id="label" name="label" value="'.$companypaymentmode->label.'"></td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans("NameOnCard").'</td>';
print '<td><input class="minwidth200" type="text" name="proprio" value="'.$companypaymentmode->proprio.'"></td></tr>';
print '<td><input class="minwidth200" type="text" name="proprio" value="'.$companypaymentmode->owner_name.'"></td></tr>';
print '<tr><td>'.$langs->trans("CardNumber").'</td>';
print '<td><input class="minwidth200" type="text" name="cardnumber" value="'.$companypaymentmode->number.'"></td></tr>';

View File

@ -845,7 +845,7 @@ class Stripe extends CommonObject
$card = null;
$sql = "SELECT sa.stripe_card_ref, sa.proprio, sa.exp_date_month, sa.exp_date_year, sa.number, sa.cvn"; // stripe_card_ref is card_....
$sql = "SELECT sa.stripe_card_ref, sa.proprio as owner_name, sa.exp_date_month, sa.exp_date_year, sa.number, sa.cvn"; // stripe_card_ref is card_....
$sql .= " FROM ".MAIN_DB_PREFIX."societe_rib as sa";
$sql .= " WHERE sa.rowid = ".((int) $object->id); // We get record from ID, no need for filter on entity
$sql .= " AND sa.type = 'card'";
@ -885,7 +885,7 @@ class Stripe extends CommonObject
$exp_date_year = $obj->exp_date_year;
$number = $obj->number;
$cvc = $obj->cvn; // cvn in database, cvc for stripe
$cardholdername = $obj->proprio;
$cardholdername = $obj->owner_name;
$ipaddress = getUserRemoteIP();

View File

@ -130,10 +130,10 @@ if ($action == 'add' && !$cancel && $permissiontoaddbankaccount) {
$account->cle_rib = GETPOST('cle_rib', 'alpha');
$account->bic = GETPOST('bic', 'alpha');
$account->iban = GETPOST('iban', 'alpha');
$account->domiciliation = GETPOST('address', 'alpha');
$account->address = GETPOST('address', 'alpha');
$account->owner_name = GETPOST('proprio', 'alpha');
$account->proprio = $account->owner_name;
$account->owner_name = GETPOST('proprio', 'alpha');
$account->proprio = $account->owner_name;
$account->owner_address = GETPOST('owner_address', 'alpha');
$account->currency_code = trim(GETPOST("account_currency_code"));
@ -163,9 +163,9 @@ if ($action == 'update' && !$cancel && $permissiontoaddbankaccount) {
$account->cle_rib = GETPOST('cle_rib', 'alpha');
$account->bic = GETPOST('bic', 'alpha');
$account->iban = GETPOST('iban', 'alpha');
$account->domiciliation = GETPOST('address', 'alpha');
$account->address = GETPOST('address', 'alpha');
$account->proprio = GETPOST('proprio', 'alpha');
$account->owner_name = GETPOST('proprio', 'alpha');
$account->proprio = $account->owner_name;
$account->owner_address = GETPOST('owner_address', 'alpha');
$account->currency_code = trim(GETPOST("account_currency_code"));
@ -1018,7 +1018,7 @@ if ($id && ($action == 'edit' || $action == 'create') && $permissiontoaddbankacc
print "</textarea></td></tr>";
print '<tr><td>'.$langs->trans("BankAccountOwner").'</td>';
print '<td colspan="4"><input size="30" type="text" name="proprio" value="'.$account->proprio.'"></td></tr>';
print '<td colspan="4"><input size="30" type="text" name="proprio" value="'.$account->owner_name.'"></td></tr>';
print "</td></tr>\n";
print '<tr><td class="tdtop">'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="4">';

View File

@ -137,8 +137,8 @@ class UserBankAccount extends Account
$sql .= ",cle_rib='".$this->db->escape($this->cle_rib)."'";
$sql .= ",bic='".$this->db->escape($this->bic)."'";
$sql .= ",iban_prefix = '".$this->db->escape($this->iban)."'";
$sql .= ",domiciliation='".$this->db->escape($this->address ? $this->address : $this->domiciliation)."'";
$sql .= ",proprio = '".$this->db->escape($this->proprio)."'";
$sql .= ",domiciliation='".$this->db->escape($this->address)."'";
$sql .= ",proprio = '".$this->db->escape($this->owner_name)."'";
$sql .= ",owner_address = '".$this->db->escape($this->owner_address)."'";
$sql .= ",currency_code = '".$this->db->escape($this->currency_code)."'";
$sql .= ",state_id = ".($this->state_id > 0 ? ((int) $this->state_id) : "null");
@ -227,12 +227,12 @@ class UserBankAccount extends Account
$this->courant = self::TYPE_CURRENT;
$this->type = self::TYPE_CURRENT;
$this->domiciliation = $obj->address;
$this->address = $obj->address;
$this->proprio = $obj->owner_name;
$this->owner_name = $obj->owner_name;
$this->proprio = $obj->owner_name;
$this->owner_address = $obj->owner_address;
$this->label = $obj->label;
$this->datec = $this->db->jdate($obj->datec);
$this->datem = $this->db->jdate($obj->datem);