[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 05/27: Code Cleaning : remove funciton getDef
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 05/27: Code Cleaning : remove funciton getDefLine |
Date: |
Sat, 2 Nov 2019 18:12:13 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 56f613ffb90dcf3ca3770beaad85f8097e02b037
Author: Dany De Bontridder <address@hidden>
Date: Fri Nov 1 20:04:04 2019 +0100
Code Cleaning : remove funciton getDefLine
---
include/class/acc_ledger.class.php | 16 ----------------
include/class/pre_op_ven.class.php | 2 +-
2 files changed, 1 insertion(+), 17 deletions(-)
diff --git a/include/class/acc_ledger.class.php
b/include/class/acc_ledger.class.php
index d58ddda..c217540 100644
--- a/include/class/acc_ledger.class.php
+++ b/include/class/acc_ledger.class.php
@@ -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
diff --git a/include/class/pre_op_ven.class.php
b/include/class/pre_op_ven.class.php
index be479d5..0a2c79d 100644
--- a/include/class/pre_op_ven.class.php
+++ b/include/class/pre_op_ven.class.php
@@ -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;
- [Noalyss-commit] [noalyss] branch master updated (9e55774 -> a56f8cc), Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 02/27: Bug : fix problem with reformating number in Sales and Purchase Ledger, Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 04/27: Merge branch 'dev7103', Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 05/27: Code Cleaning : remove funciton getDefLine,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 10/27: Acc_Ledger_History add documentation, Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 08/27: Acc_Ledger_FIN Remove DeadCode : show_ledger, Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 09/27: Test : Acc_Ledger_FIN, Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 12/27: Test : Acc_Ledger_History_Financial Test : Acc_Ledger_History_Purchase Add function phpunit_page_start, Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 03/27: Merge branch 'v7110-stable', Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 01/27: documentation, Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 06/27: Code Cleaning : remove direct access to global , add Exception, Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 25/27: TEST fix bug in acc_balanceTest, Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 13/27: TEST : Acc_Ledger_History*, Dany De Bontridder, 2019/11/02
- [Noalyss-commit] [noalyss] 14/27: Facility : new function to help with phpunit, Dany De Bontridder, 2019/11/02