Compute_internal use now hexadecimal and jrn_def_code is now the first letter + 2 digits

This commit is contained in:
Dany De Bontridder 2011-01-28 11:38:49 +00:00
parent 41c588ae03
commit 2b92170032
2 changed files with 3 additions and 3 deletions

View file

@ -1710,10 +1710,10 @@ class Acc_Ledger
function compute_internal_code($p_grpt)
{
if ( $this->id==0) return;
$num = $this->db->get_next_seq('s_internal');
$num =$this->db->get_next_seq('s_internal');
$atype=$this->get_propertie();
$type=$atype['jrn_def_code'];
$internal_code=sprintf("%s-%s",$type,$num);
$internal_code=sprintf("%s%06X",$type,$num);
$this->jr_internal=$internal_code;
return $internal_code;
}