[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
*/
- [Noalyss-commit] [noalyss] 270/323: check if open_basedir is empty, (continued)
- [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, 2018/03/14
- [Noalyss-commit] [noalyss] 212/323: Bug : Periode cannot add a new exercice,
Dany De Bontridder <=
- [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
- [Noalyss-commit] [noalyss] 246/323: Javascript : improve exception management for fill_box, Dany De Bontridder, 2018/03/14