noalyss-commit
[Top][All Lists]
Advanced

[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,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]