[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 307/323: Task #0001563: check date limit VEN
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 307/323: Task #0001563: check date limit VEN & ACH |
Date: |
Wed, 14 Mar 2018 17:39:09 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit c1a623de8c881dbee07b30fba0ebf552bb9c51a4
Author: Dany De Bontridder <address@hidden>
Date: Tue Mar 6 08:44:30 2018 +0100
Task #0001563: check date limit VEN & ACH
---
include/class/acc_ledger_purchase.class.php | 9 ++++++++-
include/class/acc_ledger_sold.class.php | 7 +++++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/include/class/acc_ledger_purchase.class.php
b/include/class/acc_ledger_purchase.class.php
index 7241c31..056d4f0 100644
--- a/include/class/acc_ledger_purchase.class.php
+++ b/include/class/acc_ledger_purchase.class.php
@@ -264,11 +264,18 @@ class Acc_Ledger_Purchase extends Acc_Ledger
if ( $nb == 0 )
throw new Exception(_('Il n\'y a aucune marchandise'),12);
+
+ // check payment date
if ( isset ($mp_date) && trim ($mp_date) != "" && isDate($mp_date) ==
null) {
throw new Exception(_('Date de paiement invalide'),13);
}
-
+ // check limit date
+ if ( isset ($e_ech) && trim ($e_ech)!="" && isDate($e_ech) == null )
+ {
+ throw new Exception(_('Date échéance invalide'),14);
+
+ }
}
/**
* Compute the ND amount thanks the attribute of the concerned card. The
object
diff --git a/include/class/acc_ledger_sold.class.php
b/include/class/acc_ledger_sold.class.php
index ecea761..f37eeec 100644
--- a/include/class/acc_ledger_sold.class.php
+++ b/include/class/acc_ledger_sold.class.php
@@ -225,6 +225,13 @@ class Acc_Ledger_Sold extends Acc_Ledger {
throw new Exception(_('Date de paiement invalide'),13);
}
+
+ // check limit date
+ if ( isset ($e_ech) && trim ($e_ech)!="" && isDate($e_ech) == null )
+ {
+ throw new Exception(_('Date échéance invalide'),14);
+
+ }
}
/*!\brief insert into the database, it calls first the verify function,
- [Noalyss-commit] [noalyss] 269/323: typo, (continued)
- [Noalyss-commit] [noalyss] 269/323: typo, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 270/323: check if open_basedir is empty, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 170/323: indent, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 207/323: Missing file, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 236/323: Merge tag 'rel6920', Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 175/323: Manage_Table_SQL : Improve Documentation + add function count_error, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 214/323: Plugin : fix indent, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 184/323: missing file, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 260/323: esthetic, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 311/323: Follow-up fix small bug with ag_ref, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 307/323: Task #0001563: check date limit VEN & ACH,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 212/323: Bug : Periode cannot add a new exercice, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 228/323: Document_Modele CFGDOC warning if there is no template, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 161/323: Esthetic : improve, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 222/323: TextArea : fix move when focus, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 203/323: Esthetic : menu administration, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 247/323: Javascript : improve exception management for fill_box, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 219/323: Improve cal, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 237/323: Database : change SQL function, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 266/323: Upgrade : improve message, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 254/323: Tag : fix bug when adding a new tag, Dany De Bontridder, 2018/03/14