NEW Add more zip, town, country for owner of a bank account

This commit is contained in:
Laurent Destailleur 2023-02-02 14:56:03 +01:00
parent fc64d78247
commit 1be5145148
7 changed files with 148 additions and 53 deletions

View File

@ -22,8 +22,8 @@ https://www.tecklenborgh.com/post/ksa-zatca-publishes-guide-on-how-to-develop-a-
Method to encode/decode ZATCA string is available in test/phpunit/BarcodeTest.php
* FOR QR-Bill in switzerland
----------------------------
* FOR QR-Bill in switzerland - Facture-QR
-----------------------------------------
Syntax of QR Code https://www.swiss-qr-invoice.org/fr/
Syntax of complentary field named "structured information of invoice S1": https://www.swiss-qr-invoice.org/downloads/qr-bill-s1-syntax-fr.pdf
To test/validate: https://www.swiss-qr-invoice.org/validator/

View File

@ -51,7 +51,7 @@ if (isModEnabled('accounting')) {
}
// Load translation files required by the page
$langs->loadLangs(array("banks", "bills", "categories", "companies", "compta"));
$langs->loadLangs(array("banks", "bills", "categories", "companies", "compta", "withdrawals"));
$action = GETPOST('action', 'aZ09');
$cancel = GETPOST('cancel', 'alpha');
@ -140,6 +140,9 @@ if (empty($reshook)) {
$object->proprio = trim(GETPOST("proprio", 'alphanohtml'));
$object->owner_address = trim(GETPOST("owner_address", 'alphanohtml'));
$object->owner_zip = trim(GETPOST("owner_zip", 'alphanohtml'));
$object->owner_town = trim(GETPOST("owner_town", 'alphanohtml'));
$object->owner_country_id = GETPOST("owner_country_id", 'int');
$object->ics = trim(GETPOST("ics", 'alpha'));
$object->ics_transfer = trim(GETPOST("ics_transfer", 'alpha'));
@ -241,6 +244,9 @@ if (empty($reshook)) {
$object->proprio = trim(GETPOST("proprio", 'alphanohtml'));
$object->owner_address = trim(GETPOST("owner_address", 'alphanohtml'));
$object->owner_zip = trim(GETPOST("owner_zip", 'alphanohtml'));
$object->owner_town = trim(GETPOST("owner_town", 'alphanohtml'));
$object->owner_country_id = GETPOST("owner_country_id", 'int');
$object->ics = trim(GETPOST("ics", 'alpha'));
$object->ics_transfer = trim(GETPOST("ics_transfer", 'alpha'));
@ -422,7 +428,8 @@ if ($action == 'create') {
print '<tr><td class="fieldrequired">'.$langs->trans("BankAccountCountry").'</td>';
print '<td>';
print img_picto('', 'country', 'class="pictofixedwidth"').$form->select_country($selectedcode, 'account_country_id');
print img_picto('', 'country', 'class="pictofixedwidth"');
print $form->select_country($selectedcode, 'account_country_id');
if ($user->admin) {
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
}
@ -438,6 +445,14 @@ if ($action == 'create') {
}
print '</td></tr>';
$type = (GETPOSTISSET("type") ? GETPOST('type', 'int') : Account::TYPE_CURRENT); // add default value
if ($type == Account::TYPE_SAVINGS || $type == Account::TYPE_CURRENT) {
print '<tr><td>'.$langs->trans("BankAccountDomiciliation").'</td><td>';
print '<textarea class="flat quatrevingtpercent" name="domiciliation" rows="'.ROWS_2.'">';
print (GETPOSTISSET('domiciliation') ?GETPOST('domiciliation') : $object->domiciliation);
print "</textarea></td></tr>";
}
// Web
print '<tr><td>'.$langs->trans("Web").'</td>';
print '<td>';
@ -552,18 +567,15 @@ if ($action == 'create') {
print '<td><input maxlength="11" type="text" class="flat minwidth150" name="bic" value="'.(GETPOSTISSET('bic') ?GETPOST('bic', 'alpha') : $object->bic).'"></td></tr>';
if (isModEnabled('paymentbybanktransfer')) {
print '<tr><td>'.$langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformation").'</td>';
print '<td><input type="checkbox" class="flat minwidth150" name="pti_in_ctti"'. (empty(GETPOST('pti_in_ctti')) ? '' : ' checked ') . '>&nbsp;';
print img_picto($langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformationHelp"), 'info');
print '<tr><td>'.$form->textwithpicto($langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformation"), $langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformationHelp")).'</td>';
print '<td><input type="checkbox" class="flat" name="pti_in_ctti"'. (empty(GETPOST('pti_in_ctti')) ? '' : ' checked ') . '>';
print '</td></tr>';
}
print '</table>';
print '<hr>';
print '<tr><td>'.$langs->trans("BankAccountDomiciliation").'</td><td>';
print '<textarea class="flat quatrevingtpercent" name="domiciliation" rows="'.ROWS_2.'">';
print (GETPOSTISSET('domiciliation') ?GETPOST('domiciliation') : $object->domiciliation);
print "</textarea></td></tr>";
print '<tr><td>'.$langs->trans("BankAccountOwner").'</td>';
print '<table class="border centpercent">';
print '<tr><td class="titlefieldcreate">'.$langs->trans("BankAccountOwner").'</td>';
print '<td><input type="text" class="flat minwidth300" name="proprio" value="'.(GETPOST('proprio') ?GETPOST('proprio', 'alpha') : $object->proprio).'">';
print '</td></tr>';
@ -572,8 +584,22 @@ if ($action == 'create') {
print (GETPOST('owner_address') ?GETPOST('owner_address', 'alpha') : $object->owner_address);
print "</textarea></td></tr>";
print '<tr><td class="tdtop">'.$langs->trans("BankAccountOwnerZip").'</td>';
print '<td><input type="text" class="flat maxwidth100" name="owner_zip" value="'.(GETPOST('owner_zip') ?GETPOST('owner_zip', 'alpha') : $object->owner_zip).'">';
print '</td></tr>';
print '<tr><td class="tdtop">'.$langs->trans("BankAccountOwnerTown").'</td>';
print '<td><input type="text" class="flat maxwidth200" name="owner_town" value="'.(GETPOST('owner_town') ?GETPOST('owner_town', 'alpha') : $object->owner_town).'">';
print '</td></tr>';
print '<tr><td class="tdtop">'.$langs->trans("BankAccountOwnerCountry").'</td>';
print '<td>';
print img_picto('', 'country', 'class="pictofixedwidth"');
print $form->select_country(GETPOST('owner_country_id') ?GETPOST('owner_country_id', 'alpha') : $object->owner_country_id, 'owner_country_id');
print '</td></tr>';
print '</table>';
print '<br>';
print '<hr>';
}
print '<table class="border centpercent">';
@ -722,8 +748,6 @@ if ($action == 'create') {
print '</table>';
if ($object->type == Account::TYPE_SAVINGS || $object->type == Account::TYPE_CURRENT) {
//print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield centpercent">';
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("BankName").'</td>';
@ -787,16 +811,11 @@ if ($action == 'create') {
print '<td>'.$object->ics_transfer.'</td>';
print '</tr>';
print '<tr><td>'.$langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformation").'</td><td>';
print (empty($object->pti_in_ctti) ? $langs->trans("No") : $langs->trans("Yes")) . '&nbsp;';
print img_picto($langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformationHelp"), 'info');
print '<tr><td>'.$form->textwithpicto($langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformation"), $langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformationHelp")).'</td><td>';
print (empty($object->pti_in_ctti) ? $langs->trans("No") : $langs->trans("Yes"));
print "</td></tr>\n";
}
print '<tr><td>'.$langs->trans("BankAccountDomiciliation").'</td><td>';
print nl2br($object->domiciliation);
print "</td></tr>\n";
print '<tr><td>'.$langs->trans("BankAccountOwner").'</td><td>';
print $object->proprio;
print "</td></tr>\n";
@ -805,6 +824,22 @@ if ($action == 'create') {
print nl2br($object->owner_address);
print "</td></tr>\n";
print '<tr><td class="tdtop">'.$langs->trans("BankAccountOwnerZip").'</td>';
print '<td>'.$object->owner_zip;
print '</td></tr>';
print '<tr><td class="tdtop">'.$langs->trans("BankAccountOwnerTown").'</td>';
print '<td>'.$object->owner_town;
print '</td></tr>';
print '<tr><td class="tdtop">'.$langs->trans("BankAccountOwnerCountry").'</td>';
print '<td>';
$object->owner_country_code = dol_getIdFromCode($db, $object->owner_country_id, 'c_country', 'rowid', 'code');
$langs->load("dict");
print (empty($object->owner_country_code) ? '' : $langs->convToOutputCharset($langs->transnoentitiesnoconv("Country".$object->owner_country_code)));
print '</td></tr>';
print '</table>';
}
@ -933,6 +968,14 @@ if ($action == 'create') {
}
print '</td></tr>';
$type = (GETPOSTISSET('type') ? GETPOST('type', 'int') : $object->type); // add default current value
if ($type == Account::TYPE_SAVINGS || $type == Account::TYPE_CURRENT) {
print '<tr><td>'.$langs->trans("BankAccountDomiciliation").'</td><td>';
print '<textarea class="flat quatrevingtpercent" name="domiciliation" rows="'.ROWS_2.'">';
print $object->domiciliation;
print "</textarea></td></tr>";
}
// Conciliable
print '<tr><td>'.$langs->trans("Conciliable").'</td>';
print '<td>';
@ -942,7 +985,7 @@ if ($action == 'create') {
} elseif ($conciliate == -3) {
print $langs->trans("No").' ('.$langs->trans("Closed").')';
} else {
print '<input type="checkbox" class="flat" id="norappro" name="norappro"'.(($conciliate > 0) ? '' : ' checked="checked"').'"> <label for="norappro">'.$langs->trans("DisableConciliation").'</label>';
print '<input type="checkbox" class="flat" id="norappro" name="norappro"'.(($conciliate > 0) ? '' : ' checked="checked"').'"> <label for="norappro" class="opacitymedium">'.$langs->trans("DisableConciliation").'</label>';
}
print '</td></tr>';
@ -993,7 +1036,7 @@ if ($action == 'create') {
}
print '</table>';
print '<br>';
print '<hr>';
//print '<div class="underbanner clearboth"></div>';
@ -1030,8 +1073,6 @@ if ($action == 'create') {
if ($type == Account::TYPE_SAVINGS || $type == Account::TYPE_CURRENT) {
print '<br>';
//print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent">';
// If bank account
@ -1087,26 +1128,39 @@ if ($action == 'create') {
print '<tr><td>'.$form->textwithpicto($langs->trans("IDS"), $langs->trans("IDS").' ('.$langs->trans("UsedFor", $langs->transnoentitiesnoconv("BankTransfer")).')').'</td>';
print '<td><input class="minwidth150 maxwidth200onsmartphone" maxlength="32" type="text" class="flat" name="ics_transfer" value="'.(GETPOSTISSET('ics_transfer') ? GETPOST('ics_transfer', 'alphanohtml') : $object->ics_transfer).'"></td></tr>';
print '<tr><td>'.$langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformation").'</td>';
print '<td><input type="checkbox" class="flat minwidth150" name="pti_in_ctti"'. ($object->pti_in_ctti ? ' checked ' : '') . '>&nbsp;';
print img_picto($langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformationHelp"), 'info');
print '<tr><td>'.$form->textwithpicto($langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformation"), $langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformationHelp")).'</td>';
print '<td><input type="checkbox" class="flat" name="pti_in_ctti"'. ($object->pti_in_ctti ? ' checked ' : '') . '>';
print '</td></tr>';
}
print '<tr><td>'.$langs->trans("BankAccountDomiciliation").'</td><td>';
print '<textarea class="flat quatrevingtpercent" name="domiciliation" rows="'.ROWS_2.'">';
print $object->domiciliation;
print "</textarea></td></tr>";
print '<tr><td>'.$langs->trans("BankAccountOwner").'</td>';
print '<td><input class="maxwidth200onsmartphone" type="text" class="flat" name="proprio" value="'.$object->proprio.'"></td>';
print '</tr>';
print '<tr><td>'.$langs->trans("BankAccountOwnerAddress").'</td><td>';
print '</table>';
print '<hr>';
print '<table class="border centpercent">';
print '<tr><td class="titlefieldcreate">'.$langs->trans("BankAccountOwnerAddress").'</td><td>';
print '<textarea class="flat quatrevingtpercent" name="owner_address" rows="'.ROWS_2.'">';
print $object->owner_address;
print "</textarea></td></tr>";
print '<tr><td class="tdtop">'.$langs->trans("BankAccountOwnerZip").'</td>';
print '<td><input type="text" class="flat maxwidth100" name="owner_zip" value="'.(GETPOST('owner_zip') ?GETPOST('owner_zip', 'alpha') : $object->owner_zip).'">';
print '</td></tr>';
print '<tr><td class="tdtop">'.$langs->trans("BankAccountOwnerTown").'</td>';
print '<td><input type="text" class="flat maxwidth200" name="owner_town" value="'.(GETPOST('owner_town') ?GETPOST('owner_town', 'alpha') : $object->owner_town).'">';
print '</td></tr>';
print '<tr><td class="tdtop">'.$langs->trans("BankAccountOwnerCountry").'</td>';
print '<td>';
print img_picto('', 'country', 'class="pictofixedwidth"');
print $form->select_country(GETPOST('owner_country_id') ?GETPOST('owner_country_id', 'alpha') : $object->owner_country_id, 'owner_country_id');
print '</td></tr>';
print '</table>';
}

View File

@ -146,12 +146,6 @@ class Account extends CommonObject
*/
public $iban_prefix;
/**
* Address of the bank
* @var string
*/
public $domiciliation;
/**
* XML SEPA format: place Payment Type Information (PmtTpInf) in Credit Transfer Transaction Information (CdtTrfTxInf)
* @var int
@ -169,7 +163,17 @@ class Account extends CommonObject
* @var string
*/
public $owner_address;
public $owner_zip;
public $owner_town;
public $owner_country_id;
public $owner_country_code;
/**
* Address of the bank account
* @var string
*/
public $domiciliation; // deprecated, use now address
public $address;
public $state_id;
public $state_code;
public $state;
@ -297,10 +301,13 @@ class Account extends CommonObject
'country_iban' =>array('type'=>'varchar(2)', 'label'=>'Country iban', 'enabled'=>1, 'visible'=>-1, 'position'=>75),
'cle_iban' =>array('type'=>'varchar(2)', 'label'=>'Cle iban', 'enabled'=>1, 'visible'=>-1, 'position'=>80),
'domiciliation' =>array('type'=>'varchar(255)', 'label'=>'Domiciliation', 'enabled'=>1, 'visible'=>-1, 'position'=>85),
'state_id' =>array('type'=>'integer', 'label'=>'State id', 'enabled'=>1, 'visible'=>-1, 'position'=>90),
'fk_pays' =>array('type'=>'integer', 'label'=>'Fk pays', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>95),
'state_id' =>array('type'=>'integer', 'label'=>'StateId', 'enabled'=>1, 'visible'=>-1, 'position'=>90),
'fk_pays' =>array('type'=>'integer', 'label'=>'Country', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>95),
'proprio' =>array('type'=>'varchar(60)', 'label'=>'Proprio', 'enabled'=>1, 'visible'=>-1, 'position'=>100),
'owner_address' =>array('type'=>'text', 'label'=>'Owner address', 'enabled'=>1, 'visible'=>-1, 'position'=>105),
'owner_address' =>array('type'=>'varchar(255)', 'label'=>'Owner address', 'enabled'=>1, 'visible'=>-1, 'position'=>105),
'owner_zip' =>array('type'=>'varchar(25)', 'label'=>'Owner zip', 'enabled'=>1, 'visible'=>-1, 'position'=>106),
'owner_town' =>array('type'=>'varchar(50)', 'label'=>'Owner town', 'enabled'=>1, 'visible'=>-1, 'position'=>107),
'owner_country_id' =>array('type'=>'integer', 'label'=>'Owner country', 'enabled'=>1, 'visible'=>-1, 'position'=>108),
'courant' =>array('type'=>'smallint(6)', 'label'=>'Courant', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>110),
'clos' =>array('type'=>'smallint(6)', 'label'=>'Clos', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>115),
'rappro' =>array('type'=>'smallint(6)', 'label'=>'Rappro', 'enabled'=>1, 'visible'=>-1, 'position'=>120),
@ -698,6 +705,9 @@ class Account extends CommonObject
$sql .= ", pti_in_ctti";
$sql .= ", proprio";
$sql .= ", owner_address";
$sql .= ", owner_zip";
$sql .= ", owner_town";
$sql .= ", owner_country_id";
$sql .= ", currency_code";
$sql .= ", rappro";
$sql .= ", min_allowed";
@ -713,7 +723,7 @@ class Account extends CommonObject
$sql .= ", '".$this->db->escape($this->label)."'";
$sql .= ", ".((int) $conf->entity);
$sql .= ", '".$this->db->escape($this->account_number)."'";
$sql .= ", ".($this->fk_accountancy_journal > 0 ? $this->db->escape($this->fk_accountancy_journal) : "null");
$sql .= ", ".($this->fk_accountancy_journal > 0 ? ((int) $this->fk_accountancy_journal) : "null");
$sql .= ", '".$this->db->escape($this->bank)."'";
$sql .= ", '".$this->db->escape($this->code_banque)."'";
$sql .= ", '".$this->db->escape($this->code_guichet)."'";
@ -725,6 +735,9 @@ class Account extends CommonObject
$sql .= ", ".((int) $this->pti_in_ctti);
$sql .= ", '".$this->db->escape($this->proprio)."'";
$sql .= ", '".$this->db->escape($this->owner_address)."'";
$sql .= ", '".$this->db->escape($this->owner_zip)."'";
$sql .= ", '".$this->db->escape($this->owner_town)."'";
$sql .= ", ".($this->owner_country_id > 0 ? ((int) $this->owner_country_id) : "null");
$sql .= ", '".$this->db->escape($this->currency_code)."'";
$sql .= ", ".((int) $this->rappro);
$sql .= ", ".price2num($this->min_allowed, 'MT');
@ -836,7 +849,7 @@ class Account extends CommonObject
$sql .= ",rappro = ".((int) $this->rappro);
$sql .= ",url = ".($this->url ? "'".$this->db->escape($this->url)."'" : "null");
$sql .= ",account_number = '".$this->db->escape($this->account_number)."'";
$sql .= ",fk_accountancy_journal = ".($this->fk_accountancy_journal > 0 ? $this->db->escape($this->fk_accountancy_journal) : "null");
$sql .= ",fk_accountancy_journal = ".($this->fk_accountancy_journal > 0 ? ((int) $this->fk_accountancy_journal) : "null");
$sql .= ",bank = '".$this->db->escape($this->bank)."'";
$sql .= ",code_banque='".$this->db->escape($this->code_banque)."'";
$sql .= ",code_guichet='".$this->db->escape($this->code_guichet)."'";
@ -848,6 +861,9 @@ class Account extends CommonObject
$sql .= ",pti_in_ctti=".((int) $this->pti_in_ctti);
$sql .= ",proprio = '".$this->db->escape($this->proprio)."'";
$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)."'";
$sql .= ",owner_country_id = ".($this->owner_country_id > 0 ? ((int) $this->owner_country_id) : "null");
$sql .= ",currency_code = '".$this->db->escape($this->currency_code)."'";
@ -931,6 +947,9 @@ class Account extends CommonObject
$sql .= ",domiciliation='".$this->db->escape($this->domiciliation)."'";
$sql .= ",proprio = '".$this->db->escape($this->proprio)."'";
$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)."'";
$sql .= ",owner_country_id = ".($this->owner_country_id > 0 ? ((int) $this->owner_country_id) : "null");
$sql .= ",state_id = ".($this->state_id > 0 ? $this->state_id : "null");
$sql .= ",fk_pays = ".($this->country_id > 0 ? $this->country_id : "null");
$sql .= " WHERE rowid = ".((int) $this->id);
@ -967,13 +986,13 @@ class Account extends CommonObject
$sql = "SELECT ba.rowid, ba.ref, ba.label, ba.bank, ba.number, ba.courant, ba.clos, ba.rappro, ba.url,";
$sql .= " ba.code_banque, ba.code_guichet, ba.cle_rib, ba.bic, ba.iban_prefix as iban,";
$sql .= " ba.domiciliation, ba.pti_in_ctti, ba.proprio, ba.owner_address, ba.state_id, ba.fk_pays as country_id,";
$sql .= " ba.domiciliation as address, ba.pti_in_ctti, ba.proprio, ba.owner_address, ba.owner_zip, ba.owner_town, ba.owner_country_id, ba.state_id, ba.fk_pays as country_id,";
$sql .= " ba.account_number, ba.fk_accountancy_journal, ba.currency_code,";
$sql .= " ba.min_allowed, ba.min_desired, ba.comment,";
$sql .= " ba.datec as date_creation, ba.tms as date_update, ba.ics, ba.ics_transfer,";
$sql .= ' c.code as country_code, c.label as country,';
$sql .= ' d.code_departement as state_code, d.nom as state';
$sql .= ' , aj.code as accountancy_journal';
$sql .= ' d.code_departement as state_code, d.nom as state,';
$sql .= ' aj.code as accountancy_journal';
$sql .= " FROM ".MAIN_DB_PREFIX."bank_account as ba";
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON ba.fk_pays = c.rowid';
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON ba.state_id = d.rowid';
@ -1009,10 +1028,14 @@ class Account extends CommonObject
$this->cle_rib = $obj->cle_rib;
$this->bic = $obj->bic;
$this->iban = $obj->iban;
$this->domiciliation = $obj->domiciliation;
$this->domiciliation = $obj->address;
$this->address = $obj->address;
$this->pti_in_ctti = $obj->pti_in_ctti;
$this->proprio = $obj->proprio;
$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->state_id = $obj->state_id;
$this->state_code = $obj->state_code;
@ -1723,6 +1746,9 @@ class Account extends CommonObject
$this->domiciliation = 'Banque de France';
$this->proprio = 'Owner';
$this->owner_address = 'Owner address';
$this->owner_zip = 'Owner zip';
$this->owner_town = 'Owner town';
$this->owner_country_id = 'Owner country_id';
$this->country_id = 1;
}

View File

@ -1735,15 +1735,17 @@ abstract class CommonInvoice extends CommonObject
$complementaryinfo .= '/30/'.$this->thirdparty->tva_intra;
}
$bankaccount = new Account($this->db);
// Header
$s = '';
$s .= "SPC\n";
$s .= "0200\n";
$s .= "1\n";
// Info seller
if ($this->fk_account > 0) {
// Bank BAN if country is LI or CH
// TODO Add
$bankaccount = new Account($this->db);
// TODO Add test on bank iban
$bankaccount->fetch($this->fk_account);
$s .= $bankaccount->iban."\n";
} else {

View File

@ -64,3 +64,10 @@ ALTER TABLE llx_website ADD COLUMN pageviews_previous_month BIGINT UNSIGNED DEFA
ALTER TABLE llx_product_stock ADD CONSTRAINT fk_product_product_rowid FOREIGN KEY (fk_product) REFERENCES llx_product (rowid);
ALTER TABLE llx_product_stock ADD CONSTRAINT fk_entrepot_entrepot_rowid FOREIGN KEY (fk_entrepot) REFERENCES llx_entrepot (rowid);
ALTER TABLE llx_bank_account ADD COLUMN owner_zip varchar(25);
ALTER TABLE llx_bank_account ADD COLUMN owner_town varchar(50);
ALTER TABLE llx_bank_account ADD COLUMN owner_country_id integer DEFAULT NULL;

View File

@ -47,6 +47,9 @@ create table llx_bank_account
fk_pays integer NOT NULL,
proprio varchar(60),
owner_address varchar(255),
owner_zip varchar(25),
owner_town varchar(50),
owner_country_id integer DEFAULT NULL,
courant smallint DEFAULT 0 NOT NULL,
clos smallint DEFAULT 0 NOT NULL,
rappro smallint DEFAULT 1,

View File

@ -49,6 +49,9 @@ BankAccountDomiciliation=Bank address
BankAccountCountry=Account country
BankAccountOwner=Account owner name
BankAccountOwnerAddress=Account owner address
BankAccountOwnerZip=Account owner zip
BankAccountOwnerTown=Account owner town
BankAccountOwnerCountry=Account owner country
CreateAccount=Create account
NewBankAccount=New account
NewFinancialAccount=New financial account