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 '
'; echo $r; diff --git a/html/style-classic7.css b/html/style-classic7.css index 154683868..5c8882cfd 100644 --- a/html/style-classic7.css +++ b/html/style-classic7.css @@ -1539,6 +1539,7 @@ div.box { float:left; font-size:14px; font-size:0.90rem; + border-radius:5px; } @media only screen and (max-width: 1426px) { div.box { @@ -2471,4 +2472,4 @@ span.title_tab_row { background-color: #000066 !important; color : white !important; -} \ No newline at end of file +} diff --git a/include/action.common.inc.php b/include/action.common.inc.php index eb6ff979b..59d9041f3 100644 --- a/include/action.common.inc.php +++ b/include/action.common.inc.php @@ -149,7 +149,7 @@ if ($sub_action == "update") $act->get(); $act->fromArray($_POST); $error_id=$e->getCode(); - record_log($e->getTraceAsString()); + record_log($e); } } //---------------------------------------------------------------------- @@ -296,7 +296,7 @@ if ($sub_action == "save_action_st2") echo ''; $sub_action="add_action"; $error_id=$e->getCode(); - record_log($e->getTraceAsString()); + record_log($e); } } //-------------------------------------------------------------------------------- diff --git a/include/ajax/ajax_card.php b/include/ajax/ajax_card.php index 11c6e7044..9b61631ba 100644 --- a/include/ajax/ajax_card.php +++ b/include/ajax/ajax_card.php @@ -118,7 +118,7 @@ case 'rmfa': { $cn->rollback(); record_log($e->getMessage()); - record_log($e->getTraceAsString()); + record_log($e); echo $e->getMessage(); } $html=ob_get_contents(); diff --git a/include/ajax/ajax_display_letter.php b/include/ajax/ajax_display_letter.php index 7e8f8007c..06f36e189 100644 --- a/include/ajax/ajax_display_letter.php +++ b/include/ajax/ajax_display_letter.php @@ -38,7 +38,7 @@ try { }catch (Exception $e ) { record_log($e->getMessage()); - record_log($e->getTraceAsString()); + record_log($e); return; } diff --git a/include/ajax/ajax_ledger.php b/include/ajax/ajax_ledger.php index 7f93ea81f..316a5a662 100644 --- a/include/ajax/ajax_ledger.php +++ b/include/ajax/ajax_ledger.php @@ -161,7 +161,7 @@ case 'rmop': } catch (Exception $e) { - record_log($e->getTraceAsString()); + record_log($e); $e->getMessage(); $cn->rollback(); } @@ -207,7 +207,7 @@ case 'de': } catch (Exception $e) { - record_log($e->getTraceAsString()); + record_log($e); echo Icon_Action::close($div); echo '

'._("Désolé il y a une erreur").'

'; } @@ -512,7 +512,7 @@ case 'save': } catch (Exception $e) { - record_log($e->getTraceAsString()); + record_log($e); if ( DEBUG ) echo $e->getMessage(); alert(_( "Changement impossible: on ne peut pas changer la date dans une période fermée")); } @@ -570,7 +570,7 @@ case 'reverseop': } catch (Exception $e) { - record_log($e->getTraceAsString()); + record_log($e); echo $e->getMessage(); $cn->rollback(); } diff --git a/include/ajax/ajax_periode.php b/include/ajax/ajax_periode.php index 367546ef2..e8e2cb133 100644 --- a/include/ajax/ajax_periode.php +++ b/include/ajax/ajax_periode.php @@ -205,7 +205,7 @@ switch ($act) } catch (Exception $e) { - record_log($e->getTraceAsString()); + record_log($e); $html=$e->getTrace(); throw $e; } diff --git a/include/ajax/ajax_tva_parameter.php b/include/ajax/ajax_tva_parameter.php index cf2107aa0..8be4577bb 100644 --- a/include/ajax/ajax_tva_parameter.php +++ b/include/ajax/ajax_tva_parameter.php @@ -42,7 +42,7 @@ try } catch (Exception $e) { - record_log($e->getTraceAsString()); + record_log($e); return; } diff --git a/include/anc_key.inc.php b/include/anc_key.inc.php index a2b343f43..7298ca5a5 100644 --- a/include/anc_key.inc.php +++ b/include/anc_key.inc.php @@ -56,7 +56,7 @@ switch ($op) } catch (Exception $e) { - record_log($e->getTraceAsString()); + record_log($e); echo span($e->getMessage(), ' class="notice"'); Anc_Key::display_list(); Anc_Key::key_add(); diff --git a/include/anc_pa.inc.php b/include/anc_pa.inc.php index f3fc67433..f16170804 100644 --- a/include/anc_pa.inc.php +++ b/include/anc_pa.inc.php @@ -145,8 +145,8 @@ if ($sa=="pa_detail") $accounting->add_json_param("pa_id", $pa_id); $accounting->set_sort_column("po_name"); ob_start(); - $accounting->display_table(" where pa_id = $1 order by po_name ",array($pa_id)); $accounting->create_js_script(); + $accounting->display_table(" where pa_id = $1 order by po_name ",array($pa_id)); $ret.=ob_get_clean(); $ret.= ''; } diff --git a/include/card_attr.inc.php b/include/card_attr.inc.php index 88e3d9a9b..fa8bcae8d 100644 --- a/include/card_attr.inc.php +++ b/include/card_attr.inc.php @@ -56,7 +56,7 @@ if ( isset($_POST['save'])) } catch (Exception $e) { - record_log($e->getTraceAsString()); + record_log($e); alert($e->getMessage()); $cn->rollback(); } diff --git a/include/cfgledger.inc.php b/include/cfgledger.inc.php index 679827d06..7984d48b9 100644 --- a/include/cfgledger.inc.php +++ b/include/cfgledger.inc.php @@ -62,7 +62,7 @@ if ( $action_frm == 'update') } catch (Exception $e) { record_log($e->getMessage()); - record_log($e->getTraceAsString()); + record_log($e); alert($e->getMessage()); } } @@ -88,7 +88,7 @@ if ($action_frm == 'delete' ) catch (Exception $e) { record_log($e->getMessage()); - record_log($e->getTraceAsString()); + record_log($e); alert ($e->getMessage()); } @@ -111,7 +111,7 @@ if (isset($_POST['add'])) catch (Exception $e) { record_log($e->getMessage()); - record_log($e->getTraceAsString()); + record_log($e); alert($e->getMessage()); } } @@ -146,7 +146,7 @@ switch ($sa) catch (Exception $e) { record_log($e->getMessage()); - record_log($e->getTraceAsString()); + record_log($e); alert($e->getMessage()); } break; diff --git a/include/class/acc_bilan.class.php b/include/class/acc_bilan.class.php index 398a3eb81..51b8b5fba 100644 --- a/include/class/acc_bilan.class.php +++ b/include/class/acc_bilan.class.php @@ -284,7 +284,7 @@ class Acc_Bilan } catch(Exception $Ex) { - record_log($e->getTraceAsString()); + record_log($e); echo $Ex->getMessage(); throw $Ex; } diff --git a/include/class/acc_ledger.class.php b/include/class/acc_ledger.class.php index ee6975e4f..ab4ce5c30 100644 --- a/include/class/acc_ledger.class.php +++ b/include/class/acc_ledger.class.php @@ -389,7 +389,7 @@ class Acc_Ledger extends jrn_def_sql } catch (Exception $e) { - record_log($e->getTraceAsString()); + record_log($e); $this->db->rollback(); throw $e; } @@ -869,7 +869,7 @@ class Acc_Ledger extends jrn_def_sql } catch (Exception $e) { - record_log($e->getTraceAsString()); + record_log($e); if ($e->getCode()==1) { echo _("Aucune période ouverte"); @@ -1503,7 +1503,7 @@ class Acc_Ledger extends jrn_def_sql } catch (Exception $e) { - record_log($e->getTraceAsString()); + record_log($e); $this->db->rollback(); echo _('OPERATION ANNULEE '); echo '
'; @@ -2307,7 +2307,7 @@ class Acc_Ledger extends jrn_def_sql catch (Exception $e) { $cn->rollback(); - record_log($e->getTraceAsString()); + record_log($e); } $cn->commit(); } @@ -2576,7 +2576,7 @@ class Acc_Ledger extends jrn_def_sql } catch (Exception $e) { - record_log($e->getTraceAsString()); + record_log($e); throw $e; } } @@ -2850,7 +2850,7 @@ class Acc_Ledger extends jrn_def_sql } catch (Exception $e) { - record_log($e->getTraceAsString()); + record_log($e); throw $e; } } diff --git a/include/class/acc_ledger_fin.class.php b/include/class/acc_ledger_fin.class.php index 65a5766e9..654c462b7 100644 --- a/include/class/acc_ledger_fin.class.php +++ b/include/class/acc_ledger_fin.class.php @@ -1076,7 +1076,7 @@ class Acc_Ledger_Fin extends Acc_Ledger __FILE__ . ':' . __LINE__ . ' ' . $e->getMessage(); $this->db->rollback(); - record_log($e->getTraceAsString()); + record_log($e); throw new Exception($r); } $this->db->commit(); diff --git a/include/class/acc_ledger_info.class.php b/include/class/acc_ledger_info.class.php index 44efb7fb2..be9e9ea1d 100644 --- a/include/class/acc_ledger_info.class.php +++ b/include/class/acc_ledger_info.class.php @@ -63,7 +63,7 @@ class Acc_Ledger_Info } catch (Exception $e) { - record_log($e->getTraceAsString()); + record_log($e); echo "Echec sauvegarde info additionnelles"; throw $e; } @@ -86,7 +86,7 @@ class Acc_Ledger_Info } catch (Exception $e) { - record_log($e->getTraceAsString()); + record_log($e); $this->cn->rollback(); echo "Echec sauvegarde info additionnelles"; throw $e; diff --git a/include/class/acc_ledger_purchase.class.php b/include/class/acc_ledger_purchase.class.php index 3a4ee02e8..24ba1b1e7 100644 --- a/include/class/acc_ledger_purchase.class.php +++ b/include/class/acc_ledger_purchase.class.php @@ -1041,7 +1041,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger }//end try catch (Exception $e) { - record_log($e->getTraceAsString()); + record_log($e); echo ''. 'Erreur dans l\'enregistrement '. __FILE__.':'.__LINE__.' '. @@ -1149,7 +1149,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger } catch (Exception $e) { - record_log($e->getTraceAsString()); + record_log($e); if ($e->getCode() == 1 ) { throw new Exception( _("Aucune période ouverte")); diff --git a/include/class/acc_ledger_sold.class.php b/include/class/acc_ledger_sold.class.php index 8bb00437d..2372a0fa3 100644 --- a/include/class/acc_ledger_sold.class.php +++ b/include/class/acc_ledger_sold.class.php @@ -716,8 +716,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { } } } catch (Exception $e) { - record_log($e->getMessage()); - record_log($e->getTraceAsString()); + record_log($e); echo '' . 'Erreur dans l\'enregistrement ' . __FILE__ . ':' . __LINE__ . ' ' . diff --git a/include/class/acc_operation.class.php b/include/class/acc_operation.class.php index 45f2eaa68..999ae98cf 100644 --- a/include/class/acc_operation.class.php +++ b/include/class/acc_operation.class.php @@ -609,8 +609,8 @@ class Acc_Operation $ret=new Acc_Fin($this->db,$this->jr_id); break; default: - $ret=new Acc_Misc($this->db,$this->jr_id); - break; + $ret=new Acc_Misc($this->db,$this->jr_id); + break; } $ret->get(); if ( empty($ret->det->array)) @@ -791,9 +791,20 @@ class Acc_Operation } $r.="

"; - $r.=HtmlInput::simple_array_to_hidden($array); - // + // For Misc Operation , if a card is given then there is no accounting + if ( $operation->signature==="ODS") { + $nb_array=count($array); + for ($i=0;$i<$nb_array;$i++) { + if (isset ($array["qc_".$i] ) && $array["qc_".$i] != "" ) { + $array["poste".$i]=""; + } + } + } + + // transform the operation into hidden element + $r.=HtmlInput::simple_array_to_hidden($array); + $r.=HtmlInput::submit(uniqid(), _("Dupliquer")); $r.=''; 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 ;