diff --git a/html/do.php b/html/do.php index b30581996..9640178c5 100644 --- a/html/do.php +++ b/html/do.php @@ -252,7 +252,8 @@ if (isset($_REQUEST['ac'])) alert(_('Accès menu impossible')); } else { - alert($e->getTraceAsString()); + alert($e->getMessage()); + error_log($e->getTraceAsString()); } } } @@ -261,21 +262,30 @@ else $default = find_default_module(); $user_profile=$g_user->get_profile(); - if ( $user_profile == "" ) + try + { + if ( $user_profile == "" ) throw new Exception (_('Aucun profil utilisateur')); - $menu_id=$cn->get_value('select - case when pm_id_v3 = 0 then - (case when pm_id_v2 = 0 then pm_id_v1 else pm_id_v2 end) - else pm_id_v3 end - from v_menu_profile where code= upper($1) and p_id=$2', - array($default,$user_profile)); - $_GET['ac']=$default; - $_POST['ac']=$default; - $_REQUEST['ac']=$default; - show_module($menu_id); - $all[0] = $default; - show_menu($menu_id); + $menu_id=$cn->get_value('select + case when pm_id_v3 = 0 then + (case when pm_id_v2 = 0 then pm_id_v1 else pm_id_v2 end) + else pm_id_v3 end + from v_menu_profile where code= upper($1) and p_id=$2', + array($default,$user_profile)); + $_GET['ac']=$default; + $_POST['ac']=$default; + $_REQUEST['ac']=$default; + show_module($menu_id); + $all[0] = $default; + show_menu($menu_id); + } + catch (Exception $exc) + { + echo $exc->getMessage(); + error_log($exc->getTraceAsString()); + } + } diff --git a/include/balance_age.inc.php b/include/balance_age.inc.php index ca4aa493b..a20cc813a 100644 --- a/include/balance_age.inc.php +++ b/include/balance_age.inc.php @@ -65,7 +65,7 @@ $w_lettre->selected=HtmlInput::default_value_get('p_let','unlet'); ?> getMessage().$e->getTraceAsString(); - + error_log($e->getMessage()); $this->db->rollback(); throw new Exception($e); } @@ -1032,16 +1032,17 @@ class Acc_Ledger_Purchase extends Acc_Ledger if ( $g_parameter->MY_PJ_SUGGEST=='Y') { $add_js="update_pj();"; +} + if ($g_parameter->MY_DATE_SUGGEST == 'Y') + { + $add_js.='get_last_date();'; } - if ($g_parameter->MY_DATE_SUGGEST == 'Y') - { - $add_js.='get_last_date();'; - } - $add_js.='update_name();'; - $add_js.='update_pay_method();'; - $add_js.='update_row("sold_item");'; + $add_js.='update_name();'; + $add_js.='update_pay_method();'; + $add_js.='update_row("sold_item");'; - $wLedger=$this->select_ledger('ACH',2); + $wLedger=$this->select_ledger('ACH',2); + if ($wLedger == null) throw new Exception(_('Pas de journal disponible')); $wLedger->javascript="onChange='update_predef(\"ach\",\"f\",\"".$_REQUEST['ac']."\");$add_js'"; $wLedger->table=1; @@ -1717,8 +1718,8 @@ EOF; * Retrieve data from the view v_detail_purchase * @global $g_user connected user * @param $p_from jrn.jr_tech_per from - * @param type $p_end jrn.jr_tech_per to - * @return type + * @param $p_end jrn.jr_tech_per to + * @return handle to database result */ function get_detail_purchase($p_from,$p_end) { diff --git a/include/class/class_anc_balance_double.php b/include/class/class_anc_balance_double.php index 177a7f888..cceff7720 100644 --- a/include/class/class_anc_balance_double.php +++ b/include/class/class_anc_balance_double.php @@ -34,7 +34,7 @@ require_once NOALYSS_INCLUDE.'/lib/class_ibutton.php'; require_once NOALYSS_INCLUDE.'/lib/class_ihidden.php'; require_once NOALYSS_INCLUDE.'/class/class_anc_print.php'; require_once NOALYSS_INCLUDE.'/class/class_anc_plan.php'; -require_once NOALYSS_INCLUDE.'/lib/lib/class_pdf.php'; +require_once NOALYSS_INCLUDE.'/lib/class_pdf.php'; class Anc_Balance_Double extends Anc_Print { diff --git a/include/class/class_anc_balance_simple.php b/include/class/class_anc_balance_simple.php index 246e78bf0..f5673f129 100644 --- a/include/class/class_anc_balance_simple.php +++ b/include/class/class_anc_balance_simple.php @@ -27,7 +27,7 @@ require_once NOALYSS_INCLUDE.'/lib/class_ihidden.php'; require_once NOALYSS_INCLUDE.'/class/class_anc_print.php'; require_once NOALYSS_INCLUDE.'/class/class_anc_plan.php'; require_once NOALYSS_INCLUDE.'/lib/ac_common.php'; -require_once NOALYSS_INCLUDE.'/lib/lib/class_pdf.php'; +require_once NOALYSS_INCLUDE.'/lib/class_pdf.php'; require_once NOALYSS_INCLUDE.'/header_print.php'; /*! \brief manage the simple balance for CA, inherit from balance_ca * diff --git a/include/class/class_anc_key.php b/include/class/class_anc_key.php index 803f35916..aef741f1e 100644 --- a/include/class/class_anc_key.php +++ b/include/class/class_anc_key.php @@ -265,7 +265,8 @@ class Anc_Key } catch (Exception $e) { - if ( DEBUG ) { echo $e->getTraceAsString(); var_dump($_POST);} else { echo _('erreur');} + if ( DEBUG ) { echo $e->getTraceAsString(); } else { echo _('erreur');} + error_log($e->getTraceAsString()); $cn->rollback(); } } diff --git a/include/class/class_print_ledger_detail.php b/include/class/class_print_ledger_detail.php index c02608f41..6b9031075 100644 --- a/include/class/class_print_ledger_detail.php +++ b/include/class/class_print_ledger_detail.php @@ -23,7 +23,7 @@ * \brief this class extends PDF and let you export the detailled printing * of any ledgers */ -require_once NOALYSS_INCLUDE.'/lib/lib/class_pdf.php'; +require_once NOALYSS_INCLUDE.'/lib/class_pdf.php'; class Print_Ledger_Detail extends PDF { diff --git a/include/class/class_print_ledger_fin.php b/include/class/class_print_ledger_fin.php index 835532752..21f56e6b4 100644 --- a/include/class/class_print_ledger_fin.php +++ b/include/class/class_print_ledger_fin.php @@ -22,7 +22,7 @@ /*!\file * \brief print a listing of financial */ -require_once NOALYSS_INCLUDE.'/lib/lib/class_pdf.php'; +require_once NOALYSS_INCLUDE.'/lib/class_pdf.php'; class Print_Ledger_Financial extends PDF { private $rap_amount; /* amount from begining exercice */ diff --git a/include/class/class_print_ledger_misc.php b/include/class/class_print_ledger_misc.php index 95515ee5d..6afa26dc6 100644 --- a/include/class/class_print_ledger_misc.php +++ b/include/class/class_print_ledger_misc.php @@ -22,7 +22,7 @@ /*!\file * \brief print a listing of financial */ -require_once NOALYSS_INCLUDE.'/lib/lib/class_pdf.php'; +require_once NOALYSS_INCLUDE.'/lib/class_pdf.php'; class Print_Ledger_Misc extends PDF { function __construct($p_cn,$p_jrn) diff --git a/include/class/class_print_ledger_simple.php b/include/class/class_print_ledger_simple.php index 5a560f80e..2fafc0c72 100644 --- a/include/class/class_print_ledger_simple.php +++ b/include/class/class_print_ledger_simple.php @@ -23,7 +23,7 @@ * \brief this class extends PDF and let you export the detailled printing * of any ledgers */ -require_once NOALYSS_INCLUDE.'/lib/lib/class_pdf.php'; +require_once NOALYSS_INCLUDE.'/lib/class_pdf.php'; class Print_Ledger_Simple extends PDF { diff --git a/include/class/class_print_ledger_simple_without_vat.php b/include/class/class_print_ledger_simple_without_vat.php index b7c3ae162..3430fd63c 100644 --- a/include/class/class_print_ledger_simple_without_vat.php +++ b/include/class/class_print_ledger_simple_without_vat.php @@ -23,7 +23,7 @@ * \brief this class extends PDF and let you export the detailled printing * of any ledgers */ -require_once NOALYSS_INCLUDE.'/lib/lib/class_pdf.php'; +require_once NOALYSS_INCLUDE.'/lib/class_pdf.php'; class Print_Ledger_Simple_Without_Vat extends PDF { diff --git a/include/compta_ods.inc.php b/include/compta_ods.inc.php index 2e4d18c33..3dd7fffd8 100644 --- a/include/compta_ods.inc.php +++ b/include/compta_ods.inc.php @@ -76,7 +76,7 @@ elseif (isset($_POST['summary'])) { echo alert($e->getMessage()); $p_msg=$e->getMessage(); - require('operation_ods_new.inc.php'); + require_once NOALYSS_INCLUDE.'/operation_ods_new.inc.php'; } return; diff --git a/include/export/export_balance_pdf.php b/include/export/export_balance_pdf.php index b1c84c6d4..e16f90c5d 100644 --- a/include/export/export_balance_pdf.php +++ b/include/export/export_balance_pdf.php @@ -35,7 +35,7 @@ require_once NOALYSS_INCLUDE.'/lib/class_database.php'; include_once("class/class_acc_balance.php"); require_once NOALYSS_INCLUDE.'/header_print.php'; require_once NOALYSS_INCLUDE.'/class/class_dossier.php'; -require_once NOALYSS_INCLUDE.'/lib/lib/class_pdf.php'; +require_once NOALYSS_INCLUDE.'/lib/class_pdf.php'; $gDossier=dossier::id(); bcscale(4); $cn=new Database($gDossier); diff --git a/include/export/export_fiche_balance_pdf.php b/include/export/export_fiche_balance_pdf.php index 3e429bfb1..828fd4777 100644 --- a/include/export/export_fiche_balance_pdf.php +++ b/include/export/export_fiche_balance_pdf.php @@ -27,7 +27,7 @@ if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis'); // Security we check if user does exist and his privilege require_once NOALYSS_INCLUDE.'/class/class_user.php'; require_once NOALYSS_INCLUDE.'/lib/class_database.php'; -require_once NOALYSS_INCLUDE.'/lib/lib/class_pdf.php'; +require_once NOALYSS_INCLUDE.'/lib/class_pdf.php'; require_once NOALYSS_INCLUDE.'/class/class_lettering.php'; require_once NOALYSS_INCLUDE.'/class/class_dossier.php'; require_once NOALYSS_INCLUDE.'/lib/ac_common.php'; diff --git a/include/export/export_fiche_detail_pdf.php b/include/export/export_fiche_detail_pdf.php index 846fc64eb..4fe9ea569 100644 --- a/include/export/export_fiche_detail_pdf.php +++ b/include/export/export_fiche_detail_pdf.php @@ -30,7 +30,7 @@ include_once("lib/class_impress.php"); require_once NOALYSS_INCLUDE.'/class/class_fiche.php'; require_once NOALYSS_INCLUDE.'/header_print.php'; require_once NOALYSS_INCLUDE.'/class/class_dossier.php'; -require_once NOALYSS_INCLUDE.'/lib/lib/class_pdf.php'; +require_once NOALYSS_INCLUDE.'/lib/class_pdf.php'; $gDossier=dossier::id(); $cn=new Database($gDossier); diff --git a/include/export/export_fiche_pdf.php b/include/export/export_fiche_pdf.php index 2e31622fa..343f6d050 100644 --- a/include/export/export_fiche_pdf.php +++ b/include/export/export_fiche_pdf.php @@ -27,7 +27,7 @@ if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis'); // Security we check if user does exist and his privilege require_once NOALYSS_INCLUDE.'/class/class_user.php'; require_once NOALYSS_INCLUDE.'/lib/class_database.php'; -require_once NOALYSS_INCLUDE.'/lib/lib/class_pdf.php'; +require_once NOALYSS_INCLUDE.'/lib/class_pdf.php'; require_once NOALYSS_INCLUDE.'/class/class_lettering.php'; require_once NOALYSS_INCLUDE.'/class/class_dossier.php'; require_once NOALYSS_INCLUDE.'/lib/ac_common.php'; diff --git a/include/export/export_form_pdf.php b/include/export/export_form_pdf.php index 7ebbf9597..10810896b 100644 --- a/include/export/export_form_pdf.php +++ b/include/export/export_form_pdf.php @@ -31,7 +31,7 @@ require_once NOALYSS_INCLUDE.'/class/class_user.php'; require_once NOALYSS_INCLUDE.'/header_print.php'; require_once NOALYSS_INCLUDE.'/class/class_dossier.php'; require_once NOALYSS_INCLUDE.'/class/class_acc_report.php'; -require_once NOALYSS_INCLUDE.'/lib/lib/class_pdf.php'; +require_once NOALYSS_INCLUDE.'/lib/class_pdf.php'; $gDossier=dossier::id(); diff --git a/include/export/export_gl_pdf.php b/include/export/export_gl_pdf.php index 3aafae240..709e9485f 100644 --- a/include/export/export_gl_pdf.php +++ b/include/export/export_gl_pdf.php @@ -30,7 +30,7 @@ include_once('lib/class_impress.php'); require_once NOALYSS_INCLUDE.'/class/class_own.php'; require_once NOALYSS_INCLUDE.'/class/class_dossier.php'; require_once NOALYSS_INCLUDE.'/class/class_user.php'; -require_once NOALYSS_INCLUDE.'/lib/lib/class_pdf.php'; +require_once NOALYSS_INCLUDE.'/lib/class_pdf.php'; bcscale(2); $gDossier=dossier::id(); diff --git a/include/export/export_ledger_pdf.php b/include/export/export_ledger_pdf.php index 5722d7a9d..0e8d9c4ab 100644 --- a/include/export/export_ledger_pdf.php +++ b/include/export/export_ledger_pdf.php @@ -28,7 +28,7 @@ if (!defined('ALLOWED')) die('Appel direct ne sont pas permis'); require_once NOALYSS_INCLUDE.'/class/class_dossier.php'; $gDossier = dossier::id(); -require_once NOALYSS_INCLUDE.'/lib/lib/class_pdf.php'; +require_once NOALYSS_INCLUDE.'/lib/class_pdf.php'; require_once NOALYSS_INCLUDE.'/class/class_user.php'; require_once NOALYSS_INCLUDE.'/lib/ac_common.php'; require_once NOALYSS_INCLUDE.'/lib/class_database.php'; diff --git a/include/export/export_poste_detail_pdf.php b/include/export/export_poste_detail_pdf.php index c9bebc2ae..d75c13e06 100644 --- a/include/export/export_poste_detail_pdf.php +++ b/include/export/export_poste_detail_pdf.php @@ -30,7 +30,7 @@ require_once NOALYSS_INCLUDE.'/lib/class_impress.php'; require_once NOALYSS_INCLUDE.'/header_print.php'; require_once NOALYSS_INCLUDE.'/class/class_dossier.php'; require_once NOALYSS_INCLUDE.'/class/class_user.php'; -require_once NOALYSS_INCLUDE.'/lib/lib/class_pdf.php'; +require_once NOALYSS_INCLUDE.'/lib/class_pdf.php'; $gDossier=dossier::id(); diff --git a/include/export/export_security_pdf.php b/include/export/export_security_pdf.php index 11f0def5f..a6d81bc2d 100755 --- a/include/export/export_security_pdf.php +++ b/include/export/export_security_pdf.php @@ -26,7 +26,7 @@ require_once NOALYSS_INCLUDE.'/class/class_dossier.php'; $gDossier=dossier::id(); require_once NOALYSS_INCLUDE.'/lib/ac_common.php'; require_once NOALYSS_INCLUDE.'/lib/class_database.php'; -require_once NOALYSS_INCLUDE.'/lib/lib/class_pdf.php'; +require_once NOALYSS_INCLUDE.'/lib/class_pdf.php'; $cn=new Database($gDossier); //----------------------------------------------------- // Security diff --git a/include/opening.inc.php b/include/opening.inc.php index ff52dd0be..d3d90853f 100644 --- a/include/opening.inc.php +++ b/include/opening.inc.php @@ -58,7 +58,7 @@ if ( isset($_POST['summary'])) } catch (Exception $e) { echo alert($e->getMessage()); - require('operation_ods_new.inc.php'); + require(NOALYSS_INCLUDE.'/operation_ods_new.inc.php'); } return; @@ -88,7 +88,7 @@ if (isset($_POST['save'])) } catch (Exception $e) { - require('operation_ods_new.inc.php'); + require(NOALYSS_INCLUDE.'/operation_ods_new.inc.php'); alert($e->getMessage()); } return; @@ -109,7 +109,7 @@ if ($sa == '') if (empty($avail)) { - echo '*** Aucun dossier ***'; + echo '*** '._("Aucun dossier").' ***'; return; } echo '
'; echo ''; @@ -160,10 +160,10 @@ if ($sa == 'step2') $w->value = $periode; $w->name = "p_periode"; echo 'Période : ' . $w->input(); - echo HtmlInput::submit('ok', 'Continuer'); + echo HtmlInput::submit('ok', _('Continuer')); echo dossier::hidden(); echo ""; - echo HtmlInput::button_anchor('Retour', $back); + echo HtmlInput::button_anchor(_('Retour'), $back); exit(0); } /* -------------------------------------------------- @@ -175,7 +175,7 @@ if ($sa == 'step3') '