Merge pull request #4232 from aspangaro/develop-remove_zero
New: Accountancy add a function to remove all zero at the right of the account
This commit is contained in:
commit
516e071363
@ -91,6 +91,19 @@ function accounting_prepare_head(AccountingAccount $object)
|
|||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return accounting account without zero on the right
|
||||||
|
*
|
||||||
|
* @param string $account Accounting account
|
||||||
|
* @return string String without zero on the right
|
||||||
|
*/
|
||||||
|
function clean_account($account)
|
||||||
|
{
|
||||||
|
$account = rtrim($account,"0");
|
||||||
|
|
||||||
|
return $account;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return general accounting account with defined length
|
* Return general accounting account with defined length
|
||||||
*
|
*
|
||||||
@ -131,7 +144,7 @@ function length_accountg($account)
|
|||||||
*/
|
*/
|
||||||
function length_accounta($accounta)
|
function length_accounta($accounta)
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf;
|
||||||
|
|
||||||
$a = $conf->global->ACCOUNTING_LENGTH_AACCOUNT;
|
$a = $conf->global->ACCOUNTING_LENGTH_AACCOUNT;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user