New: Accountancy add a function to remove all zero at the right of the account.
Thanks to Florian
This commit is contained in:
parent
687370071b
commit
c1e77daeb1
@ -99,23 +99,9 @@ function accounting_prepare_head(AccountingAccount $object)
|
||||
*/
|
||||
function clean_account($account)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
// Clean parameters
|
||||
$i = strlen($account);
|
||||
|
||||
if ($i >= 1) {
|
||||
if (substr($account, -1) == 0) {
|
||||
while ( $i >= 1 ) {
|
||||
$account = substr($account, $i);
|
||||
|
||||
$i --;
|
||||
}
|
||||
return $account;
|
||||
}
|
||||
} else {
|
||||
return $account;
|
||||
}
|
||||
$account = rtrim($account,"0");
|
||||
|
||||
return $account;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user