Compute_internal use now hexadecimal and jrn_def_code is now the first letter + 2 digits
This commit is contained in:
parent
41c588ae03
commit
2b92170032
2 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ if ( isset ($_POST["add"]) )
|
|||
$p_jrn_class_deb=FormatString($_POST["p_jrn_class_deb"]);
|
||||
if (strlen(trim($p_jrn_name))==0) return;
|
||||
// compute the jrn_def.jrn_def_code
|
||||
$p_code=sprintf("%s-%02d",trim($_POST['p_jrn_type']),Acc_Ledger::next_number($cn,$_POST['p_jrn_type']));
|
||||
$p_code=sprintf("%s%02d",trim(substr($_POST['p_jrn_type'],0,1)),Acc_Ledger::next_number($cn,$_POST['p_jrn_type']));
|
||||
$p_jrn_fiche_deb="";
|
||||
$p_jrn_fiche_cred="";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue