noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 212/323: Bug : Periode cannot add a new exerc


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 212/323: Bug : Periode cannot add a new exercice
Date: Wed, 14 Mar 2018 17:38:51 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 90bb14590b100ad2eceb5a6af68711b8b85e58d1
Author: Dany De Bontridder <address@hidden>
Date:   Fri Feb 16 18:59:45 2018 +0100

    Bug : Periode cannot add a new exercice
---
 include/class/periode.class.php |  1 -
 include/periode.inc.php         | 49 +++++++++++++++++++++--------------------
 2 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/include/class/periode.class.php b/include/class/periode.class.php
index 1b6b45e..8e4a64c 100644
--- a/include/class/periode.class.php
+++ b/include/class/periode.class.php
@@ -264,7 +264,6 @@ class Periode
             $Res=$this->cn->exec_sql("insert into jrn_periode 
(jrn_def_id,p_id,status) ".
                     "select jrn_def_id,$p_id,'OP' from jrn_def");
             $this->cn->commit();
-            return $p_id;
         }
         catch (Exception $e)
         {
diff --git a/include/periode.inc.php b/include/periode.inc.php
index fb7e62c..3feaad4 100644
--- a/include/periode.inc.php
+++ b/include/periode.inc.php
@@ -44,6 +44,30 @@ $p_ledger_id=$http->request("jrn_def_id", "number", 0);
 
 </script>
 <?php
+//--------------------------------------------------------------------
+// Add an exercice 
+// receive nb_exercice
+//--------------------------------------------------------------------
+if (isset($_POST['add_exercice']))
+{
+    $obj=new Periode($cn);
+    try
+    {
+        $p_exercice=$http->post("p_exercice", "number");
+        $p_year=$http->post("p_year", "number");
+        $nb_month=$http->post("nb_month", "number");
+        $from_month=$http->post("from_month", "number");
+        $day_opening=$http->post("day_opening", "string", 0);
+        $day_closing=$http->post("day_closing", "string", 0);
+        $exercice=new Periode($cn);
+        $exercice->insert_exercice($p_exercice, $p_year, $from_month, 
$nb_month,
+                $day_opening, $day_closing);
+    }
+    catch (Exception $ex)
+    {
+        echo_warning($ex->getMessage());
+    }
+}
 //-------------------------------------------------------------------
 // Select a ledger or global
 //-------------------------------------------------------------------
@@ -69,30 +93,7 @@ Periode::filter_exercice($p_exercice);
 $js_close_selected="jsper.close_selected()";
 echo HtmlInput::button_action(_("Fermer les périodes sélectionnées"),
         $js_close_selected);
-//--------------------------------------------------------------------
-// Add an exercice 
-// receive nb_exercice
-//--------------------------------------------------------------------
-if (isset($_POST['add_exercice']))
-{
-    $obj=new Periode($cn);
-    try
-    {
-        $p_exercice=$http->post("p_exercice", "number");
-        $p_year=$http->post("p_year", "number");
-        $nb_month=$http->post("nb_month", "number");
-        $from_month=$http->post("from_month", "number");
-        $day_opening=$http->post("day_opening", "string", 0);
-        $day_closing=$http->post("day_closing", "string", 0);
-        $exercice=new Periode($cn);
-        $exercice->insert_exercice($p_exercice, $p_year, $from_month, 
$nb_month,
-                $day_opening, $day_closing);
-    }
-    catch (Exception $ex)
-    {
-        echo_warning($ex->getMessage());
-    }
-}
+
 /*
  * Display all the periode for all ledgers
  */



reply via email to

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