Third party banking information

Hi,

I am a new-bee on dolibarr which seems a promising CRM for small businesses. I have a difficult on showing customer IBAN number on their card (Bank account numer is shown). I changed the neccessary php code to show IBAN however i noticed global contants on the php code which is not in mysql databases.

BANK_SHOW_ORDER_OPTION is for what purpose and is it used in any part of the software ?

[code]
function getRibLabel($displayriblabel = true,$displayribiban = false )
{
global $langs,$conf;

	if ($this->code_banque || $this->code_guichet || $this->number || $this->cle_rib || $this->iban)
	{
        if ($this->label && $displayriblabel) $rib = $this->label." : ";
		if($this->iban && $displayribiban) {
			$rib.=$this->iban;
		}
		else {
		// Show fields of bank account
		$fieldlists='BankCode DeskCode AccountNumber BankAccountNumberKey';
		if (! empty($conf->global->BANK_SHOW_ORDER_OPTION))
		{
			if (is_numeric($conf->global->BANK_SHOW_ORDER_OPTION))
			{
				if ($conf->global->BANK_SHOW_ORDER_OPTION == '1') $fieldlists='BankCode DeskCode BankAccountNumberKey AccountNumber';
			}
			else $fieldlists=$conf->global->BANK_SHOW_ORDER_OPTION;
		}
		$fieldlistsarray=explode(' ',$fieldlists);

		foreach($fieldlistsarray as $val)
		{
			if ($val == 'BankCode')
			{
				if ($this->useDetailedBBAN()  == 1)
				{
					$rib.=$this->code_banque.' ';
				}
			}

			if ($val == 'DeskCode')
			{
				if ($this->useDetailedBBAN()  == 1)
				{
					$rib.=$this->code_guichet.' ';
				}
			}

			if ($val == 'BankCode')
			{
				if ($this->useDetailedBBAN()  == 2)
		        {
		            $rib.=$this->code_banque.' ';
		        }
			}

			if ($val == 'AccountNumber')
			{
				$rib.=$this->number.' ';
			}
			else if($val == "IBAN")
			{
				$rib.=$this->iban.' ';
			}

			if ($val == 'BankAccountNumberKey')
			{
				if ($this->useDetailedBBAN() == 1)
				{
					$rib.=$this->cle_rib.' ';
				}
			}
		}
	}
	}
	else
	{
		$rib='';
	}

	return $rib;
} [/code]

After a little bit of checking configuration of bank module, i have figured out that that part is used for regulation in Spanish banking system. The order of banking information is apperantly different in Spain.

Settings->modules->banking module->setup(right side of the line)

If you try to make some custom modification in php code, it will be helpful since dolibarr do not show IBAN and you may not find field for sub-branch code for bank accounts.

Anyway still it is a great software!

hi aktas,

if you do not want to change in sourcecode and need a field like “yourbank” you can go to the module-settig and make a extrafield. then you get it in the card. if you need more you can install the module “custom-fields” where are more possibilitys.

if you modfy soure, you get a problem if there is a update.

best regards
w :slight_smile: