diff --git a/html/calendar-blue.css b/html/calendar-blue.css
index c7bb87f08..b403b9f6b 100644
--- a/html/calendar-blue.css
+++ b/html/calendar-blue.css
@@ -19,8 +19,8 @@ div.calendar { position: relative; z-index:13; }
border-radius: 0px;
}
-.calendar .nav {
- background: #778 url(menuarrow.gif) no-repeat 100% 100%;
+.calendar .nav1 {
+ #background: #778 url(menuarrow.gif) no-repeat 100% 100%;
}
.calendar thead .title { /* This holds the current "month, year" */
diff --git a/html/js/acc_ledger.js b/html/js/acc_ledger.js
index 5f0388dad..efdf71e65 100644
--- a/html/js/acc_ledger.js
+++ b/html/js/acc_ledger.js
@@ -879,7 +879,6 @@ function reverseOperation(obj)
{
var qs = $(obj).serialize()+ "&op=ledger";
g('ext' + obj.divname).style.display = 'none';
- g('bext' + obj.divname).style.display = 'none';
waiting_box();
new Ajax.Request(
"ajax_misc.php",
diff --git a/html/js/lang/calendar-fr.js b/html/js/lang/calendar-fr.js
index 1bfdc94a8..e2ee53d0f 100644
--- a/html/js/lang/calendar-fr.js
+++ b/html/js/lang/calendar-fr.js
@@ -39,7 +39,7 @@ Calendar._SDN = new Array
("Dim",
"Lun",
"Mar",
- "Mar",
+ "Mer",
"Jeu",
"Ven",
"Sam",
diff --git a/html/recherche.php b/html/recherche.php
index b2ebdba50..f34549a23 100644
--- a/html/recherche.php
+++ b/html/recherche.php
@@ -28,6 +28,11 @@ require_once NOALYSS_INCLUDE.'/class/acc_ledger.class.php';
require_once NOALYSS_INCLUDE.'/class/acc_ledger_search.class.php';
require_once NOALYSS_INCLUDE.'/lib/icon_action.class.php';
require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
+if ( ! isset ($_SESSION['g_theme']))
+{
+ echo "
"._('Vous êtes déconnecté')."
";
+ die();
+}
html_page_start($_SESSION['g_theme']);
@@ -69,7 +74,7 @@ window.onload=function ()
{
create_anchor_up();
init_scroll();
- sorttable.init
+ sorttable.init();
}
$v)
- $r.=HtmlInput::hidden('r_jrn['.$k.']',$v);
+ $http=new HttpInput();
+ $a_rjrn=$http->get("r_jrn","array");
+ foreach ($a_rjrn as $k=>$v) {
+ // Protect : check that $k and $v are numeric
+ if (isNumber($k)&&isNumber($v)) {
+ $r.=HtmlInput::hidden('r_jrn['.$k.']',$v);
+ }
+ }
}
echo '';
diff --git a/include/class/acc_report.class.php b/include/class/acc_report.class.php
index 0c15e17ce..952c40a37 100644
--- a/include/class/acc_report.class.php
+++ b/include/class/acc_report.class.php
@@ -216,7 +216,7 @@ class Acc_Report
}
catch (Exception $e)
{
- record_log($e->getTraceAsString());
+ record_log($e);
$this->db->rollback();
echo $e->getMessage();
}
@@ -258,7 +258,7 @@ class Acc_Report
}
catch (Exception $e)
{
- record_log($e->getTraceAsString());
+ record_log($e);
$this->db->rollback();
echo $e->getMessage();
}
diff --git a/include/class/anc_account_table.class.php b/include/class/anc_account_table.class.php
index d92b0f909..08ad0c393 100644
--- a/include/class/anc_account_table.class.php
+++ b/include/class/anc_account_table.class.php
@@ -74,7 +74,7 @@ class Anc_Account_Table extends Manage_Table_SQL
$table->po_name=str_replace(">", '', $table->po_name);
// po_name must be uniq in the Analytic Plan
- if ( $cn->get_value("select count(*) from poste_analytique where pa_id=$1 and po_name=$2 and po_id != $3",
+ if ( $cn->get_value("select count(*) from poste_analytique where pa_id=$1 and po_name=upper($2) and po_id != $3",
array($table->pa_id,$table->po_name,$table->po_id)) > 0)
{
$is_error++;
@@ -90,4 +90,36 @@ class Anc_Account_Table extends Manage_Table_SQL
if ($is_error==0)return TRUE;
return FALSE;
}
+
+ /**
+ * @brief display a data row in the table, with the order defined
+ * in a_order and depending of the visibility of the column
+ */
+ function display_row($p_row)
+ {
+ $cn=Dossier::connect();
+ $count=$cn->get_value("select count(*) from public.operation_analytique where po_id=$1",[$p_row["po_id"]]);
+ $p_row["po_name"]=sprintf("%s (%d)",$p_row['po_name'],$count);
+ parent::display_row($p_row);
+ }
+
+ /**
+ * Before deleting , we check that nothing is in a closed periode
+ */
+ function delete() {
+ $cn=Dossier::connect();
+ $count_closed=$cn->get_value(" select count(*)
+ from jrnx as jx1
+ join jrn jn1 on (jx1.j_grpt = jn1.jr_grpt_id )
+ join jrn_def as jf1 on (jn1.jr_def_id =jf1.jrn_def_id )
+ join jrn_periode as je1 on (jf1.jrn_def_id =je1.jrn_def_id )
+ join operation_analytique as oa on (oa.j_id =jx1.j_id )
+ where
+ je1.status = 'CL' and oa.po_id=$1 ",[$this->table->po_id]);
+ if ( $count_closed > 0 ) {
+ throw new \Exception(_("Effacement impossible : le poste est utilisé dans une période fermée"));
+ }
+
+ }
+
}
diff --git a/include/class/anc_group_operation.class.php b/include/class/anc_group_operation.class.php
index c5e45061d..b0058ef71 100644
--- a/include/class/anc_group_operation.class.php
+++ b/include/class/anc_group_operation.class.php
@@ -74,7 +74,7 @@ class Anc_Group_Operation
}
catch (Exception $e)
{
- record_log($e->getTraceAsString());
+ record_log($e);
echo $e->getTrace();
$this->db->rollback();
throw new Exception($e);
@@ -260,7 +260,7 @@ class Anc_Group_Operation
}
catch (Exception $ex)
{
- record_log($e->getTraceAsString());
+ record_log($e);
echo ''.
'Erreur dans l\'enregistrement '.
__FILE__.':'.__LINE__.' '.
diff --git a/include/class/anc_key.class.php b/include/class/anc_key.class.php
index ed06eb074..4fec773ed 100644
--- a/include/class/anc_key.class.php
+++ b/include/class/anc_key.class.php
@@ -268,7 +268,7 @@ class Anc_Key
{
if ( DEBUG ) { echo $e->getTraceAsString(); } else { echo _('erreur').$e->getMessage();}
- record_log($e->getTraceAsString());
+ record_log($e);
$cn->rollback();
}
}
diff --git a/include/class/anc_operation.class.php b/include/class/anc_operation.class.php
index 24c0562ce..fcba66ab2 100644
--- a/include/class/anc_operation.class.php
+++ b/include/class/anc_operation.class.php
@@ -505,7 +505,7 @@ class Anc_Operation
}
catch (Exception $e)
{
- record_log($e->getTraceAsString());
+ record_log($e);
}
}
/*!\brief display the form for PA
diff --git a/include/class/default_menu.class.php b/include/class/default_menu.class.php
index acb85207f..80a9de07d 100644
--- a/include/class/default_menu.class.php
+++ b/include/class/default_menu.class.php
@@ -106,7 +106,7 @@ class Default_Menu
}
} catch (Exception $e)
{
- record_log($e->getTraceAsString());
+ record_log($e);
echo $e->getMessage();
throw $e;
}
diff --git a/include/class/document_modele.class.php b/include/class/document_modele.class.php
index 7c29a8333..a1722a9d2 100644
--- a/include/class/document_modele.class.php
+++ b/include/class/document_modele.class.php
@@ -194,7 +194,7 @@ class Document_modele
}
catch (Exception $e)
{
- record_log($e->getTraceAsString());
+ record_log($e);
rollback($this->cn);
return ;
}
@@ -360,7 +360,7 @@ class Document_modele
}
catch (Exception $e)
{
- record_log($e->getTraceAsString());
+ record_log($e);
rollback($this->cn);
return ;
}
diff --git a/include/class/document_type.class.php b/include/class/document_type.class.php
index 92ffc823b..8f0d2fbf1 100644
--- a/include/class/document_type.class.php
+++ b/include/class/document_type.class.php
@@ -103,7 +103,7 @@ class Document_type
}
catch (Exception $e)
{
- record_log($e->getTraceAsString());
+ record_log($e);
alert(j(_("Impossible d'ajouter [$p_value] ") . $e->getMessage()));
}
}
@@ -120,7 +120,7 @@ class Document_type
}
catch (Exception $e)
{
- record_log($e->getTraceAsString());
+ record_log($e);
alert(" Erreur " . $e->getMessage());
}
}
@@ -133,7 +133,7 @@ class Document_type
}
catch (Exception $e)
{
- record_log($e->getTraceAsString());
+ record_log($e);
alert("Erreur " . $e->getMessage());
}
}
diff --git a/include/class/dossier.class.php b/include/class/dossier.class.php
index ecd439e1a..1f62b042b 100644
--- a/include/class/dossier.class.php
+++ b/include/class/dossier.class.php
@@ -326,7 +326,7 @@ class Dossier
{
echo_warning($e->getMessage());
- record_log($e->getTraceAsString());
+ record_log($e);
$cn->rollback();
}
}
diff --git a/include/class/fiche.class.php b/include/class/fiche.class.php
index cf3dea138..734226e63 100644
--- a/include/class/fiche.class.php
+++ b/include/class/fiche.class.php
@@ -937,7 +937,7 @@ class Fiche
}
catch (Exception $e)
{
- record_log($e->getTraceAsString());
+ record_log($e->getMessage()." ".$e->getTraceAsString());
$this->cn->rollback();
throw ($e);
return;
@@ -1133,7 +1133,7 @@ class Fiche
$e->getMessage().
'';
record_log($e->getMessage());
- record_log($e->getTraceAsString());
+ record_log($e);
$this->cn->rollback();
return;
}
diff --git a/include/class/fiche_attr.class.php b/include/class/fiche_attr.class.php
index 98cea2e90..c764731e5 100644
--- a/include/class/fiche_attr.class.php
+++ b/include/class/fiche_attr.class.php
@@ -99,7 +99,7 @@ class Fiche_Attr
$this->cn->exec_sql($this->ad_extra);
}catch (Exception $e)
{
- record_log($e->getTraceAsString());
+ record_log($e);
throw new Exception ("La requête SQL ".h($this->ad_extra)." est invalide ");
}
}
@@ -161,7 +161,7 @@ class Fiche_Attr
);
} catch (Exception $e)
{
- record_log($e->getTraceAsString());
+ record_log($e);
throw $e;
}
@@ -185,7 +185,7 @@ class Fiche_Attr
);
}catch (Exception $e)
{
- record_log($e->getTraceAsString());
+ record_log($e);
throw $e;
}
diff --git a/include/class/follow_up.class.php b/include/class/follow_up.class.php
index 3f9327142..29164ce8d 100644
--- a/include/class/follow_up.class.php
+++ b/include/class/follow_up.class.php
@@ -104,6 +104,7 @@ class Follow_Up
$this->aAction_detail=array();
$this->operation="";
$this->action="";
+ $this->f_dest_id=0;
}
/**
* Create a filter based on the current user,
diff --git a/include/class/periode.class.php b/include/class/periode.class.php
index 16ca96d80..43cde5797 100644
--- a/include/class/periode.class.php
+++ b/include/class/periode.class.php
@@ -273,7 +273,7 @@ class Periode
catch (Exception $e)
{
record_log($e->getMessage()." - ".$e->getCode());
- record_log($e->getTraceAsString());
+ record_log($e);
$this->cn->rollback();
throw $e;
}
@@ -495,7 +495,7 @@ class Periode
}
catch (Exception $e)
{
- record_log($e->getTraceAsString());
+ record_log($e);
$this->cn->rollback();
throw $e;
}
diff --git a/include/class/pre_op_ach.class.php b/include/class/pre_op_ach.class.php
index fb9640e77..722c9deed 100644
--- a/include/class/pre_op_ach.class.php
+++ b/include/class/pre_op_ach.class.php
@@ -104,7 +104,7 @@ class Pre_op_ach extends Pre_operation_detail
}
catch (Exception $e)
{
- record_log($e->getTraceAsString());
+ record_log($e);
echo ($e->getMessage());
$this->db->rollback();
}
diff --git a/include/class/pre_op_advanced.class.php b/include/class/pre_op_advanced.class.php
index 2c110fe45..3d78bc9e7 100644
--- a/include/class/pre_op_advanced.class.php
+++ b/include/class/pre_op_advanced.class.php
@@ -98,7 +98,7 @@ class Pre_Op_Advanced extends Pre_operation_detail
}
catch (Exception $e)
{
- record_log($e->getTraceAsString());
+ record_log($e);
echo ($e->getMessage());
$this->db->rollback();
}
diff --git a/include/class/pre_op_fin.class.php b/include/class/pre_op_fin.class.php
index f293eb253..ea16b0dbf 100644
--- a/include/class/pre_op_fin.class.php
+++ b/include/class/pre_op_fin.class.php
@@ -86,7 +86,7 @@ class Pre_op_fin extends Pre_operation_detail
}
catch (Exception $e)
{
- record_log($e->getTraceAsString());
+ record_log($e);
echo ($e->getMessage());
$this->db->rollback();
}
diff --git a/include/class/pre_op_ods.class.php b/include/class/pre_op_ods.class.php
index d886768aa..1130e6208 100644
--- a/include/class/pre_op_ods.class.php
+++ b/include/class/pre_op_ods.class.php
@@ -78,7 +78,7 @@ class Pre_op_ods extends Pre_operation_detail
}
catch (Exception $e)
{
- record_log($e->getTraceAsString());
+ record_log($e);
echo ($e->getMessage());
$this->db->rollback();
}
diff --git a/include/class/pre_op_ven.class.php b/include/class/pre_op_ven.class.php
index c76252c1b..3d97c0687 100644
--- a/include/class/pre_op_ven.class.php
+++ b/include/class/pre_op_ven.class.php
@@ -102,7 +102,7 @@ class Pre_op_ven extends Pre_operation_detail
}
catch (Exception $e)
{
- record_log($e->getTraceAsString());
+ record_log($e);
echo ($e->getMessage());
$this->db->rollback();
}
diff --git a/include/class/tva_rate_mtable.class.php b/include/class/tva_rate_mtable.class.php
index 403f513ab..460d7e857 100644
--- a/include/class/tva_rate_mtable.class.php
+++ b/include/class/tva_rate_mtable.class.php
@@ -53,8 +53,8 @@ class Tva_Rate_MTable extends Manage_Table_SQL
$this->set_col_label("tva_purchase", _("TVA Achat (D)"));
$this->set_col_type("tva_both_side", "select",
array(
- ["value"=>0, "label"=>_("Normal")],
- ["value"=>1, "label"=>_("Autoliquidation")]
+ ["value"=>0, "label"=>_("Non")],
+ ["value"=>1, "label"=>_("Oui")]
));
$this->set_property_updatable("tva_id", FALSE);
$this->set_col_label("tva_payment_purchase",_("Exigible achat"));
diff --git a/include/config.inc.example b/include/config.inc.example
index d3024056c..65650be22 100644
--- a/include/config.inc.example
+++ b/include/config.inc.example
@@ -13,6 +13,8 @@ define ("noalyss_psql_host","localhost");
// If you change the NOALYSS_ADMINISTRATOR , you will need to rerun http://..../noalyss/html/install.php
// But it doesn't change the password
define ("NOALYSS_ADMINISTRATOR","admin");
+// used only for install
+define ("NOALYSS_ADMIN_PASSWORD","");
define ("LOCALE",1);
define ("domaine","");
define ("MULTI",1);
diff --git a/include/lib/ac_common.php b/include/lib/ac_common.php
index 39c65de90..44ee884ad 100644
--- a/include/lib/ac_common.php
+++ b/include/lib/ac_common.php
@@ -1331,9 +1331,8 @@ function is_msie()
*/
function record_log($p_message)
{
- error_log("noalyss".$p_message,0);
- error_log("noalyss GET [".var_export($_GET, true)."]",0);
- error_log( "noalyss POST [".var_export($_POST, true)."]",0);
+ error_log("noalyss".print_r($p_message,true),0);
+ error_log("noalyss GET [".var_export($_GET, true)."] POST [".var_export($_POST, true)."]",0);
}
if(!function_exists('tracedebug')) {
function tracedebug($file,$var, $label = NULL) {
diff --git a/include/lib/manage_table_sql.class.php b/include/lib/manage_table_sql.class.php
index 68a4da608..67b58351e 100644
--- a/include/lib/manage_table_sql.class.php
+++ b/include/lib/manage_table_sql.class.php
@@ -1037,7 +1037,7 @@ function check()
{
$s1=$xml->createElement("status", "NOK");
$s2=$xml->createElement("ctl_row",
- $this->object_name+"_"+$this->table->get_pk_value());
+ $this->object_name."_".$this->table->get_pk_value());
$s4=$xml->createElement("ctl", $this->object_name);
$s3=$xml->createElement("html", $ex->getTraceAsString());
$root=$xml->createElement("data");
@@ -1113,7 +1113,7 @@ function check()
$s1=$xml->createElement("status", "NOK");
$s3=$xml->createElement("ctl", $this->object_name);
$s2=$xml->createElement("ctl_row",
- $this->object_name+"_"+$this->table->get_pk_value());
+ $this->object_name."_".$this->table->get_pk_value());
$s4=$xml->createElement("html", $ex->getTraceAsString());
$root=$xml->createElement("data");
diff --git a/include/lib/message_javascript.php b/include/lib/message_javascript.php
index 6e54ab8d8..e9b9d1ebf 100644
--- a/include/lib/message_javascript.php
+++ b/include/lib/message_javascript.php
@@ -74,8 +74,8 @@ content[40]=" à zéro pour effacer la ligne"))?>";
content[42]="";
content[43]="";
-content[44]="";
-content[45]="";
+content[44]="";
+content[45]="";
content[46]="";
content[47]="";
content[48]="";
@@ -107,4 +107,4 @@ content[73]="";
content[75]="";
content[76]="";
-
\ No newline at end of file
+
diff --git a/include/tfpdf/tfpdf.php b/include/tfpdf/tfpdf.php
index f9fb17971..6000a9fb2 100644
--- a/include/tfpdf/tfpdf.php
+++ b/include/tfpdf/tfpdf.php
@@ -1257,7 +1257,7 @@ function _dochecks()
if(ini_get('mbstring.func_overload') & 2)
$this->Error('mbstring overloading must be disabled');
// Ensure runtime magic quotes are disabled
- if(get_magic_quotes_runtime())
+ if(version_compare(PHP_VERSION, '7.3.0','<') && get_magic_quotes_runtime())
@set_magic_quotes_runtime(0);
}
diff --git a/sql/upgrade.sql b/sql/upgrade.sql
index e8af5a3d7..206b4a87a 100644
--- a/sql/upgrade.sql
+++ b/sql/upgrade.sql
@@ -10,4 +10,4 @@ operation_currency
join jrnx using (j_id)
group by f_id,j_id;
-commit ;
\ No newline at end of file
+commit ;