New: IBAN value is called IFSC if country is India
This commit is contained in:
parent
a8928461f3
commit
a35ed5d756
@ -36,6 +36,7 @@ For users:
|
|||||||
- New: Can now send supplier order by mail.
|
- New: Can now send supplier order by mail.
|
||||||
- New: task #10076 : Show content of message in notification module.
|
- New: task #10076 : Show content of message in notification module.
|
||||||
- New: Bank name available on invoice.
|
- New: Bank name available on invoice.
|
||||||
|
- New: IBAN value is called IFSC if country is India
|
||||||
- Fix: Debug experimental module widthrawal.
|
- Fix: Debug experimental module widthrawal.
|
||||||
- Fix: Format number was wrong for ar_AR language.
|
- Fix: Format number was wrong for ar_AR language.
|
||||||
- Fix: Can change password if has only permission change password.
|
- Fix: Can change password if has only permission change password.
|
||||||
|
|||||||
@ -199,6 +199,10 @@ if (($_GET["id"] || $_GET["ref"]) && $_GET["action"] != 'edit')
|
|||||||
print '<tr><td valign="top">'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="3">';
|
print '<tr><td valign="top">'.$langs->trans("BankAccountOwnerAddress").'</td><td colspan="3">';
|
||||||
print nl2br($account->adresse_proprio);
|
print nl2br($account->adresse_proprio);
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
|
print '<tr><td valign="top">'.$langs->trans("CountryCode").'</td><td colspan="3">';
|
||||||
|
print $account->getCountryCode();
|
||||||
|
print "</td></tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
@ -232,7 +236,7 @@ if ($_GET["id"] && $_GET["action"] == 'edit' && $user->rights->banque->configure
|
|||||||
$account = new Account($db, $_GET["id"]);
|
$account = new Account($db, $_GET["id"]);
|
||||||
$account->fetch($_GET["id"]);
|
$account->fetch($_GET["id"]);
|
||||||
|
|
||||||
print_titre($langs->trans("EditFinancialAccount"));
|
print_fiche_titre($langs->trans("EditFinancialAccount"));
|
||||||
print "<br>";
|
print "<br>";
|
||||||
|
|
||||||
if ($message) { print "$message<br>\n"; }
|
if ($message) { print "$message<br>\n"; }
|
||||||
|
|||||||
@ -824,7 +824,7 @@ class Account extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* \brief Return account country code
|
* \brief Return account country code
|
||||||
* \return String country code
|
* \return String country code
|
||||||
* TODO Add a field in bank_account table to store country
|
* TODO Manage field with country in bank_account
|
||||||
*/
|
*/
|
||||||
function getCountryCode()
|
function getCountryCode()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -11,6 +11,7 @@
|
|||||||
-- V4.1 UPDATE llx_projet_task set fk_user_creat=NULL WHERE fk_user_creat IS NOT NULL AND fk_user_creat NOT IN (SELECT rowid from llx_user);
|
-- V4.1 UPDATE llx_projet_task set fk_user_creat=NULL WHERE fk_user_creat IS NOT NULL AND fk_user_creat NOT IN (SELECT rowid from llx_user);
|
||||||
-- V4.1 UPDATE llx_projet_task set fk_user_valid=NULL WHERE fk_user_valid IS NOT NULL AND fk_user_valid NOT IN (SELECT rowid from llx_user);
|
-- V4.1 UPDATE llx_projet_task set fk_user_valid=NULL WHERE fk_user_valid IS NOT NULL AND fk_user_valid NOT IN (SELECT rowid from llx_user);
|
||||||
|
|
||||||
|
ALTER table llx_bank_account ADD COLUMN fk_pays integer DEFAULT 0 after domiciliation;
|
||||||
|
|
||||||
ALTER TABLE llx_socpeople ADD COLUMN fk_departement integer DEFAULT NULL after ville;
|
ALTER TABLE llx_socpeople ADD COLUMN fk_departement integer DEFAULT NULL after ville;
|
||||||
ALTER TABLE llx_adherent ADD COLUMN fk_departement integer DEFAULT NULL after ville;
|
ALTER TABLE llx_adherent ADD COLUMN fk_departement integer DEFAULT NULL after ville;
|
||||||
|
|||||||
@ -38,9 +38,10 @@ create table llx_bank_account
|
|||||||
cle_rib varchar(5),
|
cle_rib varchar(5),
|
||||||
bic varchar(11),
|
bic varchar(11),
|
||||||
iban_prefix varchar(34), -- 34 according to ISO 13616
|
iban_prefix varchar(34), -- 34 according to ISO 13616
|
||||||
country_iban varchar(2),
|
country_iban varchar(2), -- deprecated
|
||||||
cle_iban varchar(2),
|
cle_iban varchar(2),
|
||||||
domiciliation varchar(255),
|
domiciliation varchar(255),
|
||||||
|
fk_pays integer DEFAULT 0,
|
||||||
proprio varchar(60),
|
proprio varchar(60),
|
||||||
adresse_proprio varchar(255),
|
adresse_proprio varchar(255),
|
||||||
courant smallint DEFAULT 0 NOT NULL,
|
courant smallint DEFAULT 0 NOT NULL,
|
||||||
|
|||||||
@ -122,6 +122,8 @@ function pdf_pagehead(&$pdf,$outputlangs,$page_height)
|
|||||||
*/
|
*/
|
||||||
function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account)
|
function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account)
|
||||||
{
|
{
|
||||||
|
global $mysoc;
|
||||||
|
|
||||||
$pdf->SetXY ($curx, $cury);
|
$pdf->SetXY ($curx, $cury);
|
||||||
$pdf->SetFont('Arial','B',8);
|
$pdf->SetFont('Arial','B',8);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByTransferOnThisBankAccount').':', 0, 'L', 0);
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByTransferOnThisBankAccount').':', 0, 'L', 0);
|
||||||
@ -129,6 +131,7 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account)
|
|||||||
|
|
||||||
$outputlangs->load("banks");
|
$outputlangs->load("banks");
|
||||||
|
|
||||||
|
// Get format of bank id according to country of $account
|
||||||
$usedetailedbban=$account->useDetailedBBAN();
|
$usedetailedbban=$account->useDetailedBBAN();
|
||||||
|
|
||||||
if ($usedetailedbban)
|
if ($usedetailedbban)
|
||||||
@ -176,13 +179,19 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account)
|
|||||||
$cury-=9;
|
$cury-=9;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Use correct name of bank id according to country
|
||||||
|
$ibankey="IBANNumber";
|
||||||
|
$bickey="BICNumber";
|
||||||
|
if ($account->getCountryCode() == 'IN') $ibankey="IFSC";
|
||||||
|
if ($account->getCountryCode() == 'IN') $bickey="SWIFT";
|
||||||
|
|
||||||
$pdf->SetFont('Arial','',6);
|
$pdf->SetFont('Arial','',6);
|
||||||
$pdf->SetXY ($curx, $cury+12);
|
$pdf->SetXY ($curx, $cury+12);
|
||||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("Residence").': ' . $outputlangs->convToOutputCharset($account->domiciliation), 0, 'L', 0);
|
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("Residence").': ' . $outputlangs->convToOutputCharset($account->domiciliation), 0, 'L', 0);
|
||||||
$pdf->SetXY ($curx, $cury+22);
|
$pdf->SetXY ($curx, $cury+22);
|
||||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("IBANNumber").': ' . $outputlangs->convToOutputCharset($account->iban), 0, 'L', 0);
|
$pdf->MultiCell(90, 3, $outputlangs->transnoentities($ibankey).': ' . $outputlangs->convToOutputCharset($account->iban), 0, 'L', 0);
|
||||||
$pdf->SetXY ($curx, $cury+25);
|
$pdf->SetXY ($curx, $cury+25);
|
||||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("BICNumber").': ' . $outputlangs->convToOutputCharset($account->bic), 0, 'L', 0);
|
$pdf->MultiCell(90, 3, $outputlangs->transnoentities($bickey).': ' . $outputlangs->convToOutputCharset($account->bic), 0, 'L', 0);
|
||||||
|
|
||||||
return $pdf->getY();
|
return $pdf->getY();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user