Code Cleaning : remove funciton getDefLine
This commit is contained in:
parent
89c4c10375
commit
56f613ffb9
2 changed files with 1 additions and 17 deletions
|
|
@ -444,22 +444,6 @@ class Acc_Ledger extends jrn_def_sql
|
|||
return $Res;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the number of lines of a journal
|
||||
* @param$p_cred deb or cred
|
||||
*
|
||||
* \return an integer
|
||||
*/
|
||||
function GetDefLine()
|
||||
{
|
||||
$sql_cred='jrn_deb_max_line';
|
||||
$sql="select jrn_deb_max_line as value from jrn_def where jrn_def_id=$1";
|
||||
$r=$this->db->exec_sql($sql, array($this->id));
|
||||
$Res=Database::fetch_all($r);
|
||||
if ($Res == FALSE || sizeof($Res)==0)
|
||||
return 1;
|
||||
return $Res[0]['value'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get the saldo of a ledger for a specific period
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ class Pre_op_ven extends Pre_operation_detail
|
|||
// Find the ledger
|
||||
$ledger=new Acc_Ledger($this->db,$this->operation->jrn_def_id);
|
||||
// Find the max line of the ledger
|
||||
$max_row=$ledger->GetDefLine();
|
||||
$max_row=$ledger->get_min_row();
|
||||
|
||||
// compute nb_item
|
||||
$array['nb_item']=($max_row > $count)?$max_row:$count;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue