[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 08/119: remove extract
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 08/119: remove extract |
Date: |
Mon, 26 Oct 2020 18:27:01 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit c91e64125a69a4ee4ee18a0119c6a69c2b48da7b
Author: Dany De Bontridder <danydb@noalyss.eu>
AuthorDate: Tue Aug 18 19:12:29 2020 +0200
remove extract
---
include/class/acc_ledger.class.php | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/include/class/acc_ledger.class.php
b/include/class/acc_ledger.class.php
index 30df01e..877738b 100644
--- a/include/class/acc_ledger.class.php
+++ b/include/class/acc_ledger.class.php
@@ -2351,7 +2351,12 @@ class Acc_Ledger extends jrn_def_sql
*/
function verify_ledger($array)
{
- extract($array, EXTR_SKIP);
+
+ $p_jrn=$array['p_jrn'];
+ $p_jrn_deb_max_line=$array['p_jrn_deb_max_line'];
+ $p_jrn_name=$array['p_jrn_name'];
+ $p_jrn_type=$array['p_jrn_type'];
+
try
{
if (isNumber($p_jrn)==0)
@@ -2365,8 +2370,10 @@ class Acc_Ledger extends jrn_def_sql
throw new Exception(_("Un journal avec ce nom existe déjà"));
if ($p_jrn_type=='FIN')
{
+ $http=new \HttpInput();
$a=new Fiche($this->db);
- $result=$a->get_by_qcode(trim(strtoupper($_POST['bank'])),
false);
+ $bank=$http->post("bank");
+ $result=$a->get_by_qcode(trim(strtoupper($bank)), false);
if ($result==1)
throw new Exception(_("Aucun compte en banque n'est
donné"));
}
@@ -2375,11 +2382,17 @@ class Acc_Ledger extends jrn_def_sql
throw new Exception(_('Choix du type de journal est
obligatoire'));
}
- if (isset( $negative_warning) && $negative_amount == 1 &&
trim($negative_warning)=="") {
+ if ( isset( $array['negative_warning']) &&
+ isset( $array['negative_amount']) &&
+ $array['negative_amount'] == 1
+ && trim($array['negative_warning'])=="") {
throw new Exception(_("Avertissement ne peut être vide"));
}
- if ( isset( $negative_amount) && $negative_amount <> 0 &&
$negative_amount <> 1 ){
+ if ( isset( $array['negative_amount']) &&
+ $array['negative_amount'] <> 0 &&
+ $array['negative_amount'] <> 1 )
+ {
throw new Exception(_("Valeur invalide"));
}
}
- [Noalyss-commit] [noalyss] branch master updated (44dbd49 -> bc168d2), Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 07/119: prevent divide by zero in formula, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 09/119: compatibility PHP74 : join() : glue before piece, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 06/119: reconcilaction : possibility to select only one operation, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 13/119: Bug 1834 : order POST over GET, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 05/119: Bug : syntax error, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 04/119: Bug : use ilike instead of tilde, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 02/119: Bug : correct search remove ~, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 08/119: remove extract,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 03/119: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 01/119: Fix warning with empty array, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 10/119: Fix bug : cannot use % when searching NEW : space can be used now, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 14/119: doc, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 11/119: Improve use of the security, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 17/119: javascript : add function to concat 2 json objects, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 18/119: javascript: remove hardcoding of dialog box for manage_table, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 30/119: Bug 1834 : duplicate , cannot confirm an duplicated operation because the $_GET is taken in priority, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 29/119: Remove debug info, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 37/119: javascript: remove hardcoding of dialog box for manage_table, Dany De Bontridder, 2020/10/26