[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 05/17: restructure files and folders
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 05/17: restructure files and folders |
Date: |
Fri, 02 Oct 2015 10:22:16 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 1bdb15d4a2085d08fc84ea79672e7555c0350ca7
Author: Dany De Bontridder <address@hidden>
Date: Tue Sep 15 11:20:19 2015 +0200
restructure files and folders
---
html/do.php | 38 ++++++++++++-------
include/balance_age.inc.php | 2 +-
include/class/class_acc_ledger_purchase.php | 25 +++++++------
include/class/class_anc_balance_double.php | 2 +-
include/class/class_anc_balance_simple.php | 2 +-
include/class/class_anc_key.php | 3 +-
include/class/class_print_ledger_detail.php | 2 +-
include/class/class_print_ledger_fin.php | 2 +-
include/class/class_print_ledger_misc.php | 2 +-
include/class/class_print_ledger_simple.php | 2 +-
.../class_print_ledger_simple_without_vat.php | 2 +-
include/compta_ods.inc.php | 2 +-
include/export/export_balance_pdf.php | 2 +-
include/export/export_fiche_balance_pdf.php | 2 +-
include/export/export_fiche_detail_pdf.php | 2 +-
include/export/export_fiche_pdf.php | 2 +-
include/export/export_form_pdf.php | 2 +-
include/export/export_gl_pdf.php | 2 +-
include/export/export_ledger_pdf.php | 2 +-
include/export/export_poste_detail_pdf.php | 2 +-
include/export/export_security_pdf.php | 2 +-
include/opening.inc.php | 18 +++++-----
include/user_menu.php | 2 +-
23 files changed, 67 insertions(+), 55 deletions(-)
diff --git a/html/do.php b/html/do.php
index b305819..9640178 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 ca4aa49..a20cc81 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');
?>
</form>
<?php
- require_once 'class/class_balance_age.php';
+ require_once NOALYSS_INCLUDE.'/class/class_balance_age.php';
$balance=new Balance_Age($cn);
$type=HtmlInput::default_value_get('p_type', 'C');
$let=HtmlInput::default_value_get('p_let', 'unlet');
diff --git a/include/class/class_acc_ledger_purchase.php
b/include/class/class_acc_ledger_purchase.php
index 7100611..716303e 100644
--- a/include/class/class_acc_ledger_purchase.php
+++ b/include/class/class_acc_ledger_purchase.php
@@ -909,7 +909,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger
'Erreur dans l\'enregistrement '.
__FILE__.':'.__LINE__.' '.
$e->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");';
-
- $wLedger=$this->select_ledger('ACH',2);
+ $add_js.='update_name();';
+ $add_js.='update_pay_method();';
+ $add_js.='update_row("sold_item");';
+
+ $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 177a7f8..cceff77 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 246e78b..f5673f1 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 803f359..aef741f 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 c02608f..6b90310 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 8355327..21f56e6 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 95515ee..6afa26d 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 5a560f8..2fafc0c 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 b7c3ae1..3430fd6 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 2e4d18c..3dd7fff 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 b1c84c6..e16f90c 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 3e429bf..828fd47 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 846fc64..4fe9ea5 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 2e31622..343f6d0 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 7ebbf95..1081089 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 3aafae2..709e948 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 5722d7a..0e8d9c4 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 c9bebc2..d75c13e 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 11f0def..a6d81bc 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 ff52dd0..d3d9085 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 '<form class="print" method="post">';
@@ -129,7 +129,7 @@ if ($sa == '')
$wAvail->value = $array;
echo 'Choix du dossier :' . $wAvail->input('f');
- echo HtmlInput::submit('ok', 'Continuer');
+ echo HtmlInput::submit('ok', _('Continuer'));
echo '</form>';
echo '</div>';
@@ -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 "</form>";
- echo HtmlInput::button_anchor('Retour', $back);
+ echo HtmlInput::button_anchor(_('Retour'), $back);
exit(0);
}
/* --------------------------------------------------
@@ -175,7 +175,7 @@ if ($sa == 'step3')
'<div><h1 class="legend">Etape 3</h1>' .
'<h2 class="info">' . dossier::name($_REQUEST['f']) . '</h2>' .
'<form class="print" method="post">' .
- ' Choisissez le journal qui contiendra l\'opération d\'ouverture ';
+ _(" Choisissez le journal qui contiendra l'opération d'ouverture ");
echo dossier::hidden();
echo HtmlInput::hidden('p_action', 'ouv');
echo HtmlInput::hidden('sa', 'step4');
@@ -247,10 +247,10 @@ if ($sa == 'step4')
echo HtmlInput::hidden('p_jrn', $_REQUEST['p_jrn']);
echo $jrn->input($result, 0);
echo '<hr>';
- echo '<h2 class="notice">Ne corrigez pas encore, cliquez continuer pour
passer à l\'étape suivante</h2>';
+ echo '<h2 class="notice">'._("Ne corrigez pas encore, cliquez continuer
pour passer à l'étape suivante").'</h2>';
echo HtmlInput::submit('correct_it', 'Continuer');
echo '</form>';
- echo HtmlInput::button_anchor('Retour', $back);
+ echo HtmlInput::button_anchor(_('Retour'), $back);
echo '</div>';
}
diff --git a/include/user_menu.php b/include/user_menu.php
index add9409..ae0f1b0 100644
--- a/include/user_menu.php
+++ b/include/user_menu.php
@@ -161,4 +161,4 @@ function menu_acc_plan($p_start=1)
</ul>
<?php
}
-
+?>
\ No newline at end of file
- [Noalyss-commit] [noalyss] branch master updated (91e9218 -> b3cb736), Dany De Bontridder, 2015/10/08
- [Noalyss-commit] [noalyss] 01/17: if there is no contact show a warning, Dany De Bontridder, 2015/10/08
- [Noalyss-commit] [noalyss] 05/17: restructure files and folders,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 03/17: restructure files and folders, Dany De Bontridder, 2015/10/08
- [Noalyss-commit] [noalyss] 11/17: Use Dossier::connect (singleton) instead of new Databass(dossier_id), Dany De Bontridder, 2015/10/08
- [Noalyss-commit] [noalyss] 04/17: restructure files and folders, Dany De Bontridder, 2015/10/08
- [Noalyss-commit] [noalyss] 06/17: Use error_log with exception to log getTraceAsString, Dany De Bontridder, 2015/10/08
- [Noalyss-commit] [noalyss] 13/17: Fix problem in Bilan Belge, Dany De Bontridder, 2015/10/08
- [Noalyss-commit] [noalyss] 02/17: restructure files and folders, Dany De Bontridder, 2015/10/08
- [Noalyss-commit] [noalyss] 08/17: Cut at the 80th column, Dany De Bontridder, 2015/10/08
- [Noalyss-commit] [noalyss] 12/17: Fix problem in Bilan Belge, Dany De Bontridder, 2015/10/08
- [Noalyss-commit] [noalyss] 14/17: Fix problem in Bilan Belge, Dany De Bontridder, 2015/10/08
- [Noalyss-commit] [noalyss] 15/17: Translate, Dany De Bontridder, 2015/10/08