From c9549a5154baaa91683165ae36fe8c5a5814f77a Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Mon, 3 Nov 2014 20:58:49 +0100 Subject: [PATCH 001/119] Test unitaire avec PHPUNIT class_acc_account_ledger.php --- include/class_acc_balance.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/class_acc_balance.php b/include/class_acc_balance.php index 9480f325f..b42904107 100644 --- a/include/class_acc_balance.php +++ b/include/class_acc_balance.php @@ -248,12 +248,13 @@ class Acc_Balance } /** * set the $this->jrn to the cat + * @todo Cette function semble ne pas fonctionner correctement */ function filter_cat($p_array) { if ( empty($p_array) ) { - $bal->jn=null; + $this->jrn=null; return; } /* get the list of jrn of the cat. */ From 320593d5274370dcb02d59cfcedad28df0e0ea21 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Mon, 3 Nov 2014 21:02:03 +0100 Subject: [PATCH 002/119] Ajout traduction + header --- include/class_acc_bilan.php | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/include/class_acc_bilan.php b/include/class_acc_bilan.php index cbdab052a..4fb816930 100644 --- a/include/class_acc_bilan.php +++ b/include/class_acc_bilan.php @@ -246,7 +246,7 @@ class Acc_Bilan try { if ( $this->b_id=="") - throw new Exception("le formulaire id n'est pas donnee"); + throw new Exception(_("le formulaire id n'est pas donnee")); $sql="select b_name,b_file_template,b_file_form,lower(b_type) as b_type from bilan where". " b_id = ".$this->b_id; @@ -603,16 +603,21 @@ class Acc_Bilan break; case 'odt': case 'ods': - /* header("Pragma: public"); + header("Pragma: public"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Cache-Control: must-revalidate"); if ( $this->b_type == 'odt' ) - header('Content-type: application/vnd.oasis.opendocument.text'); + { + header('Content-type: application/vnd.oasis.opendocument.text'); + header('Content-Disposition: attachment;filename="'.$this->b_name.'.odt"',FALSE); + } if ( $this->b_type == 'ods' ) - header('Content-type: application/vnd.oasis.opendocument.spreadsheet'); - header('Content-Disposition: attachment;filename="'.$this->b_name.'.odt"',FALSE); + { + header('Content-type: application/vnd.oasis.opendocument.spreadsheet'); + header('Content-Disposition: attachment;filename="'.$this->b_name.'.ods"',FALSE); + } + header("Accept-Ranges: bytes"); - */ ob_start(); // save the file in a temp folder // create a temp directory in /tmp to unpack file and to parse it @@ -627,7 +632,7 @@ class Acc_Bilan $work_file=basename($file_base); if ( copy ($file_base,$work_file) == false ) { - echo "Je ne peux pas ouvrir ce fichier "; + echo _("Ouverture fichier impossible"); exit(); } /* From c924216d2dc355d849a8bedbf48fd58ae90338b8 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 5 Nov 2014 20:38:23 +0100 Subject: [PATCH 003/119] =?UTF-8?q?Task=20#1041=20-=20Balance=20:=20ajout?= =?UTF-8?q?=20bouton=20=20pour=20montrer=20ou=20cacher=20les=20conditions?= =?UTF-8?q?=20suppl=C3=A9mentaires?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/balance.inc.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/include/balance.inc.php b/include/balance.inc.php index 6185b022b..6cbe58e79 100644 --- a/include/balance.inc.php +++ b/include/balance.inc.php @@ -44,7 +44,7 @@ echo '
'; */ echo '
'._('Choississez un autre exercice').'';; echo '
'; -echo 'Choississez un autre exercice :'; +echo _('Choississez un autre exercice')." : "; $ex=new Exercice($cn); $wex=$ex->select('exercice',$exercice,' onchange="submit(this)"'); echo $wex->input(); @@ -72,7 +72,7 @@ $input_from->cn=$cn; $input_from->filter_year=true; $input_from->user=$g_user; -echo 'Depuis :'.$input_from->input(); +echo _('Depuis').' :'.$input_from->input(); // filter on the current year $to=(isset($_GET["to_periode"]))?$_GET['to_periode']:""; $input_to=new IPeriod("to_periode",$to,$exercice); @@ -81,10 +81,11 @@ $input_to->filter_year=true; $input_to->type=ALL; $input_to->cn=$cn; $input_to->user=$g_user; -echo ' jusque :'.$input_to->input(); - +echo " "._('jusque').' :'.$input_to->input(); +echo '
'; +echo HtmlInput::button_action(_('Avancé'), " if (\$('balance_advanced_div').style.display=='none') { \$('balance_advanced_div').show();} else { \$('balance_advanced_div').hide();}"); //------------------------------------------------- - +echo ''; +echo '
'; echo HtmlInput::submit("view",_("Visualisation")); echo ''; echo '
'; From f0faef0d69154904a02d40548d23f82ffb589324 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 5 Nov 2014 20:42:56 +0100 Subject: [PATCH 004/119] cosmetic : remove
from history_operation.inc.php --- include/class_acc_ledger.php | 1 - 1 file changed, 1 deletion(-) diff --git a/include/class_acc_ledger.php b/include/class_acc_ledger.php index 1194d7ec1..01f4e8596 100644 --- a/include/class_acc_ledger.php +++ b/include/class_acc_ledger.php @@ -2930,7 +2930,6 @@ class Acc_Ledger extends jrn_def_sql $button->javascript = "toggleHideShow('search_form','tfs');"; $r.=$button->input(); - $r.='
'; return $r; } From ba727f0860aa80eaa7b0600a9e30f37e142df63c Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 5 Nov 2014 20:53:23 +0100 Subject: [PATCH 005/119] cosmetic : add separator + translation --- include/fiche.inc.php | 2 +- include/history_operation.inc.php | 3 ++- include/impress_bilan.inc.php | 2 +- include/impress_jrn.inc.php | 6 +++--- include/impress_rapport.inc.php | 25 +++++++++++++------------ 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/include/fiche.inc.php b/include/fiche.inc.php index cee87ab91..44a29a276 100644 --- a/include/fiche.inc.php +++ b/include/fiche.inc.php @@ -88,7 +88,7 @@ $search_card_js=sprintf('onclick="boxsearch_card(\'%d\')"',dossier::id());
:input()?> - +
'; diff --git a/include/history_operation.inc.php b/include/history_operation.inc.php index 01edcae81..9a459671d 100644 --- a/include/history_operation.inc.php +++ b/include/history_operation.inc.php @@ -20,7 +20,8 @@ // Copyright Author Dany De Bontridder danydb@aevalys.eu -/**\file +/** + * \file * * * \brief diff --git a/include/impress_bilan.inc.php b/include/impress_bilan.inc.php index e02f7e857..efe052bd2 100644 --- a/include/impress_bilan.inc.php +++ b/include/impress_bilan.inc.php @@ -92,6 +92,6 @@ echo _(' Attention : si le bilan n\'est pas équilibré.
les comptes passifs ont un solde créditeur (sauf les comptes dit inversés) Utilisez la balance des comptes pour vérifier.
'); - +echo '
'; echo ''; ?> diff --git a/include/impress_jrn.inc.php b/include/impress_jrn.inc.php index 482bea2a8..37c357ba2 100644 --- a/include/impress_jrn.inc.php +++ b/include/impress_jrn.inc.php @@ -81,9 +81,9 @@ echo '
'; * Let you change the exercice */ echo '
'; -echo '
' . _('Choississez un autre exercice') . ''; +echo '
' . _('Exercice') . ''; ; -echo 'Choississez un autre exercice :'; +echo _('Choississez un autre exercice').' :'; $ex = new Exercice($cn); $wex = $ex->select('exercice', $exercice, ' onchange="submit(this)"'); echo $wex->input(); @@ -135,7 +135,7 @@ echo ''; print HtmlInput::submit('bt_html', 'Visualisation'); echo ''; - +echo '
'; //----------------------------------------------------- diff --git a/include/impress_rapport.inc.php b/include/impress_rapport.inc.php index 7b6c21762..e873a5bb5 100644 --- a/include/impress_rapport.inc.php +++ b/include/impress_rapport.inc.php @@ -179,7 +179,7 @@ $exercice=(isset($_GET['exercice']))?$_GET['exercice']:$g_user->get_exercice(); /* * Let you change the exercice */ -echo '
'._('Choississez un autre exercice').'';; +echo '
'._('Exercice').'';; echo '
'; echo 'Choississez un autre exercice :'; $ex=new Exercice($cn); @@ -200,13 +200,13 @@ echo dossier::hidden(); echo ''; $w=new ISelect(); $w->table=1; -print td("Choississez le rapport"); +print td(_("Choississez le rapport")); print $w->input("form_id",$ret); print ''; //-- calendrier ou periode comptable $aCal=array( - array('value'=>0,'label'=>'Période comptable'), - array('value'=>1,'label'=>'Calendrier') + array('value'=>0,'label'=>_('Période comptable')), + array('value'=>1,'label'=>_('Calendrier')) ); $w->javascript=' onchange=enable_type_periode();'; @@ -237,31 +237,32 @@ $date_from->id='from_date'; $date_to=new IDate('to_date'); $date_to->id='to_date'; -echo td("Calendrier depuis :"); +echo td(_("Calendrier depuis :")); echo td($date_from->input('from_date')); -echo td("jusque"); +echo td(_("jusque")); echo td($date_to->input('to_date')); echo ''; $aStep=array( - array('value'=>0,'label'=>'Pas d\'étape'), - array('value'=>1,'label'=>'1 mois') + array('value'=>0,'label'=>_('Pas d\'étape')), + array('value'=>1,'label'=>_('1 mois')) ); echo ''; -echo td('Par étape de'); +echo td(_('Par étape de')); $w->id='p_step'; echo $w->input('p_step',$aStep); echo ''; echo '
'; -echo ' Attention : vous ne pouvez pas utiliser les étapes avec les dates calendriers.'; +echo ' '._('Attention : vous ne pouvez pas utiliser les étapes avec les dates calendriers.').''; echo '
'; -echo ' Les clauses FROM sont ignorés avec les dates calendriers'; +echo ''._('Les clauses FROM sont ignorés avec les dates calendriers').''; echo '
'; -print HtmlInput::submit('bt_html','Visualisation'); +print HtmlInput::submit('bt_html',_('Visualisation')); echo '
'; echo ''; +echo '
'; echo '
'; //----------------------------------------------------- // Function From 113dc945e790ab10cc473b65d00e5f6c105b6784 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 5 Nov 2014 20:53:53 +0100 Subject: [PATCH 006/119] minor change : comment --- include/class_acc_compute.php | 3 ++- include/class_stock.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/class_acc_compute.php b/include/class_acc_compute.php index 88d3c3763..5424a5094 100644 --- a/include/class_acc_compute.php +++ b/include/class_acc_compute.php @@ -179,7 +179,8 @@ class Acc_Compute } - /*!\brief verify that all the amount are positive or null + /**! + * \brief verify that all the amount are positive or null * otherwise throw a exception and the sum of amount + vat must * equal to the sum of all the amount of the current object * so you have to copy the object before computing anything and pass diff --git a/include/class_stock.php b/include/class_stock.php index dd1a8f981..421c34c72 100644 --- a/include/class_stock.php +++ b/include/class_stock.php @@ -26,7 +26,7 @@ * * */ -require 'class_stock_sql.php'; +require_once 'class_stock_sql.php'; class Stock extends Stock_Sql { From 3c16a33f58f9ca5c386075557d4223e6bfcae25f Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 5 Nov 2014 20:54:21 +0100 Subject: [PATCH 007/119] minor change : add missing div --- include/extension_choice.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/include/extension_choice.inc.php b/include/extension_choice.inc.php index 82ef52be0..7e2490e50 100644 --- a/include/extension_choice.inc.php +++ b/include/extension_choice.inc.php @@ -43,6 +43,7 @@ if ( count($a->value)==1 ) { $_REQUEST['plugin_code']=$a->value[0]['value']; } +echo ''; /*else { if (!isset($_REQUEST['ac'])) echo_warning ("ac non positionné"); From c4424df4ca8132fd10fab794ffc6bd1a70ff7436 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 5 Nov 2014 21:04:01 +0100 Subject: [PATCH 008/119] cosmetic : improve appearance impress bilan --- include/impress_bilan.inc.php | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/include/impress_bilan.inc.php b/include/impress_bilan.inc.php index efe052bd2..85e16b668 100644 --- a/include/impress_bilan.inc.php +++ b/include/impress_bilan.inc.php @@ -41,13 +41,14 @@ $bilan=new Acc_Bilan($cn); $bilan->get_request_get(); echo '
'; $exercice=(isset($_GET['exercice']))?$_GET['exercice']:$g_user->get_exercice(); - +if ( ! isset ($_GET['verif'])) +{ /* * Let you change the exercice */ -echo '
'._('Choississez un autre exercice').'';; +echo '
'._('Exercice').'';; echo '
'; -echo 'Choississez un autre exercice :'; +echo _('Choississez un autre exercice'); $ex=new Exercice($cn); $wex=$ex->select('exercice',$exercice,' onchange="submit(this)"'); echo $wex->input(); @@ -61,16 +62,25 @@ echo ''; echo HtmlInput::hidden('type','bilan'); echo dossier::hidden(); echo $bilan->display_form ($filter_year); +echo ' '._('Attention : si le bilan n\'est pas équilibré.
Vérifiez
    +
  • L\'affectation du résultat est fait
  • +
  • Vos comptes actifs ont un solde débiteur (sauf les comptes dit inversés)
  • +
  • les comptes passifs ont un solde créditeur (sauf les comptes dit inversés)
  • +
+ Utilisez la balance des comptes pour vérifier.').'
'; echo HtmlInput::submit('verif',_('Verification comptabilite')); echo HtmlInput::get_to_hidden(array('ac','exercice')); echo '
'; - +} if ( isset($_GET['verif'])) { - echo '

Etape 2 :Impression

'; - + $periode=new Periode($cn); + $date_from=$periode->first_day($bilan->from); + $date_to=$periode->last_day($bilan->to); + echo '

'._('Etape 2 :Impression')." ".$date_from.'-'.$date_to.'

'; + $bilan->get_request_get(); $bilan->verify(); @@ -86,12 +96,7 @@ if ( isset($_GET['verif'])) echo ''; } -echo _(' Attention : si le bilan n\'est pas équilibré.
Vérifiez
    -
  • L\'affectation du résultat est fait
  • -
  • Vos comptes actifs ont un solde débiteur (sauf les comptes dit inversés)
  • -
  • les comptes passifs ont un solde créditeur (sauf les comptes dit inversés)
  • -
- Utilisez la balance des comptes pour vérifier.
'); + echo '
'; echo '
'; ?> From d3565b071b469f44204f244c8427b5be78eeb841 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 5 Nov 2014 21:25:37 +0100 Subject: [PATCH 009/119] cosmetic : improve appearance impress reconciliation --- include/template/impress_reconciliation.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/include/template/impress_reconciliation.php b/include/template/impress_reconciliation.php index aa5aa2283..2091f917a 100644 --- a/include/template/impress_reconciliation.php +++ b/include/template/impress_reconciliation.php @@ -1,7 +1,7 @@ +?>
%s', - $array[$i]['first']['jr_id'],$gDossier,$array[$i]['first']['jr_internal']); + $detail = HtmlInput::detail_op($array[$i]['first']['jr_id'], $array[$i]['first']['jr_internal']); $r.=td($detail); $r.=td($array[$i]['first']['jr_pj_number']); $r.=td($array[$i]['first']['jr_comment']); @@ -40,24 +39,27 @@ for ($i=0;$ishow_detail($ret); if ( isset($array[$i]['depend']) ) { + $tot2=0; $limit=count($array[$i]['depend'])-1; for ($e=0;$e%s', - $array[$i]['depend'][$e]['jr_id'],$gDossier,$array[$i]['depend'][$e]['jr_internal']); + $detail = HtmlInput::detail_op($array[$i]['depend'][$e]['jr_id'], $array[$i]['depend'][$e]['jr_internal']); $r.=td($detail); $r.=td($array[$i]['depend'][$e]['jr_pj_number']); $r.=td($array[$i]['depend'][$e]['jr_comment']); $r.=td(nbm($array[$i]['depend'][$e]['jr_montant']),'style="text-align:right"'); + $tot2=bcadd($tot2,$array[$i]['depend'][$e]['jr_montant']); if ( $e==$limit) - echo ''.$r.''; + echo ''.$r.''; else echo tr($r); $ret=$acc_reconciliation->db->execute('detail_quant',array($array[$i]['depend'][$e]['jr_id'])); $acc_reconciliation->show_detail($ret); } + echo tr(td(_('Total ')).td('operation 1').td(nbm($tot)).td('operation 2').td(nbm($tot2)).td('Delta').td(bcsub($tot,$tot2))); + echo tr(td('
',' colspan="6" style="witdh:auto"')); } } From aaa81b8c3016921a17ede5c6d0508d7ffe00c357 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 5 Nov 2014 21:29:10 +0100 Subject: [PATCH 010/119] cosmetic : improve appearance impress reconciliation --- include/template/impress_reconciliation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/template/impress_reconciliation.php b/include/template/impress_reconciliation.php index 2091f917a..5da24b948 100644 --- a/include/template/impress_reconciliation.php +++ b/include/template/impress_reconciliation.php @@ -58,7 +58,7 @@ for ($i=0;$idb->execute('detail_quant',array($array[$i]['depend'][$e]['jr_id'])); $acc_reconciliation->show_detail($ret); } - echo tr(td(_('Total ')).td('operation 1').td(nbm($tot)).td('operation 2').td(nbm($tot2)).td('Delta').td(bcsub($tot,$tot2))); + echo tr(td(_('Total ')).td('operation').td(nbm($tot)).td('operations dépendantes').td(nbm($tot2)).td('Delta').td(bcsub($tot,$tot2)),' class="highlight"'); echo tr(td('
',' colspan="6" style="witdh:auto"')); } From ea56549a359744c02a07c93ec4863dbb13d98c75 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 5 Nov 2014 21:48:28 +0100 Subject: [PATCH 011/119] cosmetic : improve appearance fiche historique --- include/fiche.inc.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/include/fiche.inc.php b/include/fiche.inc.php index 44a29a276..e19683a0d 100644 --- a/include/fiche.inc.php +++ b/include/fiche.inc.php @@ -120,7 +120,7 @@ $str_add_card = ($g_user->check_action(FICADD) == 1) ? $h_add_card_b->input() : if ($array == null) { echo '
'; - echo '

Aucune fiche trouvée

'; + echo '

'._('Aucune fiche trouvée').'

'; echo $str_add_card; echo '
'; exit(); @@ -275,8 +275,8 @@ if ($_GET['histo'] == 4 || $_GET['histo'] == 5) { if (isDate($_REQUEST['start']) == null || isDate($_REQUEST['end']) == null) { - echo h2('Date invalide !', 'class="error"'); - alert('Date invalide !'); + echo h2(_('Date invalide !'), 'class="error"'); + alert(_('Date invalide !')); exit; } if ( $allcard == 0 ) echo $str_add_card; @@ -287,7 +287,7 @@ if ($_GET['histo'] == 4 || $_GET['histo'] == 5) $fd = new Fiche_Def($cn, $_REQUEST['cat']); if ($allcard == 0 && $fd->hasAttribute(ATTR_DEF_ACCOUNT) == false) { - echo alert("Cette catégorie n'ayant pas de poste comptable n'a pas de balance"); + echo alert(_("Cette catégorie n'ayant pas de poste comptable n'a pas de balance")); exit; } // all card @@ -313,9 +313,9 @@ if ($_GET['histo'] == 4 || $_GET['histo'] == 5) continue; } echo '

' . $cn->get_value("select fd_label from fiche_def where fd_id=$1", array($afiche[$e]['fd_id'])) . '

'; - $id="table_".$afiche[$e]."_id"; + $id="table_".$afiche[$e]['fd_id']."_id"; echo _('Filtre rapide:').HtmlInput::filter_table($id, '0,1,2', '1'); - echo '
@@ -24,12 +24,11 @@
'; + echo '
'; echo tr( th('Quick Code') . th('Libellé') . @@ -364,7 +364,7 @@ if ($_GET['histo'] == 4 || $_GET['histo'] == 5) td(nbm($sum_deb), 'style="text-align:right"'). td(nbm($sum_cred), 'style="text-align:right"'). td(nbm(abs($sum_solde)), 'style="text-align:right"'). - td((($sum_deb < $sum_cred) ? 'CRED' : 'DEB'), 'style="text-align:right"'),""); + td((($sum_deb < $sum_cred) ? 'CRED' : 'DEB'), 'style="text-align:right"'),' class="highlight"'); echo ''; echo '
'; } @@ -433,11 +433,13 @@ for ($e = 0; $e < count($afiche); $e++) /* skip if nothing to display */ if (count($letter->content) == 0) continue; - $detail_card = HtmlInput::card_detail($row->strAttribut(ATTR_DEF_QUICKCODE), $row->strAttribut(ATTR_DEF_NAME))."poste :".$row->strAttribut(ATTR_DEF_ACCOUNT).HtmlInput::infobulle(27); + $detail_card = HtmlInput::card_detail($row->strAttribut(ATTR_DEF_QUICKCODE), $row->strAttribut(ATTR_DEF_NAME)); - echo '

' . $detail_card . '

'; + echo '

' . $detail_card ; + echo "poste " + . ":".HtmlInput::history_account($row->strAttribut(ATTR_DEF_ACCOUNT),$row->strAttribut(ATTR_DEF_ACCOUNT),'display:inline').HtmlInput::infobulle(27).'

'; - echo ''; + echo '
'; echo ''; echo th(_('Date')); echo th(_('ref')); From 46ad32c0809b40671be2df2bb4bb8742caad9856 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 5 Nov 2014 21:59:44 +0100 Subject: [PATCH 012/119] cosmetic : Fieldset title --- include/balance.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/balance.inc.php b/include/balance.inc.php index 6cbe58e79..b37ba4695 100644 --- a/include/balance.inc.php +++ b/include/balance.inc.php @@ -42,7 +42,7 @@ echo '
'; /* * Let you change the exercice */ -echo '
'._('Choississez un autre exercice').'';; +echo '
'._('Exercice').'';; echo '
'; echo _('Choississez un autre exercice')." : "; $ex=new Exercice($cn); From 6db50afeee024bf030b115e73ef17d4037604aaf Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Thu, 6 Nov 2014 09:02:48 +0100 Subject: [PATCH 013/119] translation --- include/balance.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/balance.inc.php b/include/balance.inc.php index b37ba4695..0fcab8546 100644 --- a/include/balance.inc.php +++ b/include/balance.inc.php @@ -88,7 +88,7 @@ echo HtmlInput::button_action(_('Avancé'), " if (\$('balance_advanced_div').sty echo '
@@ -1580,15 +1580,21 @@ class Fiche foreach ($step_tiers as $tiers ) { $i++; - $odd=""; - $odd = ($i % 2 == 0 ) ? 'class="odd"': ' class="even" '; - /* Filter on the default year */ - - $amount=$tiers->get_solde_detail($filter_year); + + /* Filter on the default year */ + $amount=$tiers->get_solde_detail($filter_year); /* skip the tiers without operation */ if ( $p_amount && $amount['debit']==0 && $amount['credit'] == 0 && $amount['solde'] == 0 ) continue; + $odd=""; + $odd = ($i % 2 == 0 ) ? ' odd ': ' even '; + if ( $p_action == 'bank' && $amount['debit'] < $amount['credit'] ){ + //put in red if c>d + $odd.=" notice "; + } + $odd=' class="'.$odd.'"'; + $r.=""; $e=sprintf(' ', $script,$_REQUEST['ac'],$tiers->id,$str_dossier); From d908b33261960562c2f0557763693a26a0344b43 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Fri, 7 Nov 2014 22:53:52 +0100 Subject: [PATCH 019/119] =?UTF-8?q?Task=20#1043=20-=20BK=20:=20met=20les?= =?UTF-8?q?=20montants=20en=20rouge=20si=20compte=20en=20n=C3=A9gatif?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/class_fiche.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/include/class_fiche.php b/include/class_fiche.php index b331c7f05..46bdd022b 100644 --- a/include/class_fiche.php +++ b/include/class_fiche.php @@ -1520,6 +1520,10 @@ class Fiche function Summary($p_search="",$p_action="",$p_sql="",$p_amount=false) { global $g_user; + $bank=new Acc_Parm_Code($this->cn,'BANQUE'); + $cash=new Acc_Parm_Code($this->cn,'CAISSE'); + $cc=new Acc_Parm_Code($this->cn,'COMPTE_COURANT'); + bcscale(4); $str_dossier=dossier::get(); $p_search=sql_string($p_search); @@ -1565,8 +1569,9 @@ class Fiche $r.='
- - + '. + ''. + ' @@ -1589,9 +1594,12 @@ class Fiche $odd=""; $odd = ($i % 2 == 0 ) ? ' odd ': ' even '; - if ( $p_action == 'bank' && $amount['debit'] < $amount['credit'] ){ + $accounting=$tiers->strAttribut(ATTR_DEF_ACCOUNT); + if ( $p_action == 'bank' && $amount['debit'] < $amount['credit'] ){ + if ( strpos($accounting,$bank->p_value)===0 || strpos($accounting,$cash->p_value)===0 || strpos($accounting,$cc->p_value)===0){ //put in red if c>d $odd.=" notice "; + } } $odd=' class="'.$odd.'"'; @@ -1600,6 +1608,7 @@ class Fiche $script,$_REQUEST['ac'],$tiers->id,$str_dossier); $r.=""; + $r.=""; $r.=""; $r.="'; - $r.=''; + if ($p_paid != 0 ) $r.=''; $r.=''; $r.=''; $r.=''; @@ -898,12 +898,15 @@ class Acc_Ledger extends jrn_def_sql $r.=$row['str_jr_date']; $r.=""; // echeance - $r.=""; - $r.=""; + if ($p_paid != 0 ) + { + $r.=""; + $r.=""; + } // pj $r.="
'._('Quick Code').HtmlInput::infobulle(17).''._('Nom').' ▴'.''._('Quick Code').HtmlInput::infobulle(17).''._('Poste comptable').''._('Nom').' ▴'.' '._('Adresse').' '._('Total débit').' '._('Total crédit').' $e".$tiers->strAttribut(ATTR_DEF_QUICKCODE)." $e".$accounting."".h($tiers->strAttribut(ATTR_DEF_NAME))."".h($tiers->strAttribut(ATTR_DEF_ADRESS). " ".$tiers->strAttribut(ATTR_DEF_CP). From 22e7ce9f52eb14ae926fdce08d2c15020830f76a Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Fri, 7 Nov 2014 22:55:27 +0100 Subject: [PATCH 020/119] fix bug --- html/ajax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/ajax.php b/html/ajax.php index e8a9db99e..c56485e6b 100644 --- a/html/ajax.php +++ b/html/ajax.php @@ -41,7 +41,7 @@ if (isset($_REQUEST['plugin_code']) ) exit(); } /* call the ajax script */ - require_once('ext'.DIRECTORY_SEPARATOR.dirname(trim($ext->get_parameter('me_file'))).DIRECTORY_SEPARATOR.'ajax.php'); + require_once('ext'.DIRECTORY_SEPARATOR.dirname(trim($ext->getp('me_file'))).DIRECTORY_SEPARATOR.'ajax.php'); } else { From dd864dcdca626cdbe54b21d4e85007e7e26eab83 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Fri, 7 Nov 2014 22:55:49 +0100 Subject: [PATCH 021/119] fix bug --- html/js/acc_ledger.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/html/js/acc_ledger.js b/html/js/acc_ledger.js index cc9b0ac24..24aec008b 100644 --- a/html/js/acc_ledger.js +++ b/html/js/acc_ledger.js @@ -645,8 +645,6 @@ function view_history_account(p_value,dossier) { success_box(req,xml); g(id).style.top=calcy(140+(layer*3))+"px"; - g(id).style.left="10%"; - g(id).style.width='80%'; } } ); @@ -667,8 +665,6 @@ function update_history_account(obj) { success_box(req,xml); g(obj.div).style.top=calcy(140+(layer*3))+"px"; - g(obj.div).style.left="10%"; - g(obj.div).style.width='80%'; } }); } catch (e) @@ -703,8 +699,6 @@ var popup={'id': { success_box(req,xml); g(id).style.top=calcy(140+(layer*3))+"px"; - g(id).style.left="10%"; - g(id).style.width='80%'; } } ); @@ -724,8 +718,6 @@ function update_history_card(obj) { success_box(req,xml); g(obj.div).style.top=calcy(140+(layer*3))+"px"; - g(obj.div).style.left="10%"; - g(obj.div).style.width='80%'; } }); } catch (e) @@ -804,8 +796,6 @@ function modifyOperation(p_value, dossier) success_box(xml, txt); $(id).style.position="absolute"; $(id).style.top = calcy(100 + (layer * 3))+"px"; - g(id).style.left = '10%'; - g(id).style.width = "80%"; } } ); From b4b6f5a64b1255f1214fa28b8104233b0a0ec6b0 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Fri, 7 Nov 2014 22:56:15 +0100 Subject: [PATCH 022/119] fix cosmetic bug : remove width set by JS --- html/js/scripts.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/html/js/scripts.js b/html/js/scripts.js index 37c4cc740..00007e91a 100644 --- a/html/js/scripts.js +++ b/html/js/scripts.js @@ -772,9 +772,7 @@ function success_box(req, json) g(name_ctl).innerHTML = code_html; g(name_ctl).style.height = 'auto'; - if (name_ctl != 'popup') - g(name_ctl).style.width = '60%'; - else + if (name_ctl == 'popup') g(name_ctl).style.width = 'auto'; } catch (e) @@ -1575,7 +1573,6 @@ function search_action(dossier, ctl_concern) var target = "search_action_div"; removeDiv(target); var str_style = fixed_position(77, 99); - str_style += ";width:80%"; var div = {id: target, cssclass: 'inner_box', style: str_style, html: loading(), drag: 1}; @@ -1682,7 +1679,7 @@ function stock_repo_change(p_dossier, r_id) var queryString = "gDossier=" + p_dossier + "&op=mod_stock_repo" + "&r_id=" + r_id; var nTop = calcy(posY); var nLeft = "200px"; - var str_style = "top:" + nTop + "px;left:" + nLeft + ";width:50em;height:auto"; + var str_style = "top:" + nTop + "px;left:" + nLeft + ";height:auto"; removeDiv('change_stock_repo_div'); waiting_box(); @@ -1705,7 +1702,7 @@ function stock_inv_detail(p_dossier, p_id) var queryString = "gDossier=" + p_dossier + "&op=view_mod_stock" + "&c_id=" + p_id + "&ctl=view_mod_stock_div"; var nTop = calcy(posY); var nLeft = "200px"; - var str_style = "top:" + nTop + "px;left:" + nLeft + ";width:75%;"; + var str_style = "top:" + nTop + "px;left:" + nLeft + ";"; removeDiv('view_mod_stock_div'); waiting_box(); From 461132afcc7120cb56c48f2acfc7e0e53e88c71c Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Fri, 7 Nov 2014 22:56:40 +0100 Subject: [PATCH 023/119] Task #639 - Traduction : anglais translation --- include/class_acc_parm_code.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/class_acc_parm_code.php b/include/class_acc_parm_code.php index 78d87cbf4..2c1f9bf40 100644 --- a/include/class_acc_parm_code.php +++ b/include/class_acc_parm_code.php @@ -84,7 +84,7 @@ class Acc_Parm_Code $acc=new Acc_Account_Ledger($this->db,$this->p_value); if ( $acc->load() == false ) { - alert("Ce compte n'existe pas"); + alert(_("Ce compte n'existe pas")); } else { From 445477902e1b7686d9381c182d18f1f5794ac465 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Fri, 7 Nov 2014 22:57:01 +0100 Subject: [PATCH 024/119] Task #639 - Traduction : anglais translation --- html/lang/en_US/LC_MESSAGES/messages.po | 151 +++++++++++--- html/lang/messages.po | 260 ++++++++++++++++++++---- html/lang/nl_NL/LC_MESSAGES/messages.po | 138 ++++++++++--- 3 files changed, 461 insertions(+), 88 deletions(-) diff --git a/html/lang/en_US/LC_MESSAGES/messages.po b/html/lang/en_US/LC_MESSAGES/messages.po index 0fc6e877c..aa9113166 100644 --- a/html/lang/en_US/LC_MESSAGES/messages.po +++ b/html/lang/en_US/LC_MESSAGES/messages.po @@ -9,8 +9,8 @@ msgid "" msgstr "" "Project-Id-Version: NOALYSS 672\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-30 23:30+0100\n" -"PO-Revision-Date: 2014-10-30 23:32+0100\n" +"POT-Creation-Date: 2014-11-05 21:05+0100\n" +"PO-Revision-Date: 2014-11-05 21:09+0100\n" "Last-Translator: Dany De Bontridder \n" "Language-Team: American English \n" "Language: en_US\n" @@ -197,17 +197,24 @@ msgid "%s Vous avez ajouté %d mois depuis le %d/%d pour l'exercice %d " msgstr "You have added% s% d months since% d /% d% d for the year" #: include/class_acc_ledger.php:3234 include/class_acc_ledger.php:3303 +#: include/class_acc_ledger.php:3302 msgid "'Journaux Financier" msgstr "Financial" #: include/class_acc_ledger.php:3235 include/class_acc_ledger.php:3304 +#: include/class_acc_ledger.php:3303 msgid "'Journaux d'Opérations diverses" msgstr "Miscellaneous ledger" #: include/class_acc_ledger.php:3233 include/class_acc_ledger.php:3302 +#: include/class_acc_ledger.php:3301 msgid "'Journaux d'achat" msgstr "Purchase ledgers" +#: include/impress_rapport.inc.php:248 +msgid "1 mois" +msgstr "1 month" + #: include/impress_bilan.inc.php:89 msgid "" " Attention : si le bilan n'est pas équilibré.
" @@ -313,6 +320,7 @@ msgid "Action interdite" msgstr "Forbidden" #: include/class_acc_ledger.php:3684 include/class_acc_ledger.php:3768 +#: include/class_acc_ledger.php:3767 msgid "Action non accessible" msgstr "Folder not available" @@ -667,6 +675,32 @@ msgstr "Warning : it is preferable to use card than accounting" msgid "Attention : il y a %d enregistrements incorrects " msgstr "Attention:% d records incorrect" +#: include/impress_bilan.inc.php:65 +msgid "" +"Attention : si le bilan n'est pas équilibré.
Vérifiez
    \n" +"
  • L'affectation du résultat est fait
  • \n" +"
  • Vos comptes actifs ont un solde débiteur (sauf les comptes dit " +"inversés)
  • \n" +"
  • les comptes passifs ont un solde créditeur (sauf les comptes dit " +"inversés)
  • \n" +"
\n" +" Utilisez la balance des comptes pour vérifier." +msgstr "" +"Attention : if the outcome is not balanced
check " +"
    \n" +"
  • You allocate the results
  • \n" +"
  • The asset has a saldo on debit (except the reverse accounting)
  • \n" +"
  • The liability has a saldo on credit(except the reverse accounting) \n" +"
\n" +"Use the balance of accouting to check" + +#: include/impress_rapport.inc.php:257 +msgid "" +"Attention : vous ne pouvez pas utiliser les étapes avec les dates " +"calendriers." +msgstr "Warning : you cannot use step with the calendar" + #: include/class_acc_ledger_purchase.php:1484 #: include/class_acc_ledger_sold.php:755 msgid "Attention Différence entre TVA calculée et donnée" @@ -735,6 +769,8 @@ msgstr "No VAT code corresponds to the rate" #: include/class_acc_ledger.php:3416 include/class_acc_ledger.php:3461 #: include/class_acc_ledger.php:3594 include/class_acc_ledger.php:3486 #: include/class_acc_ledger.php:3531 include/class_acc_ledger.php:3678 +#: include/class_acc_ledger.php:3485 include/class_acc_ledger.php:3530 +#: include/class_acc_ledger.php:3677 msgid "Aucun compte en banque n'est donné" msgstr "No bank account given" @@ -765,7 +801,7 @@ msgstr "No file" msgid "Aucun fichier donné" msgstr "Any given file" -#: include/balance.inc.php:101 +#: include/balance.inc.php:101 include/balance.inc.php:102 msgid "Aucun filtre, tous les journaux" msgstr "No filter, all ledgers" @@ -927,7 +963,7 @@ msgstr "Other info" msgid "Autres actions" msgstr "atiAdd Action" -#: include/database.item.php:117 +#: include/database.item.php:117 include/balance.inc.php:86 msgid "Avancé" msgstr "Advanced" @@ -959,7 +995,7 @@ msgstr "Date for every operation" msgid "Avec date opérations" msgstr "with date of operation " -#: include/balance.inc.php:172 +#: include/balance.inc.php:172 include/balance.inc.php:173 msgid "Avec la balance de l'année précédente" msgstr "With the balance of previous year" @@ -1096,10 +1132,15 @@ msgstr "calculator" #: include/template/dashboard.php:9 include/ajax_calendar_zoom.php:23 #: include/class_html_input.php:779 include/template/dashboard.php:6 -#: include/class_html_input.php:796 +#: include/class_html_input.php:796 include/impress_rapport.inc.php:209 msgid "Calendrier" msgstr "Calendar" +#: include/impress_rapport.inc.php:240 +#, fuzzy +msgid "Calendrier depuis :" +msgstr "Calendar" + #: include/template/impress_cat_card.php:6 include/ajax_boxcard_search.php:57 msgid "Categorie" msgstr "Category" @@ -1249,6 +1290,11 @@ msgstr "Expenses" msgid "Chemin" msgstr "Path" +#: include/fiche.inc.php:91 +#, fuzzy +msgid "Chercher" +msgstr "Search" + #: html/ajax_misc.php:190 msgid "Choississez la TVA " msgstr "Select the VAT" @@ -1258,8 +1304,15 @@ msgid "" "Choississez la catégorie de fiche à laquelle vous aimeriez ajouter une fiche" msgstr "Choose the category of card" +#: include/impress_rapport.inc.php:203 +#, fuzzy +msgid "Choississez le rapport" +msgstr "Select the VAT" + #: include/balance.inc.php:45 include/impress_bilan.inc.php:48 #: include/impress_jrn.inc.php:84 include/impress_rapport.inc.php:182 +#: include/balance.inc.php:47 include/impress_bilan.inc.php:51 +#: include/impress_jrn.inc.php:86 msgid "Choississez un autre exercice" msgstr "Choose another year" @@ -1748,7 +1801,7 @@ msgid "Credit" msgstr "Credit" #: include/class_acc_ledger.php:3280 include/user_menu.php:51 -#: include/class_acc_ledger.php:3349 +#: include/class_acc_ledger.php:3349 include/class_acc_ledger.php:3348 msgid "Création" msgstr "Creation" @@ -1840,6 +1893,7 @@ msgstr "Credit" #: include/ext/coprop/include/lot.inc.php:34 include/class_acc_ledger.php:1583 #: include/class_acc_ledger.php:3563 include/fiche.inc.php:113 #: include/ext/coprop/include/class_copro_budget.php:134 +#: include/class_acc_ledger.php:3562 msgid "Créer une nouvelle fiche" msgstr "Add a new card" @@ -2035,7 +2089,7 @@ msgstr "Disconnect" #: include/class_acc_bilan.php:70 include/impress_gl_comptes.inc.php:62 #: include/impress_poste.inc.php:93 include/template/impress_cat_card.php:14 -#: include/class_anc_print.php:146 +#: include/class_anc_print.php:146 include/balance.inc.php:75 msgid "Depuis" msgstr "From" @@ -2768,6 +2822,10 @@ msgstr "Step" msgid "Etape 1/3" msgstr "Step 1/3" +#: include/impress_bilan.inc.php:82 +msgid "Etape 2 :Impression" +msgstr "Step 2 : printing" + #: include/ext/transform/include/intervat_listing_assujetti_step_2.inc.php:266 msgid "Etape 2/3" msgstr "Step 2/3" @@ -2806,7 +2864,8 @@ msgid "Exclure Etat" msgstr "Exclude State" #: include/ext/tools/index.php:43 include/bank.inc.php:73 -#: include/template/stock_state_search.php:35 +#: include/template/stock_state_search.php:35 include/impress_bilan.inc.php:49 +#: include/impress_jrn.inc.php:84 include/impress_rapport.inc.php:182 msgid "Exercice" msgstr "Exercise" @@ -3091,7 +3150,7 @@ msgstr "File to include (from the folder \"include\")" #: include/ext/amortis/include/template/listing_histo.php:10 #: include/ajax_boxcard_search.php:46 #: include/template/result_cat_card_summary.php:5 include/menu.inc.php:150 -#: html/user_login.php:165 +#: html/user_login.php:165 include/balance.inc.php:280 msgid "Filtre" msgstr "Filter" @@ -3117,11 +3176,11 @@ msgstr "Filter" msgid "Filtrer par " msgstr "Filter by" -#: include/balance.inc.php:109 +#: include/balance.inc.php:109 include/balance.inc.php:110 msgid "Filtré par catégorie" msgstr "Filter on category" -#: include/balance.inc.php:104 +#: include/balance.inc.php:104 include/balance.inc.php:105 msgid "Filtré par journal" msgstr "filter on ledger" @@ -3559,6 +3618,7 @@ msgid "Importer ce rapport" msgstr "Import this report" #: include/class_acc_ledger.php:3611 include/class_acc_ledger.php:3695 +#: include/class_acc_ledger.php:3694 msgid "Impossible d'effacer un journal qui contient des opérations" msgstr "It is not possible to remove this ledger.It is still in use" @@ -3711,6 +3771,7 @@ msgid "Journal inexistant" msgstr "No existent ledger" #: include/class_acc_ledger.php:3305 include/class_acc_ledger.php:3374 +#: include/class_acc_ledger.php:3373 msgid "Journal n'existe pas" msgstr "The ledger does not exist" @@ -3719,6 +3780,7 @@ msgid "Journaux" msgstr "Ledgers" #: include/class_acc_ledger.php:3232 include/class_acc_ledger.php:3301 +#: include/class_acc_ledger.php:3300 msgid "Journaux de vente" msgstr "Ledger of sales" @@ -3838,6 +3900,10 @@ msgstr "Reading" msgid "Les 2" msgstr "Both" +#: include/impress_rapport.inc.php:259 +msgid "Les clauses FROM sont ignorés avec les dates calendriers" +msgstr "statement FROM are ignored if you use calendar" + #: include/class_anc_print.php:120 msgid "Les dates sont en format DD.MM.YYYY" msgstr "The date formats are DD.MM.YYYY" @@ -4133,6 +4199,7 @@ msgstr "Update plugin, could you check the parameter setting?" #: include/class_acc_ledger_purchase.php:1689 #: include/class_acc_ledger_sold.php:954 include/history_operation.inc.php:140 +#: include/history_operation.inc.php:141 msgid "Mise à jour paiement" msgstr "Update payment" @@ -4185,7 +4252,7 @@ msgstr "Change the document type" #: include/ajax_mod_periode.php:49 include/ajax_mod_periode.php:75 msgid "Modifier les dates de début et fin de période" -msgstr "" +msgstr "Modify start and end date" #: include/forecast.inc.php:360 msgid "Modifier nom ou catégories" @@ -4346,7 +4413,7 @@ msgid "Montant initial" msgstr "Initial amount" #: include/ext/amortis/include/class_am_card.php:179 -#: include/class_acc_compute.php:194 +#: include/class_acc_compute.php:194 include/class_acc_compute.php:195 msgid "Montant invalide" msgstr "Invalid amount" @@ -4443,15 +4510,15 @@ msgstr "Can not save" msgid "Ne remplissez pas s'il n'y a pas de mandataire" msgstr "Do not complete if there is no representative" -#: include/balance.inc.php:128 +#: include/balance.inc.php:128 include/balance.inc.php:129 msgid "Niveau 1" msgstr "Level 1" -#: include/balance.inc.php:129 +#: include/balance.inc.php:129 include/balance.inc.php:130 msgid "Niveau 2" msgstr "level 2" -#: include/balance.inc.php:130 +#: include/balance.inc.php:130 include/balance.inc.php:131 msgid "Niveau 3" msgstr "Level 3" @@ -4553,6 +4620,7 @@ msgid "Nombre d'unité" msgstr "Number of unit" #: include/class_acc_ledger.php:3406 include/class_acc_ledger.php:3476 +#: include/class_acc_ledger.php:3475 msgid "Nombre de ligne incorrect" msgstr "Number of incorrect rows" @@ -4952,6 +5020,16 @@ msgstr "Display order" msgid "Oui" msgstr "yes" +#: include/class_acc_bilan.php:635 +#, fuzzy +msgid "Ouverture fichier impossible" +msgstr "Error opening file" + +#: include/impress_rapport.inc.php:208 +#, fuzzy +msgid "Période comptable" +msgstr "Accounting period" + #: include/class_acc_ledger.php:211 include/class_acc_ledger.php:210 msgid "PERIODE FERMEE" msgstr "Close period" @@ -5032,6 +5110,11 @@ msgstr "Per file" msgid "Par gérant ou administrateur" msgstr "By the manager or administrator" +#: include/impress_rapport.inc.php:251 +#, fuzzy +msgid "Par étape de" +msgstr "Per year" + #: html/ajax_card.php:106 msgid "Parametre ad_id est invalide" msgstr "Invalid parameter" @@ -5096,6 +5179,10 @@ msgstr "No access" msgid "Pas d'anomalie détectée" msgstr "Correct" +#: include/impress_rapport.inc.php:247 +msgid "Pas d'étape" +msgstr "No step" + #: include/ext/invoicing/include/invoice_send_mail.inc.php:75 #: include/ext/invoicing/include/invoice_send_mail.inc.php:80 #: include/ext/invoicing/include/invoice_send_mail.inc.php:103 @@ -5133,6 +5220,7 @@ msgid "Payé" msgstr "Paid" #: include/class_acc_ledger.php:3478 include/class_acc_ledger.php:3548 +#: include/class_acc_ledger.php:3547 msgid "Payé par" msgstr "Paid by" @@ -5180,7 +5268,7 @@ msgstr "Receipt" msgid "Pièces attachées" msgstr "Attachment" -#: include/balance.inc.php:162 +#: include/balance.inc.php:162 include/balance.inc.php:163 msgid "Plage de postes" msgstr "Range accounting" @@ -6244,7 +6332,7 @@ msgstr "Total Debit" msgid "Total lettré" msgstr "Total of lettered" -#: include/balance.inc.php:334 +#: include/balance.inc.php:334 include/balance.inc.php:336 msgid "Total niveau" msgstr "Total level" @@ -6266,7 +6354,7 @@ msgstr "Actual total" msgid "Totaux" msgstr "Total" -#: include/balance.inc.php:111 +#: include/balance.inc.php:111 include/balance.inc.php:112 msgid "Totaux par sous-niveaux" msgstr "Subtotal" @@ -6395,6 +6483,7 @@ msgid "URL" msgstr "URL" #: include/class_acc_ledger.php:3410 include/class_acc_ledger.php:3480 +#: include/class_acc_ledger.php:3479 msgid "Un journal avec ce nom existe déjà" msgstr "This name is already used" @@ -6402,7 +6491,7 @@ msgstr "This name is already used" msgid "Uniquement actions internes" msgstr "Only internal actions" -#: include/balance.inc.php:169 +#: include/balance.inc.php:169 include/balance.inc.php:170 msgid "Uniquement comptes non soldés" msgstr "Only not balanced accounting" @@ -6511,7 +6600,7 @@ msgstr "Sales" msgid "Ventes" msgstr "Sales" -#: include/impress_bilan.inc.php:64 +#: include/impress_bilan.inc.php:64 include/impress_bilan.inc.php:71 msgid "Verification comptabilite" msgstr "Check accountancy" @@ -6541,6 +6630,7 @@ msgid "Visible Y ou N" msgstr "Visible Y or N" #: include/impress_rec.inc.php:79 include/balance.inc.php:175 +#: include/balance.inc.php:177 include/impress_rapport.inc.php:261 msgid "Visualisation" msgstr "View" @@ -6789,6 +6879,7 @@ msgid "choix des journaux" msgstr "Ledgers" #: include/class_acc_ledger.php:3527 include/class_acc_ledger.php:3610 +#: include/class_acc_ledger.php:3609 msgid "choix du type de journal" msgstr "Select the type of ledger" @@ -6860,7 +6951,8 @@ msgid "erreur" msgstr "Error:" #: include/class_acc_bilan.php:348 include/class_acc_bilan.php:656 -#: include/class_acc_bilan.php:681 +#: include/class_acc_bilan.php:681 include/class_acc_bilan.php:661 +#: include/class_acc_bilan.php:686 msgid "erreur Ouverture fichier" msgstr "Error opening file" @@ -6870,7 +6962,7 @@ msgid "" "erreur aucune période par défaut, allez dans préférence pour en choisir une" msgstr "Warning : no default period, choose one in your preference" -#: include/class_acc_bilan.php:662 +#: include/class_acc_bilan.php:662 include/class_acc_bilan.php:667 msgid "erreur écriture fichier" msgstr "Error writing file" @@ -6903,10 +6995,16 @@ msgstr "inexistent" msgid "journaux" msgstr "ledger" -#: include/balance.inc.php:164 +#: include/balance.inc.php:164 include/balance.inc.php:84 +#: include/balance.inc.php:165 include/impress_rapport.inc.php:242 msgid "jusque" msgstr "Until" +#: include/class_acc_bilan.php:249 +#, fuzzy +msgid "le formulaire id n'est pas donnee" +msgstr "rate is not a number" + #: include/dossier.inc.php:58 msgid "le modele " msgstr "the template" @@ -7314,9 +7412,6 @@ msgstr "You cannot record to an ealier time" #~ msgid "Changez vos préférences" #~ msgstr "Change your preferences" -#~ msgid "Cherche" -#~ msgstr "Search" - #~ msgid "Choisir un autre journal" #~ msgstr "Choose another ledger" diff --git a/html/lang/messages.po b/html/lang/messages.po index 38a7a90c2..776bacf05 100644 --- a/html/lang/messages.po +++ b/html/lang/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-04 15:15+0200\n" +"POT-Creation-Date: 2014-11-05 21:05+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -41,6 +41,7 @@ msgstr "" #: html/ajax_card.php:199 html/ajax_card.php:311 html/ajax_card.php:446 #: html/ajax_card.php:483 html/ajax_card.php:491 html/ajax_card.php:312 #: html/ajax_card.php:447 html/ajax_card.php:484 html/ajax_card.php:492 +#: html/ajax_card.php:448 html/ajax_card.php:485 html/ajax_card.php:493 msgid "Action interdite" msgstr "" @@ -80,7 +81,7 @@ msgstr "" #: include/anc_acc_balance.inc.php:12 include/class_anc_print.php:128 #: include/class_anc_print.php:134 include/lettering.gestion.inc.php:53 #: include/ext/tools/include/export_document_anc.inc.php:35 -#: include/ext/tools/include/operation.inc.php:11 +#: include/ext/tools/include/operation.inc.php:11 include/class_icard.php:310 #, php-format msgid "Recherche" msgstr "" @@ -94,15 +95,15 @@ msgstr "" msgid "Recherche de fiche" msgstr "" -#: html/ajax_card.php:408 html/ajax_card.php:409 +#: html/ajax_card.php:408 html/ajax_card.php:409 html/ajax_card.php:410 msgid " de clients" msgstr "" -#: html/ajax_card.php:412 html/ajax_card.php:413 +#: html/ajax_card.php:412 html/ajax_card.php:413 html/ajax_card.php:414 msgid " de fournisseurs" msgstr "" -#: html/ajax_card.php:416 html/ajax_card.php:417 +#: html/ajax_card.php:416 html/ajax_card.php:417 html/ajax_card.php:418 msgid " d'administration" msgstr "" @@ -119,6 +120,7 @@ msgstr "" #: html/ajax_card.php:431 #: include/ext/rapport_avance/include/class_rapav_listing_formula.php:386 #: include/ext/rapport_avance/include/class_rapav_listing_formula.php:806 +#: html/ajax_card.php:432 msgid "Recherche poste" msgstr "" @@ -130,23 +132,23 @@ msgstr "" #: html/ajax_card.php:438 include/ajax_mod_predf_op.php:55 #: include/cfgledger.inc.php:122 include/template/dashboard.php:321 #: include/company.inc.php:145 include/template/dashboard.php:325 -#: include/template/detail-action.php:421 +#: include/template/detail-action.php:421 html/ajax_card.php:439 msgid "Sauve" msgstr "" -#: html/ajax_card.php:468 html/ajax_card.php:469 +#: html/ajax_card.php:468 html/ajax_card.php:469 html/ajax_card.php:470 msgid "Catégorie existe déjà" msgstr "" -#: html/ajax_card.php:470 html/ajax_card.php:471 +#: html/ajax_card.php:470 html/ajax_card.php:471 html/ajax_card.php:472 msgid "Catégorie sauvée" msgstr "" -#: html/ajax_card.php:475 html/ajax_card.php:476 +#: html/ajax_card.php:475 html/ajax_card.php:476 html/ajax_card.php:477 msgid "Le nom et la classe base ne peuvent être vide" msgstr "" -#: html/ajax_card.php:497 html/ajax_card.php:498 +#: html/ajax_card.php:497 html/ajax_card.php:498 html/ajax_card.php:499 msgid "Fiche non valide" msgstr "" @@ -268,6 +270,7 @@ msgstr "" #: include/template/ledger_detail_bottom.php:116 #: include/ext/rapport_avance/ajax_listing_detail_modify.php:75 #: include/ext/amortis/include/template/material_detail.php:140 +#: include/ext/amortis/include/template/material_detail.php:160 msgid "Sauver" msgstr "" @@ -355,7 +358,7 @@ msgstr "" #: include/ext/amortis/include/template/listing_histo.php:10 #: include/ajax_boxcard_search.php:46 #: include/template/result_cat_card_summary.php:5 include/menu.inc.php:150 -#: html/user_login.php:165 +#: html/user_login.php:165 include/balance.inc.php:280 msgid "Filtre" msgstr "" @@ -440,6 +443,8 @@ msgstr "" #: include/ext/coprop/include/class_copro_budget.php:114 #: include/ext/coprop/include/lot.inc.php:34 include/class_acc_ledger.php:1583 #: include/class_acc_ledger.php:3563 include/fiche.inc.php:113 +#: include/ext/coprop/include/class_copro_budget.php:134 +#: include/class_acc_ledger.php:3562 msgid "Créer une nouvelle fiche" msgstr "" @@ -502,6 +507,7 @@ msgstr "" #: include/ext/transform/include/intervat_listing_assujetti_step_1.inc.php:67 #: include/ajax_preference.php:115 include/class_acc_ledger_purchase.php:1731 #: include/class_acc_ledger_sold.php:1315 +#: include/class_acc_ledger_sold.php:1313 msgid "Période" msgstr "" @@ -581,6 +587,8 @@ msgstr "" #: include/balance.inc.php:45 include/impress_bilan.inc.php:48 #: include/impress_jrn.inc.php:84 include/impress_rapport.inc.php:182 +#: include/balance.inc.php:47 include/impress_bilan.inc.php:51 +#: include/impress_jrn.inc.php:86 msgid "Choississez un autre exercice" msgstr "" @@ -719,6 +727,7 @@ msgstr "" #: include/template/ledger_detail_ven.php:79 #: include/template/ledger_detail_ven.php:280 #: include/ext/tools/include/class_anc_grandlivre_ext.php:122 +#: include/class_acc_ledger_sold.php:1314 #, php-format msgid "Libellé" msgstr "" @@ -730,7 +739,7 @@ msgstr "" #: include/class_acc_bilan.php:70 include/impress_gl_comptes.inc.php:62 #: include/impress_poste.inc.php:93 include/template/impress_cat_card.php:14 -#: include/class_anc_print.php:146 +#: include/class_anc_print.php:146 include/balance.inc.php:75 msgid "Depuis" msgstr "" @@ -786,16 +795,18 @@ msgstr "" #: include/template/ledger_detail_ven.php:144 #: include/class_acc_ledger.php:1442 #: include/template/ledger_detail_ven.php:150 +#: include/class_acc_ledger_fin.php:552 msgid "Compt. Analytique" msgstr "" #: include/class_acc_ledger_fin.php:1002 include/class_acc_ledger.php:1594 #: include/class_acc_ledger_purchase.php:1035 #: include/class_acc_ledger_sold.php:1055 include/class_acc_ledger.php:1591 +#: include/class_acc_ledger_fin.php:1003 msgid "Pas de journal disponible" msgstr "" -#: include/class_acc_ledger_fin.php:1007 +#: include/class_acc_ledger_fin.php:1007 include/class_acc_ledger_fin.php:1008 msgid "Tous les journaux financiers" msgstr "" @@ -803,6 +814,7 @@ msgstr "" #: include/anc_great_ledger.inc.php:19 include/class_acc_ledger.php:2911 #: include/class_anc_balance_double.php:342 #: include/class_anc_balance_simple.php:172 include/class_anc_listing.php:42 +#: include/class_acc_ledger_fin.php:1038 msgid "Rechercher" msgstr "" @@ -881,6 +893,7 @@ msgstr "" #: include/ext/modop/template_ledger_fin.php:7 #: include/ext/invoicing/include/invoice_send_mail_input.inc.php:94 #: include/ext/tools/include/class_anc_grandlivre_ext.php:119 +#: include/class_acc_ledger_sold.php:1310 msgid "Date" msgstr "" @@ -907,6 +920,7 @@ msgstr "" #: include/class_acc_ledger_sold.php:1320 include/class_anc_grandlivre.php:189 #: include/class_anc_listing.php:76 #: include/ext/tools/include/class_anc_grandlivre_ext.php:120 +#: include/class_acc_ledger_sold.php:1318 msgid "Poste" msgstr "" @@ -930,6 +944,7 @@ msgstr "" #: include/class_acc_ledger.php:1433 include/class_acc_ledger.php:1687 #: include/class_anc_grandlivre.php:195 include/class_anticipation.php:420 #: include/template/ledger_detail_ven.php:281 +#: include/ext/coprop/include/class_coprop_appel_fond.php:222 msgid "Débit" msgstr "" @@ -949,6 +964,7 @@ msgstr "" #: include/anc_od.inc.php:150 include/class_acc_ledger.php:1434 #: include/class_anc_grandlivre.php:196 include/class_anticipation.php:421 #: include/template/ledger_detail_ven.php:282 +#: include/ext/coprop/include/class_coprop_appel_fond.php:223 msgid "Crédit" msgstr "" @@ -995,6 +1011,7 @@ msgstr "" #: include/class_acc_ledger_sold.php:1317 include/class_anc_grandlivre.php:193 #: include/template/ledger_detail_ven.php:70 #: include/ext/tools/include/class_anc_grandlivre_ext.php:124 +#: include/class_acc_ledger_sold.php:1315 msgid "Pièce" msgstr "" @@ -1068,15 +1085,17 @@ msgid "Filtrer" msgstr "" #: include/class_acc_ledger.php:3280 include/user_menu.php:51 -#: include/class_acc_ledger.php:3349 +#: include/class_acc_ledger.php:3349 include/class_acc_ledger.php:3348 msgid "Création" msgstr "" #: include/class_acc_ledger.php:3305 include/class_acc_ledger.php:3374 +#: include/class_acc_ledger.php:3373 msgid "Journal n'existe pas" msgstr "" #: include/class_acc_ledger.php:3478 include/class_acc_ledger.php:3548 +#: include/class_acc_ledger.php:3547 msgid "Payé par" msgstr "" @@ -1189,6 +1208,7 @@ msgstr "" #: include/class_acc_ledger_sold.php:1273 include/class_pre_op_ach.php:390 #: include/class_pre_op_ven.php:384 include/compta_fin.inc.php:142 #: include/ext/modop/modop_display.php:98 +#: include/class_acc_ledger_sold.php:1271 msgid "Ajout article" msgstr "" @@ -1261,6 +1281,7 @@ msgstr "" #: include/class_acc_ledger_purchase.php:1751 #: include/class_acc_ledger_sold.php:1335 #: include/template/detail-action.php:306 +#: include/class_acc_ledger_sold.php:1333 msgid "quantité" msgstr "" @@ -1278,6 +1299,7 @@ msgstr "" #: include/class_acc_ledger_purchase.php:1749 #: include/class_acc_ledger_sold.php:1333 #: include/template/detail-action.php:308 +#: include/class_acc_ledger_sold.php:1331 msgid "Montant TVA" msgstr "" @@ -1357,6 +1379,7 @@ msgstr "" #: include/class_acc_ledger_purchase.php:1689 #: include/class_acc_ledger_sold.php:954 include/history_operation.inc.php:140 +#: include/history_operation.inc.php:141 msgid "Mise à jour paiement" msgstr "" @@ -1387,6 +1410,7 @@ msgstr "" #: include/ext/transform/ajax_modify_intervat_assujetti.php:24 #: include/template/print_ledger_simple.php:10 #: include/template/ledger_detail_ven.php:58 +#: include/class_acc_ledger_sold.php:1258 msgid "Client" msgstr "" @@ -1652,6 +1676,7 @@ msgstr "" #: include/template/detail-action.php:434 #: include/template/ledger_detail_bottom.php:125 #: include/ext/amortis/include/template/material_detail.php:142 +#: include/ext/amortis/include/template/material_detail.php:162 msgid "Effacer" msgstr "" @@ -1849,6 +1874,9 @@ msgstr "" #: html/recherche.php:67 html/recherche.php:111 #: include/class_acc_ledger.php:2923 #: include/ext/amortis/include/template/material_detail.php:143 +#: include/ajax_mod_periode.php:60 include/ajax_mod_periode.php:78 +#: include/ajax_mod_periode.php:89 include/class_html_input.php:706 +#: include/ext/amortis/include/template/material_detail.php:163 #, php-format msgid "Fermer" msgstr "" @@ -2711,7 +2739,7 @@ msgstr "" msgid "Tableau de bord" msgstr "" -#: include/database.item.php:117 +#: include/database.item.php:117 include/balance.inc.php:86 msgid "Avancé" msgstr "" @@ -3143,7 +3171,7 @@ msgstr "" #: include/template/letter_all.php:29 #: include/class_acc_ledger_purchase.php:1734 #: include/class_acc_ledger_sold.php:1318 include/class_anc_grandlivre.php:194 -#: include/fiche.inc.php:444 +#: include/fiche.inc.php:444 include/class_acc_ledger_sold.php:1316 msgid "Interne" msgstr "" @@ -3285,7 +3313,7 @@ msgstr "" msgid "Vous devez corriger" msgstr "" -#: include/impress_bilan.inc.php:64 +#: include/impress_bilan.inc.php:64 include/impress_bilan.inc.php:71 msgid "Verification comptabilite" msgstr "" @@ -3315,6 +3343,7 @@ msgid "Jusqu'au poste" msgstr "" #: include/impress_rec.inc.php:79 include/balance.inc.php:175 +#: include/balance.inc.php:177 include/impress_rapport.inc.php:261 msgid "Visualisation" msgstr "" @@ -3369,6 +3398,7 @@ msgstr "" #: include/ext/coprop/include/appel_fond.inc.php:156 #: include/ext/coprop/include/class_coprop_appel_fond.php:204 #: include/anc_od.inc.php:151 +#: include/ext/coprop/include/class_coprop_appel_fond.php:224 msgid "Difference" msgstr "" @@ -3377,6 +3407,7 @@ msgstr "" #: include/ext/coprop/include/appel_fond.inc.php:82 #: include/ext/coprop/include/appel_fond.inc.php:151 #: include/ext/coprop/include/class_coprop_appel_fond.php:199 +#: include/ext/coprop/include/class_coprop_appel_fond.php:219 msgid "Ajout d'une ligne" msgstr "" @@ -3612,6 +3643,7 @@ msgstr "" #: include/template/dashboard.php:9 include/ajax_calendar_zoom.php:23 #: include/class_html_input.php:779 include/template/dashboard.php:6 +#: include/class_html_input.php:796 include/impress_rapport.inc.php:209 msgid "Calendrier" msgstr "" @@ -3703,6 +3735,7 @@ msgstr "" #: include/class_acc_ledger_sold.php:1321 #: include/template/detail-action.php:231 #: include/ext/modop/template_ledger_fin.php:23 +#: include/class_acc_ledger_sold.php:1319 msgid "Commentaire" msgstr "" @@ -3725,6 +3758,7 @@ msgstr "" #: include/class_acc_ledger_purchase.php:1748 #: include/class_acc_ledger_sold.php:1332 #: include/template/detail-action.php:307 +#: include/class_acc_ledger_sold.php:1330 msgid "Code TVA" msgstr "" @@ -3839,6 +3873,7 @@ msgstr "" #: include/template/predf_ledger_detail.php:74 #: include/class_acc_ledger_purchase.php:1750 #: include/class_acc_ledger_sold.php:1334 +#: include/class_acc_ledger_sold.php:1332 msgid "Total HTVA" msgstr "" @@ -4464,7 +4499,8 @@ msgid "Rénuméroter des pièces justificative" msgstr "" #: include/ext/tools/index.php:43 include/bank.inc.php:73 -#: include/template/stock_state_search.php:35 +#: include/template/stock_state_search.php:35 include/impress_bilan.inc.php:49 +#: include/impress_jrn.inc.php:84 include/impress_rapport.inc.php:182 msgid "Exercice" msgstr "" @@ -4792,7 +4828,7 @@ msgid "Nombre annuités invalide" msgstr "" #: include/ext/amortis/include/class_am_card.php:179 -#: include/class_acc_compute.php:194 +#: include/class_acc_compute.php:194 include/class_acc_compute.php:195 msgid "Montant invalide" msgstr "" @@ -5068,6 +5104,7 @@ msgid "le taux n'est pas un nombre" msgstr "" #: include/ext/importbank/include/class_bank_item.php:63 +#: include/ext/importbank/include/class_bank_item.php:65 msgid "op. concernée" msgstr "" @@ -5532,6 +5569,9 @@ msgstr "" #: include/ext/import_doli/include/template/input_file.php:7 #: include/ext/import_doli/include/template/test_file.php:8 #: include/ext/import_doli/include/template/test_operation.php:8 +#: include/ext/import_account/include/template/input_file.php:23 +#: include/ext/import_account/include/template/test_file.php:23 +#: include/ext/import_account/include/template/test_operation.php:23 msgid "Importation de données" msgstr "" @@ -5678,11 +5718,11 @@ msgstr "" msgid "Fiche sauvée" msgstr "" -#: html/ajax_card.php:421 +#: html/ajax_card.php:421 html/ajax_card.php:422 msgid " de contacts" msgstr "" -#: html/ajax_card.php:504 +#: html/ajax_card.php:504 html/ajax_card.php:505 msgid "Détail fiche (sauvée)" msgstr "" @@ -6021,51 +6061,53 @@ msgid "Affiche aussi les actions fermées" msgstr "" #: include/template/action_search_result.php:32 -#: include/template/action_search_result.php:88 +#: include/template/action_search_result.php:88 include/search.inc.php:121 +#: include/search.inc.php:125 msgid "Mettre à jour" msgstr "" -#: include/balance.inc.php:101 +#: include/balance.inc.php:101 include/balance.inc.php:102 msgid "Aucun filtre, tous les journaux" msgstr "" -#: include/balance.inc.php:104 +#: include/balance.inc.php:104 include/balance.inc.php:105 msgid "Filtré par journal" msgstr "" -#: include/balance.inc.php:109 +#: include/balance.inc.php:109 include/balance.inc.php:110 msgid "Filtré par catégorie" msgstr "" -#: include/balance.inc.php:111 +#: include/balance.inc.php:111 include/balance.inc.php:112 msgid "Totaux par sous-niveaux" msgstr "" -#: include/balance.inc.php:128 +#: include/balance.inc.php:128 include/balance.inc.php:129 msgid "Niveau 1" msgstr "" -#: include/balance.inc.php:129 +#: include/balance.inc.php:129 include/balance.inc.php:130 msgid "Niveau 2" msgstr "" -#: include/balance.inc.php:130 +#: include/balance.inc.php:130 include/balance.inc.php:131 msgid "Niveau 3" msgstr "" -#: include/balance.inc.php:162 +#: include/balance.inc.php:162 include/balance.inc.php:163 msgid "Plage de postes" msgstr "" -#: include/balance.inc.php:164 +#: include/balance.inc.php:164 include/balance.inc.php:84 +#: include/balance.inc.php:165 include/impress_rapport.inc.php:242 msgid "jusque" msgstr "" -#: include/balance.inc.php:169 +#: include/balance.inc.php:169 include/balance.inc.php:170 msgid "Uniquement comptes non soldés" msgstr "" -#: include/balance.inc.php:172 +#: include/balance.inc.php:172 include/balance.inc.php:173 msgid "Avec la balance de l'année précédente" msgstr "" @@ -6202,11 +6244,12 @@ msgid "Aucun enregistrement trouve" msgstr "" #: include/class_acc_bilan.php:348 include/class_acc_bilan.php:656 -#: include/class_acc_bilan.php:681 +#: include/class_acc_bilan.php:681 include/class_acc_bilan.php:661 +#: include/class_acc_bilan.php:686 msgid "erreur Ouverture fichier" msgstr "" -#: include/class_acc_bilan.php:662 +#: include/class_acc_bilan.php:662 include/class_acc_bilan.php:667 msgid "erreur écriture fichier" msgstr "" @@ -6273,44 +6316,55 @@ msgid "Pour la fiche %s le poste comptable [%s] n'existe pas" msgstr "" #: include/class_acc_ledger.php:3232 include/class_acc_ledger.php:3301 +#: include/class_acc_ledger.php:3300 msgid "Journaux de vente" msgstr "" #: include/class_acc_ledger.php:3233 include/class_acc_ledger.php:3302 +#: include/class_acc_ledger.php:3301 msgid "'Journaux d'achat" msgstr "" #: include/class_acc_ledger.php:3234 include/class_acc_ledger.php:3303 +#: include/class_acc_ledger.php:3302 msgid "'Journaux Financier" msgstr "" #: include/class_acc_ledger.php:3235 include/class_acc_ledger.php:3304 +#: include/class_acc_ledger.php:3303 msgid "'Journaux d'Opérations diverses" msgstr "" #: include/class_acc_ledger.php:3406 include/class_acc_ledger.php:3476 +#: include/class_acc_ledger.php:3475 msgid "Nombre de ligne incorrect" msgstr "" #: include/class_acc_ledger.php:3410 include/class_acc_ledger.php:3480 +#: include/class_acc_ledger.php:3479 msgid "Un journal avec ce nom existe déjà" msgstr "" #: include/class_acc_ledger.php:3416 include/class_acc_ledger.php:3461 #: include/class_acc_ledger.php:3594 include/class_acc_ledger.php:3486 #: include/class_acc_ledger.php:3531 include/class_acc_ledger.php:3678 +#: include/class_acc_ledger.php:3485 include/class_acc_ledger.php:3530 +#: include/class_acc_ledger.php:3677 msgid "Aucun compte en banque n'est donné" msgstr "" #: include/class_acc_ledger.php:3527 include/class_acc_ledger.php:3610 +#: include/class_acc_ledger.php:3609 msgid "choix du type de journal" msgstr "" #: include/class_acc_ledger.php:3611 include/class_acc_ledger.php:3695 +#: include/class_acc_ledger.php:3694 msgid "Impossible d'effacer un journal qui contient des opérations" msgstr "" #: include/class_acc_ledger.php:3684 include/class_acc_ledger.php:3768 +#: include/class_acc_ledger.php:3767 msgid "Action non accessible" msgstr "" @@ -6482,6 +6536,7 @@ msgstr "" #: include/class_acc_ledger_purchase.php:1729 #: include/class_acc_ledger_sold.php:1313 #: include/template/ledger_detail_ven.php:44 +#: include/class_acc_ledger_sold.php:1311 msgid "Date paiement" msgstr "" @@ -6742,7 +6797,7 @@ msgstr "" msgid "Choix des categories" msgstr "" -#: include/class_html_input.php:804 +#: include/class_html_input.php:804 include/class_html_input.php:821 msgid "choix des journaux" msgstr "" @@ -6752,6 +6807,7 @@ msgstr "" #: include/ext/amortis/include/template/material_detail.php:128 #: include/ext/amortis/include/template/material_detail.php:135 +#: include/ext/amortis/include/template/material_detail.php:155 #, php-format msgid "Différence entre le montant à amortir et le montant amorti = %d'" msgstr "" @@ -6794,7 +6850,7 @@ msgstr "" msgid "Clef invalide" msgstr "" -#: include/balance.inc.php:334 +#: include/balance.inc.php:334 include/balance.inc.php:336 msgid "Total niveau" msgstr "" @@ -6804,71 +6860,85 @@ msgstr "" #: include/class_acc_ledger_purchase.php:1727 #: include/class_acc_ledger_sold.php:1311 +#: include/class_acc_ledger_sold.php:1309 msgid "Numéro opération" msgstr "" #: include/class_acc_ledger_purchase.php:1730 #: include/class_acc_ledger_sold.php:1314 +#: include/class_acc_ledger_sold.php:1312 msgid "Date échéance" msgstr "" #: include/class_acc_ledger_purchase.php:1735 #: include/class_acc_ledger_sold.php:1319 +#: include/class_acc_ledger_sold.php:1317 msgid "Code journal" msgstr "" #: include/class_acc_ledger_purchase.php:1738 #: include/class_acc_ledger_sold.php:1322 +#: include/class_acc_ledger_sold.php:1320 msgid "Code Item" msgstr "" #: include/class_acc_ledger_purchase.php:1739 #: include/class_acc_ledger_sold.php:1323 +#: include/class_acc_ledger_sold.php:1321 msgid "N° fiche" msgstr "" #: include/class_acc_ledger_purchase.php:1740 #: include/class_acc_ledger_sold.php:1324 +#: include/class_acc_ledger_sold.php:1322 msgid "Nom fiche" msgstr "" #: include/class_acc_ledger_purchase.php:1741 #: include/class_acc_ledger_sold.php:1325 +#: include/class_acc_ledger_sold.php:1323 msgid "N° fiche fournisseur" msgstr "" #: include/class_acc_ledger_purchase.php:1742 #: include/class_acc_ledger_sold.php:1326 +#: include/class_acc_ledger_sold.php:1324 msgid "Nom fournisseur" msgstr "" #: include/class_acc_ledger_purchase.php:1743 #: include/class_acc_ledger_sold.php:1327 +#: include/class_acc_ledger_sold.php:1325 msgid "Code fournisseur" msgstr "" #: include/class_acc_ledger_purchase.php:1744 #: include/class_acc_ledger_sold.php:1328 +#: include/class_acc_ledger_sold.php:1326 msgid "Nom TVA" msgstr "" #: include/class_acc_ledger_purchase.php:1745 #: include/class_acc_ledger_sold.php:1329 +#: include/class_acc_ledger_sold.php:1327 msgid "Commentaire TVA" msgstr "" #: include/class_acc_ledger_purchase.php:1746 #: include/class_acc_ledger_sold.php:1330 +#: include/class_acc_ledger_sold.php:1328 msgid "TVA annulée" msgstr "" #: include/class_acc_ledger_purchase.php:1747 #: include/class_acc_ledger_sold.php:1331 +#: include/class_acc_ledger_sold.php:1329 msgid "Retrait TVA" msgstr "" #: include/class_acc_ledger_purchase.php:1752 #: include/class_acc_ledger_sold.php:1336 +#: include/class_acc_ledger_sold.php:1334 msgid "PU" msgstr "" @@ -6886,11 +6956,13 @@ msgstr "" #: include/class_acc_ledger_purchase.php:1756 #: include/class_acc_ledger_sold.php:1337 +#: include/class_acc_ledger_sold.php:1335 msgid "HTVA Opération" msgstr "" #: include/class_acc_ledger_purchase.php:1757 #: include/class_acc_ledger_sold.php:1338 +#: include/class_acc_ledger_sold.php:1336 msgid "TVA Opération" msgstr "" @@ -7063,3 +7135,117 @@ msgstr "" #: include/template/profile.php:45 msgid "Avec Direct Accès" msgstr "" + +#: include/ajax_mod_periode.php:48 +msgid "Modification période" +msgstr "" + +#: include/ajax_mod_periode.php:49 include/ajax_mod_periode.php:75 +msgid "Modifier les dates de début et fin de période" +msgstr "" + +#: include/ajax_mod_periode.php:50 +msgid "Cela pourrait avoir un impact sur les opérations déjà existantes" +msgstr "" + +#: include/ajax_mod_periode.php:55 +msgid " Début période : " +msgstr "" + +#: include/ajax_mod_periode.php:56 +msgid " Fin période : " +msgstr "" + +#: include/ajax_mod_periode.php:57 +msgid " Exercice : " +msgstr "" + +#: include/ajax_mod_periode.php:59 +msgid "sauver" +msgstr "" + +#: include/ajax_mod_periode.php:76 +msgid "Erreur date invalide" +msgstr "" + +#: include/search.inc.php:118 +msgid "Liste limitée à " +msgstr "" + +#: include/search.inc.php:118 +msgid " enregistrements. Le nombre d'enregistrements trouvés est de " +msgstr "" + +#: include/template/profile.php:45 +msgid "Avec Accès Direct " +msgstr "" + +#: include/ext/modop/modop_display.php:53 +msgid "On ne peut pas modifier dans une période fermée" +msgstr "" + +#: include/ext/rapport_avance/include/class_rapav.php:150 +msgid " Erreur dans la formule " +msgstr "" + +#: include/class_acc_bilan.php:249 +msgid "le formulaire id n'est pas donnee" +msgstr "" + +#: include/class_acc_bilan.php:635 +msgid "Ouverture fichier impossible" +msgstr "" + +#: include/fiche.inc.php:91 +msgid "Chercher" +msgstr "" + +#: include/impress_bilan.inc.php:65 +msgid "" +"Attention : si le bilan n'est pas équilibré.
Vérifiez
    \n" +"
  • L'affectation du résultat est fait
  • \n" +"
  • Vos comptes actifs ont un solde débiteur (sauf les comptes dit " +"inversés)
  • \n" +"
  • les comptes passifs ont un solde créditeur (sauf les comptes dit " +"inversés)
  • \n" +"
\n" +" Utilisez la balance des comptes pour vérifier." +msgstr "" + +#: include/impress_bilan.inc.php:82 +msgid "Etape 2 :Impression" +msgstr "" + +#: include/impress_rapport.inc.php:203 +msgid "Choississez le rapport" +msgstr "" + +#: include/impress_rapport.inc.php:208 +msgid "Période comptable" +msgstr "" + +#: include/impress_rapport.inc.php:240 +msgid "Calendrier depuis :" +msgstr "" + +#: include/impress_rapport.inc.php:247 +msgid "Pas d'étape" +msgstr "" + +#: include/impress_rapport.inc.php:248 +msgid "1 mois" +msgstr "" + +#: include/impress_rapport.inc.php:251 +msgid "Par étape de" +msgstr "" + +#: include/impress_rapport.inc.php:257 +msgid "" +"Attention : vous ne pouvez pas utiliser les étapes avec les dates " +"calendriers." +msgstr "" + +#: include/impress_rapport.inc.php:259 +msgid "Les clauses FROM sont ignorés avec les dates calendriers" +msgstr "" diff --git a/html/lang/nl_NL/LC_MESSAGES/messages.po b/html/lang/nl_NL/LC_MESSAGES/messages.po index fcf7444e4..48101919c 100644 --- a/html/lang/nl_NL/LC_MESSAGES/messages.po +++ b/html/lang/nl_NL/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: NOALYSS\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-30 23:30+0100\n" +"POT-Creation-Date: 2014-11-05 21:05+0100\n" "PO-Revision-Date: 2014-02-21 21:35+0100\n" "Last-Translator: dany\n" "Language-Team: American English \n" @@ -202,18 +202,25 @@ msgid "%s Vous avez ajouté %d mois depuis le %d/%d pour l'exercice %d " msgstr "Je hebt% s% d maanden sinds% d /% d% d voor het jaar toegevoegd" #: include/class_acc_ledger.php:3234 include/class_acc_ledger.php:3303 +#: include/class_acc_ledger.php:3302 msgid "'Journaux Financier" msgstr "Financiële" #: include/class_acc_ledger.php:3235 include/class_acc_ledger.php:3304 +#: include/class_acc_ledger.php:3303 msgid "'Journaux d'Opérations diverses" msgstr "Menu verschillende bewerkingen" #: include/class_acc_ledger.php:3233 include/class_acc_ledger.php:3302 +#: include/class_acc_ledger.php:3301 #, fuzzy msgid "'Journaux d'achat" msgstr "Ver" +#: include/impress_rapport.inc.php:248 +msgid "1 mois" +msgstr "" + #: include/impress_bilan.inc.php:89 #, fuzzy msgid "" @@ -317,6 +324,7 @@ msgid "Action interdite" msgstr "Verboden Actie" #: include/class_acc_ledger.php:3684 include/class_acc_ledger.php:3768 +#: include/class_acc_ledger.php:3767 #, fuzzy msgid "Action non accessible" msgstr "Folder niet Bereikbaar" @@ -693,6 +701,25 @@ msgstr "" msgid "Attention : il y a %d enregistrements incorrects " msgstr "Let op:% d administratie onjuist" +#: include/impress_bilan.inc.php:65 +#, fuzzy +msgid "" +"Attention : si le bilan n'est pas équilibré.
Vérifiez
    \n" +"
  • L'affectation du résultat est fait
  • \n" +"
  • Vos comptes actifs ont un solde débiteur (sauf les comptes dit " +"inversés)
  • \n" +"
  • les comptes passifs ont un solde créditeur (sauf les comptes dit " +"inversés)
  • \n" +"
\n" +" Utilisez la balance des comptes pour vérifier." +msgstr "Accepteren" + +#: include/impress_rapport.inc.php:257 +msgid "" +"Attention : vous ne pouvez pas utiliser les étapes avec les dates " +"calendriers." +msgstr "" + #: include/class_acc_ledger_purchase.php:1484 #: include/class_acc_ledger_sold.php:755 msgid "Attention Différence entre TVA calculée et donnée" @@ -769,6 +796,8 @@ msgstr "" #: include/class_acc_ledger.php:3416 include/class_acc_ledger.php:3461 #: include/class_acc_ledger.php:3594 include/class_acc_ledger.php:3486 #: include/class_acc_ledger.php:3531 include/class_acc_ledger.php:3678 +#: include/class_acc_ledger.php:3485 include/class_acc_ledger.php:3530 +#: include/class_acc_ledger.php:3677 #, fuzzy msgid "Aucun compte en banque n'est donné" msgstr "Geen Enkele analytisch kaart" @@ -804,7 +833,7 @@ msgstr "Geen bestand" msgid "Aucun fichier donné" msgstr "Geen Gegevens" -#: include/balance.inc.php:101 +#: include/balance.inc.php:101 include/balance.inc.php:102 #, fuzzy msgid "Aucun filtre, tous les journaux" msgstr "Logging Configuratie" @@ -985,7 +1014,7 @@ msgstr "Andere Informatie" msgid "Autres actions" msgstr "Actie Toevoegen" -#: include/database.item.php:117 +#: include/database.item.php:117 include/balance.inc.php:86 msgid "Avancé" msgstr "Vergevorderd" @@ -1020,7 +1049,7 @@ msgstr "Nieuwe extract" msgid "Avec date opérations" msgstr "Operatie Doorsturen" -#: include/balance.inc.php:172 +#: include/balance.inc.php:172 include/balance.inc.php:173 msgid "Avec la balance de l'année précédente" msgstr "" @@ -1158,10 +1187,15 @@ msgstr "Rekenmachine" #: include/template/dashboard.php:9 include/ajax_calendar_zoom.php:23 #: include/class_html_input.php:779 include/template/dashboard.php:6 -#: include/class_html_input.php:796 +#: include/class_html_input.php:796 include/impress_rapport.inc.php:209 msgid "Calendrier" msgstr "Kalender" +#: include/impress_rapport.inc.php:240 +#, fuzzy +msgid "Calendrier depuis :" +msgstr "Kalender" + #: include/template/impress_cat_card.php:6 include/ajax_boxcard_search.php:57 msgid "Categorie" msgstr "Categorie" @@ -1322,6 +1356,11 @@ msgstr "Kosten" msgid "Chemin" msgstr "Pad" +#: include/fiche.inc.php:91 +#, fuzzy +msgid "Chercher" +msgstr "Vinden" + #: html/ajax_misc.php:190 msgid "Choississez la TVA " msgstr "" @@ -1331,8 +1370,15 @@ msgid "" "Choississez la catégorie de fiche à laquelle vous aimeriez ajouter une fiche" msgstr "Kies de categorie lijst waar u een record toe te voegen" +#: include/impress_rapport.inc.php:203 +#, fuzzy +msgid "Choississez le rapport" +msgstr "Kiez UW map" + #: include/balance.inc.php:45 include/impress_bilan.inc.php:48 #: include/impress_jrn.inc.php:84 include/impress_rapport.inc.php:182 +#: include/balance.inc.php:47 include/impress_bilan.inc.php:51 +#: include/impress_jrn.inc.php:86 msgid "Choississez un autre exercice" msgstr "Kies een jaar" @@ -1854,7 +1900,7 @@ msgid "Credit" msgstr "Credit" #: include/class_acc_ledger.php:3280 include/user_menu.php:51 -#: include/class_acc_ledger.php:3349 +#: include/class_acc_ledger.php:3349 include/class_acc_ledger.php:3348 msgid "Création" msgstr "Schepping" @@ -1954,6 +2000,7 @@ msgstr "Creditzijde" #: include/ext/coprop/include/lot.inc.php:34 include/class_acc_ledger.php:1583 #: include/class_acc_ledger.php:3563 include/fiche.inc.php:113 #: include/ext/coprop/include/class_copro_budget.php:134 +#: include/class_acc_ledger.php:3562 msgid "Créer une nouvelle fiche" msgstr "Maak EEN Nieuwe blad" @@ -2162,7 +2209,7 @@ msgstr "Afmelden" #: include/class_acc_bilan.php:70 include/impress_gl_comptes.inc.php:62 #: include/impress_poste.inc.php:93 include/template/impress_cat_card.php:14 -#: include/class_anc_print.php:146 +#: include/class_anc_print.php:146 include/balance.inc.php:75 msgid "Depuis" msgstr "VANAF" @@ -2929,6 +2976,11 @@ msgstr "Stap 1/3" msgid "Etape 1/3" msgstr "Stap 1/3" +#: include/impress_bilan.inc.php:82 +#, fuzzy +msgid "Etape 2 :Impression" +msgstr "Indruk" + #: include/ext/transform/include/intervat_listing_assujetti_step_2.inc.php:266 msgid "Etape 2/3" msgstr "Stap 2/3" @@ -2968,7 +3020,8 @@ msgid "Exclure Etat" msgstr "Uitsluiten State" #: include/ext/tools/index.php:43 include/bank.inc.php:73 -#: include/template/stock_state_search.php:35 +#: include/template/stock_state_search.php:35 include/impress_bilan.inc.php:49 +#: include/impress_jrn.inc.php:84 include/impress_rapport.inc.php:182 msgid "Exercice" msgstr "Oefening" @@ -3261,7 +3314,7 @@ msgstr "" #: include/ext/amortis/include/template/listing_histo.php:10 #: include/ajax_boxcard_search.php:46 #: include/template/result_cat_card_summary.php:5 include/menu.inc.php:150 -#: html/user_login.php:165 +#: html/user_login.php:165 include/balance.inc.php:280 msgid "Filtre" msgstr "Filter" @@ -3287,12 +3340,12 @@ msgstr "Filter" msgid "Filtrer par " msgstr "Filteren op" -#: include/balance.inc.php:109 +#: include/balance.inc.php:109 include/balance.inc.php:110 #, fuzzy msgid "Filtré par catégorie" msgstr "Categorie Toevoegen" -#: include/balance.inc.php:104 +#: include/balance.inc.php:104 include/balance.inc.php:105 #, fuzzy msgid "Filtré par journal" msgstr "Filteren op" @@ -3758,6 +3811,7 @@ msgid "Importer ce rapport" msgstr "Importeer dit verslag" #: include/class_acc_ledger.php:3611 include/class_acc_ledger.php:3695 +#: include/class_acc_ledger.php:3694 msgid "Impossible d'effacer un journal qui contient des opérations" msgstr "" @@ -3911,6 +3965,7 @@ msgid "Journal inexistant" msgstr "Module bestaat niet" #: include/class_acc_ledger.php:3305 include/class_acc_ledger.php:3374 +#: include/class_acc_ledger.php:3373 msgid "Journal n'existe pas" msgstr "Inloggen bestaat niet" @@ -3920,6 +3975,7 @@ msgid "Journaux" msgstr "Kranten" #: include/class_acc_ledger.php:3232 include/class_acc_ledger.php:3301 +#: include/class_acc_ledger.php:3300 #, fuzzy msgid "Journaux de vente" msgstr "Sales Geschiedenis" @@ -4044,6 +4100,10 @@ msgstr "Lezing" msgid "Les 2" msgstr "2" +#: include/impress_rapport.inc.php:259 +msgid "Les clauses FROM sont ignorés avec les dates calendriers" +msgstr "" + #: include/class_anc_print.php:120 msgid "Les dates sont en format DD.MM.YYYY" msgstr "referentiepunt in formaat TT.MM.JJJJ" @@ -4350,6 +4410,7 @@ msgstr "Werk plugin, kunt u de parameter instelling te controleren?" #: include/class_acc_ledger_purchase.php:1689 #: include/class_acc_ledger_sold.php:954 include/history_operation.inc.php:140 +#: include/history_operation.inc.php:141 msgid "Mise à jour paiement" msgstr "OPSLAAN" @@ -4580,7 +4641,7 @@ msgid "Montant initial" msgstr "Oorspronkelijk bedrag" #: include/ext/amortis/include/class_am_card.php:179 -#: include/class_acc_compute.php:194 +#: include/class_acc_compute.php:194 include/class_acc_compute.php:195 #, fuzzy msgid "Montant invalide" msgstr "has EEN verkeerde Bedrag" @@ -4683,17 +4744,17 @@ msgstr "Het kan-niet OPSLAAN" msgid "Ne remplissez pas s'il n'y a pas de mandataire" msgstr "Niet compleet als er geen vertegenwoordiger" -#: include/balance.inc.php:128 +#: include/balance.inc.php:128 include/balance.inc.php:129 #, fuzzy msgid "Niveau 1" msgstr "Nieuw" -#: include/balance.inc.php:129 +#: include/balance.inc.php:129 include/balance.inc.php:130 #, fuzzy msgid "Niveau 2" msgstr "Nieuw" -#: include/balance.inc.php:130 +#: include/balance.inc.php:130 include/balance.inc.php:131 #, fuzzy msgid "Niveau 3" msgstr "Nieuw" @@ -4802,6 +4863,7 @@ msgid "Nombre d'unité" msgstr "Aantal eenheid" #: include/class_acc_ledger.php:3406 include/class_acc_ledger.php:3476 +#: include/class_acc_ledger.php:3475 #, fuzzy msgid "Nombre de ligne incorrect" msgstr "Aantal geregistreerde lijnen" @@ -5237,6 +5299,16 @@ msgstr "Volgorde van verschijning" msgid "Oui" msgstr "Ja" +#: include/class_acc_bilan.php:635 +#, fuzzy +msgid "Ouverture fichier impossible" +msgstr "Opening Schrift" + +#: include/impress_rapport.inc.php:208 +#, fuzzy +msgid "Période comptable" +msgstr "Boekhoudingsperiode" + #: include/class_acc_ledger.php:211 include/class_acc_ledger.php:210 msgid "PERIODE FERMEE" msgstr "Gesloten periode" @@ -5326,6 +5398,11 @@ msgstr "Het blad" msgid "Par gérant ou administrateur" msgstr "Door de manager of beheerder" +#: include/impress_rapport.inc.php:251 +#, fuzzy +msgid "Par étape de" +msgstr "Per jaar" + #: html/ajax_card.php:106 #, fuzzy msgid "Parametre ad_id est invalide" @@ -5394,6 +5471,10 @@ msgstr "Geen Toegang" msgid "Pas d'anomalie détectée" msgstr "" +#: include/impress_rapport.inc.php:247 +msgid "Pas d'étape" +msgstr "" + #: include/ext/invoicing/include/invoice_send_mail.inc.php:75 #: include/ext/invoicing/include/invoice_send_mail.inc.php:80 #: include/ext/invoicing/include/invoice_send_mail.inc.php:103 @@ -5433,6 +5514,7 @@ msgid "Payé" msgstr "Betaald" #: include/class_acc_ledger.php:3478 include/class_acc_ledger.php:3548 +#: include/class_acc_ledger.php:3547 msgid "Payé par" msgstr "Betaald deur" @@ -5480,7 +5562,7 @@ msgstr "Bewijs" msgid "Pièces attachées" msgstr "Documenten" -#: include/balance.inc.php:162 +#: include/balance.inc.php:162 include/balance.inc.php:163 #, fuzzy msgid "Plage de postes" msgstr "Basisklasse" @@ -6593,7 +6675,7 @@ msgstr "Debet Totaal" msgid "Total lettré" msgstr "Werkelijke totale" -#: include/balance.inc.php:334 +#: include/balance.inc.php:334 include/balance.inc.php:336 #, fuzzy msgid "Total niveau" msgstr "Totaal" @@ -6618,7 +6700,7 @@ msgstr "Werkelijke totale" msgid "Totaux" msgstr "Totalen" -#: include/balance.inc.php:111 +#: include/balance.inc.php:111 include/balance.inc.php:112 msgid "Totaux par sous-niveaux" msgstr "" @@ -6752,6 +6834,7 @@ msgid "URL" msgstr "" #: include/class_acc_ledger.php:3410 include/class_acc_ledger.php:3480 +#: include/class_acc_ledger.php:3479 msgid "Un journal avec ce nom existe déjà" msgstr "" @@ -6759,7 +6842,7 @@ msgstr "" msgid "Uniquement actions internes" msgstr "Alleen interne acties" -#: include/balance.inc.php:169 +#: include/balance.inc.php:169 include/balance.inc.php:170 #, fuzzy msgid "Uniquement comptes non soldés" msgstr "Alleen interne acties" @@ -6871,7 +6954,7 @@ msgstr "Sales / Recepten" msgid "Ventes" msgstr "Verkoop" -#: include/impress_bilan.inc.php:64 +#: include/impress_bilan.inc.php:64 include/impress_bilan.inc.php:71 msgid "Verification comptabilite" msgstr "Verificatie vand van Boekhouding" @@ -6902,6 +6985,7 @@ msgid "Visible Y ou N" msgstr "Zichtbare Y of N" #: include/impress_rec.inc.php:79 include/balance.inc.php:175 +#: include/balance.inc.php:177 include/impress_rapport.inc.php:261 msgid "Visualisation" msgstr "Visualisatie" @@ -7159,6 +7243,7 @@ msgid "choix des journaux" msgstr "Financiele" #: include/class_acc_ledger.php:3527 include/class_acc_ledger.php:3610 +#: include/class_acc_ledger.php:3609 #, fuzzy msgid "choix du type de journal" msgstr "For the boek van soort" @@ -7235,7 +7320,8 @@ msgid "erreur" msgstr "Fout:" #: include/class_acc_bilan.php:348 include/class_acc_bilan.php:656 -#: include/class_acc_bilan.php:681 +#: include/class_acc_bilan.php:681 include/class_acc_bilan.php:661 +#: include/class_acc_bilan.php:686 #, fuzzy msgid "erreur Ouverture fichier" msgstr "Opening Schrift" @@ -7247,7 +7333,7 @@ msgid "" msgstr "" "enig verzuim periode gemaakte fout, ga dan naar een voorkeur voor kiezen" -#: include/class_acc_bilan.php:662 +#: include/class_acc_bilan.php:662 include/class_acc_bilan.php:667 msgid "erreur écriture fichier" msgstr "" @@ -7280,11 +7366,17 @@ msgstr "onbestaand" msgid "journaux" msgstr "Kranten" -#: include/balance.inc.php:164 +#: include/balance.inc.php:164 include/balance.inc.php:84 +#: include/balance.inc.php:165 include/impress_rapport.inc.php:242 #, fuzzy msgid "jusque" msgstr "peuter" +#: include/class_acc_bilan.php:249 +#, fuzzy +msgid "le formulaire id n'est pas donnee" +msgstr "tarief is geen getal" + #: include/dossier.inc.php:58 msgid "le modele " msgstr "Het model" From 58f5512097b42a1aa0d1602d00fe2dd457995e0a Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Fri, 7 Nov 2014 22:57:16 +0100 Subject: [PATCH 025/119] Ajout poste comptable --- include/fiche.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fiche.inc.php b/include/fiche.inc.php index e19683a0d..ea2393ff0 100644 --- a/include/fiche.inc.php +++ b/include/fiche.inc.php @@ -346,7 +346,7 @@ if ($_GET['histo'] == 4 || $_GET['histo'] == 5) echo tr( td(HtmlInput::history_card($oCard->id, $oCard->strAttribut(ATTR_DEF_QUICKCODE))) . td($oCard->strAttribut(ATTR_DEF_NAME)) . - td($oCard->strAttribut(ATTR_DEF_ACCOUNT)). + td(HtmlInput::history_account($oCard->strAttribut(ATTR_DEF_ACCOUNT),$oCard->strAttribut(ATTR_DEF_ACCOUNT))). td(nbm($solde['debit']), 'class="sorttable_numeric" sorttable_customkey="'.$solde['debit'].'" style="text-align:right"') . td(nbm($solde['credit']), 'class="sorttable_numeric" sorttable_customkey="'.$solde['debit'].'" style="text-align:right"') . td(nbm(abs($solde['solde'])), 'class="sorttable_numeric" sorttable_customkey="'.$solde['solde'].'" style="text-align:right"') . From e1137d745047ab2051634cc00c549ed9ae59c53c Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Fri, 7 Nov 2014 23:03:49 +0100 Subject: [PATCH 026/119] =?UTF-8?q?Task=20#1043=20-=20BK=20:=20met=20les?= =?UTF-8?q?=20montants=20en=20rouge=20si=20compte=20en=20n=C3=A9gatif=20Co?= =?UTF-8?q?mpte=20non=20tresorerie=20sans=20couleur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/bank.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/bank.inc.php b/include/bank.inc.php index 643c1e90e..8a5b4e0e6 100644 --- a/include/bank.inc.php +++ b/include/bank.inc.php @@ -101,7 +101,7 @@ if ( $low_action == "list" ) $noop=(isset($_GET['noop']))?false:true; echo '
'; - echo $supplier->Summary($search,'supplier',$sql,$noop); + echo $supplier->Summary($search,'bank',$sql,$noop); echo '
'; From 31395e58176f45eb703bff8abf096b5e3990fa1a Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Fri, 7 Nov 2014 23:52:08 +0100 Subject: [PATCH 027/119] Task #1044 - Implementation de PHPUNIT Class Acc_Parm_Code --- unit-test/include/class_acc_parm_codeTest.php | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 unit-test/include/class_acc_parm_codeTest.php diff --git a/unit-test/include/class_acc_parm_codeTest.php b/unit-test/include/class_acc_parm_codeTest.php new file mode 100644 index 000000000..b4f0f4206 --- /dev/null +++ b/unit-test/include/class_acc_parm_codeTest.php @@ -0,0 +1,108 @@ +object=new Acc_Parm_Code($g_connection); + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + + } + + /** + * @covers Acc_Parm_Code::load_all + * @todo Implement testLoad_all(). + */ + public function testLoad_all() + { + + $a_result=$this->object->load_all(); + for ($i=0;$ip_code; + if (! in_array($code, array('BANQUE','CAISSE','COMPTE_COURANT','COMPTE_TVA', + 'CUSTOMER','DEP_PRIV','DNA','SUPPLIER','TVA_DED_IMPOT','TVA_DNA','VENTE','VIREMENT_INTERNE'))) + $this->assertNull('code inconnu'.$code); + } + + + } + + /** + * @covers Acc_Parm_Code::save + * @todo Implement testSave(). + */ + public function testSave() + { + global $g_connection; + + $this->object->save(); + $a=new Acc_Parm_Code($g_connection,'CAISSE'); + $save=clone ($a); + $a->p_code='CAISSE'; + $a->p_comment='TEST'; + $a->p_value='5'; + $a->save(); + $test=new Acc_Parm_Code($g_connection,'CAISSE'); + $this->assertEquals($test->p_code,$a->p_code); + $this->assertEquals($test->p_comment,$a->p_comment); + $this->assertEquals($test->p_value,$a->p_value); + $save->save(); + } + + /** + * @covers Acc_Parm_Code::display + * @todo Implement testDisplay(). + */ + public function testDisplay() + { + $this->object->display(); + $this->assertTrue(TRUE); + } + + /** + * @covers Acc_Parm_Code::form + * @todo Implement testForm(). + */ + public function testForm() + { + $this->object->form(); + $this->assertTrue(TRUE); + } + + /** + * @covers Acc_Parm_Code::load + * @todo Implement testLoad(). + */ + public function testLoad() + { + $this->object->load(); + $this->object->p_code='CAISSE'; + $this->object->load(); + $this->assertTrue(TRUE); + } + +} From 2a9161fa31c0bf5db0fd5baa2fee58a3b6268d15 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Fri, 7 Nov 2014 23:56:05 +0100 Subject: [PATCH 028/119] Task #1044 - Implementation de PHPUNIT Ajout explication, corrige test --- unit-test/README | 7 ++++++- unit-test/include/class_acc_accountTest.php | 4 ++-- unit-test/include/class_acc_account_ledgerTest.php | 8 ++++++-- unit-test/include/class_acc_computeTest.php | 8 +++++++- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/unit-test/README b/unit-test/README index ff98d8a26..8337172df 100644 --- a/unit-test/README +++ b/unit-test/README @@ -10,4 +10,9 @@ Testing commande en ligne ========================= Génération php /phpunit-skelgen.phar --bootstrap bootstrap.php --test -- Intervat ../include/class_transform_intervat.php - php /phpunit.phar --tap --colors --bootstrap ../bootstrap.php class_acc_accountTest.php \ No newline at end of file + php /phpunit.phar --tap --colors --bootstrap ../bootstrap.php class_acc_accountTest.php + +Génération pour tous les fichiers +================================= +Permet de voir les lignes de code qui ont été testées +php /phpunit.phar --coverage-html html --bootstrap bootstrap.php include \ No newline at end of file diff --git a/unit-test/include/class_acc_accountTest.php b/unit-test/include/class_acc_accountTest.php index 0f231c578..519f833ce 100644 --- a/unit-test/include/class_acc_accountTest.php +++ b/unit-test/include/class_acc_accountTest.php @@ -19,8 +19,8 @@ class Acc_AccountTest extends PHPUnit_Framework_TestCase protected function setUp() { global $g_connection; - $_REQUEST['gDossier'] = 36; - $g_connection=new Database(36); + $_REQUEST['gDossier'] = DOSSIER; + $g_connection=new Database(DOSSIER); $this->object=new Acc_Account($g_connection,400); $this->object->load(); } diff --git a/unit-test/include/class_acc_account_ledgerTest.php b/unit-test/include/class_acc_account_ledgerTest.php index a7b45c045..c93632663 100644 --- a/unit-test/include/class_acc_account_ledgerTest.php +++ b/unit-test/include/class_acc_account_ledgerTest.php @@ -148,7 +148,11 @@ class Acc_Account_LedgerTest extends PHPUnit_Framework_TestCase */ public function testIsTVA() { - $this->assertTrue(false,'Doit être réécrit'); + $this->object->id="4111"; + $this->assertEquals($this->object->isTVA(),1); + $this->object->id=10; + $this->assertEquals($this->object->isTVA(),0); + } /** @@ -280,7 +284,7 @@ class Acc_Account_LedgerTest extends PHPUnit_Framework_TestCase */ public function testTest_me() { - $this->assertTrue(false,'Must be removed'); + $this->assertEquals($this->object->test_me(),0); } } diff --git a/unit-test/include/class_acc_computeTest.php b/unit-test/include/class_acc_computeTest.php index 166da0621..2f01e15df 100644 --- a/unit-test/include/class_acc_computeTest.php +++ b/unit-test/include/class_acc_computeTest.php @@ -54,6 +54,7 @@ class Acc_ComputeTest extends PHPUnit_Framework_TestCase { $result=$data; $test=$data; + $this->object->get_parameter($test); $this->assertEquals($test,$result); } @@ -63,6 +64,7 @@ class Acc_ComputeTest extends PHPUnit_Framework_TestCase */ public function testSet_parameter() { + $this->object->set_parameter("nd_vat_rate",50); $this->assertTrue(true,true); } @@ -72,6 +74,7 @@ class Acc_ComputeTest extends PHPUnit_Framework_TestCase */ public function testGet_info() { + $this->object->get_info(); $this->assertTrue(true,true); } @@ -160,7 +163,9 @@ class Acc_ComputeTest extends PHPUnit_Framework_TestCase */ public function testVerify() { - $this->object->correct(); + $this->object->verify(); + $new=new Acc_Compute(); + $this->object->verify($new); } /** @@ -179,6 +184,7 @@ class Acc_ComputeTest extends PHPUnit_Framework_TestCase */ public function testTest_me() { + $this->object->test_me(); $this->assertTrue(true,true); } From fd9033f8b6e7bb6fbd719649206280b9d58bb9fb Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 9 Nov 2014 18:04:51 +0100 Subject: [PATCH 029/119] =?UTF-8?q?Task=20#145=20-=20Am=C3=A9lioration=20s?= =?UTF-8?q?tock=20Solde=20banque=20:=20agrandissement=20table?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/compta_fin_rec.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/compta_fin_rec.inc.php b/include/compta_fin_rec.inc.php index cb2f9bf96..16c12b316 100644 --- a/include/compta_fin_rec.inc.php +++ b/include/compta_fin_rec.inc.php @@ -131,7 +131,7 @@ echo ''; echo ''; -echo ''; +echo '
'; $r =''; $r.=th('Libellé'); $r.=th('N° interne'); From 61d6688de03a81af1979bb79984b0fd538256357 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 9 Nov 2014 18:05:53 +0100 Subject: [PATCH 030/119] =?UTF-8?q?Task=20#1045=20-=20Am=C3=A9lioration=20?= =?UTF-8?q?apparence=20=20:=20MENU=20:=20Menu=20verticaux=20diff=C3=A9rent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/user_menu.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/user_menu.php b/include/user_menu.php index e803f4737..550a0834b 100644 --- a/include/user_menu.php +++ b/include/user_menu.php @@ -144,16 +144,16 @@ function menu_acc_plan($p_start=1) $base="?ac=".$_REQUEST['ac']; $str_dossier="&".dossier::get(); echo '
'.'Date '.HtmlInput::infobulle(17).' ▴'.'
'; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; echo "
0 '._(' Hors Bilan').'
1 '._(' Immobilisé').'
2 '._('Actif a un an au plus').'
3 '._('Stock et commande').'
4 '._('Compte tiers').'
5 '._('Financier').'
6 '._('Charges').'
7 '._('Produits').'
8 '._('Hors Comptabilité').'
9 '._('Hors Comptabilité').'
0 '._(' Hors Bilan').'
1 '._(' Immobilisé').'
2 '._('Actif a un an au plus').'
3 '._('Stock et commande').'
4 '._('Compte tiers').'
5 '._('Financier').'
6 '._('Charges').'
7 '._('Produits').'
8 '._('Hors Comptabilité').'
9 '._('Hors Comptabilité').'
"; } From 799cf694c49046e77a6883c6512b171c0bc2990b Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 9 Nov 2014 18:06:30 +0100 Subject: [PATCH 031/119] =?UTF-8?q?Task=20#1045=20-=20Am=C3=A9lioration=20?= =?UTF-8?q?apparence=20=20:=20Ne=20montre=20pas=20=C3=A9ch=C3=A9ance=20pou?= =?UTF-8?q?r=20journaux=20financiers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/class_acc_ledger.php | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/include/class_acc_ledger.php b/include/class_acc_ledger.php index 01f4e8596..afadcf75f 100644 --- a/include/class_acc_ledger.php +++ b/include/class_acc_ledger.php @@ -851,8 +851,8 @@ class Acc_Ledger extends jrn_def_sql $r.=th('Journal'); } $r.='
' . $table->get_header(0) . '' . $table->get_header(1) . ''; - $r.='' . $table->get_header(2) . '' . $table->get_header(1) . ''; + if ($p_paid != 0 ) $r.='' . $table->get_header(2) . '' . $table->get_header(3) . '' . $table->get_header(4) . '' . $table->get_header(6) . '"; - $r.=$row['str_jr_ech']; - $r.=""; - $r.=$row['str_jr_date_paid']; - $r.=""; + $r.=$row['str_jr_ech']; + $r.=""; + $r.=$row['str_jr_date_paid']; + $r.=""; @@ -1815,6 +1818,13 @@ class Acc_Ledger extends jrn_def_sql function verify($p_array) { + if (is_array($p_array ) == false || empty($p_array)) + throw new Exception ("Array empty"); + /* + * Check needed value + */ + check_parameter($p_array,'p_jrn,e_date'); + extract($p_array); global $g_user; $tot_cred = 0; @@ -3345,7 +3355,7 @@ class Acc_Ledger extends jrn_def_sql $r = ""; $r.=''; - $r.=''; + $r.=''; $ret = $this->db->exec_sql("select distinct jrn_def_id,jrn_def_name, jrn_def_class_deb,jrn_def_class_cred,jrn_def_type from jrn_def order by jrn_def_name"); @@ -3356,7 +3366,7 @@ class Acc_Ledger extends jrn_def_sql { $l_line = Database::fetch_array($ret, $i); $url = $base_url . "&sa=detail&p_jrn=" . $l_line['jrn_def_id']; - $r.=sprintf('', $url, h($l_line['jrn_def_name'])); + $r.=sprintf('', $url, h($l_line['jrn_def_name'])); } $r.= "
' . _('Création') . '
' . _('Création') . '
%s
%s
"; return $r; From 915a2bb4ab22dc3a4a0e90114a87a2ba4db86d2a Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 9 Nov 2014 18:06:51 +0100 Subject: [PATCH 032/119] =?UTF-8?q?Task=20#1045=20-=20Am=C3=A9lioration=20?= =?UTF-8?q?apparence=20=20:=20Solde=20banque=20:=20agrandissement=20table?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/compta_fin_saldo.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/compta_fin_saldo.inc.php b/include/compta_fin_saldo.inc.php index 03cbfcede..373dec808 100644 --- a/include/compta_fin_saldo.inc.php +++ b/include/compta_fin_saldo.inc.php @@ -36,7 +36,7 @@ require_once ('class_acc_parm_code.php'); echo '
'; echo dossier::hidden(); echo _('Filtre :').HtmlInput::filter_table("fin_saldo_tb", '0,1,2,3', '1'); - echo ''; + echo '
'; echo tr(th('Quick Code',' class=" sorttable_sorted_reverse"',HtmlInput::infobulle(17).' ▴') .th('Compte en banque',' style="text-align:left"') .th('Journal',' style="text-align:center"') From 75ba5461499eb24061608f36ffb088366c466294 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 9 Nov 2014 18:08:22 +0100 Subject: [PATCH 033/119] =?UTF-8?q?Ajout=20test=20param=C3=A8tres=20pass?= =?UTF-8?q?=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/class_acc_ledger_fin.php | 18 ++++++++++++++---- include/class_acc_ledger_sold.php | 15 ++++++++++++++- include/user_common.php | 16 ++++++++++++++++ 3 files changed, 44 insertions(+), 5 deletions(-) diff --git a/include/class_acc_ledger_fin.php b/include/class_acc_ledger_fin.php index 66c155cc2..fdbc2a662 100644 --- a/include/class_acc_ledger_fin.php +++ b/include/class_acc_ledger_fin.php @@ -45,15 +45,25 @@ class Acc_Ledger_Fin extends Acc_Ledger $this->type = 'FIN'; } - /**\brief verify that the data are correct before inserting or confirming - * \param an array (usually $_POST) - * \return String - * \throw Exception on error occurs + /** + * Verify that the data are correct before inserting or confirming + * @brief verify the data + * @param an array (usually $_POST) + * @return String + * @throw Exception on error occurs */ public function verify($p_array) { global $g_user; + if (is_array($p_array ) == false || empty($p_array)) + throw new Exception ("Array empty"); + /* + * Check needed value + */ + check_parameter($p_array,'p_jrn'); + + extract($p_array); /* check for a double reload */ if (isset($mt) && $this->db->count_sql('select jr_mt from jrn where jr_mt=$1', array($mt)) != 0) diff --git a/include/class_acc_ledger_sold.php b/include/class_acc_ledger_sold.php index 923e4bd76..bbd46d3d7 100644 --- a/include/class_acc_ledger_sold.php +++ b/include/class_acc_ledger_sold.php @@ -61,7 +61,17 @@ class Acc_Ledger_Sold extends Acc_Ledger { public function verify($p_array) { global $g_parameter, $g_user; + + if (is_array($p_array ) == false || empty($p_array)) + throw new Exception ("Array empty"); + extract($p_array); + + /* + * Check needed value + */ + check_parameter($p_array,'p_jrn,e_date,e_client'); + /* check for a double reload */ if (isset($mt) && $this->db->count_sql('select jr_mt from jrn where jr_mt=$1', array($mt)) != 0) throw new Exception(_('Double Encodage'), 5); @@ -918,7 +928,10 @@ class Acc_Ledger_Sold extends Acc_Ledger { return $r; } - /* !\brief update the payment + /** + * @brief update the payment + * @deprecated + * */ function show_unpaid() { diff --git a/include/user_common.php b/include/user_common.php index 6b0d56ae2..a1ed734f8 100644 --- a/include/user_common.php +++ b/include/user_common.php @@ -226,4 +226,20 @@ function toNumber($p_num) $p_num=str_replace(',','.',$p_num); return $p_num; } +/** + * Check that all the index are in the array, used by function to check if + * the array contains the needed variables before an extract + * @param type $p_array array to check + * @param type $needed string containing variable separated by comma + * @throws Exception + */ +function check_parameter($p_array,$p_needed) +{ + $needed = split(',',$p_needed); + for ($e=0;$e<$needed;$e++) { + if ( ! isset($p_array[$needed[$e]])) { + throw new Exception (_('Paramètre manquant')." ".$needed[$e]); + } + } +} ?> From 72d66765e660631142a158e7ebc964578b5cd481 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 9 Nov 2014 18:09:01 +0100 Subject: [PATCH 034/119] devient une classe abstraite --- include/class_noalyss_sql.php | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/include/class_noalyss_sql.php b/include/class_noalyss_sql.php index 51549c200..69bbbfd29 100644 --- a/include/class_noalyss_sql.php +++ b/include/class_noalyss_sql.php @@ -22,8 +22,7 @@ /** * @file - * @brief - * this wrapper is used to created easily a wrapper to a table + * @brief this wrapper is used to created easily a wrapper to a table * * @class * Match a table into an object, you need to add the code for each table @@ -70,7 +69,7 @@ * @endcode * */ -class Noalyss_SQL +abstract class Noalyss_SQL { function __construct(&$p_cn, $p_id=-1) @@ -86,7 +85,7 @@ class Noalyss_SQL } $this->$pk=$p_id; /* load it */ - $this->load(); + if ($p_id != -1 )$this->load(); } public function save() @@ -100,8 +99,7 @@ class Noalyss_SQL public function getp($p_string) { - if (array_key_exists($p_string, $this->name)) - { + if (array_key_exists($p_string, $this->name)) { $idx=$this->name[$p_string]; return $this->$idx; } @@ -111,12 +109,10 @@ class Noalyss_SQL public function setp($p_string, $p_value) { - if (array_key_exists($p_string, $this->name)) - { + if (array_key_exists($p_string, $this->name)) { $idx=$this->name[$p_string]; $this->$idx=$p_value; - } - else + } else throw new Exception(__FILE__.":".__LINE__.$p_string.'Erreur attribut inexistant '.$p_string); } @@ -171,8 +167,7 @@ class Noalyss_SQL $idx=1; $array=array(); $set=" set "; - foreach ($this->name as $key=> $value) - { + foreach ($this->name as $key=> $value) { if (isset($this->default[$value])&&$this->default[$value]=="auto") continue; switch ($this->type[$value]) @@ -198,11 +193,7 @@ class Noalyss_SQL { $sql=" select "; $sep=""; - $par=""; - - foreach ($this->name as $key) - { - + foreach ($this->name as $key) { switch ($this->type[$key]) { case "date": @@ -217,7 +208,7 @@ class Noalyss_SQL $sql.=" from ".$this->table; $sql.=" where ".$this->primary_key." = $1"; - + $result=$this->cn->get_array($sql,array ($this->$pk)); if ($this->cn->count()==0) { @@ -315,7 +306,7 @@ class Noalyss_SQL { if ($p_array != null && ! is_array($p_array) ) { - throw new Exception("Erreur : exec_sql attend un array"); + throw new Exception(_("Erreur : exec_sql attend un array")); } $ret=$this->seek($cond, $p_array); $max=Database::num_row($ret); @@ -326,7 +317,6 @@ class Noalyss_SQL } return $a_return; } - } ?> From 38c1338d50a9287a0f1ad26feb49a91090a7662a Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 9 Nov 2014 18:09:29 +0100 Subject: [PATCH 035/119] =?UTF-8?q?Task=20#1045=20-=20Am=C3=A9lioration=20?= =?UTF-8?q?apparence=20=20:=20Icone=20enlever=20tag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/class_tag.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/class_tag.php b/include/class_tag.php index 4680e0ce9..8d2323e47 100644 --- a/include/class_tag.php +++ b/include/class_tag.php @@ -100,9 +100,7 @@ class Tag echo h($this->data->t_tag); echo HtmlInput::hidden($p_prefix.'tag[]', $this->data->t_id); $js=sprintf("$('sp_".$p_prefix.$this->data->t_id."').remove();"); - echo ''; - echo HtmlInput::anchor('X', "javascript:void(0)", "onclick=\"$js\""); - echo ''; + echo HtmlInput::anchor( " ⵝ ", "javascript:void(0)", "onclick=\"$js\"", ' class="smallbutton " style="padding:0px;display:inline" '); echo ''; } /** From c51ead13710ad0ada16bc2262aa0a70270575768 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 9 Nov 2014 18:09:43 +0100 Subject: [PATCH 036/119] Enleve global $cn --- include/class_tag_sql.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/class_tag_sql.php b/include/class_tag_sql.php index ba4caa03b..9c9b0bbc0 100644 --- a/include/class_tag_sql.php +++ b/include/class_tag_sql.php @@ -45,9 +45,8 @@ class Tag_SQL extends Noalyss_SQL $this->default = array( "t_id" => "auto", ); - global $cn; - parent::__construct($cn,$p_id); + parent::__construct($p_cn,$p_id); } From 672a84c7aa2b85235639f1941c16a0a6c1333b8a Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 9 Nov 2014 18:10:06 +0100 Subject: [PATCH 037/119] =?UTF-8?q?ajout=20=C3=A0=20HTMLINPUT::anchor=20d'?= =?UTF-8?q?un=20style=20ou=20classe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/class_html_input.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/class_html_input.php b/include/class_html_input.php index 19463e9c1..3f8ea98f2 100755 --- a/include/class_html_input.php +++ b/include/class_html_input.php @@ -716,8 +716,9 @@ class HtmlInput * @param string $p_text text of the anchor * @param string $p_url url * @param string $p_js javascript + * @param string $p_style is the visuable effect (class, style...) */ - static function anchor($p_text,$p_url="",$p_js="") + static function anchor($p_text,$p_url="",$p_js="",$p_style=' class="line" ') { if ($p_js != "") { @@ -725,8 +726,8 @@ class HtmlInput } - $str=sprintf('%s', - $p_url,$p_js,$p_text); + $str=sprintf('%s', + $p_style,$p_url,$p_js,$p_text); return $str; } /** From 2f7d2e9bd00d0c75b86dd9678e5bd4c421611315 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 9 Nov 2014 18:10:22 +0100 Subject: [PATCH 038/119] =?UTF-8?q?Ajout=20test=20param=C3=A8tres=20pass?= =?UTF-8?q?=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/class_acc_ledger_purchase.php | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/include/class_acc_ledger_purchase.php b/include/class_acc_ledger_purchase.php index f14b44c26..1aabec5ee 100644 --- a/include/class_acc_ledger_purchase.php +++ b/include/class_acc_ledger_purchase.php @@ -61,6 +61,14 @@ class Acc_Ledger_Purchase extends Acc_Ledger public function verify($p_array) { global $g_parameter,$g_user; + + if (is_array($p_array ) == false || empty($p_array)) + throw new Exception ("Array empty"); + /* + * Check needed value + */ + check_parameter($p_array,'p_jrn,e_date,e_client'); + extract ($p_array); /* check if we can write into this ledger */ if ( $g_user->check_jrn($p_jrn) != 'W' ) @@ -1653,9 +1661,12 @@ class Acc_Ledger_Purchase extends Acc_Ledger } - /*!\brief update the payment + /** + * @brief update the payment + * @todo to remove, obsolete + * @deprecated */ - function show_unpaid() + function show_unpaid_deprecated() { // Show list of unpaid sell // Date - date of payment - Customer - amount @@ -1666,9 +1677,9 @@ class Acc_Ledger_Purchase extends Acc_Ledger $sql=SQL_LIST_UNPAID_INVOICE_DATE_LIMIT." and jr_def_id=".$this->id ; - list($max_line,$list)=ListJrn($this->db,$sql,null,$offset,1); + list($max_line,$list)=$this->list_operation($sql,null,$offset,1); $sql=SQL_LIST_UNPAID_INVOICE." and jr_def_id=".$this->id ; - list($max_line2,$list2)=ListJrn($this->db,$sql,null,$offset,1); + list($max_line2,$list2)=$this->list_operation($sql,null,$offset,1); // Get the max line $m=($max_line2>$max_line)?$max_line2:$max_line; From 54d33441d0a2879a419a80cb1bf0d40967a4382a Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 9 Nov 2014 18:10:55 +0100 Subject: [PATCH 039/119] =?UTF-8?q?Task=20#1045=20-=20Am=C3=A9lioration=20?= =?UTF-8?q?apparence=20=20:=20correction=20position=20fen=C3=AAtre=20tag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/js/scripts.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/html/js/scripts.js b/html/js/scripts.js index 00007e91a..e8cd6905e 100644 --- a/html/js/scripts.js +++ b/html/js/scripts.js @@ -2228,9 +2228,9 @@ function action_tag_select(p_dossier, ag_id) } var code_html = getNodeText(html[0]); code_html = unescape_xml(code_html); - add_div({id: 'tag_div', style: '', cssclass: 'inner_box', drag: 1}); - $('tag_div').style.top = (posY - 70)+"px"; - $('tag_div').style.left = (posX - 70)+"px"; + pos=fixed_position(35,229 ); + add_div({id: 'tag_div', style: pos, cssclass: 'inner_box tag', drag: 1}); + remove_waiting_box(); $('tag_div').innerHTML = code_html; } From 805e691b4d9417d07d533fdce5ff801a546f6491 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 9 Nov 2014 18:11:24 +0100 Subject: [PATCH 040/119] =?UTF-8?q?Task=20#1045=20-=20Am=C3=A9lioration=20?= =?UTF-8?q?apparence=20=20:=20Ajout=20symbole=20pour=20enlever=20tag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/class_follow_up.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/class_follow_up.php b/include/class_follow_up.php index 8eadeffe5..e10b34a2d 100644 --- a/include/class_follow_up.php +++ b/include/class_follow_up.php @@ -1531,9 +1531,7 @@ class Follow_Up $a_tag[$e]['t_id']); echo ''; echo $a_tag[$e]['t_tag']; - echo ''; - echo ''; - echo HtmlInput::anchor("X", "javascript:void(0)", $js_remove); + echo HtmlInput::anchor( " ⵝ ", "javascript:void(0)", $js_remove, ' class="smallbutton " style="padding:0px;display:inline" '); echo ''; echo ' '; echo ' '; From edccfbe22822d38a4b94391d2e825ec96d3cc449 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 9 Nov 2014 18:12:51 +0100 Subject: [PATCH 041/119] Passage par reference de la connexion --- include/class_anc_key_sql.php | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/include/class_anc_key_sql.php b/include/class_anc_key_sql.php index ffb6577fe..6785c1ca2 100644 --- a/include/class_anc_key_sql.php +++ b/include/class_anc_key_sql.php @@ -32,7 +32,7 @@ require_once 'class_noalyss_sql.php'; class Anc_Key_SQL extends Noalyss_SQL { - function __construct($cn, $p_id = -1) + function __construct($p_cn, $p_id = -1) { $this->table = "public.key_distribution"; $this->primary_key = "kd_id"; @@ -52,9 +52,10 @@ class Anc_Key_SQL extends Noalyss_SQL $this->default = array( "kd_id" => "auto" ); - global $cn; + // PHPUNIT seems to have a problem with this line + //global $cn; - parent::__construct($cn, $p_id); + parent::__construct($p_cn, $p_id); } } @@ -63,7 +64,7 @@ class Anc_Key_SQL extends Noalyss_SQL */ class Anc_Key_Ledger_SQL extends Noalyss_SQL { - function __construct($cn, $p_id = -1) + function __construct(&$p_cn, $p_id = -1) { $this->table = "public.key_distribution_ledger"; $this->primary_key = "kl_id"; @@ -83,9 +84,10 @@ class Anc_Key_Ledger_SQL extends Noalyss_SQL $this->default = array( "kl_id" => "auto" ); - global $cn; + // PHPUNIT seems to have a problem with this line + //global $cn; - parent::__construct($cn, $p_id); + parent::__construct($p_cn, $p_id); } } /** @@ -93,8 +95,9 @@ class Anc_Key_Ledger_SQL extends Noalyss_SQL */ class Anc_Key_Detail_SQL extends Noalyss_SQL { - function __construct($cn, $p_id = -1) + function __construct(&$p_cn, $p_id = -1) { + $this->table = "public.key_distribution_detail"; $this->primary_key = "ke_id"; @@ -115,9 +118,11 @@ class Anc_Key_Detail_SQL extends Noalyss_SQL $this->default = array( "ke_id" => "auto" ); - global $cn; + // PHPUNIT seems to have a problem with this line + //global $cn; + - parent::__construct($cn, $p_id); + parent::__construct($p_cn, $p_id); } } /** @@ -125,7 +130,7 @@ class Anc_Key_Detail_SQL extends Noalyss_SQL */ class Anc_Key_Activity_SQL extends Noalyss_SQL { - function __construct($cn, $p_id = -1) + function __construct($p_cn, $p_id = -1) { $this->table = "public.key_distribution_activity"; $this->primary_key = "ka_id"; @@ -148,8 +153,7 @@ class Anc_Key_Activity_SQL extends Noalyss_SQL $this->default = array( "ka_id" => "auto" ); - global $cn; - parent::__construct($cn, $p_id); + parent::__construct($p_cn, $p_id); } } \ No newline at end of file From 6cb6febe336a24d1cfbc8454fd369a058a194431 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 9 Nov 2014 19:18:19 +0100 Subject: [PATCH 042/119] Task #1044 - Implementation de PHPUNIT Passage par reference de la connexion --- unit-test/include/class_acc_ledgerTest.php | 836 ++++++++++++++++++ .../include/class_acc_ledger_finTest.php | 138 +++ .../include/class_acc_ledger_purchaseTest.php | 127 +++ .../include/class_acc_ledger_soldTest.php | 138 +++ unit-test/include/class_anc_accountTest.php | 176 ++++ .../include/class_anc_grandlivreTest.php | 116 +++ unit-test/include/class_anc_keyTest.php | 140 +++ unit-test/include/class_anc_key_sqlTest.php | 43 + unit-test/include/class_anc_operationTest.php | 224 +++++ unit-test/include/class_databaseTest.php | 584 ++++++++++++ .../include/class_default_menu_sqlTest.php | 32 + .../include/class_document_exportTest.php | 104 +++ unit-test/include/class_ficheTest.php | 549 ++++++++++++ unit-test/include/class_follow_upTest.php | 428 +++++++++ .../include/class_follow_up_detailTest.php | 176 ++++ unit-test/include/class_html_inputTest.php | 644 ++++++++++++++ unit-test/include/class_icardTest.php | 128 +++ unit-test/include/class_menu_ref_sqlTest.php | 44 + unit-test/include/class_profile_sqlTest.php | 32 + unit-test/include/class_stockTest.php | 128 +++ .../include/class_stock_goods_sqlTest.php | 32 + unit-test/include/class_stock_sqlTest.php | 28 + unit-test/include/class_tagTest.php | 152 ++++ unit-test/include/class_tag_sqlTest.php | 32 + 24 files changed, 5031 insertions(+) create mode 100644 unit-test/include/class_acc_ledgerTest.php create mode 100644 unit-test/include/class_acc_ledger_finTest.php create mode 100644 unit-test/include/class_acc_ledger_purchaseTest.php create mode 100644 unit-test/include/class_acc_ledger_soldTest.php create mode 100644 unit-test/include/class_anc_accountTest.php create mode 100644 unit-test/include/class_anc_grandlivreTest.php create mode 100644 unit-test/include/class_anc_keyTest.php create mode 100644 unit-test/include/class_anc_key_sqlTest.php create mode 100644 unit-test/include/class_anc_operationTest.php create mode 100644 unit-test/include/class_databaseTest.php create mode 100644 unit-test/include/class_default_menu_sqlTest.php create mode 100644 unit-test/include/class_document_exportTest.php create mode 100644 unit-test/include/class_ficheTest.php create mode 100644 unit-test/include/class_follow_upTest.php create mode 100644 unit-test/include/class_follow_up_detailTest.php create mode 100644 unit-test/include/class_html_inputTest.php create mode 100644 unit-test/include/class_icardTest.php create mode 100644 unit-test/include/class_menu_ref_sqlTest.php create mode 100644 unit-test/include/class_profile_sqlTest.php create mode 100644 unit-test/include/class_stockTest.php create mode 100644 unit-test/include/class_stock_goods_sqlTest.php create mode 100644 unit-test/include/class_stock_sqlTest.php create mode 100644 unit-test/include/class_tagTest.php create mode 100644 unit-test/include/class_tag_sqlTest.php diff --git a/unit-test/include/class_acc_ledgerTest.php b/unit-test/include/class_acc_ledgerTest.php new file mode 100644 index 000000000..9a81c4592 --- /dev/null +++ b/unit-test/include/class_acc_ledgerTest.php @@ -0,0 +1,836 @@ +object=new Acc_Ledger($g_connection,0); + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + + } + + /** + * @covers Acc_Ledger::get_last_pj + * @todo Implement testGet_last_pj(). + */ + public function testGet_last_pj() + { + $this->object->id=1; + $array=$this->object->get_last(2); + $this->assertEquals(2,count($array)); + + } + + /** + * @covers Acc_Ledger::get_type + * @todo Implement testGet_type(). + */ + public function testGet_type() + { + $this->object->id=0; + $type=$this->object->get_type(); + $this->assertEquals('GL',$type); + + $this->object->id=1; + $type=$this->object->get_type(); + $this->assertEquals('FIN',$type); + + $this->object->id=2; + $type=$this->object->get_type(); + $this->assertEquals('VEN',$type); + + $this->object->id=3; + $type=$this->object->get_type(); + $this->assertEquals('ACH',$type); + } + + /** + * @covers Acc_Ledger::delete + * @todo Implement testDelete(). + */ + public function testDelete() + { + $this->object->delete(); + } + + /** + * @covers Acc_Ledger::display_warning + * @todo Implement testDisplay_warning(). + */ + public function testDisplay_warning() + { + $this->object->display_warning("Alert", "warning"); + } + + /** + * @covers Acc_Ledger::reverse + * @todo Implement testReverse(). + */ + public function testReverse() + { + $this->object->reverse('01.01.2014'); + } + + /** + * @covers Acc_Ledger::get_name + * @todo Implement testGet_name(). + */ + public function testGet_name() + { + $this->object->id=3; + $name=$this->object->get_name(); + $this->assertEquals('Achat',$name); + } + + /** + * @covers Acc_Ledger::get_row + * @todo Implement testGet_row(). + */ + public function testGet_row() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::get_rowSimple + * @todo Implement testGet_rowSimple(). + */ + public function testGet_rowSimple() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::guess_pj + * @todo Implement testGuess_pj(). + */ + public function testGuess_pj() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::list_operation_to_reconcile + * @todo Implement testList_operation_to_reconcile(). + */ + public function testList_operation_to_reconcile() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::list_operation + * @todo Implement testList_operation(). + */ + public function testList_operation() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::get_detail + * @todo Implement testGet_detail(). + */ + public function testGet_detail() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::get_propertie + * @todo Implement testGet_propertie(). + */ + public function testGet_propertie() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::GetDefLine + * @todo Implement testGetDefLine(). + */ + public function testGetDefLine() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::get_solde + * @todo Implement testGet_solde(). + */ + public function testGet_solde() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::select_ledger + * @todo Implement testSelect_ledger(). + */ + public function testSelect_ledger() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::get_fiche_def + * @todo Implement testGet_fiche_def(). + */ + public function testGet_fiche_def() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::get_class_def + * @todo Implement testGet_class_def(). + */ + public function testGet_class_def() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::confirm + * @todo Implement testConfirm(). + */ + public function testConfirm() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::get_min_row + * @todo Implement testGet_min_row(). + */ + public function testGet_min_row() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::input + * @todo Implement testInput(). + */ + public function testInput() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::is_closed + * @todo Implement testIs_closed(). + */ + public function testIs_closed() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::verify + * @todo Implement testVerify(). + */ + public function testVerify() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::compute_internal_code + * @todo Implement testCompute_internal_code(). + */ + public function testCompute_internal_code() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::save + * @todo Implement testSave(). + */ + public function testSave() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::get_request + * @todo Implement testGet_request(). + */ + public function testGet_request() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::next_number + * @todo Implement testNext_number(). + */ + public function testNext_number() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::get_first + * @todo Implement testGet_first(). + */ + public function testGet_first() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::update_paid + * @todo Implement testUpdate_paid(). + */ + public function testUpdate_paid() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::update_internal_code + * @todo Implement testUpdate_internal_code(). + */ + public function testUpdate_internal_code() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::get_default_card + * @todo Implement testGet_default_card(). + */ + public function testGet_default_card() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::get_all_fiche_def + * @todo Implement testGet_all_fiche_def(). + */ + public function testGet_all_fiche_def() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::get_saldo_exercice + * @todo Implement testGet_saldo_exercice(). + */ + public function testGet_saldo_exercice() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::check_strict + * @todo Implement testCheck_strict(). + */ + public function testCheck_strict() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::check_periode + * @todo Implement testCheck_periode(). + */ + public function testCheck_periode() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::get_last_date + * @todo Implement testGet_last_date(). + */ + public function testGet_last_date() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::get_id + * @todo Implement testGet_id(). + */ + public function testGet_id() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::create_document + * @todo Implement testCreate_document(). + */ + public function testCreate_document() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::check_payment + * @todo Implement testCheck_payment(). + */ + public function testCheck_payment() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::inc_seq_pj + * @todo Implement testInc_seq_pj(). + */ + public function testInc_seq_pj() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::search_form + * @todo Implement testSearch_form(). + */ + public function testSearch_form() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::build_search_sql + * @todo Implement testBuild_search_sql(). + */ + public function testBuild_search_sql() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::display_search_form + * @todo Implement testDisplay_search_form(). + */ + public function testDisplay_search_form() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::get_last + * @todo Implement testGet_last(). + */ + public function testGet_last() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::search_group + * @todo Implement testSearch_group(). + */ + public function testSearch_group() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::get_operation + * @todo Implement testGet_operation(). + */ + public function testGet_operation() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::existing_vat + * @todo Implement testExisting_vat(). + */ + public function testExisting_vat() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::get_other_amount + * @todo Implement testGet_other_amount(). + */ + public function testGet_other_amount() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::vat_operation + * @todo Implement testVat_operation(). + */ + public function testVat_operation() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::previous_amount + * @todo Implement testPrevious_amount(). + */ + public function testPrevious_amount() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::test_me + * @todo Implement testTest_me(). + */ + public function testTest_me() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::array_cat + * @todo Implement testArray_cat(). + */ + public function testArray_cat() + { + $array=Acc_Ledger::array_cat(); + $this->assertEquals(4,count($array)); + } + + /** + * @covers Acc_Ledger::get_tiers + * @todo Implement testGet_tiers(). + */ + public function testGet_tiers() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::listing + * @todo Implement testListing(). + */ + public function testListing() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::display_ledger + * @todo Implement testDisplay_ledger(). + */ + public function testDisplay_ledger() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::verify_ledger + * @todo Implement testVerify_ledger(). + */ + public function testVerify_ledger() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::update + * @todo Implement testUpdate(). + */ + public function testUpdate() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::input_paid + * @todo Implement testInput_paid(). + */ + public function testInput_paid() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::input_new + * @todo Implement testInput_new(). + */ + public function testInput_new() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::save_new + * @todo Implement testSave_new(). + */ + public function testSave_new() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::delete_ledger + * @todo Implement testDelete_ledger(). + */ + public function testDelete_ledger() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::get_operation_date + * @todo Implement testGet_operation_date(). + */ + public function testGet_operation_date() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::get_supplier_now + * @todo Implement testGet_supplier_now(). + */ + public function testGet_supplier_now() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::get_supplier_late + * @todo Implement testGet_supplier_late(). + */ + public function testGet_supplier_late() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::get_customer_now + * @todo Implement testGet_customer_now(). + */ + public function testGet_customer_now() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::get_customer_late + * @todo Implement testGet_customer_late(). + */ + public function testGet_customer_late() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger::convert_from_follow + * @todo Implement testConvert_from_follow(). + */ + public function testConvert_from_follow() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + +} diff --git a/unit-test/include/class_acc_ledger_finTest.php b/unit-test/include/class_acc_ledger_finTest.php new file mode 100644 index 000000000..c4ebba793 --- /dev/null +++ b/unit-test/include/class_acc_ledger_finTest.php @@ -0,0 +1,138 @@ +object=new Acc_Ledger_Fin($g_connection,1); + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + + } + + /** + * @covers Acc_Ledger_Fin::verify + * @todo Implement testVerify(). + * @expectedException Exception + */ + public function testVerify() + { + + $this->object->verify(null); + } + + /** + * @covers Acc_Ledger_Fin::input + * @todo Implement testInput(). + */ + public function testInput() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger_Fin::confirm + * @todo Implement testConfirm(). + */ + public function testConfirm() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger_Fin::insert + * @todo Implement testInsert(). + */ + public function testInsert() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger_Fin::show_ledger + * @todo Implement testShow_ledger(). + */ + public function testShow_ledger() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger_Fin::get_bank_name + * @todo Implement testGet_bank_name(). + */ + public function testGet_bank_name() + { + $name=$this->object->get_bank_name(); + var_export($name); + if (strpos ($name,NOTFOUND) !=0 ) + $this->assertTrue(FALSE); + } + + /** + * @covers Acc_Ledger_Fin::get_bank + * @todo Implement testGet_bank(). + */ + public function testGet_bank() + { + $this->assertEquals(27,$this->object->get_bank()); + } + + /** + * @covers Acc_Ledger_Fin::numb_operation + * @todo Implement testNumb_operation(). + */ + public function testNumb_operation() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger_Fin::insert_quant_fin + * @todo Implement testInsert_quant_fin(). + */ + public function testInsert_quant_fin() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + +} diff --git a/unit-test/include/class_acc_ledger_purchaseTest.php b/unit-test/include/class_acc_ledger_purchaseTest.php new file mode 100644 index 000000000..e5d23b46c --- /dev/null +++ b/unit-test/include/class_acc_ledger_purchaseTest.php @@ -0,0 +1,127 @@ +object=new Acc_Ledger_Purchase($g_connection,3); + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + + } + + /** + * @covers Acc_Ledger_Purchase::verify + * @todo Implement testVerify(). + * @expectedException Exception + */ + public function testVerify() + { + $this->object->verify(array()); + } + + /** + * @covers Acc_Ledger_Purchase::insert + * @todo Implement testInsert(). + */ + public function testInsert() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger_Purchase::input + * @todo Implement testInput(). + */ + public function testInput() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger_Purchase::confirm + * @todo Implement testConfirm(). + */ + public function testConfirm() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger_Purchase::extra_info + * @todo Implement testExtra_info(). + */ + public function testExtra_info() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger_Purchase::show_unpaid + * @todo Implement testShow_unpaid(). + */ + public function testShow_unpaid() + { + // OBSOLETE : function must be removed in the next code cleaning + // $str_html=$this->object->show_unpaid(); + + } + + /** + * @covers Acc_Ledger_Purchase::get_detail_purchase + * @todo Implement testGet_detail_purchase(). + */ + public function testGet_detail_purchase() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger_Purchase::heading_detail_purchase + * @todo Implement testHeading_detail_purchase(). + */ + public function testHeading_detail_purchase() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + +} diff --git a/unit-test/include/class_acc_ledger_soldTest.php b/unit-test/include/class_acc_ledger_soldTest.php new file mode 100644 index 000000000..66908f94c --- /dev/null +++ b/unit-test/include/class_acc_ledger_soldTest.php @@ -0,0 +1,138 @@ +object=new Acc_Ledger_Sold($g_connection,2); + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + + } + + /** + * @covers Acc_Ledger_Sold::verify + * @todo Implement testVerify(). + * @expectedException Exception + */ + public function testVerify() + { + $this->object->verify(array()); + } + + /** + * @covers Acc_Ledger_Sold::insert + * @todo Implement testInsert(). + * @expectedException Exception + */ + public function testInsert() + { + $this->object->insert(array()); + } + + /** + * @covers Acc_Ledger_Sold::confirm + * @todo Implement testConfirm(). + * @expectedException Exception + */ + public function testConfirm() + { + $_POST['p_jrn']=$this->object->id; + $this->object->confirm(array()); + } + + /** + * @covers Acc_Ledger_Sold::extra_info + * @todo Implement testExtra_info(). + */ + public function testExtra_info() + { + $info=$this->object->extra_info(); + if ( ! is_string($info) ) { + $this->assertTrue(FALSE); + } + } + + /** + * @covers Acc_Ledger_Sold::show_unpaid + * @todo Implement testShow_unpaid(). + */ + public function testShow_unpaid() + { + // OBSOLETE : must be removed + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger_Sold::input + * @todo Implement testInput(). + */ + public function testInput() + { + $_REQUEST['ac']='VEN'; + $info=$this->object->input(); + if ( ! is_string($info) ) { + $this->assertTrue(FALSE); + } + } + + /** + * @covers Acc_Ledger_Sold::get_detail_sale + * @todo Implement testGet_detail_sale(). + */ + public function testGet_detail_sale() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger_Sold::heading_detail_sale + * @todo Implement testHeading_detail_sale(). + */ + public function testHeading_detail_sale() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Acc_Ledger_Sold::test_me + * @todo Implement testTest_me(). + */ + public function testTest_me() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + +} diff --git a/unit-test/include/class_anc_accountTest.php b/unit-test/include/class_anc_accountTest.php new file mode 100644 index 000000000..b818ed790 --- /dev/null +++ b/unit-test/include/class_anc_accountTest.php @@ -0,0 +1,176 @@ +object=new Anc_Account; + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + + } + + /** + * @covers Anc_Account::get_by_id + * @todo Implement testGet_by_id(). + */ + public function testGet_by_id() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Account::get_by_name + * @todo Implement testGet_by_name(). + */ + public function testGet_by_name() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Account::add + * @todo Implement testAdd(). + */ + public function testAdd() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Account::make_array_name + * @todo Implement testMake_array_name(). + */ + public function testMake_array_name() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Account::update + * @todo Implement testUpdate(). + */ + public function testUpdate() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Account::delete + * @todo Implement testDelete(). + */ + public function testDelete() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Account::get_list + * @todo Implement testGet_list(). + */ + public function testGet_list() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Account::display_list + * @todo Implement testDisplay_list(). + */ + public function testDisplay_list() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Account::debug + * @todo Implement testDebug(). + */ + public function testDebug() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Account::form + * @todo Implement testForm(). + */ + public function testForm() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Account::get_from_array + * @todo Implement testGet_from_array(). + */ + public function testGet_from_array() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Account::test_me + * @todo Implement testTest_me(). + */ + public function testTest_me() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + +} diff --git a/unit-test/include/class_anc_grandlivreTest.php b/unit-test/include/class_anc_grandlivreTest.php new file mode 100644 index 000000000..0d8c39989 --- /dev/null +++ b/unit-test/include/class_anc_grandlivreTest.php @@ -0,0 +1,116 @@ +object=new Anc_GrandLivre; + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + + } + + /** + * @covers Anc_GrandLivre::set_sql_filter + * @todo Implement testSet_sql_filter(). + */ + public function testSet_sql_filter() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_GrandLivre::load + * @todo Implement testLoad(). + */ + public function testLoad() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_GrandLivre::load_csv + * @todo Implement testLoad_csv(). + */ + public function testLoad_csv() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_GrandLivre::button_export_pdf + * @todo Implement testButton_export_pdf(). + */ + public function testButton_export_pdf() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_GrandLivre::display_html + * @todo Implement testDisplay_html(). + */ + public function testDisplay_html() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_GrandLivre::show_button + * @todo Implement testShow_button(). + */ + public function testShow_button() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_GrandLivre::display_csv + * @todo Implement testDisplay_csv(). + */ + public function testDisplay_csv() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + +} diff --git a/unit-test/include/class_anc_keyTest.php b/unit-test/include/class_anc_keyTest.php new file mode 100644 index 000000000..ce1854299 --- /dev/null +++ b/unit-test/include/class_anc_keyTest.php @@ -0,0 +1,140 @@ +object=new Anc_Key; + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + + } + + /** + * @covers Anc_Key::key_avaiable + * @todo Implement testKey_avaiable(). + */ + public function testKey_avaiable() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Key::display_choice + * @todo Implement testDisplay_choice(). + */ + public function testDisplay_choice() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Key::display_list + * @todo Implement testDisplay_list(). + */ + public function testDisplay_list() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Key::input + * @todo Implement testInput(). + */ + public function testInput() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Key::verify + * @todo Implement testVerify(). + */ + public function testVerify() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Key::save + * @todo Implement testSave(). + */ + public function testSave() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Key::fill_table + * @todo Implement testFill_table(). + */ + public function testFill_table() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Key::key_add + * @todo Implement testKey_add(). + */ + public function testKey_add() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Key::delete + * @todo Implement testDelete(). + */ + public function testDelete() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + +} diff --git a/unit-test/include/class_anc_key_sqlTest.php b/unit-test/include/class_anc_key_sqlTest.php new file mode 100644 index 000000000..da109d167 --- /dev/null +++ b/unit-test/include/class_anc_key_sqlTest.php @@ -0,0 +1,43 @@ +object=new Anc_Key_Detail_SQL($g_connection); + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + + } + + /** + * @backupGlobals enabled + * + */ + function test_me() + { + $this->assertTrue(true); + } + +} diff --git a/unit-test/include/class_anc_operationTest.php b/unit-test/include/class_anc_operationTest.php new file mode 100644 index 000000000..7a56deab1 --- /dev/null +++ b/unit-test/include/class_anc_operationTest.php @@ -0,0 +1,224 @@ +object=new Anc_Operation; + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + + } + + /** + * @covers Anc_Operation::add + * @todo Implement testAdd(). + */ + public function testAdd() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Operation::delete + * @todo Implement testDelete(). + */ + public function testDelete() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Operation::get_list + * @todo Implement testGet_list(). + */ + public function testGet_list() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Operation::html_table + * @todo Implement testHtml_table(). + */ + public function testHtml_table() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Operation::get_by_jid + * @todo Implement testGet_by_jid(). + */ + public function testGet_by_jid() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Operation::update_from_jrnx + * @todo Implement testUpdate_from_jrnx(). + */ + public function testUpdate_from_jrnx() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Operation::get_jrid + * @todo Implement testGet_jrid(). + */ + public function testGet_jrid() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Operation::get_balance + * @todo Implement testGet_balance(). + */ + public function testGet_balance() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Operation::display_form_plan + * @todo Implement testDisplay_form_plan(). + */ + public function testDisplay_form_plan() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Operation::save_form_plan_vat_nd + * @todo Implement testSave_form_plan_vat_nd(). + */ + public function testSave_form_plan_vat_nd() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Operation::save_form_plan + * @todo Implement testSave_form_plan(). + */ + public function testSave_form_plan() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Operation::save_update_form + * @todo Implement testSave_update_form(). + */ + public function testSave_update_form() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Operation::to_request + * @todo Implement testTo_request(). + */ + public function testTo_request() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Operation::delete_by_jid + * @todo Implement testDelete_by_jid(). + */ + public function testDelete_by_jid() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Operation::display_table + * @todo Implement testDisplay_table(). + */ + public function testDisplay_table() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Anc_Operation::test_me + * @todo Implement testTest_me(). + */ + public function testTest_me() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + +} diff --git a/unit-test/include/class_databaseTest.php b/unit-test/include/class_databaseTest.php new file mode 100644 index 000000000..f876962cc --- /dev/null +++ b/unit-test/include/class_databaseTest.php @@ -0,0 +1,584 @@ +object=new Database; + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + + } + + /** + * @covers Database::verify + * @todo Implement testVerify(). + */ + public function testVerify() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::set_encoding + * @todo Implement testSet_encoding(). + */ + public function testSet_encoding() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::exec_sql + * @todo Implement testExec_sql(). + */ + public function testExec_sql() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::count_sql + * @todo Implement testCount_sql(). + */ + public function testCount_sql() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::get_current_seq + * @todo Implement testGet_current_seq(). + */ + public function testGet_current_seq() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::get_next_seq + * @todo Implement testGet_next_seq(). + */ + public function testGet_next_seq() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::start + * @todo Implement testStart(). + */ + public function testStart() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::commit + * @todo Implement testCommit(). + */ + public function testCommit() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::rollback + * @todo Implement testRollback(). + */ + public function testRollback() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::alter_seq + * @todo Implement testAlter_seq(). + */ + public function testAlter_seq() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::execute_script + * @todo Implement testExecute_script(). + */ + public function testExecute_script() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::get_version + * @todo Implement testGet_version(). + */ + public function testGet_version() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::fetch + * @todo Implement testFetch(). + */ + public function testFetch() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::size + * @todo Implement testSize(). + */ + public function testSize() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::count + * @todo Implement testCount(). + */ + public function testCount() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::apply_patch + * @todo Implement testApply_patch(). + */ + public function testApply_patch() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::get_value + * @todo Implement testGet_value(). + */ + public function testGet_value() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::get_array + * @todo Implement testGet_array(). + */ + public function testGet_array() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::create_sequence + * @todo Implement testCreate_sequence(). + */ + public function testCreate_sequence() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::exist_sequence + * @todo Implement testExist_sequence(). + */ + public function testExist_sequence() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::exist_table + * @todo Implement testExist_table(). + */ + public function testExist_table() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::exist_column + * @todo Implement testExist_column(). + */ + public function testExist_column() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::format_name + * @todo Implement testFormat_name(). + */ + public function testFormat_name() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::exist_database + * @todo Implement testExist_database(). + */ + public function testExist_database() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::exist_blob + * @todo Implement testExist_blob(). + */ + public function testExist_blob() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::exist_view + * @todo Implement testExist_view(). + */ + public function testExist_view() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::exist_schema + * @todo Implement testExist_schema(). + */ + public function testExist_schema() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::make_list + * @todo Implement testMake_list(). + */ + public function testMake_list() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::make_array + * @todo Implement testMake_array(). + */ + public function testMake_array() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::save_upload_document + * @todo Implement testSave_upload_document(). + */ + public function testSave_upload_document() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::num_row + * @todo Implement testNum_row(). + */ + public function testNum_row() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::fetch_array + * @todo Implement testFetch_array(). + */ + public function testFetch_array() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::fetch_all + * @todo Implement testFetch_all(). + */ + public function testFetch_all() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::fetch_result + * @todo Implement testFetch_result(). + */ + public function testFetch_result() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::fetch_row + * @todo Implement testFetch_row(). + */ + public function testFetch_row() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::lo_unlink + * @todo Implement testLo_unlink(). + */ + public function testLo_unlink() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::prepare + * @todo Implement testPrepare(). + */ + public function testPrepare() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::execute + * @todo Implement testExecute(). + */ + public function testExecute() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::lo_export + * @todo Implement testLo_export(). + */ + public function testLo_export() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::lo_import + * @todo Implement testLo_import(). + */ + public function testLo_import() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::escape_string + * @todo Implement testEscape_string(). + */ + public function testEscape_string() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::close + * @todo Implement testClose(). + */ + public function testClose() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::__toString + * @todo Implement test__toString(). + */ + public function test__toString() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::test_me + * @todo Implement testTest_me(). + */ + public function testTest_me() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::status + * @todo Implement testStatus(). + */ + public function testStatus() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Database::query_to_csv + * @todo Implement testQuery_to_csv(). + */ + public function testQuery_to_csv() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + +} diff --git a/unit-test/include/class_default_menu_sqlTest.php b/unit-test/include/class_default_menu_sqlTest.php new file mode 100644 index 000000000..7f6872034 --- /dev/null +++ b/unit-test/include/class_default_menu_sqlTest.php @@ -0,0 +1,32 @@ +object=new Default_Menu_SQL; + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + + } + +} diff --git a/unit-test/include/class_document_exportTest.php b/unit-test/include/class_document_exportTest.php new file mode 100644 index 000000000..6381fdf00 --- /dev/null +++ b/unit-test/include/class_document_exportTest.php @@ -0,0 +1,104 @@ +object=new Document_Export; + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + + } + + /** + * @covers Document_Export::concatenate_pdf + * @todo Implement testConcatenate_pdf(). + */ + public function testConcatenate_pdf() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Document_Export::move_file + * @todo Implement testMove_file(). + */ + public function testMove_file() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Document_Export::send_pdf + * @todo Implement testSend_pdf(). + */ + public function testSend_pdf() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Document_Export::clean_folder + * @todo Implement testClean_folder(). + */ + public function testClean_folder() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Document_Export::export_all + * @todo Implement testExport_all(). + */ + public function testExport_all() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Document_Export::check_file + * @todo Implement testCheck_file(). + */ + public function testCheck_file() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + +} diff --git a/unit-test/include/class_ficheTest.php b/unit-test/include/class_ficheTest.php new file mode 100644 index 000000000..31a638ae6 --- /dev/null +++ b/unit-test/include/class_ficheTest.php @@ -0,0 +1,549 @@ +object=new Fiche($g_connection); + $result=$this->object->get_bk_account(); + $this->assertEquals(gettype($result),'array'); + $count = count($result); + $this->assertGreaterThan(0,$count); + + } + + /** + * @covers Fiche::get_by_qcode + * @todo Implement testGet_by_qcode(). + */ + public function testGet_by_qcode() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::setAttribut + * @todo Implement testSetAttribut(). + */ + public function testSetAttribut() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::getAttribut + * @todo Implement testGetAttribut(). + */ + public function testGetAttribut() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::seek + * @todo Implement testSeek(). + */ + public function testSeek() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::size + * @todo Implement testSize(). + */ + public function testSize() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::count_by_modele + * @todo Implement testCount_by_modele(). + */ + public function testCount_by_modele() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::GetByDef + * @todo Implement testGetByDef(). + */ + public function testGetByDef() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::ShowTable + * @todo Implement testShowTable(). + */ + public function testShowTable() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::strAttribut + * @todo Implement testStrAttribut(). + */ + public function testStrAttribut() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::to_array + * @todo Implement testTo_array(). + */ + public function testTo_array() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::blank + * @todo Implement testBlank(). + */ + public function testBlank() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::Display + * @todo Implement testDisplay(). + */ + public function testDisplay() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::Save + * @todo Implement testSave(). + */ + public function testSave() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::insert + * @todo Implement testInsert(). + */ + public function testInsert() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::update + * @todo Implement testUpdate(). + */ + public function testUpdate() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::remove + * @todo Implement testRemove(). + */ + public function testRemove() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::getName + * @todo Implement testGetName(). + */ + public function testGetName() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::get_quick_code + * @todo Implement testGet_quick_code(). + */ + public function testGet_quick_code() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::Get + * @todo Implement testGet(). + */ + public function testGet() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::get_by_category + * @todo Implement testGet_by_category(). + */ + public function testGet_by_category() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::get_fiche_def_ref_id + * @todo Implement testGet_fiche_def_ref_id(). + */ + public function testGet_fiche_def_ref_id() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::get_row_date + * @todo Implement testGet_row_date(). + */ + public function testGet_row_date() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::get_row + * @todo Implement testGet_row(). + */ + public function testGet_row() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::HtmlTableDetail + * @todo Implement testHtmlTableDetail(). + */ + public function testHtmlTableDetail() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::HtmlTable + * @todo Implement testHtmlTable(). + */ + public function testHtmlTable() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::HtmlTableHeader + * @todo Implement testHtmlTableHeader(). + */ + public function testHtmlTableHeader() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::get_solde_detail + * @todo Implement testGet_solde_detail(). + */ + public function testGet_solde_detail() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::get_bk_balance + * @todo Implement testGet_bk_balance(). + */ + public function testGet_bk_balance() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::empty_attribute + * @todo Implement testEmpty_attribute(). + */ + public function testEmpty_attribute() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::Summary + * @todo Implement testSummary(). + */ + public function testSummary() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::get_categorie + * @todo Implement testGet_categorie(). + */ + public function testGet_categorie() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::belong_ledger + * @todo Implement testBelong_ledger(). + */ + public function testBelong_ledger() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::get_fiche_def + * @todo Implement testGet_fiche_def(). + */ + public function testGet_fiche_def() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::is_used + * @todo Implement testIs_used(). + */ + public function testIs_used() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::delete + * @todo Implement testDelete(). + */ + public function testDelete() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::build_sql + * @todo Implement testBuild_sql(). + */ + public function testBuild_sql() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::move_to + * @todo Implement testMove_to(). + */ + public function testMove_to() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::get_amount_side + * @todo Implement testGet_amount_side(). + */ + public function testGet_amount_side() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::test_me + * @todo Implement testTest_me(). + */ + public function testTest_me() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::get_gestion_title + * @todo Implement testGet_gestion_title(). + */ + public function testGet_gestion_title() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Fiche::get_all_account + * @todo Implement testGet_all_account(). + */ + public function testGet_all_account() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + +} diff --git a/unit-test/include/class_follow_upTest.php b/unit-test/include/class_follow_upTest.php new file mode 100644 index 000000000..02df8c38a --- /dev/null +++ b/unit-test/include/class_follow_upTest.php @@ -0,0 +1,428 @@ +object=new Follow_Up; + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + + } + + /** + * @covers Follow_Up::sql_security_filter + * @todo Implement testSql_security_filter(). + */ + public function testSql_security_filter() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::Display + * @todo Implement testDisplay(). + */ + public function testDisplay() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::get + * @todo Implement testGet(). + */ + public function testGet() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::save + * @todo Implement testSave(). + */ + public function testSave() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::myList + * @todo Implement testMyList(). + */ + public function testMyList() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::Update + * @todo Implement testUpdate(). + */ + public function testUpdate() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::generate_document + * @todo Implement testGenerate_document(). + */ + public function testGenerate_document() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::fromArray + * @todo Implement testFromArray(). + */ + public function testFromArray() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::remove + * @todo Implement testRemove(). + */ + public function testRemove() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::get_last + * @todo Implement testGet_last(). + */ + public function testGet_last() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::get_today + * @todo Implement testGet_today(). + */ + public function testGet_today() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::get_late + * @todo Implement testGet_late(). + */ + public function testGet_late() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::insert_operation + * @todo Implement testInsert_operation(). + */ + public function testInsert_operation() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::remove_operation_deprecated + * @todo Implement testRemove_operation_deprecated(). + */ + public function testRemove_operation_deprecated() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::display_search + * @todo Implement testDisplay_search(). + */ + public function testDisplay_search() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::show_action_list + * @todo Implement testShow_action_list(). + */ + public function testShow_action_list() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::filter_by_tag + * @todo Implement testFilter_by_tag(). + */ + public function testFilter_by_tag() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::create_query + * @todo Implement testCreate_query(). + */ + public function testCreate_query() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::short_list + * @todo Implement testShort_list(). + */ + public function testShort_list() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::insert_action + * @todo Implement testInsert_action(). + */ + public function testInsert_action() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::export_csv + * @todo Implement testExport_csv(). + */ + public function testExport_csv() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::get_all_operation + * @todo Implement testGet_all_operation(). + */ + public function testGet_all_operation() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::tag_get + * @todo Implement testTag_get(). + */ + public function testTag_get() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::tag_add + * @todo Implement testTag_add(). + */ + public function testTag_add() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::tag_remove + * @todo Implement testTag_remove(). + */ + public function testTag_remove() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::tag_cell + * @todo Implement testTag_cell(). + */ + public function testTag_cell() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::action_tag_remove + * @todo Implement testAction_tag_remove(). + */ + public function testAction_tag_remove() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::action_tag_add + * @todo Implement testAction_tag_add(). + */ + public function testAction_tag_add() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::action_tag_clear + * @todo Implement testAction_tag_clear(). + */ + public function testAction_tag_clear() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::action_print + * @todo Implement testAction_print(). + */ + public function testAction_print() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::tag_clear + * @todo Implement testTag_clear(). + */ + public function testTag_clear() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::action_set_state + * @todo Implement testAction_set_state(). + */ + public function testAction_set_state() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up::action_remove + * @todo Implement testAction_remove(). + */ + public function testAction_remove() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + +} diff --git a/unit-test/include/class_follow_up_detailTest.php b/unit-test/include/class_follow_up_detailTest.php new file mode 100644 index 000000000..742a05409 --- /dev/null +++ b/unit-test/include/class_follow_up_detailTest.php @@ -0,0 +1,176 @@ +object=new Follow_Up_Detail; + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + + } + + /** + * @covers Follow_Up_Detail::get_parameter + * @todo Implement testGet_parameter(). + */ + public function testGet_parameter() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up_Detail::set_parameter + * @todo Implement testSet_parameter(). + */ + public function testSet_parameter() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up_Detail::get_info + * @todo Implement testGet_info(). + */ + public function testGet_info() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up_Detail::verify + * @todo Implement testVerify(). + */ + public function testVerify() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up_Detail::save + * @todo Implement testSave(). + */ + public function testSave() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up_Detail::insert + * @todo Implement testInsert(). + */ + public function testInsert() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up_Detail::update + * @todo Implement testUpdate(). + */ + public function testUpdate() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up_Detail::load_all + * @todo Implement testLoad_all(). + */ + public function testLoad_all() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up_Detail::load + * @todo Implement testLoad(). + */ + public function testLoad() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up_Detail::delete + * @todo Implement testDelete(). + */ + public function testDelete() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up_Detail::from_array + * @todo Implement testFrom_array(). + */ + public function testFrom_array() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Follow_Up_Detail::test_me + * @todo Implement testTest_me(). + */ + public function testTest_me() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + +} diff --git a/unit-test/include/class_html_inputTest.php b/unit-test/include/class_html_inputTest.php new file mode 100644 index 000000000..6cf6a867b --- /dev/null +++ b/unit-test/include/class_html_inputTest.php @@ -0,0 +1,644 @@ +object=new HtmlInput; + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + + } + + /** + * @covers HtmlInput::setReadOnly + * @todo Implement testSetReadOnly(). + */ + public function testSetReadOnly() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::set_attribute + * @todo Implement testSet_attribute(). + */ + public function testSet_attribute() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::get_js_attr + * @todo Implement testGet_js_attr(). + */ + public function testGet_js_attr() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::make_object + * @todo Implement testMake_object(). + */ + public function testMake_object() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::debug + * @todo Implement testDebug(). + */ + public function testDebug() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::submit + * @todo Implement testSubmit(). + */ + public function testSubmit() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::button + * @todo Implement testButton(). + */ + public function testButton() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::reset + * @todo Implement testReset(). + */ + public function testReset() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::hidden + * @todo Implement testHidden(). + */ + public function testHidden() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::extension + * @todo Implement testExtension(). + */ + public function testExtension() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::button_anchor + * @todo Implement testButton_anchor(). + */ + public function testButton_anchor() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::infobulle + * @todo Implement testInfobulle(). + */ + public function testInfobulle() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::warnbulle + * @todo Implement testWarnbulle(). + */ + public function testWarnbulle() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::detail_op + * @todo Implement testDetail_op(). + */ + public function testDetail_op() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::detail_action + * @todo Implement testDetail_action(). + */ + public function testDetail_action() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::detail_modele_document + * @todo Implement testDetail_modele_document(). + */ + public function testDetail_modele_document() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::remove_stock + * @todo Implement testRemove_stock(). + */ + public function testRemove_stock() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::history_card + * @todo Implement testHistory_card(). + */ + public function testHistory_card() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::history_card_button + * @todo Implement testHistory_card_button(). + */ + public function testHistory_card_button() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::history_account + * @todo Implement testHistory_account(). + */ + public function testHistory_account() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::select_ledger + * @todo Implement testSelect_ledger(). + */ + public function testSelect_ledger() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::select_cat + * @todo Implement testSelect_cat(). + */ + public function testSelect_cat() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::display_periode + * @todo Implement testDisplay_periode(). + */ + public function testDisplay_periode() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::button_close + * @todo Implement testButton_close(). + */ + public function testButton_close() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::anchor_close + * @todo Implement testAnchor_close(). + */ + public function testAnchor_close() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::button_action + * @todo Implement testButton_action(). + */ + public function testButton_action() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::button_image + * @todo Implement testButton_image(). + */ + public function testButton_image() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::anchor_hide + * @todo Implement testAnchor_hide(). + */ + public function testAnchor_hide() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::print_window + * @todo Implement testPrint_window(). + */ + public function testPrint_window() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::card_detail + * @todo Implement testCard_detail(). + */ + public function testCard_detail() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::array_to_hidden + * @todo Implement testArray_to_hidden(). + */ + public function testArray_to_hidden() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::get_to_hidden + * @todo Implement testGet_to_hidden(). + */ + public function testGet_to_hidden() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::post_to_hidden + * @todo Implement testPost_to_hidden(). + */ + public function testPost_to_hidden() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::request_to_hidden + * @todo Implement testRequest_to_hidden(). + */ + public function testRequest_to_hidden() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::array_to_string + * @todo Implement testArray_to_string(). + */ + public function testArray_to_string() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::get_to_string + * @todo Implement testGet_to_string(). + */ + public function testGet_to_string() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::post_to_string + * @todo Implement testPost_to_string(). + */ + public function testPost_to_string() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::request_to_string + * @todo Implement testRequest_to_string(). + */ + public function testRequest_to_string() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::generate_id + * @todo Implement testGenerate_id(). + */ + public function testGenerate_id() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::default_value + * @todo Implement testDefault_value(). + */ + public function testDefault_value() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::default_value_get + * @todo Implement testDefault_value_get(). + */ + public function testDefault_value_get() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::default_value_post + * @todo Implement testDefault_value_post(). + */ + public function testDefault_value_post() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::default_value_request + * @todo Implement testDefault_value_request(). + */ + public function testDefault_value_request() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::title_box + * @todo Implement testTitle_box(). + */ + public function testTitle_box() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::anchor + * @todo Implement testAnchor(). + */ + public function testAnchor() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::select_stock + * @todo Implement testSelect_stock(). + */ + public function testSelect_stock() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::filter_table + * @todo Implement testFilter_table(). + */ + public function testFilter_table() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::show_reconcile + * @todo Implement testShow_reconcile(). + */ + public function testShow_reconcile() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::calendar_zoom + * @todo Implement testCalendar_zoom(). + */ + public function testCalendar_zoom() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::button_choice_ledger + * @todo Implement testButton_choice_ledger(). + */ + public function testButton_choice_ledger() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers HtmlInput::show_receipt_document + * @todo Implement testShow_receipt_document(). + */ + public function testShow_receipt_document() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + +} diff --git a/unit-test/include/class_icardTest.php b/unit-test/include/class_icardTest.php new file mode 100644 index 000000000..282acfc9d --- /dev/null +++ b/unit-test/include/class_icardTest.php @@ -0,0 +1,128 @@ +object=new ICard; + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + + } + + /** + * @covers ICard::set_callback + * @todo Implement testSet_callback(). + */ + public function testSet_callback() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers ICard::set_function + * @todo Implement testSet_function(). + */ + public function testSet_function() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers ICard::ipopup + * @todo Implement testIpopup(). + */ + public function testIpopup() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers ICard::set_dblclick + * @todo Implement testSet_dblclick(). + */ + public function testSet_dblclick() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers ICard::input + * @todo Implement testInput(). + */ + public function testInput() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers ICard::display + * @todo Implement testDisplay(). + */ + public function testDisplay() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers ICard::search + * @todo Implement testSearch(). + */ + public function testSearch() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers ICard::test_me + * @todo Implement testTest_me(). + */ + public function testTest_me() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + +} diff --git a/unit-test/include/class_menu_ref_sqlTest.php b/unit-test/include/class_menu_ref_sqlTest.php new file mode 100644 index 000000000..0aee82a17 --- /dev/null +++ b/unit-test/include/class_menu_ref_sqlTest.php @@ -0,0 +1,44 @@ +object=new Menu_Ref_SQL; + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + + } + + /** + * @covers Menu_Ref_SQL::test_me + * @todo Implement testTest_me(). + */ + public function testTest_me() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + +} diff --git a/unit-test/include/class_profile_sqlTest.php b/unit-test/include/class_profile_sqlTest.php new file mode 100644 index 000000000..2aa57da14 --- /dev/null +++ b/unit-test/include/class_profile_sqlTest.php @@ -0,0 +1,32 @@ +object=new Profile_sql; + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + + } + +} diff --git a/unit-test/include/class_stockTest.php b/unit-test/include/class_stockTest.php new file mode 100644 index 000000000..9c516b901 --- /dev/null +++ b/unit-test/include/class_stockTest.php @@ -0,0 +1,128 @@ +object=new Stock; + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + + } + + /** + * @covers Stock::history + * @todo Implement testHistory(). + */ + public function testHistory() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Stock::export_stock_histo_form + * @todo Implement testExport_stock_histo_form(). + */ + public function testExport_stock_histo_form() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Stock::export_stock_summary_list_form + * @todo Implement testExport_stock_summary_list_form(). + */ + public function testExport_stock_summary_list_form() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Stock::search_box_button + * @todo Implement testSearch_box_button(). + */ + public function testSearch_box_button() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Stock::search_box + * @todo Implement testSearch_box(). + */ + public function testSearch_box() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Stock::create_query_histo + * @todo Implement testCreate_query_histo(). + */ + public function testCreate_query_histo() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Stock::summary + * @todo Implement testSummary(). + */ + public function testSummary() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Stock::build_tmp_table + * @todo Implement testBuild_tmp_table(). + */ + public function testBuild_tmp_table() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + +} diff --git a/unit-test/include/class_stock_goods_sqlTest.php b/unit-test/include/class_stock_goods_sqlTest.php new file mode 100644 index 000000000..65f2c2b07 --- /dev/null +++ b/unit-test/include/class_stock_goods_sqlTest.php @@ -0,0 +1,32 @@ +object=new Stock_Goods_Sql; + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + + } + +} diff --git a/unit-test/include/class_stock_sqlTest.php b/unit-test/include/class_stock_sqlTest.php new file mode 100644 index 000000000..df2162716 --- /dev/null +++ b/unit-test/include/class_stock_sqlTest.php @@ -0,0 +1,28 @@ +object = new Stock_Sql; + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } +} diff --git a/unit-test/include/class_tagTest.php b/unit-test/include/class_tagTest.php new file mode 100644 index 000000000..127011ca4 --- /dev/null +++ b/unit-test/include/class_tagTest.php @@ -0,0 +1,152 @@ +object=new Tag; + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + + } + + /** + * @covers Tag::show_list + * @todo Implement testShow_list(). + */ + public function testShow_list() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Tag::select + * @todo Implement testSelect(). + */ + public function testSelect() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Tag::form_add + * @todo Implement testForm_add(). + */ + public function testForm_add() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Tag::show_form_add + * @todo Implement testShow_form_add(). + */ + public function testShow_form_add() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Tag::save + * @todo Implement testSave(). + */ + public function testSave() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Tag::remove + * @todo Implement testRemove(). + */ + public function testRemove() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Tag::button_search + * @todo Implement testButton_search(). + */ + public function testButton_search() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Tag::select_search + * @todo Implement testSelect_search(). + */ + public function testSelect_search() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Tag::update_search_cell + * @todo Implement testUpdate_search_cell(). + */ + public function testUpdate_search_cell() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers Tag::add_clear_button + * @todo Implement testAdd_clear_button(). + */ + public function testAdd_clear_button() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + +} diff --git a/unit-test/include/class_tag_sqlTest.php b/unit-test/include/class_tag_sqlTest.php new file mode 100644 index 000000000..fda9fcbdb --- /dev/null +++ b/unit-test/include/class_tag_sqlTest.php @@ -0,0 +1,32 @@ +object=new Tag_SQL; + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + + } + +} From 9ab226754e03eb43e57c2588c9780b614292ce72 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 9 Nov 2014 19:19:33 +0100 Subject: [PATCH 043/119] Task #1044 - Implementation de PHPUNIT Passage par reference de la connexion --- unit-test/global.example.php | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 unit-test/global.example.php diff --git a/unit-test/global.example.php b/unit-test/global.example.php new file mode 100644 index 000000000..ef5a767ba --- /dev/null +++ b/unit-test/global.example.php @@ -0,0 +1,33 @@ + Date: Sun, 9 Nov 2014 21:24:18 +0100 Subject: [PATCH 044/119] =?UTF-8?q?Task=20#1045=20-=20Am=C3=A9lioration=20?= =?UTF-8?q?apparence=20=20:=20Am=C3=A9lioration=20pr=C3=A9sentation=20rapp?= =?UTF-8?q?ort?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/report.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/report.inc.php b/include/report.inc.php index 2ff74dc29..5f5cf1b2f 100644 --- a/include/report.inc.php +++ b/include/report.inc.php @@ -71,11 +71,11 @@ $ac="&ac=".$_REQUEST['ac']; $p_action='p_action=defreport'; echo '
'; -echo ''; +echo ''; foreach ( $lis as $row) { - printf ('', $row->id,$str_dossier,$row->name); + printf ('', $row->id,$str_dossier,$row->name); } echo "
Ajout
Ajout
%s
%s
"; From f448475c2c1b2335e5a10820476987c42d1af441 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 9 Nov 2014 23:18:15 +0100 Subject: [PATCH 045/119] Task #1046 - Bug dans les stock --- include/class_stock.php | 5 +++-- include/class_user.php | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/class_stock.php b/include/class_stock.php index dd1a8f981..4bd6f3384 100644 --- a/include/class_stock.php +++ b/include/class_stock.php @@ -328,8 +328,9 @@ class Stock extends Stock_Sql sg_type='c' and j_id is null and r_id in (select r_id from profile_sec_repository where p_id=$1) - and sg_date <= to_date($2,'DD.MM.YYYY') - group by r_id,trim(sg_code),f_id + and sg_date >= ( select min(p_start) from parm_periode where p_exercice=$2) + and sg_date <= ( select max(p_end) from parm_periode where p_exercice=$2) + group by r_id,trim(sg_code),f_id "; $cn->exec_sql($sql_repo_detail, array($g_user->get_profile(), $periode->p_exercice)); return $tmp_id; diff --git a/include/class_user.php b/include/class_user.php index db1d19c7d..7c4404878 100644 --- a/include/class_user.php +++ b/include/class_user.php @@ -799,7 +799,7 @@ class User $r=array(); if ($p_access=='R') { - $r=$this->db->get_array("select u.r_id,r_name + $r=$this->db->get_array("select distinct u.r_id,r_name from profile_sec_repository as u join stock_repository as s on(u.r_id=s.r_id) @@ -811,7 +811,7 @@ class User } if ($p_access == 'W') { - $r=$this->db->get_array("select u.r_id,r_name + $r=$this->db->get_array("select distinct u.r_id,r_name from profile_sec_repository as u join stock_repository as s on(u.r_id=s.r_id) From da0183374065c88dfe7baece4f29bdff40f458c3 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 9 Nov 2014 23:37:02 +0100 Subject: [PATCH 046/119] Version 6.7.2.2 --- html/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/index.php b/html/index.php index a71fc7705..42e128c9f 100644 --- a/html/index.php +++ b/html/index.php @@ -203,7 +203,7 @@ if ( strlen(domaine) > 0 ) echo ' -version 6.7.2.1 - '.$my_domain.' +version 6.7.2.2 - '.$my_domain.'

From 3adf0d850ee1c6325df99ea354e923121e14861f Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Mon, 10 Nov 2014 22:18:22 +0100 Subject: [PATCH 047/119] Version 6.7.2.3 --- html/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/index.php b/html/index.php index 42e128c9f..d25d78c48 100644 --- a/html/index.php +++ b/html/index.php @@ -203,7 +203,7 @@ if ( strlen(domaine) > 0 ) echo ' -version 6.7.2.2 - '.$my_domain.' +version 6.7.2.3 - '.$my_domain.'

From b777353054c39c6d3393a03b80e4c4465871b29f Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Tue, 11 Nov 2014 20:25:58 +0100 Subject: [PATCH 048/119] =?UTF-8?q?Task=20#1047=20-=20Protection=20de=20la?= =?UTF-8?q?=20cat=C3=A9gorie=20de=20fiches=20'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/cfgfiche.inc.php | 25 ++++++++++++++++--------- include/class_fiche_def.php | 3 +++ sql/upgrade.sql | 19 +++++++++++++++++++ 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/include/cfgfiche.inc.php b/include/cfgfiche.inc.php index 16392e45c..2f641fcfd 100644 --- a/include/cfgfiche.inc.php +++ b/include/cfgfiche.inc.php @@ -62,21 +62,28 @@ if ( isset ($_POST['remove_line'])) /*******************************************************************************************/ if ( isset ($_POST['remove_cat'])) { - $fd_id=new Fiche_Def($cn,$_POST['fd_id']); - $remains=$fd_id->remove(); - if ( $remains != 0 ) - /* some card are not removed because it is used */ - alert(_('Impossible d\'enlever cette catégorie, certaines fiches sont encore utilisées'."\n". - 'Les fiches non utilisées ont cependant été effacées')); + $post_id=HtmlInput::default_value_post('fd_id', 0); + if ($post_id == 0 || $post_id >= 500000) + { + alert(_('Impossible d\'enlever cette catégorie')); + } else { + $fd_id=new Fiche_Def($cn,$post_id); + $remains=$fd_id->remove(); + if ( $remains != 0 ) { + /* some card are not removed because it is used */ + alert(_('Impossible d\'enlever cette catégorie, certaines fiches sont encore utilisées'."\n". + 'Les fiches non utilisées ont cependant été effacées')); + } + } } /*******************************************************************************************/ // Change some basis info /*******************************************************************************************/ if ( isset ($_POST['change_name'])) { - if (isset ($_REQUEST['label']) ) + if (isset ($_REQUEST['label']) ) { - $fiche_def=new Fiche_Def($cn,$_REQUEST['fd_id']); + $fiche_def=new Fiche_Def($cn,$_REQUEST['fd_id']); $fiche_def->SaveLabel($_REQUEST['label']); if ( isset($_REQUEST['create'])) { @@ -87,7 +94,7 @@ if ( isset ($_POST['change_name'])) $fiche_def->set_autocreate(false); } $fiche_def->save_class_base($_REQUEST['class_base']); - $fiche_def->save_description($_REQUEST['fd_description']); + $fiche_def->save_description($_REQUEST['fd_description']); } echo $fiche_def->input_detail(); diff --git a/include/class_fiche_def.php b/include/class_fiche_def.php index ab634e274..27d96d927 100644 --- a/include/class_fiche_def.php +++ b/include/class_fiche_def.php @@ -683,6 +683,9 @@ $order */ function remove() { + if ( $this->id >= 500000 ) { + throw new Exception(_('Catégorie verrouillée ')); + } $remain=0; /* get all the card */ $aFiche=fiche::get_fiche_def($this->cn,$this->id); diff --git a/sql/upgrade.sql b/sql/upgrade.sql index fad1c6001..7421d8033 100644 --- a/sql/upgrade.sql +++ b/sql/upgrade.sql @@ -161,3 +161,22 @@ ALTER TABLE action_gestion ADD CONSTRAINT fiche_f_id_fk3 FOREIGN KEY (f_id_dest alter table action_gestion alter f_id_dest drop not null; update action_gestion set f_id_dest = null where f_id_dest = 0; +CREATE OR REPLACE FUNCTION comptaproc.category_card_before_delete() + RETURNS trigger AS +$BODY$ + +begin + if OLD.fd_id > 499000 then + return null; + end if; + return OLD; + +end; +$BODY$ +language plpgsql; + +CREATE TRIGGER trg_category_card_before_delete + BEFORE delete + ON fiche_def + FOR EACH ROW + EXECUTE PROCEDURE comptaproc.category_card_before_delete(); \ No newline at end of file From da7ca83dc20245ea462453066181755594e67a7d Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Tue, 11 Nov 2014 23:48:52 +0100 Subject: [PATCH 049/119] Task #639 - Traduction : anglais ' --- include/ajax_view_action.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/ajax_view_action.php b/include/ajax_view_action.php index bf42f25c5..ec69e78f8 100644 --- a/include/ajax_view_action.php +++ b/include/ajax_view_action.php @@ -41,6 +41,7 @@ if ($g_user->can_write_action($ag_id) == true || $g_user->can_read_action($ag_id //$action=HtmlInput::array_to_string(array("gDossier","ag_id"), $_GET)."&ac=FOLLOW&sa=detail"; $action= "do.php?".http_build_query(array("gDossier"=>Dossier::id(),"ag_id"=>$ag_id,"ac"=>$menu->get('code_follow'),"sa"=>"detail")); if ( $_GET['mod']== 1) : + $forbidden=_("Accès interdit : vous n'avez pas accès à cette information, contactez votre responsable"); ?>
-

Accès interdit : vous n'avez pas accès à cette information, contactez votre responsable

; +

;
Date: Wed, 12 Nov 2014 00:08:23 +0100 Subject: [PATCH 050/119] Task #639 - Traduction : anglais ' --- include/class_fiche_def.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/class_fiche_def.php b/include/class_fiche_def.php index 27d96d927..7fedb5a67 100644 --- a/include/class_fiche_def.php +++ b/include/class_fiche_def.php @@ -764,7 +764,7 @@ $order $this->get(); $this->GetAttribut(); $r.= '

' . $this->id . " " . h($this->label) . '

'; - $r.='
Données générales'; + $r.='
'_('Données générales').''; /* show the values label class_base and create account */ $r.=''; @@ -777,7 +777,7 @@ $order $r.=''; $r.='
'; /* attributes */ - $r.='
Détails'; + $r.='
'._('Détails').''; $r.= '
'; $r.=dossier::hidden(); From ed21c1036f79ff55f90368845021ee2770a75a3a Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 12 Nov 2014 00:10:31 +0100 Subject: [PATCH 051/119] Task #639 - Traduction : anglais ' --- include/class_fiche_def.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/class_fiche_def.php b/include/class_fiche_def.php index 7fedb5a67..27a2de472 100644 --- a/include/class_fiche_def.php +++ b/include/class_fiche_def.php @@ -169,10 +169,10 @@ class Fiche_Def $tab = new Sort_Table(); $url = HtmlInput::get_to_string(array('ac', 'gDossier')); - $tab->add("Nom de fiche", $url, "order by fd_label asc", "order by fd_label desc", "na", "nd"); - $tab->add("Basé sur le poste comptable", $url, "order by fd_class_base asc", "order by fd_class_base desc", "pa", "pd"); - $tab->add("Calcul automatique du poste comptable", $url, "order by fd_create_account asc", "order by fd_create_account desc", "ca", "cd"); - $tab->add("Basé sur le modèle", $url, "order by frd_text asc", "order by frd_text desc", "ma", "md"); + $tab->add(_("Nom de fiche"), $url, "order by fd_label asc", "order by fd_label desc", "na", "nd"); + $tab->add(_("Basé sur le poste comptable"), $url, "order by fd_class_base asc", "order by fd_class_base desc", "pa", "pd"); + $tab->add(_("Calcul automatique du poste comptable"), $url, "order by fd_create_account asc", "order by fd_create_account desc", "ca", "cd"); + $tab->add(_("Basé sur le modèle"), $url, "order by frd_text asc", "order by frd_text desc", "ma", "md"); $order = (isset($_GET['ord'])) ? $tab->get_sql_order($_GET["ord"]) : $tab->get_sql_order("na"); @@ -805,7 +805,7 @@ $order echo HtmlInput::hidden("p_action","fiche"); echo dossier::hidden(); echo $this->input(); // CreateCategory($cn,$search); - echo HtmlInput::submit("add_modele" ,"Sauve"); + echo HtmlInput::submit("add_modele" ,_("Sauve")); echo ''; } From 2649c2581dfeb89d3919b8516f2b68ec0524fa32 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 12 Nov 2014 00:11:14 +0100 Subject: [PATCH 052/119] Task #639 - Traduction : anglais ' --- include/class_fiche_def_ref.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/class_fiche_def_ref.php b/include/class_fiche_def_ref.php index dad66407c..c8aa5c195 100644 --- a/include/class_fiche_def_ref.php +++ b/include/class_fiche_def_ref.php @@ -95,9 +95,9 @@ class Fiche_Def_Ref $h=new IHidden(); $r.='
  • Id :'.$h->input('frd_id',$this->frd_id).$this->frd_id."
  • "; $w=new IText(); - $r.='
  • Commentaire :'.$w->input('frd_text',$this->frd_text)."
  • "; + $r.='
  • '._('Commentaire ').' :'.$w->input('frd_text',$this->frd_text)."
  • "; $t=new IText(); - $r.='
  • Poste de base:'.$t->input('frd_class_base',$this->frd_class_base)."
  • "; + $r.='
  • '._('Poste de base').':'.$t->input('frd_class_base',$this->frd_class_base)."
  • "; return $r; } From b2748e7600c17f0191b5f4c9ba97814b71e591c6 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 12 Nov 2014 00:28:05 +0100 Subject: [PATCH 053/119] Bug in ajax_card for adding banque --- html/ajax_card.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/html/ajax_card.php b/html/ajax_card.php index d1cd66f2d..ed34e2336 100644 --- a/html/ajax_card.php +++ b/html/ajax_card.php @@ -404,6 +404,7 @@ case 'ac': * *----------------------------------------------------------------------*/ $ipopup=str_replace('_content','',$ctl); + $msg="";$base=""; switch($cat) { case FICHE_TYPE_CLIENT: @@ -418,9 +419,13 @@ case 'ac': $msg=_(' d\'administration'); $base=''; break; - case FICHE_TYPE_CONTACT: - $msg=_(' de contacts'); - $base=''; + case FICHE_TYPE_CONTACT: + $msg=_(' de contacts'); + $base=''; + case FICHE_TYPE_FIN: + $msg=_(' Banque'); + $base=$cn->get_value("select p_value from parm_code where p_code='BANQUE'"); + } $html=''; From b04201fcbe880a13d2872ccd58ed6fa8e2a6d5ae Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 12 Nov 2014 20:04:33 +0100 Subject: [PATCH 054/119] Bug in NOALYSS_SQL --- include/class_noalyss_sql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/class_noalyss_sql.php b/include/class_noalyss_sql.php index 69bbbfd29..8c1aad59b 100644 --- a/include/class_noalyss_sql.php +++ b/include/class_noalyss_sql.php @@ -313,7 +313,7 @@ abstract class Noalyss_SQL $a_return=array(); for ($i=0; $i<$max; $i++) { - $a_return[$i]=$this->next($ret, $i); + $a_return[$i]=clone $this->next($ret, $i); } return $a_return; } From 303abf2f087f5bb25805a842f1d4c9714e7c90ba Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 12 Nov 2014 22:21:43 +0100 Subject: [PATCH 055/119] =?UTF-8?q?Task=20#639=20-=20Traduction=20:=20angl?= =?UTF-8?q?ais=20Renforcement=20s=C3=A9curit=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/history_operation.inc.php | 72 ++++++++++++++----------------- 1 file changed, 32 insertions(+), 40 deletions(-) diff --git a/include/history_operation.inc.php b/include/history_operation.inc.php index 9a459671d..d2b5102a8 100644 --- a/include/history_operation.inc.php +++ b/include/history_operation.inc.php @@ -34,40 +34,38 @@ require_once 'class_acc_ledger_sold.php'; require_once 'class_acc_ledger.php'; global $g_user,$cn; $p_array = $_GET; -if ( isset ($_GET['ledger_type'])) +$ledger_type=HtmlInput::default_value_get("ledger_type", 'ALL'); +switch($ledger_type) { - $ledger_type=$_GET['ledger_type']; - switch($ledger_type) - { - case 'ACH': - $Ledger = new Acc_Ledger_Purchase($cn, 0); - $ask_pay=1; - break; - case 'ODS': - $Ledger=new Acc_Ledger($cn,0); - $ask_pay=0; - $p_array['ledger_type']='ODS'; - $Ledger->type='ODS'; - break; - case 'ALL': - $Ledger=new Acc_Ledger($cn,0); - $ask_pay=0; - $p_array['ledger_type']='ALL'; - $Ledger->type='ALL'; - break; - case 'VEN': - $Ledger=new Acc_Ledger_Sold($cn,0); - $ask_pay=1; - break; - case 'FIN': - $Ledger=new Acc_Ledger_Fin($cn,0); - $ask_pay=0; - break; + case 'ACH': + $Ledger = new Acc_Ledger_Purchase($cn, 0); + $ask_pay=1; + break; + case 'ODS': + $Ledger=new Acc_Ledger($cn,0); + $ask_pay=0; + $p_array['ledger_type']='ODS'; + $Ledger->type='ODS'; + break; + case 'ALL': + $Ledger=new Acc_Ledger($cn,0); + $ask_pay=0; + $p_array['ledger_type']='ALL'; + $Ledger->type='ALL'; + break; + case 'VEN': + $Ledger=new Acc_Ledger_Sold($cn,0); + $ask_pay=1; + break; + case 'FIN': + $Ledger=new Acc_Ledger_Fin($cn,0); + $ask_pay=0; + break; - } } echo '
    '; // Check privilege +$p_jrn=HtmlInput::default_value_request("p_jrn", -1); if (isset($_REQUEST['p_jrn']) && $g_user->check_jrn($_REQUEST['p_jrn']) == 'X') { @@ -76,13 +74,7 @@ if (isset($_REQUEST['p_jrn']) && exit - 1; } - -if (!isset($_REQUEST['p_jrn'])) -{ - $Ledger->id = -1; -} -else - $Ledger->id = $_REQUEST['p_jrn']; +$Ledger->id = $p_jrn; echo $Ledger->display_search_form(); //------------------------------ // UPdate the payment @@ -102,11 +94,11 @@ if (!isset($p_array['date_start'])) list($date_start, $date_end) = $per->get_date_limit(); $p_array['date_start'] = $date_start; $p_array['date_end'] = $date_end; - $msg='

    '."Période ".$date_start." au ".$date_end.'

    '; + $msg='

    '._("Période ").$date_start._(" au ").$date_end.'

    '; } else { - $msg='

    '."Période ".$_GET['date_start']." au ".$_GET['date_end'].'

    '; + $msg='

    '._("Période ").$_GET['date_start']._(" au ").$_GET['date_end'].'

    '; } /* compute the sql stmt */ @@ -122,7 +114,7 @@ $bar = navigation_bar($offset, $max_line, $step, $page); echo $msg; echo '
    '; echo HtmlInput::hidden("ac", $_REQUEST['ac']); -echo HtmlInput::hidden('ledger_type',$_REQUEST['ledger_type']); +echo HtmlInput::hidden('ledger_type',$ledger_type); echo dossier::hidden(); echo $bar; @@ -160,5 +152,5 @@ echo HtmlInput::submit('viewsearch', 'Export vers CSV'); echo '
    '; echo '
    '; -exit(); +return; ?> From 0e4b44478db970cdb195d4bcc3bc5fcefa3a1d07 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 12 Nov 2014 22:34:49 +0100 Subject: [PATCH 056/119] Add exception --- include/class_document_export.php | 34 ++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/include/class_document_export.php b/include/class_document_export.php index bfda2cdc9..38a561ba1 100644 --- a/include/class_document_export.php +++ b/include/class_document_export.php @@ -52,21 +52,31 @@ class Document_Export */ function concatenate_pdf() { - $this->check_file(); - $stmt = PDFTK . " " . $this->store_pdf . '/stamp_*pdf output ' . $this->store_pdf . '/result.pdf'; - $status = 0; - echo $stmt; - passthru($stmt, $status); - - if ($status <> 0) + try { - $cnt_feedback = count($this->feedback); - $this->feedback[$cnt_feedback]['file'] = 'result.pdf'; - $this->feedback[$cnt_feedback]['message'] = ' cannot concatenate PDF'; - $this->feedback[$cnt_feedback]['error'] = $status; + $this->check_file(); + $stmt=PDFTK." ".$this->store_pdf.'/stamp_*pdf output '.$this->store_pdf.'/result.pdf'; + $status=0; + echo $stmt; + passthru($stmt, $status); + + if ($status<>0) + { + $cnt_feedback=count($this->feedback); + $this->feedback[$cnt_feedback]['file']='result.pdf'; + $this->feedback[$cnt_feedback]['message']=' cannot concatenate PDF'; + $this->feedback[$cnt_feedback]['error']=$status; + } + } + catch (Exception $exc) + { + $cnt_feedback=count($this->feedback); + $this->feedback[$cnt_feedback]['file']='result.pdf'; + $this->feedback[$cnt_feedback]['message']=$exc->getMessage(); + $this->feedback[$cnt_feedback]['error']=0; } } - + function move_file($p_source, $target) { $this->check_file(); From 09478c0e1b6b17e80c59f7242503f4b474126739 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 12 Nov 2014 22:59:37 +0100 Subject: [PATCH 057/119] =?UTF-8?q?Task=20#1045=20-=20Am=C3=A9lioration=20?= =?UTF-8?q?apparence=20=20:=20Placement=20boite=20"ajout=20categorie=20de?= =?UTF-8?q?=20fiche"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/js/card.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/js/card.js b/html/js/card.js index a70073201..ba7c2ebd9 100644 --- a/html/js/card.js +++ b/html/js/card.js @@ -446,7 +446,7 @@ function select_card_type(obj) sx=document.body.scrollTop+60; } - var str_style="top:"+sx+"px;left:25%;height:30%"; + var str_style="top:"+sx+"px;height:30%"; waiting_box(); var popup={'id': content,'cssclass':'inner_box','style':str_style,'html':"",'drag':true}; From d976b71b399f3e2887cf2b37f1d4cbb946008ee0 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Thu, 13 Nov 2014 00:03:23 +0100 Subject: [PATCH 058/119] Task #1044 - Implementation de PHPUNIT Test files inc.php could also be used with ajax --- html/do.php | 25 ++++++- html/test.php | 126 +++++++++++++++++++++++---------- include/user_common.php | 4 +- scenario/readme.txt | 36 ++++++++++ scenario/scenario-historic.php | 24 +++++++ 5 files changed, 173 insertions(+), 42 deletions(-) create mode 100644 scenario/readme.txt create mode 100644 scenario/scenario-historic.php diff --git a/html/do.php b/html/do.php index 79d25c359..c97061ca1 100644 --- a/html/do.php +++ b/html/do.php @@ -95,7 +95,7 @@ if ($cn->exist_table('version') == false) { echo '

    ' . _("Base de donnée invalide") . '

    '; $base = dirname($_SERVER['REQUEST_URI']); - echo HtmlInput::button_anchor('Retour', $base . '/user_login.php'); + echo HtmlInput::button_anchor('Retour', $base . '/user_login.php'); exit(); } if (DBVERSION < dossier::get_version($cn)) @@ -150,11 +150,34 @@ if ( isset ($_POST['set_preference'])) { $_SESSION['g_pagesize']=$p_size; $_SESSION['g_lang']=$lang; } + /* * if an action is requested */ if (isset($_REQUEST['ac'])) { + // When debugging save all the input in a file + if ( LOGINPUT) + { + $file_loginput=fopen($_ENV['TMP'].'/scenario-'.$_SERVER['REQUEST_TIME'].'.php','a+'); + $tmp_ac=explode('/',trim(strtoupper($_REQUEST['ac']))); + $last=count($tmp_ac); + if ($last > 0) $last--; + fwrite ($file_loginput,"'.$p_array['desc'].''; - require $p_array['file']; - call_user_func($p_array['function']); -} -// Test the connection -echo __FILE__.":".__LINE__; -print_r($_REQUEST); -if ( ! isset($_REQUEST['gDossier'])) -{ - echo "Vous avez oublie de specifier le gDossier ;)"; - echo "L'url aurait du etre test.php?gDossier=xx"; - exit(); -} -$cn=new Database($_GET['gDossier']); - -$a_route[]=array('desc'=>'test sur les menus par défauts','file'=>'class_default_menu.php','function'=>'Default_Menu::test_me'); -$a_route[]=array('desc'=>'test sur Acc_Operations','file'=>'class_acc_operation.php','function'=>'Acc_Operation::test_me'); -$a_route[]=array('desc'=>'test sur INVOICING','file'=>'../include/ext/invoicing/include/class_acc_ledger_sold_generate.php','function'=>'Acc_Ledger_Sold_Generate::test_me'); -$a_route[]=array('desc'=>'test sur menu_ref','file'=>'class_menu_ref_sql.php','function'=>'Menu_Ref_SQL::test_me'); -$called=HtmlInput::default_value_get("called", -1); -if ($called == -1 ) -{ - for ($i=0;$i< count($a_route);$i++) + echo "

    Test NOALYSS

    "; + /* + * cherche pour fichier a include, s'il y en a alors les affiche + * avec une description + */ + $scan=scandir('../scenario/'); + $max=count($scan); + + echo ''; + for ($e=0; $e<$max; $e++) { - start_test($a_route[$i]); + if (is_file('../scenario/'.$scan[$e])&&strpos($scan[$e], '.php') == true) + { + $description=""; + $a_description=file('../scenario/'.$scan[$e]); + $max_description=count($a_description); + for ($w=0;$w<$max_description;$w++) + { + if (strpos($a_description[$w],'@description:')==true) + { + $description=$a_description[$w]; + $description=str_replace('//@description:','',$description); + + } + } + $get='test.php?'.http_build_query(array('script'=>$scan[$e],'gDossier'=>$gDossierLogInput,'description'=>$description)); + echo ''; + echo ''; + echo ''; + echo ''; + } } + echo '
    '; + echo ''; + echo $scan[$e]; + echo ''; + echo ''.$description.'
    '; } - else +else { - start_test($a_route[$called]); + + $script=str_replace('../','',$script); + $description=HtmlInput::default_value_get("description", "aucune description"); + echo '

    '.$script."

    "; + echo '

    description = '.$description.'

    '; + include '../scenario/'.$script; + + $end_mem=memory_get_usage(); + $end_time=microtime(true); + + echo "

    start mem : ".$start_mem; + echo '

    '; + echo "

    end mem : ".$end_mem; + echo '

    '; + echo "

    Diff = ".($end_mem-$start_mem)." bytes "; + echo "

    Diff = ".(round(($end_mem-$start_mem)/1024, 2))." kbytes "; + echo "

    Diff = ".(round(($end_mem-$start_mem)/1024/1024, 2))." Mbytes "; + echo '

    '; + echo "

    Execution script ".$script." time = ".(round(($end_time-$start_time), 4))." secondes

    "; } \ No newline at end of file diff --git a/include/user_common.php b/include/user_common.php index a1ed734f8..03326e2de 100644 --- a/include/user_common.php +++ b/include/user_common.php @@ -235,8 +235,8 @@ function toNumber($p_num) */ function check_parameter($p_array,$p_needed) { - $needed = split(',',$p_needed); - for ($e=0;$e<$needed;$e++) { + $needed =explode(',',$p_needed); + for ($e=0;$e + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +Afin d'avoir les scénarios pour les rejouer avec test.php. + +Dans include/constant.php, changer +define ('LOGINPUT',false); par +define ('LOGINPUT',true); + +Ensuite, aller dans votre dossier de test et faites une action (une vente, un achat...), vous devez ouvrir le fichier test.php +ce que vous venez de faire a été sauvé dans le répertoire défini par $_ENV['TMP'], (sous linux il s'agit de /tmp )avec un nom ressemblant à scenario-.php + +Vous devez d'abord copier ce fichier dans ce répertoire-ci + +Si vous pointez votre browser sur noalyss/html/test.php (après avoir créé le fichier authorized_debug) en cliquant sur le +lien avec le nom de fichier vous pourrez rejouer l'action. Vous pouvez améliorer la description en changeant l'annotation //@description: + +Vous pouvez aussi utiliser un nom de fichier plus parlant. + +L'objectif étant de pouvoir tester et de rejouer facilement les actions que vous avez faites. + + diff --git a/scenario/scenario-historic.php b/scenario/scenario-historic.php new file mode 100644 index 000000000..3ee41699f --- /dev/null +++ b/scenario/scenario-historic.php @@ -0,0 +1,24 @@ + '37', + 'ledger_type' => 'ALL', + 'ac' => 'HIST', + 'nb_jrn' => '0', + 'date_start' => '01.01.2014', + 'date_end' => '31.12.2014', + 'date_paid_start' => '', + 'date_paid_end' => '', + 'desc' => '', + 'amount_min' => '0', + 'amount_max' => '0', + 'qcode' => '', + 'accounting' => '', + 'search' => 'Rechercher', +); +$_POST=array ( +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'history_operation.inc.php'; From 98a27b512136406f8fffa52bdc0650dd0ae99f1d Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Thu, 13 Nov 2014 00:05:34 +0100 Subject: [PATCH 059/119] Task #1044 - Implementation de PHPUNIT new defined variables for testing --- include/constant.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/constant.php b/include/constant.php index 7dafcbcbe..7308a3a63 100644 --- a/include/constant.php +++ b/include/constant.php @@ -59,8 +59,14 @@ $g_captcha=false; $g_failed=""; $g_succeed=""; /* uncomment for development */ -define ('SVNINFO',6721); +/* +define ('SVNINFO',6722); +define ("DEBUG",true); +define ("LOGINPUT",true); +*/ +define ('SVNINFO',6723); define ("DEBUG",false); +define ("LOGINPUT",false); $version_noalyss=SVNINFO; // If you don't want to be notified of the update From 6bc7b1dd4e51c02f8787e408516325d13993dd06 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Fri, 14 Nov 2014 20:53:36 +0100 Subject: [PATCH 060/119] Task #1044 - Implementation de Test new defined variables for testing --- include/ac_common.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/include/ac_common.php b/include/ac_common.php index 6250c822f..5dfd7e627 100644 --- a/include/ac_common.php +++ b/include/ac_common.php @@ -983,7 +983,15 @@ function show_menu($module, $idx) $array=compute_variable($file[0]['me_parameter']); put_global($array); } - + /* + * Log the file we input to put in the folder test-noalyss for replaying it + */ + if (LOGINPUT) { + $file_loginput=fopen($_ENV['TMP'].'/scenario-'.$_SERVER['REQUEST_TIME'].'.php','a+'); + fwrite($file_loginput, "include '".$file[0]['me_file']."';"); + fwrite($file_loginput,"\n"); + fclose($file_loginput); + } // if file is not a plugin, include the file, otherwise // include the plugin launcher if ( $file[0]['me_type'] != 'PL') From 518a9090d6d0d916f7683ba6b40bc85b2331a13f Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Fri, 14 Nov 2014 21:36:26 +0100 Subject: [PATCH 061/119] =?UTF-8?q?Bug=20:=20ne=20peut=20pas=20sauver=20un?= =?UTF-8?q?e=20op=C3=A9ration=20pr=C3=A9d=C3=A9finie=20sans=20quick-code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/class_pre_op_advanced.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/class_pre_op_advanced.php b/include/class_pre_op_advanced.php index fbfb286ab..58022dcae 100644 --- a/include/class_pre_op_advanced.php +++ b/include/class_pre_op_advanced.php @@ -45,8 +45,10 @@ class Pre_Op_Advanced extends Pre_operation_detail { if ( ! isset ($_POST['poste'.$i]) && ! isset ($_POST['qc_'.$i])) continue; - $this->{'poste'.$i}=(trim($_POST['qc_'.$i]) != "" )?$_POST['qc_'.$i]:$_POST['poste'.$i]; - $this->{'isqc'.$i}=(trim($_POST['qc_'.$i]) != "")?'t':'f'; + if (isset ($this->{'poste'.$i})) + $this->{'poste'.$i}=(trim($_POST['qc_'.$i]) != "" )?$_POST['qc_'.$i]:$_POST['poste'.$i]; + if ( isset($this->{'qc'.$i})) + $this->{'isqc'.$i}=(trim($_POST['qc_'.$i]) != "")?'t':'f'; $this->{"amount".$i}=$_POST['amount'.$i]; $this->{"ck".$i}=(isset($_POST['ck'.$i]))?'t':'f'; From 54b6037edefdecb39287bbc114ce27291a5ed60b Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Fri, 14 Nov 2014 23:11:56 +0100 Subject: [PATCH 062/119] Task #1044 - Implementation de Test Replace in class exit by throw new Exception --- include/class_acc_account.php | 4 ++-- include/class_acc_account_ledger.php | 1 - include/class_acc_bilan.php | 24 ++++++++++-------------- include/class_acc_compute.php | 4 ++-- include/class_acc_ledger.php | 18 +++++++++--------- include/class_acc_ledger_fin.php | 12 ++++++------ include/class_acc_ledger_info.php | 6 +++--- include/class_acc_ledger_purchase.php | 7 +++---- include/class_acc_ledger_sold.php | 7 +++---- include/class_acc_payment.php | 3 +-- include/class_acc_reconciliation.php | 2 +- include/class_acc_report_row.php | 4 ++-- include/class_acc_tva.php | 2 +- include/class_anc_acc_list.php | 2 +- include/class_anc_group_operation.php | 6 +++--- include/class_anc_print.php | 2 +- include/class_anc_table.php | 2 +- include/class_anticipation.php | 4 ++-- include/class_database.php | 9 ++++----- include/class_document.php | 15 ++++++++------- include/class_document_export.php | 2 +- include/class_document_modele.php | 4 ++-- include/class_dossier.php | 4 ++-- include/class_extension.php | 2 +- include/class_fiche.php | 7 +++---- include/class_fiche_def.php | 2 +- include/class_follow_up.php | 4 ++-- include/class_follow_up_detail.php | 4 ++-- include/class_forecast.php | 4 ++-- include/class_forecast_cat.php | 4 ++-- include/class_forecast_item.php | 4 ++-- include/class_gestion_purchase.php | 2 +- include/class_gestion_sold.php | 2 +- include/class_pre_operation.php | 8 ++++---- include/class_stock_goods.php | 2 +- include/class_todo_list.php | 4 ++-- include/class_user.php | 6 +++--- 37 files changed, 95 insertions(+), 104 deletions(-) diff --git a/include/class_acc_account.php b/include/class_acc_account.php index db3e8457e..387daafc4 100644 --- a/include/class_acc_account.php +++ b/include/class_acc_account.php @@ -63,7 +63,7 @@ class Acc_Account return $this->$idx; } else - exit (__FILE__.":".__LINE__._('Erreur attribut inexistant')); + throw new Exception (__FILE__.":".__LINE__._('Erreur attribut inexistant')); } function set_parameter($p_string,$p_value) @@ -74,7 +74,7 @@ class Acc_Account if ($this->check($idx,$p_value) == true ) $this->$idx=$p_value; } else - exit (__FILE__.":".__LINE__._('Erreur attribut inexistant')); + throw new Exception (__FILE__.":".__LINE__._('Erreur attribut inexistant')); } diff --git a/include/class_acc_account_ledger.php b/include/class_acc_account_ledger.php index 1f758ca27..230f86bdc 100644 --- a/include/class_acc_account_ledger.php +++ b/include/class_acc_account_ledger.php @@ -464,7 +464,6 @@ class Acc_Account_Ledger break; default: throw new Exception(" Fonction HtmlTableHeader argument actiontarget invalid"); - exit; } $hid=new IHidden(); diff --git a/include/class_acc_bilan.php b/include/class_acc_bilan.php index 4fb816930..a54dce267 100644 --- a/include/class_acc_bilan.php +++ b/include/class_acc_bilan.php @@ -262,7 +262,7 @@ class Acc_Bilan catch(Exception $Ex) { echo $Ex->getMessage(); - exit(); + throw $Ex; } } /*!\brief open the file of the form */ @@ -273,7 +273,7 @@ class Acc_Bilan if ( $form == false) { echo 'Cannot Open'; - exit(); + throw new Exception(_('Echec ouverture fichier '.$this->b_file_form)); } return $form; } @@ -285,7 +285,7 @@ class Acc_Bilan if ( $templ == false) { echo 'Cannot Open'; - exit(); + throw new Exception(_('Echec ouverture fichier '.$this->b_file_template)); } return $templ; @@ -346,7 +346,7 @@ class Acc_Bilan if ( copy ($file_base,$work_file) == false ) { echo _("erreur Ouverture fichier"); - exit(); + throw new Exception(_('Echec ouverture fichier '.$file_base)); } ob_start(); /* unzip the document */ @@ -367,8 +367,7 @@ class Acc_Bilan if ( $p_file == false) { - echo 'Cannot Open'; - exit(); + throw new Exception(_('Echec ouverture fichier '.$p_file)); } $r=""; @@ -632,8 +631,7 @@ class Acc_Bilan $work_file=basename($file_base); if ( copy ($file_base,$work_file) == false ) { - echo _("Ouverture fichier impossible"); - exit(); + throw new Exception ( _("Ouverture fichier impossible")); } /* * unzip the document @@ -658,22 +656,20 @@ class Acc_Bilan $p_file=fopen($dirname.DIRECTORY_SEPARATOR.'content.xml','wb'); if ( $p_file == false ) { - exit ( _("erreur Ouverture fichier").' content.xml'); + throw new Exception ( _("erreur Ouverture fichier").' content.xml'); } $a=fwrite($p_file,$p_result); if ( $a==false) { - echo _("erreur écriture fichier").' content.xml'; - exit(); + throw new Exception ( _("erreur écriture fichier").' content.xml'); } // repack $zip = new Zip_Extended; $res = $zip->open($this->b_name.".".$this->b_type, ZipArchive::CREATE); if($res !== TRUE) { - echo __FILE__.":".__LINE__."cannot recreate zip"; - exit; + throw new Exception (__FILE__.":".__LINE__."cannot recreate zip"); } $zip->add_recurse_folder($dirname.DIRECTORY_SEPARATOR); $zip->close(); @@ -683,7 +679,7 @@ class Acc_Bilan $fdoc=fopen($dirname.DIRECTORY_SEPARATOR.$this->b_name.'.'.$this->b_type,'r'); if ( $fdoc == false ) { - exit (_("erreur Ouverture fichier")); + throw new Exception (_("erreur Ouverture fichier")); } $buffer=fread ($fdoc,filesize($dirname.DIRECTORY_SEPARATOR.$this->b_name.'.'.$this->b_type)); echo $buffer; diff --git a/include/class_acc_compute.php b/include/class_acc_compute.php index 5424a5094..a2282a2a9 100644 --- a/include/class_acc_compute.php +++ b/include/class_acc_compute.php @@ -91,7 +91,7 @@ class Acc_Compute return $this->$idx; } else - exit (__FILE__.":".__LINE__._('Erreur attribut inexistant')); + throw new Exception (__FILE__.":".__LINE__._('Erreur attribut inexistant')); } public function set_parameter($p_string,$p_value) { @@ -101,7 +101,7 @@ class Acc_Compute $this->$idx=$p_value; } else - exit (__FILE__.":".__LINE__._('Erreur attribut inexistant')); + throw new Exception (__FILE__.":".__LINE__._('Erreur attribut inexistant')); } diff --git a/include/class_acc_ledger.php b/include/class_acc_ledger.php index 2e9cd3be0..17c276f81 100644 --- a/include/class_acc_ledger.php +++ b/include/class_acc_ledger.php @@ -1559,7 +1559,7 @@ class Acc_Ledger extends jrn_def_sql * @brief Show the form to encode your operation * @param$p_array if you correct or use a predef operation (default = null) * @param$p_readonly 1 for readonly 0 for writable (default 0) - * + *@exception if ledger not found * \return a string containing the form */ @@ -1595,7 +1595,7 @@ class Acc_Ledger extends jrn_def_sql } $wLedger = $this->select_ledger('ODS', 2); if ($wLedger == null) - exit(_('Pas de journal disponible')); + throw new Exception(_('Pas de journal disponible')); $wLedger->javascript = "onChange='update_name();update_predef(\"ods\",\"t\",\"".$_REQUEST['ac']."\");$add_js'"; $label = " Journal " . HtmlInput::infobulle(2); @@ -2208,7 +2208,7 @@ class Acc_Ledger extends jrn_def_sql function update_internal_code($p_internal) { if (!isset($this->grpt_id)) - exit('ERREUR ' . __FILE__ . ":" . __LINE__); + throw new Exception(('ERREUR ' . __FILE__ . ":" . __LINE__)); $Res = $this->db->exec_sql("update jrn set jr_internal='" . $p_internal . "' where " . " jr_grpt_id = " . $this->grpt_id); } @@ -2363,7 +2363,7 @@ class Acc_Ledger extends jrn_def_sql return true; if ($g_parameter->MY_STRICT == 'N') return false; - exit("Valeur invalid " . __FILE__ . ':' . __LINE__); + throw Exception("Valeur invalid " . __FILE__ . ':' . __LINE__); } /** @@ -2379,7 +2379,7 @@ class Acc_Ledger extends jrn_def_sql return true; if ($g_parameter->MY_CHECK_PERIODE == 'N') return false; - exit("Valeur invalid " . __FILE__ . ':' . __LINE__); + throw Exception("Valeur invalid " . __FILE__ . ':' . __LINE__); } /** @@ -3214,7 +3214,7 @@ class Acc_Ledger extends jrn_def_sql echo $op->show_button(); } echo ''; - exit(); + exit('test_me'); } if (isset($_POST['post_id'])) @@ -3225,7 +3225,7 @@ class Acc_Ledger extends jrn_def_sql echo HtmlInput::button('add', 'Ajout d\'une ligne', 'onClick="quick_writing_add_row()"'); echo HtmlInput::submit('save_it', "Sauver"); echo ''; - exit(); + exit('test_me'); } if (isset($_POST['save_it'])) { @@ -3245,7 +3245,7 @@ class Acc_Ledger extends jrn_def_sql echo HtmlInput::submit('post_id', 'Try me'); echo ''; } - exit(); + return; } // The GET at the end because automatically repost when you don't // specify the url in the METHOD field @@ -3262,7 +3262,7 @@ class Acc_Ledger extends jrn_def_sql echo $a->show_form($p_post); echo HtmlInput::submit('post_id', 'Use predefined operation'); echo ''; - exit(); + return; } }// if case = '' /////////////////////////////////////////////////////////////////////////// diff --git a/include/class_acc_ledger_fin.php b/include/class_acc_ledger_fin.php index fdbc2a662..284e354b6 100644 --- a/include/class_acc_ledger_fin.php +++ b/include/class_acc_ledger_fin.php @@ -292,8 +292,8 @@ class Acc_Ledger_Fin extends Acc_Ledger { if ($e->getCode() == 1) { - echo "Aucune période ouverte"; - exit(); + throw Exception(_("Aucune période ouverte")); + } } $label = HtmlInput::infobulle(3); @@ -312,7 +312,7 @@ class Acc_Ledger_Fin extends Acc_Ledger $add_js = 'onchange="'.$onchange.'"'; $wLedger = $this->select_ledger('FIN', 2); if ($wLedger == null) - exit('Pas de journal disponible'); + throw Exception(_('Pas de journal disponible')); $wLedger->javascript = $add_js; @@ -960,12 +960,12 @@ class Acc_Ledger_Fin extends Acc_Ledger } catch (Exception $e) { - echo '' . + $r = '' . 'Erreur dans l\'enregistrement ' . __FILE__ . ':' . __LINE__ . ' ' . $e->getMessage(); $this->db->rollback(); - exit(); + throw Exception($r); } $this->db->commit(); $r = ""; @@ -1010,7 +1010,7 @@ class Acc_Ledger_Fin extends Acc_Ledger $wLedger = $this->select_ledger('fin', 3); if ($wLedger == null) - exit(_('Pas de journal disponible')); + throw Exception(_('Pas de journal disponible')); if (count($wLedger->value) > 1) { diff --git a/include/class_acc_ledger_info.php b/include/class_acc_ledger_info.php index 3ad73eee3..5ac20d6a4 100644 --- a/include/class_acc_ledger_info.php +++ b/include/class_acc_ledger_info.php @@ -51,7 +51,7 @@ class Acc_Ledger_Info { echo 'Appel incorrecte '.__FILE__.__LINE__; var_dump($this); - exit(); + throw Exception(_('appel incorrect')); } try { @@ -75,7 +75,7 @@ class Acc_Ledger_Info { echo 'Appel incorrecte '.__FILE__.__LINE__; var_dump($this); - exit(); + throw Exception('appel incorrect'); } try { @@ -136,7 +136,7 @@ class Acc_Ledger_Info if ( ! isset ($this->jr_id) ) { echo "jr_id is not set ".__FILE__.__LINE__; - exit(); + throw Exception('Error : jr_id not set'); } $sql="select ji_id from jrn_info where jr_id=".$this->jr_id; diff --git a/include/class_acc_ledger_purchase.php b/include/class_acc_ledger_purchase.php index 1aabec5ee..b01cce77f 100644 --- a/include/class_acc_ledger_purchase.php +++ b/include/class_acc_ledger_purchase.php @@ -908,7 +908,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger $e->getMessage().$e->getTraceAsString(); $this->db->rollback(); - exit(); + throw new Exception($e); } $this->db->commit(); return $internal; @@ -1014,8 +1014,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger { if ($e->getCode() == 1 ) { - echo _("Aucune période ouverte"); - exit(); + throw Exception( _("Aucune période ouverte")); } } @@ -1040,7 +1039,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger $add_js.='update_row("sold_item");'; $wLedger=$this->select_ledger('ACH',2); - if ($wLedger == null) exit (_('Pas de journal disponible')); + if ($wLedger == null) throw Exception(_('Pas de journal disponible')); $wLedger->javascript="onChange='update_predef(\"ach\",\"f\",\"".$_REQUEST['ac']."\");$add_js'"; $wLedger->table=1; $f_jrn=$wLedger->input(); diff --git a/include/class_acc_ledger_sold.php b/include/class_acc_ledger_sold.php index bbd46d3d7..7242caf41 100644 --- a/include/class_acc_ledger_sold.php +++ b/include/class_acc_ledger_sold.php @@ -582,7 +582,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { echo $e->getTrace(); $this->db->rollback(); - exit(); + throw new Exception ($e); } $this->db->commit(); @@ -1044,8 +1044,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { $l_form_per = $period->input(); } catch (Exception $e) { if ($e->getCode() == 1) { - echo _("Aucune période ouverte"); - exit(); + throw Exception( _("Aucune période ouverte") ); } } $label = HtmlInput::infobulle(3); @@ -1065,7 +1064,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { $wLedger = $this->select_ledger('VEN', 2); if ($wLedger == null) - exit(_('Pas de journal disponible')); + throw Exception(_('Pas de journal disponible')); $wLedger->table = 1; $wLedger->javascript = "onChange='update_predef(\"ven\",\"f\",\"".$_REQUEST['ac']."\");$add_js'"; $wLedger->label = " Journal " . HtmlInput::infobulle(2); diff --git a/include/class_acc_payment.php b/include/class_acc_payment.php index 71c1f8aa0..0d4dbb4de 100644 --- a/include/class_acc_payment.php +++ b/include/class_acc_payment.php @@ -70,7 +70,6 @@ class Acc_Payment else { throw new Exception("Attribut inexistant $p_string"); - exit (__FILE__.":".__LINE__.'Erreur attribut inexistant'); } } public function set_parameter($p_string,$p_value) @@ -81,7 +80,7 @@ class Acc_Payment $this->$idx=$p_value; } else - exit (__FILE__.":".__LINE__.'Erreur attribut inexistant'); + throw new Exception("Attribut inexistant $p_string"); } diff --git a/include/class_acc_reconciliation.php b/include/class_acc_reconciliation.php index ef8b6a738..5a35d4399 100644 --- a/include/class_acc_reconciliation.php +++ b/include/class_acc_reconciliation.php @@ -517,7 +517,7 @@ j1.j_poste as poste break; default: echo "Choix invalid"; - exit(); + throw new Exception("invalide"); } return $array; } diff --git a/include/class_acc_report_row.php b/include/class_acc_report_row.php index 8ea31b585..1f4a377e0 100644 --- a/include/class_acc_report_row.php +++ b/include/class_acc_report_row.php @@ -49,7 +49,7 @@ class Acc_Report_Row return $this->$idx; } else - exit (__FILE__.":".__LINE__.'Erreur attribut inexistant'); + throw new Exception("Attribut inexistant $p_string"); } public function set_parameter($p_string,$p_value) { @@ -59,7 +59,7 @@ class Acc_Report_Row $this->$idx=$p_value; } else - exit (__FILE__.":".__LINE__."$p_string ".'Erreur attribut inexistant'); + throw new Exception("Attribut inexistant $p_string"); } diff --git a/include/class_acc_tva.php b/include/class_acc_tva.php index 583589ca9..b88ce9759 100644 --- a/include/class_acc_tva.php +++ b/include/class_acc_tva.php @@ -69,7 +69,7 @@ class Acc_Tva $this->$idx=$p_value; } else - exit (__FILE__.":".__LINE__.'Erreur attribut inexistant'); + throw new Exception("Attribut inexistant $p_string"); } diff --git a/include/class_anc_acc_list.php b/include/class_anc_acc_list.php index 473704806..b782b802e 100644 --- a/include/class_anc_acc_list.php +++ b/include/class_anc_acc_list.php @@ -427,7 +427,7 @@ END) <> 0::numeric order by name,po_name",array($this->pa_id)); function export_csv() { bcscale(2); - if ( $this->check () != 0 ) {echo "DATE INVALIDE";exit();} + if ( $this->check () != 0 ) {throw new Exception (_("date invalide"));} //--------------------------------------------------------------------------- // Card - Acc //--------------------------------------------------------------------------- diff --git a/include/class_anc_group_operation.php b/include/class_anc_group_operation.php index 1e950c647..bd3c859a0 100644 --- a/include/class_anc_group_operation.php +++ b/include/class_anc_group_operation.php @@ -76,7 +76,7 @@ class Anc_Group_Operation { echo $e->getTrace(); $this->db->rollback(); - exit(); + throw new Exception($e); } $this->db->commit(); } @@ -244,7 +244,7 @@ class Anc_Group_Operation __FILE__.':'.__LINE__.' '. $ex->getMessage(); $p_cn->rollback(); - exit(); + throw new Exception("Erreur ".$ex->getMessage()); } $this->db->commit(); @@ -263,7 +263,7 @@ class Anc_Group_Operation { $b=new Anc_Group_Operation($cn); $b->get_from_array($_POST); - exit(); + return; } $a=new Anc_Group_Operation($cn); diff --git a/include/class_anc_print.php b/include/class_anc_print.php index 7596d561a..2a51b08a4 100644 --- a/include/class_anc_print.php +++ b/include/class_anc_print.php @@ -93,7 +93,7 @@ class Anc_Print echo '
    '; echo '

    '._('Aucun plan défini').'

    '; echo '
    '; - exit(); + return; } $from=new IDate('from','from'); diff --git a/include/class_anc_table.php b/include/class_anc_table.php index 7ca3c86b0..5c2669f54 100644 --- a/include/class_anc_table.php +++ b/include/class_anc_table.php @@ -239,7 +239,7 @@ class Anc_Table extends Anc_Acc_Link function export_csv() { bcscale(2); - if ( $this->check () != 0 ) {echo "DATE INVALIDE";exit();} + if ( $this->check () != 0 ) {throw new Exception ( "DATE INVALIDE");} if ( $this->card_poste=='1') { diff --git a/include/class_anticipation.php b/include/class_anticipation.php index 3d9bd6845..7d65f20ba 100644 --- a/include/class_anticipation.php +++ b/include/class_anticipation.php @@ -61,7 +61,7 @@ class Anticipation return $this->$idx; } else - exit (__FILE__.":".__LINE__."[$p_string]".'Erreur attribut inexistant'); + throw new Exception("Attribut inexistant $p_string"); } public function set_parameter($p_string,$p_value) { @@ -71,7 +71,7 @@ class Anticipation $this->$idx=$p_value; } else - exit (__FILE__.":".__LINE__."[$p_string]".'Erreur attribut inexistant'); + throw new Exception("Attribut inexistant $p_string"); } diff --git a/include/class_database.php b/include/class_database.php index 0c4c9b64e..e7cfe930e 100644 --- a/include/class_database.php +++ b/include/class_database.php @@ -99,7 +99,7 @@ class Database echo "Utilisateur : $noalyss_user
    "; echo '

    '; - exit("Connection impossible : vérifiez vos paramètres de base + die("Connection impossible : vérifiez vos paramètres de base de données"); } else @@ -264,8 +264,7 @@ class Database $hf=fopen($script, 'r'); if ($hf==false) { - echo 'Ne peut ouvrir '.$script; - exit(); + throw new Exception ( 'Ne peut ouvrir '.$script); } $sql=""; $flag_function=false; @@ -327,7 +326,7 @@ class Database if (!DEBUG) ob_end_clean(); print "ERROR : $sql"; - exit(); + throw new Exception("ERROR : $sql"); } $sql=""; $flag_function=false; @@ -619,7 +618,7 @@ class Database break; default: echo_error(__FILE__." format_name invalid type ".$p_type, __LINE__); - exit(); + throw new Exception(__FILE__." format_name invalid type ".$p_type. __LINE__); } return $sys_name; } diff --git a/include/class_document.php b/include/class_document.php index dd4942c3e..9f4684a76 100644 --- a/include/class_document.php +++ b/include/class_document.php @@ -146,8 +146,7 @@ class Document $res = $zip->open($filename, ZipArchive::CREATE); if($res !== TRUE) { - echo __FILE__.":".__LINE__."cannot recreate zip"; - exit; + throw new Exception ( __FILE__.":".__LINE__."cannot recreate zip"); } $zip->add_recurse_folder($dirname.DIRECTORY_SEPARATOR); $zip->close(); @@ -197,8 +196,8 @@ class Document { if ( mkdir($temp_dir) == false ) { - echo "Ne peut pas créer le répertoire ".$temp_dir; - exit(); + $msg=_("Ne peut pas créer le répertoire ".$temp_dir); + throw new Exception($msg); } } // Compute output_name @@ -208,12 +207,14 @@ class Document if ( $h === false ) { echo __FILE__.":".__LINE__."cannot open $p_dir $p_file "; - exit(); + $msg=_("Ne peut pas ouvrir $p_dir $p_file"); + throw new Exception($msg); } if ( $output_file == false) { - echo "ne peut pas ouvrir le fichier de sortie"; - exit(); + $msg=_("Ne peut pas ouvrir $p_dir $p_file"); + echo $msg; + throw new Exception($msg); } // compute the regex if ( $p_type=='OOo') diff --git a/include/class_document_export.php b/include/class_document_export.php index 38a561ba1..8de4af2da 100644 --- a/include/class_document_export.php +++ b/include/class_document_export.php @@ -71,7 +71,7 @@ class Document_Export catch (Exception $exc) { $cnt_feedback=count($this->feedback); - $this->feedback[$cnt_feedback]['file']='result.pdf'; + $this->feedback[$cnt_feedback]['file']=' '; $this->feedback[$cnt_feedback]['message']=$exc->getMessage(); $this->feedback[$cnt_feedback]['error']=0; } diff --git a/include/class_document_modele.php b/include/class_document_modele.php index aafa406f9..51acd03f2 100644 --- a/include/class_document_modele.php +++ b/include/class_document_modele.php @@ -183,7 +183,7 @@ class Document_modele { echo "

    Error

    "; $this->cn->rollback(); - exit; + throw new Exception("Erreur".__FILE__.__LINE__); } } } @@ -348,7 +348,7 @@ class Document_modele { echo "

    Error

    "; $this->cn->rollback(); - exit; + throw new Exception("Erreur".__FILE__.__LINE__); } } } diff --git a/include/class_dossier.php b/include/class_dossier.php index 1a13590e8..4cf4ab1dd 100644 --- a/include/class_dossier.php +++ b/include/class_dossier.php @@ -181,7 +181,7 @@ class Dossier return $this->$idx; } else - exit (__FILE__.":".__LINE__.'Erreur attribut inexistant'); + throw new Exception("Attribut inexistant $p_string"); } public function set_parameter($p_string,$p_value) { @@ -191,7 +191,7 @@ class Dossier $this->$idx=$p_value; } else - exit (__FILE__.":".__LINE__.'Erreur attribut inexistant'); + throw new Exception("Attribut inexistant $p_string"); } diff --git a/include/class_extension.php b/include/class_extension.php index fcbcaf962..6188e6639 100644 --- a/include/class_extension.php +++ b/include/class_extension.php @@ -92,7 +92,7 @@ class Extension extends Menu_Ref_sql { alert('Cette extension ne fonctionne pas sur cette version de NOALYSS'. ' Veuillez mettre votre programme a jour. Version minimum '.$i); - exit(); + return; } Extension::check_plugin_version(); } diff --git a/include/class_fiche.php b/include/class_fiche.php index ed94d6551..3bc3e239e 100644 --- a/include/class_fiche.php +++ b/include/class_fiche.php @@ -1464,7 +1464,7 @@ class Fiche */ function get_bk_balance($p_cond="") { - if ( $this->id == 0 ) exit('fiche->id est nul'); + if ( $this->id == 0 ) throw new Exception('fiche->id est nul'); $qcode=$this->strAttribut(ATTR_DEF_QUICKCODE); if ( $p_cond != "") $p_cond=" and ".$p_cond; @@ -1642,7 +1642,7 @@ class Fiche */ function get_categorie() { - if ( $this->id == 0 ) exit('class_fiche : f_id = 0 '); + if ( $this->id == 0 ) throw new Exception('class_fiche : f_id = 0 '); $sql='select fd_id from fiche where f_id='.$this->id; $R=$this->cn->get_value($sql); if ( $R == "" ) @@ -1671,8 +1671,7 @@ class Fiche if (($this->quick_code==null || $this->quick_code == "" ) && $this->id == 0 ) { - echo 'erreur ni quick_code ni f_id ne sont donnes'; - exit(); + throw new Exception( 'erreur ni quick_code ni f_id ne sont donnes'); } //retrieve the quick_code diff --git a/include/class_fiche_def.php b/include/class_fiche_def.php index 27a2de472..719fed5b1 100644 --- a/include/class_fiche_def.php +++ b/include/class_fiche_def.php @@ -764,7 +764,7 @@ $order $this->get(); $this->GetAttribut(); $r.= '

    ' . $this->id . " " . h($this->label) . '

    '; - $r.='
    '_('Données générales').''; + $r.='
    '._('Données générales').''; /* show the values label class_base and create account */ $r.='
    '; diff --git a/include/class_follow_up.php b/include/class_follow_up.php index e10b34a2d..5de133a54 100644 --- a/include/class_follow_up.php +++ b/include/class_follow_up.php @@ -158,7 +158,7 @@ class Follow_Up } else { - exit('class_action' . __LINE__ . 'Follow_Up::Display error unknown parameter' . $p_view); + throw new Exception('class_action' . __LINE__ . 'Follow_Up::Display error unknown parameter' . $p_view); } // Compute the widget // Date @@ -1448,7 +1448,7 @@ class Follow_Up where true $p_search order by ag.ag_timestamp,ag.ag_id"; $ret=$this->db->exec_sql($sql); - if ( Database::num_row($ret)==0)exit(); + if ( Database::num_row($ret)==0) return; $this->db->query_to_csv($ret,array( array("title"=>"doc id","type"=>"string"), array("title"=>"date","type"=>"date"), diff --git a/include/class_follow_up_detail.php b/include/class_follow_up_detail.php index 237723d23..2bcef10ac 100644 --- a/include/class_follow_up_detail.php +++ b/include/class_follow_up_detail.php @@ -64,7 +64,7 @@ class Follow_Up_Detail return $this->$idx; } else - exit (__FILE__.":".__LINE__.'Erreur attribut inexistant'); + throw new Exception("Attribut inexistant $p_string"); } public function set_parameter($p_string,$p_value) { @@ -74,7 +74,7 @@ class Follow_Up_Detail $this->$idx=$p_value; } else - exit (__FILE__.":".__LINE__.'Erreur attribut inexistant'); + throw new Exception("Attribut inexistant $p_string"); } diff --git a/include/class_forecast.php b/include/class_forecast.php index 82b6835f8..8bc0cb6a6 100644 --- a/include/class_forecast.php +++ b/include/class_forecast.php @@ -46,7 +46,7 @@ class Forecast return $this->$idx; } else - exit (__FILE__.":".__LINE__."[$p_string]".'Erreur attribut inexistant'); + throw new Exception("Attribut inexistant $p_string"); } public function set_parameter($p_string,$p_value) { @@ -56,7 +56,7 @@ class Forecast $this->$idx=$p_value; } else - exit (__FILE__.":".__LINE__."[$p_string]".'Erreur attribut inexistant'); + throw new Exception("Attribut inexistant $p_string"); } public function get_info() { diff --git a/include/class_forecast_cat.php b/include/class_forecast_cat.php index db407b3d4..2b7188e78 100644 --- a/include/class_forecast_cat.php +++ b/include/class_forecast_cat.php @@ -52,7 +52,7 @@ class Forecast_Cat return $this->$idx; } else - exit (__FILE__.":".__LINE__."[$p_string]".'Erreur attribut inexistant'); + throw new Exception("Attribut inexistant $p_string"); } public function set_parameter($p_string,$p_value) { @@ -62,7 +62,7 @@ class Forecast_Cat $this->$idx=$p_value; } else - exit (__FILE__.":".__LINE__."[$p_string]".'Erreur attribut inexistant'); + throw new Exception("Attribut inexistant $p_string"); } diff --git a/include/class_forecast_item.php b/include/class_forecast_item.php index 9da6f6d1f..00815324b 100644 --- a/include/class_forecast_item.php +++ b/include/class_forecast_item.php @@ -54,7 +54,7 @@ class Forecast_Item return $this->$idx; } else - exit (__FILE__.":".__LINE__."[$p_string]".'Erreur attribut inexistant'); + throw new Exception("Attribut inexistant $p_string"); } public function set_parameter($p_string,$p_value) { @@ -64,7 +64,7 @@ class Forecast_Item $this->$idx=$p_value; } else - exit (__FILE__.":".__LINE__."[$p_string]".'Erreur attribut inexistant'); + throw new Exception("Attribut inexistant $p_string"); } diff --git a/include/class_gestion_purchase.php b/include/class_gestion_purchase.php index cd530fb10..d36c92f58 100644 --- a/include/class_gestion_purchase.php +++ b/include/class_gestion_purchase.php @@ -52,7 +52,7 @@ class gestion_purchase extends gestion_table function get_list() { if ($this->qp_internal=="") - exit (__FILE__.__LINE__." qs_internal est vide"); + throw new Exception(__FILE__.__LINE__." qs_internal est vide"); $sql="select qp_id, qp_internal, qp_fiche, diff --git a/include/class_gestion_sold.php b/include/class_gestion_sold.php index aceeb2012..fb0705cc0 100644 --- a/include/class_gestion_sold.php +++ b/include/class_gestion_sold.php @@ -48,7 +48,7 @@ class gestion_sold extends gestion_table function get_list() { if ($this->qs_internal=="") - exit (__FILE__.__LINE__." qs_internal est vide"); + throw new Exception(__FILE__.__LINE__." qs_internal est vide"); $sql="select qs_id, qs_internal, qs_fiche, diff --git a/include/class_pre_operation.php b/include/class_pre_operation.php index 1be1a2704..fd2bf215b 100644 --- a/include/class_pre_operation.php +++ b/include/class_pre_operation.php @@ -305,8 +305,8 @@ class Pre_operation_detail { if ( ! isset ($this->valid[$p_param] ) ) { - echo(" le parametre $p_param n'existe pas ".__FILE__.':'.__LINE__); - exit(); + $msg=_(" le parametre $p_param n'existe pas ".__FILE__.':'.__LINE__); + throw new Exception($msg); } $attr=$this->valid[$p_param]; $this->$attr=$value; @@ -316,8 +316,8 @@ class Pre_operation_detail if ( ! isset ($this->valid[$p_param] ) ) { - echo(" le parametre $p_param n'existe pas ".__FILE__.':'.__LINE__); - exit(); + $msg=_(" le parametre $p_param n'existe pas ".__FILE__.':'.__LINE__); + throw new Exception($msg); } $attr=$this->valid[$p_param]; return $this->$attr; diff --git a/include/class_stock_goods.php b/include/class_stock_goods.php index dc0bd1813..bf7f9327b 100644 --- a/include/class_stock_goods.php +++ b/include/class_stock_goods.php @@ -71,7 +71,7 @@ class Stock_Goods extends Stock_Goods_Sql if (count($idepo->value) == 0) { NoAccess(); - exit(); + die(); } $idepo->selected = $p_depot; if ($p_readonly ) { diff --git a/include/class_todo_list.php b/include/class_todo_list.php index e95655663..391c33dfa 100644 --- a/include/class_todo_list.php +++ b/include/class_todo_list.php @@ -67,7 +67,7 @@ class Todo_List return $this->$idx; } else - exit (__FILE__.":".__LINE__.'Erreur attribut inexistant'); + throw new Exception("Attribut inexistant $p_string"); } public function check($p_idx,&$p_value) { @@ -99,7 +99,7 @@ class Todo_List if ($this->check($idx,$p_value) == true ) $this->$idx=$p_value; } else - exit (__FILE__.":".__LINE__.'Erreur attribut inexistant'); + throw new Exception("Attribut inexistant $p_string"); } diff --git a/include/class_user.php b/include/class_user.php index 7c4404878..8e640865a 100644 --- a/include/class_user.php +++ b/include/class_user.php @@ -354,6 +354,7 @@ class User function Admin() { + $this->admin = 0; if ($this->login != 'phpcompta') { $pass5 = md5($this->pass); @@ -363,7 +364,7 @@ class User $cn = new Database(); $res = $cn->exec_sql($sql, array($this->login)); if (Database::num_row($res) == 0) - exit(__FILE__ . " " . __LINE__ . " aucun resultat"); + throw new Exception(__FILE__ . " " . __LINE__ . " aucun resultat"); $this->admin = Database::fetch_result($res, 0); } else @@ -402,8 +403,7 @@ class User $pid = Database::fetch_result($Res2, 0, 0); if ($pid == null) { - echo _("Aucune période trouvéee !!!"); - exit(1); + throw new Exception( _("Aucune période trouvéee !!!")); } $pid = Database::fetch_result($Res2, 0, 0); From f7b4d5497d37057e03cdf0b3ef11beace160ff2d Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Fri, 14 Nov 2014 23:41:59 +0100 Subject: [PATCH 063/119] Enforce security - ajax --- include/ajax_add_menu.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/include/ajax_add_menu.php b/include/ajax_add_menu.php index 9a73ab4fc..9392446a9 100644 --- a/include/ajax_add_menu.php +++ b/include/ajax_add_menu.php @@ -25,7 +25,11 @@ * @brief show the form to add a menu */ if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis'); -$type=$_GET['type']; +$type=HtmlInput::default_value_get('type','XX'); +if ($type == 'XX') { + throw new Exception('invalid call'); + return; +} if ( $type=='me') { $ame_code_dep=$cn->make_array(" @@ -99,8 +103,6 @@ echo HtmlInput::title_box(_("Nouveau menu"), $ctl);
    '; -} if ($type=='pr') { @@ -114,6 +116,8 @@ select me_code,me_code||' '||coalesce(me_menu,'')||' '||coalesce(me_description, ",0,array($p_id)); $me_code=new ISelect('me_code'); +echo ''; +} $me_code->value=$ame_code; echo HtmlInput::title_box(_("Nouveau menu"), $ctl); From 25635a296a60c9c1fe954fef4744bb68cbd15838 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sat, 15 Nov 2014 01:50:12 +0100 Subject: [PATCH 064/119] Replace in inc file exit by return --- include/action.common.inc.php | 8 ++++---- include/adm.inc.php | 2 +- include/anc_od.inc.php | 8 ++++---- include/bank.inc.php | 2 +- include/category_card.inc.php | 2 +- include/cfgfiche.inc.php | 12 ++++++------ include/company.inc.php | 2 +- include/compta_ach.inc.php | 6 +++--- include/compta_fin.inc.php | 6 +++--- include/compta_fin_rec.inc.php | 4 ++-- include/compta_fin_saldo.inc.php | 2 +- include/compta_ods.inc.php | 8 ++++---- include/compta_ven.inc.php | 6 +++--- include/contact.inc.php | 2 +- include/customer.inc.php | 2 +- include/dossier.inc.php | 6 +++--- include/extension_get.inc.php | 6 +++--- include/fiche.inc.php | 10 +++++----- include/forecast.inc.php | 2 +- include/impress_gl_comptes.inc.php | 2 +- include/impress_poste.inc.php | 4 ++-- include/impress_rec.inc.php | 4 ++-- include/lettering.account.inc.php | 2 +- include/lettering.gestion.inc.php | 2 +- include/manager.inc.php | 2 +- include/modele.inc.php | 6 +++--- include/opening.inc.php | 10 +++++----- include/operation_ods_new.inc.php | 2 +- include/param_sec.inc.php | 2 +- include/payment_middle.inc.php | 4 ++-- include/preod.inc.php | 2 +- include/report.inc.php | 2 +- include/stock_cfg.inc.php | 2 +- include/supplier.inc.php | 2 +- include/tva.inc.php | 4 ++-- include/user.inc.php | 2 +- include/user_detail.inc.php | 4 ++-- 37 files changed, 77 insertions(+), 77 deletions(-) diff --git a/include/action.common.inc.php b/include/action.common.inc.php index e2b1b4056..689cc3d9c 100644 --- a/include/action.common.inc.php +++ b/include/action.common.inc.php @@ -52,7 +52,7 @@ if ( isset ($_POST['other_action_bt'])) { case 'IMP': //Impression Follow_Up::action_print($cn,$_POST); - exit(0); + return; break; case 'ST': // Etat @@ -124,7 +124,7 @@ if ($sub_action == "update") echo '
    '; echo '

    '._('Cette action ne vous est pas autorisée Contactez votre responsable').'

    '; echo '
    '; - exit(); + return; } $sub_action = "detail"; put_global(array(array('key' => "sa", "value" => "detail"))); @@ -195,7 +195,7 @@ if ($sub_action == 'detail') else { echo h2info(_("Ce document n'est pas accessible")); - exit(); + return; } @@ -216,7 +216,7 @@ if ($sub_action == 'delete') Follow_Up::show_action_list($cn, $base); if (isset($act->ag_ref)) echo hb(_('Action ') . $act->ag_ref . _(' effacée')); - exit(); + return; } //-------------------------------------------------------------------------------- diff --git a/include/adm.inc.php b/include/adm.inc.php index 6829fe4d7..f3cadd19c 100644 --- a/include/adm.inc.php +++ b/include/adm.inc.php @@ -142,7 +142,7 @@ if ( $low_action == 'detail') { /* Menu */ require_once('category_card.inc.php'); - exit(); +return; } diff --git a/include/anc_od.inc.php b/include/anc_od.inc.php index 592783fe1..02f113326 100644 --- a/include/anc_od.inc.php +++ b/include/anc_od.inc.php @@ -41,7 +41,7 @@ if ( ! $m ) { echo '

    '._('Aucun plan analytique défini').'

    '; - exit(); + return; } @@ -111,7 +111,7 @@ if ( isset($_GET['see'])) echo '
    '; echo $a->html_table($current); echo '
    '; - exit(); + return; } if ( isset($_POST['save'])) { @@ -127,7 +127,7 @@ if ( isset($_POST['save'])) $a->save(); echo $a->show(); echo ''; - exit(); + return; } if ( isset($_GET['new'])) @@ -153,7 +153,7 @@ if ( isset($_GET['new'])) '; echo ''; - exit(); + return; } ?> diff --git a/include/bank.inc.php b/include/bank.inc.php index 8a5b4e0e6..8ee65634d 100644 --- a/include/bank.inc.php +++ b/include/bank.inc.php @@ -139,7 +139,7 @@ if ( $low_action == 'detail') { /* Menu */ require_once('category_card.inc.php'); - exit(); + return; } diff --git a/include/category_card.inc.php b/include/category_card.inc.php index ec24e9601..524e3c334 100644 --- a/include/category_card.inc.php +++ b/include/category_card.inc.php @@ -124,7 +124,7 @@ if ( $ss_action == 'cn') echo ''; echo _("Vous devez aller dans fiche et créer une catégorie pour les contacts"); echo ''; - exit(); + return; } /* Add button */ $f_add_button=new IButton('add_card'); diff --git a/include/cfgfiche.inc.php b/include/cfgfiche.inc.php index 2f641fcfd..40dcea7c4 100644 --- a/include/cfgfiche.inc.php +++ b/include/cfgfiche.inc.php @@ -43,7 +43,7 @@ if ( isset($_POST['add_line'])) $fiche_def->InsertAttribut($_REQUEST['ad_id']); echo $fiche_def->input_detail(); echo $retour; - exit(); + return; } /*******************************************************************************************/ // Remove an attribut @@ -55,7 +55,7 @@ if ( isset ($_POST['remove_line'])) $fiche_def->RemoveAttribut($_REQUEST['chk_remove']); echo $fiche_def->input_detail(); echo $retour; - exit(); + return; } /*******************************************************************************************/ // Try to remove a category @@ -99,7 +99,7 @@ if ( isset ($_POST['change_name'])) } echo $fiche_def->input_detail(); echo $retour; - exit(); + return; } /*******************************************************************************************/ // Save order of the attributes @@ -110,7 +110,7 @@ if ( isset($_POST['save_line'])) $fiche_def->save_order($_POST); echo $fiche_def->input_detail(); echo $retour; - exit(); + return; } /*******************************************************************************************/ // Save a new category of card @@ -126,13 +126,13 @@ if ( isset($_POST['add_modele'])) { echo $fiche_def->input_detail(); echo $retour; - exit(); + return; } else { $fiche_def->input_new(); echo $retour; - exit(); + return; } } else diff --git a/include/company.inc.php b/include/company.inc.php index fe2b09591..90c184141 100644 --- a/include/company.inc.php +++ b/include/company.inc.php @@ -145,5 +145,5 @@ echo ""; echo HtmlInput::submit("record_company", _("Sauve")); echo ""; echo ''; -exit(); +return; ?> diff --git a/include/compta_ach.inc.php b/include/compta_ach.inc.php index 69dc8c5cf..fd2b9a6b4 100644 --- a/include/compta_ach.inc.php +++ b/include/compta_ach.inc.php @@ -80,7 +80,7 @@ if (isset($_POST['view_invoice'])) echo ''; echo ''; - exit(); + return; } } //------------------------------ @@ -141,7 +141,7 @@ if (isset($_POST['record'])) } echo ''; - exit(); + return; } } // ------------------------------ @@ -230,6 +230,6 @@ echo create_script(" update_name()"); echo ''; -exit(); +return; // end record invoice ?> \ No newline at end of file diff --git a/include/compta_fin.inc.php b/include/compta_fin.inc.php index f9ea7f4eb..d53be9505 100644 --- a/include/compta_fin.inc.php +++ b/include/compta_fin.inc.php @@ -85,7 +85,7 @@ if ( isset($_POST['save'])) echo ''; echo ''; - exit(); + return; } } //---------------------------------------- @@ -116,7 +116,7 @@ if ( isset($_POST['confirm'])) echo $a; echo ''; echo ''; - exit(); + return; } } //---------------------------------------- @@ -150,4 +150,4 @@ if ( ! isset ($_POST['e_date'])&& $g_parameter->MY_DATE_SUGGEST=='Y') echo create_script(" ajax_saldo('first_sold');"); } echo create_script(" update_name()"); -exit(); \ No newline at end of file +return; \ No newline at end of file diff --git a/include/compta_fin_rec.inc.php b/include/compta_fin_rec.inc.php index 16c12b316..130acd688 100644 --- a/include/compta_fin_rec.inc.php +++ b/include/compta_fin_rec.inc.php @@ -43,7 +43,7 @@ $jrn_priv = $g_user->get_ledger_access($Ledger->id); if (isset($_GET["p_jrn"]) && $jrn_priv == "X") { NoAccess(); - exit(); + return; } //------------------------- // save @@ -214,5 +214,5 @@ echo ''; echo HtmlInput::submit('save', 'Mettre à jour le n° de relevé bancaire'); echo ''; echo ''; -exit(); +return; ?> diff --git a/include/compta_fin_saldo.inc.php b/include/compta_fin_saldo.inc.php index 373dec808..6cd396932 100644 --- a/include/compta_fin_saldo.inc.php +++ b/include/compta_fin_saldo.inc.php @@ -123,5 +123,5 @@ require_once ('class_acc_parm_code.php'); echo ''; echo ""; echo ""; - exit(); + return; ?> diff --git a/include/compta_ods.inc.php b/include/compta_ods.inc.php index bb65daf40..1f1d1da2f 100644 --- a/include/compta_ods.inc.php +++ b/include/compta_ods.inc.php @@ -64,7 +64,7 @@ if ($g_user->check_jrn($ledger->id) == 'X') if (!isset($_POST['summary']) && !isset($_POST['save'])) { require('operation_ods_new.inc.php'); - exit(); + return; } elseif (isset($_POST['summary'])) { @@ -77,7 +77,7 @@ elseif (isset($_POST['summary'])) require('operation_ods_new.inc.php'); } - exit(); + return; } elseif (isset($_POST['save'])) { @@ -104,7 +104,7 @@ elseif (isset($_POST['save'])) require('operation_ods_new.inc.php'); alert($e->getMessage()); } - exit(); + return; } -exit(); +return; diff --git a/include/compta_ven.inc.php b/include/compta_ven.inc.php index 74a9fbd78..7a334b378 100644 --- a/include/compta_ven.inc.php +++ b/include/compta_ven.inc.php @@ -88,7 +88,7 @@ global $g_parameter; echo ''; echo ''; - exit(); + return; } } //------------------------------ @@ -148,7 +148,7 @@ global $g_parameter; echo ''; - exit(); + return; } } // ------------------------------ @@ -250,5 +250,5 @@ echo '
    '; echo create_script(" get_last_date()"); } echo create_script(" update_name()"); -exit(); +return; ?> diff --git a/include/contact.inc.php b/include/contact.inc.php index 829f028b6..71678287f 100644 --- a/include/contact.inc.php +++ b/include/contact.inc.php @@ -147,7 +147,7 @@ if ( $low_action == 'detail') { /* Menu */ require_once('category_card.inc.php'); - exit(); + return; } html_page_stop(); diff --git a/include/customer.inc.php b/include/customer.inc.php index 87554bd47..b1e867786 100644 --- a/include/customer.inc.php +++ b/include/customer.inc.php @@ -137,7 +137,7 @@ if ( $low_action == 'detail') { /* Menu */ require_once('category_card.inc.php'); - exit(); + return; } html_page_stop(); diff --git a/include/dossier.inc.php b/include/dossier.inc.php index ccd9562c8..ec7c663bd 100644 --- a/include/dossier.inc.php +++ b/include/dossier.inc.php @@ -58,7 +58,7 @@ if ( isset ($_POST["DATABASE"]) ) echo _('le modele ').domaine.'mod'.$_POST["FMOD_ID"]._(" doit être migré en unicode."); echo _('Pour le passer en unicode, faites-en un backup puis restaurez le fichier reçu').''; echo HtmlInput::button_anchor('Retour','admin_repo.php?action=dossier_mgt'); - exit(); + return; } $desc=sql_string($_POST["DESCRIPTION"]); @@ -344,7 +344,7 @@ if ( $sa == 'remove' ) { echo _('Désolé, vous n\'avez pas coché la case'); echo HtmlInput::button_anchor('Retour','?action=dossier_mgt'); - exit(); + return; } $cn=new Database(); @@ -353,7 +353,7 @@ if ( $sa == 'remove' ) if ( strlen(trim($name)) == 0 ) { echo "

    $msg "._('inexistant')."

    "; - exit(); + return; } $sql="drop database ".domaine."dossier".sql_string($_REQUEST['d']); ob_start(); diff --git a/include/extension_get.inc.php b/include/extension_get.inc.php index fc76e0d76..e051490bc 100644 --- a/include/extension_get.inc.php +++ b/include/extension_get.inc.php @@ -26,17 +26,17 @@ $ext=new Extension(); if ($ext->search($_REQUEST['plugin_code']) == -1) { echo_warning("plugin non trouvé"); - exit(); + return; } if ($ext->can_request($g_user->login)==-1) { alert("Plugin non authorisé"); - exit(); + return; } if ( ! file_exists('../include/ext'.DIRECTORY_SEPARATOR.trim($ext->me_file))) { alert(j(_("Ce fichier n'existe pas "))); - exit(); + return; } echo '
    '; require_once('ext'.DIRECTORY_SEPARATOR.trim($ext->me_file)); diff --git a/include/fiche.inc.php b/include/fiche.inc.php index ea2393ff0..053135ae8 100644 --- a/include/fiche.inc.php +++ b/include/fiche.inc.php @@ -103,7 +103,7 @@ echo '
    '; //----------------------------------------------------- if (!isset($_GET['cat_display'])) - exit(); + return; $fd_id = $_GET['cat']; @@ -123,7 +123,7 @@ if ($array == null) echo '

    '._('Aucune fiche trouvée').'

    '; echo $str_add_card; echo '
    '; - exit(); + return; } $allcard = (isset($_GET['allcard'])) ? 1 : 0; @@ -218,7 +218,7 @@ if ($_GET['histo'] == -1) require_once 'template/fiche_list.php'; echo '
    '.$bar; - exit(); + return; } /* * ********************************************************************************************************************************* * Summary @@ -241,7 +241,7 @@ if ($_GET['histo'] == 3) $hid->input("fd_id", $_REQUEST['cat']); echo ""; - exit(); + return; } $export_pdf = '
    '; $export_pdf.=HtmlInput::hidden('cat', $_GET['cat']); @@ -373,7 +373,7 @@ if ($_GET['histo'] == 4 || $_GET['histo'] == 5) echo $export_csv; echo $export_print; - exit(); + return; } if (isDate($_REQUEST['start']) == null || isDate($_REQUEST['end']) == null) { diff --git a/include/forecast.inc.php b/include/forecast.inc.php index 33859bd33..20557a278 100644 --- a/include/forecast.inc.php +++ b/include/forecast.inc.php @@ -366,7 +366,7 @@ if (isset($_REQUEST['f_id']) && $sa == "vw") echo '
    '; echo '
    '; echo ''; - exit(); + return; } catch (Exception $e) { diff --git a/include/impress_gl_comptes.inc.php b/include/impress_gl_comptes.inc.php index 21c416d65..e20f6b9f4 100644 --- a/include/impress_gl_comptes.inc.php +++ b/include/impress_gl_comptes.inc.php @@ -147,7 +147,7 @@ if ( isset( $_REQUEST['bt_html'] ) ) if ( isDate($_REQUEST['from_periode'])==null || isDate($_REQUEST['to_periode'])==null) { echo alert('Date malformée, désolée'); - exit(); + return; } echo '
    '; diff --git a/include/impress_poste.inc.php b/include/impress_poste.inc.php index d6c55c01c..0532ff4db 100644 --- a/include/impress_poste.inc.php +++ b/include/impress_poste.inc.php @@ -134,7 +134,7 @@ if ( isset( $_REQUEST['bt_html'] ) ) if ( isDate($_REQUEST['from_periode'])==null || isDate($_REQUEST['to_periode'])==null) { echo alert('Date malformée, désolée'); - exit(); + return; } require_once("class_acc_account_ledger.php"); $go=0; @@ -187,7 +187,7 @@ if ( isset( $_REQUEST['bt_html'] ) ) Acc_Account_Ledger::HtmlTableHeader(); $Poste->get_row_date( $_GET['from_periode'], $_GET['to_periode'],$_GET['ople']); - if ( empty($Poste->row)) exit(); + if ( empty($Poste->row)) return; $Poste->load(); echo ''; diff --git a/include/impress_rec.inc.php b/include/impress_rec.inc.php index 4f8bec5fb..0beee6bce 100644 --- a/include/impress_rec.inc.php +++ b/include/impress_rec.inc.php @@ -82,7 +82,7 @@ echo '
    '; echo ''; echo ''; echo '
    '; -if ( ! isset($_GET['vis'])) exit(); +if ( ! isset($_GET['vis'])) return; $acc_reconciliation=new Acc_Reconciliation($cn); $acc_reconciliation->a_jrn=$r_jrn; $acc_reconciliation->start_day=$dstart->value; @@ -100,4 +100,4 @@ $gDossier=Dossier::id(); '; if ( isDate($_GET['start']) == null || isDate($_GET['end']) == null ) { echo alert(_('Date malformée, désolé')); - exit(); + return; } $letter=new Lettering_Account($cn); $letter->set_parameter('account',$_GET['acc']); diff --git a/include/lettering.gestion.inc.php b/include/lettering.gestion.inc.php index 0da3fc750..a421b7c41 100644 --- a/include/lettering.gestion.inc.php +++ b/include/lettering.gestion.inc.php @@ -71,7 +71,7 @@ if ( isset($_GET['start']) && isset($_GET['end'])) if ( isDate($_GET['start']) == null || isDate($_GET['end']) == null ) { echo alert(_('Date malformée, désolé')); - exit(); + return; } } echo '
    '; diff --git a/include/manager.inc.php b/include/manager.inc.php index 382de0488..2064b710f 100644 --- a/include/manager.inc.php +++ b/include/manager.inc.php @@ -139,7 +139,7 @@ if ($low_action == 'detail') { /* Menu */ require_once('category_card.inc.php'); - exit(); + return; } diff --git a/include/modele.inc.php b/include/modele.inc.php index 5480dc518..a571c9973 100644 --- a/include/modele.inc.php +++ b/include/modele.inc.php @@ -70,7 +70,7 @@ if (isset($_POST["FMOD_NAME"])) echo ' Pour le passer en unicode, faites-en un backup puis restaurez le fichier reçu'; echo HtmlInput::button_anchor('Retour', 'admin_repo.php?action=dossier_mgt'); - exit(); + return; } $mod_name = sql_string($_POST["FMOD_NAME"]); @@ -387,7 +387,7 @@ if ($sa == 'add') { echo('Désolé, vous n\'avez pas coché la case'); echo HtmlInput::button_anchor('Retour', '?action=modele_mgt'); - exit(); + return; } $cn = new Database(); @@ -396,7 +396,7 @@ if ($sa == 'add') if (strlen(trim($name)) == 0) { echo "

    $msg inexistant

    "; - exit(); + return; } $sql = "drop database " . domaine . "mod" . sql_string($_REQUEST['m']); ob_start(); diff --git a/include/opening.inc.php b/include/opening.inc.php index d639124b2..b9fc4689d 100644 --- a/include/opening.inc.php +++ b/include/opening.inc.php @@ -42,7 +42,7 @@ if (isset($_POST['correct'])) { $ledger = new Acc_Ledger($cn, $_REQUEST['p_jrn']); require_once 'operation_ods_new.inc.php'; - exit(); + return; } // confirm before saving @@ -59,7 +59,7 @@ if ( isset($_POST['summary'])) require('operation_ods_new.inc.php'); } - exit(); + return; } // record @@ -89,7 +89,7 @@ if (isset($_POST['save'])) require('operation_ods_new.inc.php'); alert($e->getMessage()); } - exit(); + return; } @@ -108,7 +108,7 @@ if ($sa == '') if (empty($avail)) { echo '*** Aucun dossier ***'; - exit(); + return; } echo '
    '; echo HtmlInput::hidden('ac', $_REQUEST['ac']); @@ -132,7 +132,7 @@ if ($sa == '') echo ''; echo '
    '; echo '
    '; - exit(); + return; } /* -------------------------------------------------- * Step 2 choose now the exercice of this folder diff --git a/include/operation_ods_new.inc.php b/include/operation_ods_new.inc.php index 0e6cc84cc..ce1e9a40f 100644 --- a/include/operation_ods_new.inc.php +++ b/include/operation_ods_new.inc.php @@ -41,7 +41,7 @@ $ledger->id = ($ledger->id == -1) ? $first_ledger['jrn_def_id'] : $id_ledger; if ( $g_user->check_jrn($ledger->id)=='X') { alert("Vous ne pouvez pas écrire dans ce journal, contacter votre administrateur"); - exit(); + return; } echo '
    '; echo '
    '; diff --git a/include/param_sec.inc.php b/include/param_sec.inc.php index d2d9adf7e..9ee99b365 100644 --- a/include/param_sec.inc.php +++ b/include/param_sec.inc.php @@ -230,7 +230,7 @@ if ( $action == "view" ) l'écran administration -> utilisateur.

    "; echo $return; - exit(); + return; } // // Check if the user can access that folder diff --git a/include/payment_middle.inc.php b/include/payment_middle.inc.php index 1fb7eddfe..5a634b0f3 100644 --- a/include/payment_middle.inc.php +++ b/include/payment_middle.inc.php @@ -57,7 +57,7 @@ if ( $sb=='change') '?p_action=divers&sa=mp&'.dossier::get()."&ac=".$_REQUEST['ac'] ); echo ''; - exit(); + return; } //---------------------------------------------------------------------- // Save the change @@ -106,7 +106,7 @@ if ($sb=='ins') ); echo ''; - exit(); + return; } //-------------------------------------------------------------------------------- //LIST diff --git a/include/preod.inc.php b/include/preod.inc.php index 777730d25..75815e3f4 100644 --- a/include/preod.inc.php +++ b/include/preod.inc.php @@ -80,7 +80,7 @@ if ( $request_sa== 'jrn' ) if (empty($array) == true) { echo _("Aucun enregistrement"); - exit(); + return; } echo '
    '; diff --git a/include/report.inc.php b/include/report.inc.php index 5f5cf1b2f..eb8480a7d 100644 --- a/include/report.inc.php +++ b/include/report.inc.php @@ -82,7 +82,7 @@ echo "
    "; echo '
    '; if ( isset($_POST['upload'])) { - exit(); + return; } if ( isset ($_REQUEST["action"]) ) { diff --git a/include/stock_cfg.inc.php b/include/stock_cfg.inc.php index 6c7ada2b1..cd307145b 100644 --- a/include/stock_cfg.inc.php +++ b/include/stock_cfg.inc.php @@ -36,7 +36,7 @@ if ($g_parameter->MY_STOCK == 'N') echo '

    '; echo _("Vous n'utilisez pas de gestion de stock"); echo '

    '; - exit(); + return; } if ( isset ($_POST['add_stock'])) { diff --git a/include/supplier.inc.php b/include/supplier.inc.php index 7b49b36ee..0dc5a652a 100644 --- a/include/supplier.inc.php +++ b/include/supplier.inc.php @@ -143,7 +143,7 @@ if ( $low_action == 'detail') { /* Menu */ require_once('category_card.inc.php'); - exit(); + return; } diff --git a/include/tva.inc.php b/include/tva.inc.php index 4446e2669..9b65f850b 100644 --- a/include/tva.inc.php +++ b/include/tva.inc.php @@ -90,8 +90,8 @@ if (isset($_POST['confirm_mod']) $own = new Own($cn); if ($own->MY_TVA_USE == 'N') { - echo '

    Vous n\'êtes pas assujetti à la TVA

    '; - exit(); + echo '

    '._("Vous n'êtes pas assujetti à la TVA").'

    '; + return; } //----------------------------------------------------- // Display diff --git a/include/user.inc.php b/include/user.inc.php index 3646e69f3..85799eed6 100644 --- a/include/user.inc.php +++ b/include/user.inc.php @@ -61,7 +61,7 @@ if ( isset($_REQUEST['det'])) { require_once("user_detail.inc.php"); - exit(); + return; } ?> diff --git a/include/user_detail.inc.php b/include/user_detail.inc.php index 6b5fa8046..9905dec56 100644 --- a/include/user_detail.inc.php +++ b/include/user_detail.inc.php @@ -31,7 +31,7 @@ $rep = new Database(); if (!isset($_REQUEST['use_id'])) { html_page_stop(); - exit(); + return; } $uid = $_REQUEST['use_id']; $UserChange = new User($rep, $uid); @@ -210,7 +210,7 @@ if (empty($Dossier)) { echo hb('* Aucun Dossier *'); echo ''; - exit(); + return; } $mod_user = new User(new Database(), $uid); From a8fd49f65141065d331d0628e6549794c8158013 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sat, 15 Nov 2014 01:53:19 +0100 Subject: [PATCH 065/119] Task #1048 - Remplacer exit et die Replace in inc file exit by return --- include/fiche.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/fiche.inc.php b/include/fiche.inc.php index 053135ae8..1a87523c5 100644 --- a/include/fiche.inc.php +++ b/include/fiche.inc.php @@ -277,7 +277,7 @@ if ($_GET['histo'] == 4 || $_GET['histo'] == 5) { echo h2(_('Date invalide !'), 'class="error"'); alert(_('Date invalide !')); - exit; + return; } if ( $allcard == 0 ) echo $str_add_card; echo $export_pdf; @@ -288,7 +288,7 @@ if ($_GET['histo'] == 4 || $_GET['histo'] == 5) if ($allcard == 0 && $fd->hasAttribute(ATTR_DEF_ACCOUNT) == false) { echo alert(_("Cette catégorie n'ayant pas de poste comptable n'a pas de balance")); - exit; + return; } // all card if ($allcard == 1) @@ -308,7 +308,7 @@ if ($_GET['histo'] == 4 || $_GET['histo'] == 5) if ($allcard == 0) { echo _("Aucune fiche trouvée"); - exit; + return; } else continue; } @@ -379,7 +379,7 @@ if (isDate($_REQUEST['start']) == null || isDate($_REQUEST['end']) == null) { echo h2('Date invalide !', 'class="error"'); alert('Date invalide !'); - exit; + return; } /*********************************************************************************************************************************** * Lettering From 8b9f4fb2c0626d71743e78c328983b4d88d269d7 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sat, 15 Nov 2014 02:15:29 +0100 Subject: [PATCH 066/119] Task #1044 - Implementation de Test Test files --- html/test.php | 78 +++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 66 insertions(+), 12 deletions(-) diff --git a/html/test.php b/html/test.php index 84f1449fc..76774e48a 100644 --- a/html/test.php +++ b/html/test.php @@ -26,8 +26,7 @@ * - secund the test must adapted to this page : if you do a post (or get) from a test, you won't get any result * if the $_REQUEST[test_select] is not set, so set it . */ -$start_mem=memory_get_usage(); -$start_time=microtime(true); + include_once("../include/constant.php"); @@ -69,25 +68,34 @@ if ($script=="") */ $scan=scandir('../scenario/'); $max=count($scan); - + echo ''; + $get='test.php?'.http_build_query(array('script'=>"all", 'gDossier'=>$gDossierLogInput, 'description'=>"Tous les scripts")); + echo ''; + echo ''; + echo ''; + echo ''; + for ($e=0; $e<$max; $e++) { - if (is_file('../scenario/'.$scan[$e])&&strpos($scan[$e], '.php') == true) + if (is_file('../scenario/'.$scan[$e])&&strpos($scan[$e], '.php')==true) { $description=""; $a_description=file('../scenario/'.$scan[$e]); $max_description=count($a_description); - for ($w=0;$w<$max_description;$w++) + for ($w=0; $w<$max_description; $w++) { - if (strpos($a_description[$w],'@description:')==true) + if (strpos($a_description[$w], '@description:')==true) { $description=$a_description[$w]; - $description=str_replace('//@description:','',$description); - + $description=str_replace('//@description:', '', $description); } } - $get='test.php?'.http_build_query(array('script'=>$scan[$e],'gDossier'=>$gDossierLogInput,'description'=>$description)); + $get='test.php?'.http_build_query(array('script'=>$scan[$e], 'gDossier'=>$gDossierLogInput, 'description'=>$description)); echo ''; echo '
    '; + echo ''; + echo "Tous "; + echo ''; + echo 'Tous les scripts
    '; echo ''; @@ -100,10 +108,56 @@ if ($script=="") } echo '
    '; } +else if ($script=='all') +{ + $scan=scandir('../scenario/'); + $maxscan=count($scan); + + echo ''; + for ($e_scan=0; $e_scan<$maxscan; $e_scan++) + { + if (is_file('../scenario/'.$scan[$e_scan])&&strpos($scan[$e_scan], '.php')==true) + { + $description=""; + $a_description=file('../scenario/'.$scan[$e_scan]); + $max_description=count($a_description); + for ($w=0; $w<$max_description; $w++) + { + if (strpos($a_description[$w], '@description:')==true) + { + $description=$a_description[$w]; + $description=str_replace('//@description:', '', $description); + } + } + $start_mem=memory_get_usage(); + $start_time=microtime(true); + $script=str_replace('../', '', $script); + + echo '

    '.$script."

    "; + echo '

    description = '.$description.'

    '; + include '../scenario/'.$scan[$e_scan]; + echo ''; + echo ''; + $end_mem=memory_get_usage(); + $end_time=microtime(true); + + echo "

    start mem : ".$start_mem; + echo '

    '; + echo "

    end mem : ".$end_mem; + echo '

    '; + echo "

    Diff = ".($end_mem-$start_mem)." bytes "; + echo "

    Diff = ".(round(($end_mem-$start_mem)/1024, 2))." kbytes "; + echo "

    Diff = ".(round(($end_mem-$start_mem)/1024/1024, 2))." Mbytes "; + echo '

    '; + echo "

    Execution script ".$script." time = ".(round(($end_time-$start_time), 4))." secondes

    "; + } + } +} else { - - $script=str_replace('../','',$script); + $start_mem=memory_get_usage(); + $start_time=microtime(true); + $script=str_replace('../', '', $script); $description=HtmlInput::default_value_get("description", "aucune description"); echo '

    '.$script."

    "; echo '

    description = '.$description.'

    '; @@ -121,4 +175,4 @@ else echo "

    Diff = ".(round(($end_mem-$start_mem)/1024/1024, 2))." Mbytes "; echo '

    '; echo "

    Execution script ".$script." time = ".(round(($end_time-$start_time), 4))." secondes

    "; -} \ No newline at end of file +} \ No newline at end of file From 87d3f0c7df66f08e46070062c5fb1f8b4b751a25 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sat, 15 Nov 2014 02:18:21 +0100 Subject: [PATCH 067/119] Task #1044 - Implementation de Test Test files --- scenario/scenario-1415994947.php | 17 +++++ scenario/scenario-1415994966.php | 17 +++++ scenario/scenario-1415995071.php | 12 ++++ scenario/scenario-1415995185.php | 43 ++++++++++++ scenario/scenario-1415995188.php | 40 ++++++++++++ scenario/scenario-1415995192.php | 12 ++++ scenario/scenario-1415995229.php | 34 ++++++++++ scenario/scenario-1415995238.php | 34 ++++++++++ scenario/scenario-1415995254.php | 35 ++++++++++ scenario/scenario-1415995260.php | 14 ++++ scenario/scenario-1415995262.php | 106 ++++++++++++++++++++++++++++++ scenario/scenario-1415995277.php | 108 +++++++++++++++++++++++++++++++ scenario/scenario-1415995285.php | 11 ++++ scenario/scenario-1415995301.php | 14 ++++ scenario/scenario-1415995308.php | 33 ++++++++++ scenario/scenario-1415995317.php | 12 ++++ scenario/scenario-1415995350.php | 54 ++++++++++++++++ scenario/scenario-1415995352.php | 50 ++++++++++++++ scenario/scenario-1415995357.php | 12 ++++ scenario/scenario-1415995424.php | 12 ++++ scenario/scenario-1415995434.php | 19 ++++++ scenario/scenario-1415995437.php | 13 ++++ scenario/scenario-1415995449.php | 20 ++++++ scenario/scenario-1415995545.php | 12 ++++ scenario/scenario-1415995575.php | 32 +++++++++ scenario/scenario-1415996970.php | 44 +++++++++++++ scenario/scenario-1415996980.php | 35 ++++++++++ scenario/scenario-1415997148.php | 12 ++++ scenario/scenario-1415997352.php | 44 +++++++++++++ scenario/scenario-1415997358.php | 35 ++++++++++ scenario/scenario-1415997389.php | 12 ++++ scenario/scenario-1415997404.php | 67 +++++++++++++++++++ scenario/scenario-1415997407.php | 38 +++++++++++ scenario/scenario-1415997877.php | 12 ++++ scenario/scenario-1415997886.php | 12 ++++ scenario/scenario-1415997889.php | 12 ++++ scenario/scenario-1415998124.php | 13 ++++ scenario/scenario-1415998134.php | 13 ++++ scenario/scenario-1415998146.php | 13 ++++ 39 files changed, 1128 insertions(+) create mode 100644 scenario/scenario-1415994947.php create mode 100644 scenario/scenario-1415994966.php create mode 100644 scenario/scenario-1415995071.php create mode 100644 scenario/scenario-1415995185.php create mode 100644 scenario/scenario-1415995188.php create mode 100644 scenario/scenario-1415995192.php create mode 100644 scenario/scenario-1415995229.php create mode 100644 scenario/scenario-1415995238.php create mode 100644 scenario/scenario-1415995254.php create mode 100644 scenario/scenario-1415995260.php create mode 100644 scenario/scenario-1415995262.php create mode 100644 scenario/scenario-1415995277.php create mode 100644 scenario/scenario-1415995285.php create mode 100644 scenario/scenario-1415995301.php create mode 100644 scenario/scenario-1415995308.php create mode 100644 scenario/scenario-1415995317.php create mode 100644 scenario/scenario-1415995350.php create mode 100644 scenario/scenario-1415995352.php create mode 100644 scenario/scenario-1415995357.php create mode 100644 scenario/scenario-1415995424.php create mode 100644 scenario/scenario-1415995434.php create mode 100644 scenario/scenario-1415995437.php create mode 100644 scenario/scenario-1415995449.php create mode 100644 scenario/scenario-1415995545.php create mode 100644 scenario/scenario-1415995575.php create mode 100644 scenario/scenario-1415996970.php create mode 100644 scenario/scenario-1415996980.php create mode 100644 scenario/scenario-1415997148.php create mode 100644 scenario/scenario-1415997352.php create mode 100644 scenario/scenario-1415997358.php create mode 100644 scenario/scenario-1415997389.php create mode 100644 scenario/scenario-1415997404.php create mode 100644 scenario/scenario-1415997407.php create mode 100644 scenario/scenario-1415997877.php create mode 100644 scenario/scenario-1415997886.php create mode 100644 scenario/scenario-1415997889.php create mode 100644 scenario/scenario-1415998124.php create mode 100644 scenario/scenario-1415998134.php create mode 100644 scenario/scenario-1415998146.php diff --git a/scenario/scenario-1415994947.php b/scenario/scenario-1415994947.php new file mode 100644 index 000000000..955b5245d --- /dev/null +++ b/scenario/scenario-1415994947.php @@ -0,0 +1,17 @@ + '42', + 'ac' => 'COMPTA/CARD', + 'cat' => '3', + 'histo' => '-1', + 'start' => '01.01.2014', + 'end' => '31.12.2014', + 'cat_display' => 'Recherche', +); +$_POST=array ( +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'fiche.inc.php'; diff --git a/scenario/scenario-1415994966.php b/scenario/scenario-1415994966.php new file mode 100644 index 000000000..9c00416c1 --- /dev/null +++ b/scenario/scenario-1415994966.php @@ -0,0 +1,17 @@ + '42', + 'ac' => 'COMPTA/CARD', + 'cat' => '2', + 'histo' => '-1', + 'start' => '01.01.2014', + 'end' => '31.12.2014', + 'cat_display' => 'Recherche', +); +$_POST=array ( +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'fiche.inc.php'; diff --git a/scenario/scenario-1415995071.php b/scenario/scenario-1415995071.php new file mode 100644 index 000000000..670a2eccc --- /dev/null +++ b/scenario/scenario-1415995071.php @@ -0,0 +1,12 @@ + '42', + 'ac' => 'COMPTA/VENMENU/VEN', +); +$_POST=array ( +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'compta_ven.inc.php'; diff --git a/scenario/scenario-1415995185.php b/scenario/scenario-1415995185.php new file mode 100644 index 000000000..1accb4392 --- /dev/null +++ b/scenario/scenario-1415995185.php @@ -0,0 +1,43 @@ + '42', + 'ac' => 'COMPTA/VENMENU/VEN', +); +$_POST=array ( + 'ledger_type' => 'VEN', + 'ac' => 'COMPTA/VENMENU/VEN', + 'sa' => 'p', + 'gDossier' => '42', + 'nb_item' => '2', + 'p_jrn' => '2', + 'e_date' => '14.11.2014', + 'e_ech' => '', + 'e_client' => 'CLIENT1 ', + 'e_pj' => 'VEN1', + 'e_pj_suggest' => 'VEN1', + 'e_comm' => 'Première vente', + 'e_march0' => 'DEPLAC', + 'e_march0_price' => '120', + 'e_quant0' => '1', + 'htva_march0' => '120', + 'e_march0_tva_id' => '1', + 'e_march0_tva_amount' => '25.2', + 'tva_march0' => '25.2', + 'tvac_march0' => '145.2', + 'e_march1' => '', + 'e_march1_price' => '', + 'e_quant1' => '1', + 'htva_march1' => '0', + 'e_march1_tva_id' => '', + 'e_march1_tva_amount' => '', + 'tva_march1' => '0', + 'tvac_march1' => '0', + 'jrn_type' => 'VEN', + 'e_mp' => '0', + 'view_invoice' => 'Enregistrer', +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'compta_ven.inc.php'; diff --git a/scenario/scenario-1415995188.php b/scenario/scenario-1415995188.php new file mode 100644 index 000000000..5a4f1d28d --- /dev/null +++ b/scenario/scenario-1415995188.php @@ -0,0 +1,40 @@ + '42', + 'ac' => 'COMPTA/VENMENU/VEN', +); +$_POST=array ( + 'gDossier' => '42', + 'bon_comm' => '', + 'other_info' => '', + 'e_client' => 'CLIENT1 ', + 'nb_item' => '2', + 'p_jrn' => '2', + 'mt' => '1415995185.7619', + 'e_comm' => 'Première vente', + 'e_date' => '14.11.2014', + 'e_ech' => '', + 'e_pj' => 'VEN1', + 'e_pj_suggest' => 'VEN1', + 'e_mp' => '0', + 'jrn_type' => 'VEN', + 'e_march0' => 'DEPLAC', + 'e_march0_price' => '120', + 'e_march0_tva_id' => '1', + 'e_march0_tva_amount' => '25.2', + 'e_quant0' => '1', + 'e_march1' => '', + 'e_march1_price' => '', + 'e_march1_tva_id' => '', + 'e_march1_tva_amount' => '', + 'e_quant1' => '1', + 'ac' => 'COMPTA/VENMENU/VEN', + 'opd_name' => '', + 'od_description' => '', + 'record' => 'Enregistrement', +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'compta_ven.inc.php'; diff --git a/scenario/scenario-1415995192.php b/scenario/scenario-1415995192.php new file mode 100644 index 000000000..dc3340c2b --- /dev/null +++ b/scenario/scenario-1415995192.php @@ -0,0 +1,12 @@ + '42', + 'ac' => 'COMPTA/MENUACH/ACH', +); +$_POST=array ( +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'compta_ach.inc.php'; diff --git a/scenario/scenario-1415995229.php b/scenario/scenario-1415995229.php new file mode 100644 index 000000000..89776e0af --- /dev/null +++ b/scenario/scenario-1415995229.php @@ -0,0 +1,34 @@ + '42', + 'ac' => 'COMPTA/MENUACH/ACH', +); +$_POST=array ( + 'gDossier' => '42', + 'nb_item' => '1', + 'p_jrn' => '3', + 'e_date' => '01.03.2014', + 'e_ech' => '', + 'e_client' => 'IMMOB', + 'e_pj' => 'ACH1', + 'e_pj_suggest' => 'ACH1', + 'e_comm' => 'Loyer', + 'e_march0' => 'LOYER', + 'e_march0_price' => '2560', + 'e_quant0' => '1', + 'htva_march0' => '2560', + 'e_march0_tva_id' => '4', + 'e_march0_tva_amount' => '0', + 'tva_march0' => '0', + 'tvac_march0' => '2560', + 'jrn_type' => 'ACH', + 'p_action' => 'ach', + 'sa' => 'p', + 'e_mp' => '0', + 'view_invoice' => 'Enregistrer', +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'compta_ach.inc.php'; diff --git a/scenario/scenario-1415995238.php b/scenario/scenario-1415995238.php new file mode 100644 index 000000000..82d40e5b0 --- /dev/null +++ b/scenario/scenario-1415995238.php @@ -0,0 +1,34 @@ + '42', + 'ac' => 'COMPTA/MENUACH/ACH', +); +$_POST=array ( + 'gDossier' => '42', + 'nb_item' => '1', + 'p_jrn' => '3', + 'e_date' => '01.01.2014', + 'e_ech' => '', + 'e_client' => 'IMMOB', + 'e_pj' => 'ACH1', + 'e_pj_suggest' => 'ACH1', + 'e_comm' => 'Loyer', + 'e_march0' => 'LOYER', + 'e_march0_price' => '2560', + 'e_quant0' => '1', + 'htva_march0' => '2560', + 'e_march0_tva_id' => '4', + 'e_march0_tva_amount' => '0', + 'tva_march0' => '0', + 'tvac_march0' => '2560', + 'jrn_type' => 'ACH', + 'p_action' => 'ach', + 'sa' => 'p', + 'e_mp' => '0', + 'view_invoice' => 'Enregistrer', +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'compta_ach.inc.php'; diff --git a/scenario/scenario-1415995254.php b/scenario/scenario-1415995254.php new file mode 100644 index 000000000..6f70f6bba --- /dev/null +++ b/scenario/scenario-1415995254.php @@ -0,0 +1,35 @@ + '42', + 'ac' => 'COMPTA/MENUACH/ACH', +); +$_POST=array ( + 'gDossier' => '42', + 'e_client' => 'IMMOB', + 'nb_item' => '1', + 'p_jrn' => '3', + 'e_comm' => 'Loyer', + 'e_date' => '01.01.2014', + 'e_ech' => '', + 'jrn_type' => 'ACH', + 'e_pj' => 'ACH1', + 'e_pj_suggest' => 'ACH1', + 'mt' => '1415995238.7737', + 'e_mp' => '0', + 'e_march0' => 'LOYER', + 'e_march0_price' => '2560', + 'e_march0_tva_id' => '4', + 'e_march0_tva_amount' => '0', + 'e_quant0' => '1', + 'bon_comm' => '', + 'other_info' => '', + 'ac' => 'COMPTA/MENUACH/ACH', + 'opd_name' => 'Paiement loyer', + 'od_description' => 'Paiement du loyer', + 'record' => 'Enregistrement', +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'compta_ach.inc.php'; diff --git a/scenario/scenario-1415995260.php b/scenario/scenario-1415995260.php new file mode 100644 index 000000000..41d4c3c5a --- /dev/null +++ b/scenario/scenario-1415995260.php @@ -0,0 +1,14 @@ + '3', + 'ac' => 'COMPTA/MENUACH/ACH', + 'gDossier' => '42', + 'pre_def' => '1', +); +$_POST=array ( +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'compta_ach.inc.php'; diff --git a/scenario/scenario-1415995262.php b/scenario/scenario-1415995262.php new file mode 100644 index 000000000..8401f523f --- /dev/null +++ b/scenario/scenario-1415995262.php @@ -0,0 +1,106 @@ + '3', + 'ac' => 'COMPTA/MENUACH/ACH', + 'gDossier' => '42', + 'pre_def' => '1', +); +$_POST=array ( + 'gDossier' => '42', + 'nb_item' => '10', + 'p_jrn' => '3', + 'e_date' => '01.01.2014', + 'e_ech' => '', + 'e_client' => 'IMMOB', + 'e_pj' => 'ACH2', + 'e_pj_suggest' => 'ACH2', + 'e_comm' => 'Paiement loyer', + 'e_march0' => 'LOYER', + 'e_march0_price' => '2560.0000', + 'e_quant0' => '1.0000', + 'htva_march0' => '2560', + 'e_march0_tva_id' => '4', + 'e_march0_tva_amount' => '0', + 'tva_march0' => '0', + 'tvac_march0' => '2560', + 'e_march1' => '', + 'e_march1_price' => '', + 'e_quant1' => '1', + 'htva_march1' => '0', + 'e_march1_tva_id' => '', + 'e_march1_tva_amount' => '', + 'tva_march1' => '0', + 'tvac_march1' => '0', + 'e_march2' => '', + 'e_march2_price' => '', + 'e_quant2' => '1', + 'htva_march2' => '0', + 'e_march2_tva_id' => '', + 'e_march2_tva_amount' => '', + 'tva_march2' => '0', + 'tvac_march2' => '0', + 'e_march3' => '', + 'e_march3_price' => '', + 'e_quant3' => '1', + 'htva_march3' => '0', + 'e_march3_tva_id' => '', + 'e_march3_tva_amount' => '', + 'tva_march3' => '0', + 'tvac_march3' => '0', + 'e_march4' => '', + 'e_march4_price' => '', + 'e_quant4' => '1', + 'htva_march4' => '0', + 'e_march4_tva_id' => '', + 'e_march4_tva_amount' => '', + 'tva_march4' => '0', + 'tvac_march4' => '0', + 'e_march5' => '', + 'e_march5_price' => '', + 'e_quant5' => '1', + 'htva_march5' => '0', + 'e_march5_tva_id' => '', + 'e_march5_tva_amount' => '', + 'tva_march5' => '0', + 'tvac_march5' => '0', + 'e_march6' => '', + 'e_march6_price' => '', + 'e_quant6' => '1', + 'htva_march6' => '0', + 'e_march6_tva_id' => '', + 'e_march6_tva_amount' => '', + 'tva_march6' => '0', + 'tvac_march6' => '0', + 'e_march7' => '', + 'e_march7_price' => '', + 'e_quant7' => '1', + 'htva_march7' => '0', + 'e_march7_tva_id' => '', + 'e_march7_tva_amount' => '', + 'tva_march7' => '0', + 'tvac_march7' => '0', + 'e_march8' => '', + 'e_march8_price' => '', + 'e_quant8' => '1', + 'htva_march8' => '0', + 'e_march8_tva_id' => '', + 'e_march8_tva_amount' => '', + 'tva_march8' => '0', + 'tvac_march8' => '0', + 'e_march9' => '', + 'e_march9_price' => '', + 'e_quant9' => '1', + 'htva_march9' => '0', + 'e_march9_tva_id' => '', + 'e_march9_tva_amount' => '', + 'tva_march9' => '0', + 'tvac_march9' => '0', + 'jrn_type' => 'ACH', + 'e_mp' => '0', + 'view_invoice' => 'Enregistrer', +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'compta_ach.inc.php'; diff --git a/scenario/scenario-1415995277.php b/scenario/scenario-1415995277.php new file mode 100644 index 000000000..64dc92465 --- /dev/null +++ b/scenario/scenario-1415995277.php @@ -0,0 +1,108 @@ + '3', + 'ac' => 'COMPTA/MENUACH/ACH', + 'gDossier' => '42', + 'pre_def' => '1', +); +$_POST=array ( + 'gDossier' => '42', + 'nb_item' => '10', + 'p_jrn' => '3', + 'e_date' => '01.02.2014', + 'e_ech' => '', + 'e_client' => 'IMMOB', + 'e_pj' => 'ACH2', + 'e_pj_suggest' => 'ACH2', + 'e_comm' => 'Paiement loyer', + 'e_march0' => 'LOYER', + 'e_march0_price' => '2560.0000', + 'e_quant0' => '1.0000', + 'htva_march0' => '2560', + 'e_march0_tva_id' => '4', + 'e_march0_tva_amount' => '0', + 'tva_march0' => '0', + 'tvac_march0' => '2560', + 'e_march1' => '', + 'e_march1_price' => '', + 'e_quant1' => '1', + 'htva_march1' => '0', + 'e_march1_tva_id' => '', + 'e_march1_tva_amount' => '', + 'tva_march1' => '0', + 'tvac_march1' => '0', + 'e_march2' => '', + 'e_march2_price' => '', + 'e_quant2' => '1', + 'htva_march2' => '0', + 'e_march2_tva_id' => '', + 'e_march2_tva_amount' => '', + 'tva_march2' => '0', + 'tvac_march2' => '0', + 'e_march3' => '', + 'e_march3_price' => '', + 'e_quant3' => '1', + 'htva_march3' => '0', + 'e_march3_tva_id' => '', + 'e_march3_tva_amount' => '', + 'tva_march3' => '0', + 'tvac_march3' => '0', + 'e_march4' => '', + 'e_march4_price' => '', + 'e_quant4' => '1', + 'htva_march4' => '0', + 'e_march4_tva_id' => '', + 'e_march4_tva_amount' => '', + 'tva_march4' => '0', + 'tvac_march4' => '0', + 'e_march5' => '', + 'e_march5_price' => '', + 'e_quant5' => '1', + 'htva_march5' => '0', + 'e_march5_tva_id' => '', + 'e_march5_tva_amount' => '', + 'tva_march5' => '0', + 'tvac_march5' => '0', + 'e_march6' => '', + 'e_march6_price' => '', + 'e_quant6' => '1', + 'htva_march6' => '0', + 'e_march6_tva_id' => '', + 'e_march6_tva_amount' => '', + 'tva_march6' => '0', + 'tvac_march6' => '0', + 'e_march7' => '', + 'e_march7_price' => '', + 'e_quant7' => '1', + 'htva_march7' => '0', + 'e_march7_tva_id' => '', + 'e_march7_tva_amount' => '', + 'tva_march7' => '0', + 'tvac_march7' => '0', + 'e_march8' => '', + 'e_march8_price' => '', + 'e_quant8' => '1', + 'htva_march8' => '0', + 'e_march8_tva_id' => '', + 'e_march8_tva_amount' => '', + 'tva_march8' => '0', + 'tvac_march8' => '0', + 'e_march9' => '', + 'e_march9_price' => '', + 'e_quant9' => '1', + 'htva_march9' => '0', + 'e_march9_tva_id' => '', + 'e_march9_tva_amount' => '', + 'tva_march9' => '0', + 'tvac_march9' => '0', + 'jrn_type' => 'ACH', + 'p_action' => 'ach', + 'sa' => 'p', + 'e_mp' => '0', + 'view_invoice' => 'Enregistrer', +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'compta_ach.inc.php'; diff --git a/scenario/scenario-1415995285.php b/scenario/scenario-1415995285.php new file mode 100644 index 000000000..d8dd41afb --- /dev/null +++ b/scenario/scenario-1415995285.php @@ -0,0 +1,11 @@ + '42', + 'ac' => 'COMPTA/MENUFIN', +); +$_POST=array ( +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); diff --git a/scenario/scenario-1415995301.php b/scenario/scenario-1415995301.php new file mode 100644 index 000000000..079f79157 --- /dev/null +++ b/scenario/scenario-1415995301.php @@ -0,0 +1,14 @@ + '42', + 'ac' => 'PARAM/CFGLED', + 'sa' => 'detail', + 'p_jrn' => '1', +); +$_POST=array ( +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'cfgledger.inc.php'; diff --git a/scenario/scenario-1415995308.php b/scenario/scenario-1415995308.php new file mode 100644 index 000000000..fa5bf186c --- /dev/null +++ b/scenario/scenario-1415995308.php @@ -0,0 +1,33 @@ + '42', + 'ac' => 'PARAM/CFGLED', + 'sa' => 'detail', + 'p_jrn' => '1', +); +$_POST=array ( + 'p_jrn' => '1', + 'sa' => 'detail', + 'gDossier' => '42', + 'p_jrn_deb_max_line' => '10', + 'p_ech_lib' => 'echeance', + 'p_jrn_type' => 'FIN', + 'p_jrn_name' => 'Financier', + 'bank' => 'BQ', + 'min_row' => '5', + 'jrn_def_pj_pref' => 'FIN', + 'jrn_def_pj_seq' => '0', + 'p_description' => 'Concerne tous les mouvements financiers (comptes en banque, caisses, visa...)', + 'FICHEDEB' => + array ( + 0 => '3', + 1 => '2', + 2 => '4', + ), + 'update' => 'Sauve', +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'cfgledger.inc.php'; diff --git a/scenario/scenario-1415995317.php b/scenario/scenario-1415995317.php new file mode 100644 index 000000000..9238ff0af --- /dev/null +++ b/scenario/scenario-1415995317.php @@ -0,0 +1,12 @@ + '42', + 'ac' => 'COMPTA/MENUFIN/FIN', +); +$_POST=array ( +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'compta_fin.inc.php'; diff --git a/scenario/scenario-1415995350.php b/scenario/scenario-1415995350.php new file mode 100644 index 000000000..f41c47f36 --- /dev/null +++ b/scenario/scenario-1415995350.php @@ -0,0 +1,54 @@ + '42', + 'ac' => 'COMPTA/MENUFIN/FIN', +); +$_POST=array ( + 'ledger_type' => 'fin', + 'ac' => 'COMPTA/MENUFIN/FIN', + 'gDossier' => '42', + 'nb_item' => '5', + 'chdate' => '1', + 'e_date' => '02.01.2014', + 'p_jrn' => '1', + 'e_pj' => 'FIN1', + 'e_pj_suggest' => 'FIN1', + 'first_sold' => '0', + 'last_sold' => '', + 'dateop0' => '', + 'e_other0' => 'IMMOB ', + 'e_other_name0' => 'Immo Bureau', + 'e_other0_comment' => '', + 'e_other0_amount' => '2560', + 'e_concerned0' => '2', + 'dateop1' => '', + 'e_other1' => '', + 'e_other_name1' => '', + 'e_other1_comment' => '', + 'e_other1_amount' => '0', + 'e_concerned1' => '', + 'dateop2' => '', + 'e_other2' => '', + 'e_other_name2' => '', + 'e_other2_comment' => '', + 'e_other2_amount' => '0', + 'e_concerned2' => '', + 'dateop3' => '', + 'e_other3' => '', + 'e_other_name3' => '', + 'e_other3_comment' => '', + 'e_other3_amount' => '0', + 'e_concerned3' => '', + 'dateop4' => '', + 'e_other4' => '', + 'e_other_name4' => '', + 'e_other4_comment' => '', + 'e_other4_amount' => '0', + 'e_concerned4' => '', + 'save' => 'Sauve', +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'compta_fin.inc.php'; diff --git a/scenario/scenario-1415995352.php b/scenario/scenario-1415995352.php new file mode 100644 index 000000000..5abb0c940 --- /dev/null +++ b/scenario/scenario-1415995352.php @@ -0,0 +1,50 @@ + '42', + 'ac' => 'COMPTA/MENUFIN/FIN', +); +$_POST=array ( + 'ac' => 'COMPTA/MENUFIN/FIN', + 'gDossier' => '42', + 'p_jrn' => '1', + 'nb_item' => '5', + 'last_sold' => '', + 'first_sold' => '0', + 'e_pj' => 'FIN1', + 'e_pj_suggest' => 'FIN1', + 'e_date' => '02.01.2014', + 'mt' => '1415995351.0398', + 'sa' => 'n', + 'e_other0' => 'IMMOB ', + 'e_other0_comment' => '', + 'e_other0_amount' => '2560', + 'e_concerned0' => '2', + 'dateop0' => '', + 'chdate' => '1', + 'e_other1' => '', + 'e_other1_comment' => '', + 'e_other1_amount' => '0', + 'e_concerned1' => '', + 'dateop1' => '', + 'e_other2' => '', + 'e_other2_comment' => '', + 'e_other2_amount' => '0', + 'e_concerned2' => '', + 'dateop2' => '', + 'e_other3' => '', + 'e_other3_comment' => '', + 'e_other3_amount' => '0', + 'e_concerned3' => '', + 'dateop3' => '', + 'e_other4' => '', + 'e_other4_comment' => '', + 'e_other4_amount' => '0', + 'e_concerned4' => '', + 'dateop4' => '', + 'confirm' => 'Confirmer', +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'compta_fin.inc.php'; diff --git a/scenario/scenario-1415995357.php b/scenario/scenario-1415995357.php new file mode 100644 index 000000000..925c69ad9 --- /dev/null +++ b/scenario/scenario-1415995357.php @@ -0,0 +1,12 @@ + '42', + 'ac' => 'COMPTA/MENUODS/ODS', +); +$_POST=array ( +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'compta_ods.inc.php'; diff --git a/scenario/scenario-1415995424.php b/scenario/scenario-1415995424.php new file mode 100644 index 000000000..d028bad94 --- /dev/null +++ b/scenario/scenario-1415995424.php @@ -0,0 +1,12 @@ + '42', + 'ac' => 'PARAM/CFGPCMN', +); +$_POST=array ( +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'param_pcmn.inc.php'; diff --git a/scenario/scenario-1415995434.php b/scenario/scenario-1415995434.php new file mode 100644 index 000000000..d698b1320 --- /dev/null +++ b/scenario/scenario-1415995434.php @@ -0,0 +1,19 @@ + '42', + 'ac' => 'PARAM/CFGPCMN', +); +$_POST=array ( + 'p_action' => 'pcmn', + 'gDossier' => '42', + 'p_val' => '4519', + 'p_lib' => 'Compte TVA', + 'p_parent' => '451', + 'p_type' => 'ACT', + 'Ajout' => 'Ajout', +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'param_pcmn.inc.php'; diff --git a/scenario/scenario-1415995437.php b/scenario/scenario-1415995437.php new file mode 100644 index 000000000..4675ee822 --- /dev/null +++ b/scenario/scenario-1415995437.php @@ -0,0 +1,13 @@ + 'PARAM/CFGPCMN', + 'p_start' => '4', + 'gDossier' => '42', +); +$_POST=array ( +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'param_pcmn.inc.php'; diff --git a/scenario/scenario-1415995449.php b/scenario/scenario-1415995449.php new file mode 100644 index 000000000..98fdd20fd --- /dev/null +++ b/scenario/scenario-1415995449.php @@ -0,0 +1,20 @@ + 'PARAM/CFGPCMN', + 'p_start' => '4', + 'gDossier' => '42', +); +$_POST=array ( + 'p_valu' => '4519', + 'p_libu' => 'Compte TVA', + 'p_parentu' => '451', + 'p_typeu' => 'PAS', + 'p_oldu' => '4519', + 'gDossier' => '42', + 'update' => 'Sauve', +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'param_pcmn.inc.php'; diff --git a/scenario/scenario-1415995545.php b/scenario/scenario-1415995545.php new file mode 100644 index 000000000..4c503059f --- /dev/null +++ b/scenario/scenario-1415995545.php @@ -0,0 +1,12 @@ + '42', + 'ac' => 'PARAM/COMPANY', +); +$_POST=array ( +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'company.inc.php'; diff --git a/scenario/scenario-1415995575.php b/scenario/scenario-1415995575.php new file mode 100644 index 000000000..41a7e8110 --- /dev/null +++ b/scenario/scenario-1415995575.php @@ -0,0 +1,32 @@ + '42', + 'ac' => 'PARAM/COMPANY', +); +$_POST=array ( + 'gDossier' => '42', + 'p_name' => 'NOALYSS', + 'p_tel' => '', + 'p_fax' => '', + 'p_street' => 'Rue de l\'espoir', + 'p_no' => '14', + 'p_cp' => '1090', + 'p_Commune' => 'Jette', + 'p_pays' => 'Belgique', + 'p_tva' => 'BE99999999', + 'p_compta' => 'nu', + 'p_stock' => 'N', + 'p_strict' => 'Y', + 'p_tva_use' => 'Y', + 'p_pj' => 'Y', + 'p_date_suggest' => 'Y', + 'p_check_periode' => 'N', + 'p_alphanum' => 'N', + 'p_updlab' => 'N', + 'record_company' => 'Sauve', +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'company.inc.php'; diff --git a/scenario/scenario-1415996970.php b/scenario/scenario-1415996970.php new file mode 100644 index 000000000..335ec53ff --- /dev/null +++ b/scenario/scenario-1415996970.php @@ -0,0 +1,44 @@ + '42', + 'ac' => 'COMPTA/MENUODS/ODS', +); +$_POST=array ( + 'gDossier' => '42', + 'ac' => 'COMPTA/MENUODS/ODS', + 'p_jrn' => '4', + 'e_date' => '14.11.2014', + 'e_pj' => 'ODS1', + 'e_pj_suggest' => 'ODS1', + 'desc' => 'TVA', + 'nb_item' => '5', + 'jrn_type' => 'ODS', + 'qc_0' => '', + 'poste0' => '4519', + 'ld0' => 'Compte TVA', + 'amount0' => '250', + 'qc_1' => '', + 'poste1' => '6700', + 'ld1' => 'Paiement TVA', + 'amount1' => '250', + 'ck1' => '', + 'qc_2' => '', + 'poste2' => '', + 'ld2' => '', + 'amount2' => '', + 'qc_3' => '', + 'poste3' => '', + 'ld3' => '', + 'amount3' => '', + 'qc_4' => '', + 'poste4' => '', + 'ld4' => '', + 'amount4' => '', + 'jrn_concerned' => '', + 'summary' => 'Sauvez', +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'compta_ods.inc.php'; diff --git a/scenario/scenario-1415996980.php b/scenario/scenario-1415996980.php new file mode 100644 index 000000000..0868b2879 --- /dev/null +++ b/scenario/scenario-1415996980.php @@ -0,0 +1,35 @@ + '42', + 'ac' => 'COMPTA/MENUODS/ODS', +); +$_POST=array ( + 'ac' => 'COMPTA/MENUODS/ODS', + 'e_date' => '14.11.2014', + 'desc' => 'TVA', + 'period' => '102', + 'e_pj' => 'ODS1', + 'e_pj_suggest' => 'ODS1', + 'mt' => '1415996970.8822', + 'e_comm' => 'TVA', + 'jrn_type' => 'ODS', + 'p_jrn' => '4', + 'nb_item' => '5', + 'jrn_concerned' => '', + 'gDossier' => '42', + 'poste0' => '4519', + 'ld0' => 'Compte TVA', + 'amount0' => '250', + 'poste1' => '6700', + 'ld1' => 'Paiement TVA', + 'amount1' => '250', + 'ck1' => '', + 'opd_name' => 'Paiement TVA', + 'od_description' => '', + 'save' => 'Confirmer', +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'compta_ods.inc.php'; diff --git a/scenario/scenario-1415997148.php b/scenario/scenario-1415997148.php new file mode 100644 index 000000000..a3ecb3694 --- /dev/null +++ b/scenario/scenario-1415997148.php @@ -0,0 +1,12 @@ + '42', + 'ac' => 'ODS', + 'go' => 'aller', +); +$_POST=array ( +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); diff --git a/scenario/scenario-1415997352.php b/scenario/scenario-1415997352.php new file mode 100644 index 000000000..7187c9627 --- /dev/null +++ b/scenario/scenario-1415997352.php @@ -0,0 +1,44 @@ + '42', + 'ac' => 'COMPTA/MENUODS/ODS', +); +$_POST=array ( + 'gDossier' => '42', + 'ac' => 'COMPTA/MENUODS/ODS', + 'p_jrn' => '4', + 'e_date' => '14.11.2014', + 'e_pj' => 'ODS1', + 'e_pj_suggest' => 'ODS1', + 'desc' => 'TVA', + 'nb_item' => '5', + 'jrn_type' => 'ODS', + 'qc_0' => '', + 'poste0' => '4519', + 'ld0' => 'Compte TVA', + 'amount0' => '250', + 'qc_1' => '', + 'poste1' => '6700', + 'ld1' => 'Paiement TVA', + 'amount1' => '250', + 'ck1' => '', + 'qc_2' => '', + 'poste2' => '', + 'ld2' => '', + 'amount2' => '', + 'qc_3' => '', + 'poste3' => '', + 'ld3' => '', + 'amount3' => '', + 'qc_4' => '', + 'poste4' => '', + 'ld4' => '', + 'amount4' => '', + 'jrn_concerned' => '', + 'summary' => 'Sauvez', +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'compta_ods.inc.php'; diff --git a/scenario/scenario-1415997358.php b/scenario/scenario-1415997358.php new file mode 100644 index 000000000..97135d13c --- /dev/null +++ b/scenario/scenario-1415997358.php @@ -0,0 +1,35 @@ + '42', + 'ac' => 'COMPTA/MENUODS/ODS', +); +$_POST=array ( + 'ac' => 'COMPTA/MENUODS/ODS', + 'e_date' => '14.11.2014', + 'desc' => 'TVA', + 'period' => '102', + 'e_pj' => 'ODS1', + 'e_pj_suggest' => 'ODS1', + 'mt' => '1415997352.5804', + 'e_comm' => 'TVA', + 'jrn_type' => 'ODS', + 'p_jrn' => '4', + 'nb_item' => '5', + 'jrn_concerned' => '', + 'gDossier' => '42', + 'poste0' => '4519', + 'ld0' => 'Compte TVA', + 'amount0' => '250', + 'poste1' => '6700', + 'ld1' => 'Paiement TVA', + 'amount1' => '250', + 'ck1' => '', + 'opd_name' => 'Paiement TVA', + 'od_description' => '', + 'save' => 'Confirmer', +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'compta_ods.inc.php'; diff --git a/scenario/scenario-1415997389.php b/scenario/scenario-1415997389.php new file mode 100644 index 000000000..b08f80102 --- /dev/null +++ b/scenario/scenario-1415997389.php @@ -0,0 +1,12 @@ + '42', + 'ac' => 'COMPTA/MENUODS/ODS', +); +$_POST=array ( +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'compta_ods.inc.php'; diff --git a/scenario/scenario-1415997404.php b/scenario/scenario-1415997404.php new file mode 100644 index 000000000..52244f92d --- /dev/null +++ b/scenario/scenario-1415997404.php @@ -0,0 +1,67 @@ + 'use_opd', + 'p_jrn_predef' => '4', + 'ac' => 'COMPTA/MENUODS/ODS', + 'gDossier' => '42', + 'pre_def' => '2', +); +$_POST=array ( + 'gDossier' => '42', + 'ac' => 'COMPTA/MENUODS/ODS', + 'p_jrn' => '4', + 'e_date' => '14.11.2014', + 'e_pj' => 'ODS4', + 'e_pj_suggest' => 'ODS4', + 'desc' => 'Paiement TVA', + 'nb_item' => '10', + 'jrn_type' => 'ODS', + 'qc_0' => '', + 'poste0' => '4519', + 'ld0' => 'Compte TVA', + 'amount0' => '250.0000', + 'qc_1' => '', + 'poste1' => '6700', + 'ld1' => 'Impôts et précomptes dus ou versés', + 'amount1' => '250.0000', + 'ck1' => '', + 'qc_2' => '', + 'poste2' => '', + 'ld2' => '', + 'amount2' => '', + 'qc_3' => '', + 'poste3' => '', + 'ld3' => '', + 'amount3' => '', + 'qc_4' => '', + 'poste4' => '', + 'ld4' => '', + 'amount4' => '', + 'qc_5' => '', + 'poste5' => '', + 'ld5' => '', + 'amount5' => '', + 'qc_6' => '', + 'poste6' => '', + 'ld6' => '', + 'amount6' => '', + 'qc_7' => '', + 'poste7' => '', + 'ld7' => '', + 'amount7' => '', + 'qc_8' => '', + 'poste8' => '', + 'ld8' => '', + 'amount8' => '', + 'qc_9' => '', + 'poste9' => '', + 'ld9' => '', + 'amount9' => '', + 'jrn_concerned' => '', + 'summary' => 'Sauvez', +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'compta_ods.inc.php'; diff --git a/scenario/scenario-1415997407.php b/scenario/scenario-1415997407.php new file mode 100644 index 000000000..cee4af697 --- /dev/null +++ b/scenario/scenario-1415997407.php @@ -0,0 +1,38 @@ + 'use_opd', + 'p_jrn_predef' => '4', + 'ac' => 'COMPTA/MENUODS/ODS', + 'gDossier' => '42', + 'pre_def' => '2', +); +$_POST=array ( + 'ac' => 'COMPTA/MENUODS/ODS', + 'e_date' => '14.11.2014', + 'desc' => 'Paiement TVA', + 'period' => '102', + 'e_pj' => 'ODS4', + 'e_pj_suggest' => 'ODS4', + 'mt' => '1415997404.8993', + 'e_comm' => 'Paiement TVA', + 'jrn_type' => 'ODS', + 'p_jrn' => '4', + 'nb_item' => '10', + 'jrn_concerned' => '', + 'gDossier' => '42', + 'poste0' => '4519', + 'ld0' => 'Compte TVA', + 'amount0' => '250.0000', + 'poste1' => '6700', + 'ld1' => 'Impôts et précomptes dus ou versés', + 'amount1' => '250.0000', + 'ck1' => '', + 'opd_name' => '', + 'od_description' => '', + 'save' => 'Confirmer', +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'compta_ods.inc.php'; diff --git a/scenario/scenario-1415997877.php b/scenario/scenario-1415997877.php new file mode 100644 index 000000000..0bf739713 --- /dev/null +++ b/scenario/scenario-1415997877.php @@ -0,0 +1,12 @@ + '42', + 'ac' => 'COMPTA/MENUACH/ACHISTO', +); +$_POST=array ( +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'history_operation.inc.php'; diff --git a/scenario/scenario-1415997886.php b/scenario/scenario-1415997886.php new file mode 100644 index 000000000..55677039c --- /dev/null +++ b/scenario/scenario-1415997886.php @@ -0,0 +1,12 @@ + '42', + 'ac' => 'COMPTA/MENUFIN/FIHISTO', +); +$_POST=array ( +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'history_operation.inc.php'; diff --git a/scenario/scenario-1415997889.php b/scenario/scenario-1415997889.php new file mode 100644 index 000000000..a5a4dc684 --- /dev/null +++ b/scenario/scenario-1415997889.php @@ -0,0 +1,12 @@ + '42', + 'ac' => 'COMPTA/MENUFIN/FSALDO', +); +$_POST=array ( +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'compta_fin_saldo.inc.php'; diff --git a/scenario/scenario-1415998124.php b/scenario/scenario-1415998124.php new file mode 100644 index 000000000..cfe280368 --- /dev/null +++ b/scenario/scenario-1415998124.php @@ -0,0 +1,13 @@ + '42', + 'ac' => 'COMPTA/MENUACH/ACHISTO', + 'go' => 'aller', +); +$_POST=array ( +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'history_operation.inc.php'; diff --git a/scenario/scenario-1415998134.php b/scenario/scenario-1415998134.php new file mode 100644 index 000000000..3c57dbf47 --- /dev/null +++ b/scenario/scenario-1415998134.php @@ -0,0 +1,13 @@ + '42', + 'ac' => 'COMPTA/VENMENU/VEHISTO', + 'go' => 'aller', +); +$_POST=array ( +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'history_operation.inc.php'; diff --git a/scenario/scenario-1415998146.php b/scenario/scenario-1415998146.php new file mode 100644 index 000000000..4c84df0da --- /dev/null +++ b/scenario/scenario-1415998146.php @@ -0,0 +1,13 @@ + '42', + 'ac' => 'COMPTA/MENUODS/ODHISTO', + 'go' => 'aller', +); +$_POST=array ( +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'history_operation.inc.php'; From e8b5d52db7c1a9da45b7d00f6f37229b4af0f065 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sat, 15 Nov 2014 02:23:02 +0100 Subject: [PATCH 068/119] =?UTF-8?q?Task=20#1045=20-=20Am=C3=A9lioration=20?= =?UTF-8?q?apparence=20=20:=20Position=20nouvelle=20fiche?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/js/card.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/js/card.js b/html/js/card.js index ba7c2ebd9..583d1da5c 100644 --- a/html/js/card.js +++ b/html/js/card.js @@ -510,7 +510,7 @@ function dis_blank_card(obj) ref='&ref'; } var content='div_new_card'; - var nTop=calcy(30); + var nTop=calcy(150); var nLeft=posX; var str_style="top:"+nTop+"px;right:"+nLeft+"px;height:auto"; From 0b4ecc56a7475376aa589bd12567b71b2dc40904 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sat, 15 Nov 2014 17:04:09 +0100 Subject: [PATCH 069/119] Task #1044 - Implementation de Test Test files : ajout ajax --- html/ajax_card.php | 28 +++++++-- html/ajax_history.php | 29 ++++++++-- html/ajax_ledger.php | 22 ++++++- html/ajax_misc.php | 21 ++++++- html/ajax_poste.php | 22 ++++++- html/test.php | 131 ++++++++++++++++++++++-------------------- 6 files changed, 179 insertions(+), 74 deletions(-) diff --git a/html/ajax_card.php b/html/ajax_card.php index ed34e2336..00a21f041 100644 --- a/html/ajax_card.php +++ b/html/ajax_card.php @@ -53,7 +53,7 @@ * - ref if we want to refresh the window *\see fiche fiche::Save constant.php */ -define ('ALLOWED',1); +if ( ! defined('ALLOWED')) define ('ALLOWED',1); require_once '../include/constant.php'; require_once('class_database.php'); @@ -94,6 +94,24 @@ $g_user=new User($cn); $g_user->check(true); $g_user->check_dossier($gDossier,true); $html=var_export($_REQUEST,true); +if ( LOGINPUT) + { + $file_loginput=fopen($_ENV['TMP'].'/scenario-'.$_SERVER['REQUEST_TIME'].'.php','a+'); + fwrite ($file_loginput," $ctl -$html +$xml EOF; diff --git a/html/ajax_history.php b/html/ajax_history.php index cf2169e53..3ff482c67 100644 --- a/html/ajax_history.php +++ b/html/ajax_history.php @@ -23,6 +23,8 @@ * \brief show the history of a card of an accounting * for the card f_id is set and for an accounting : pcm_val */ +if ( ! defined('ALLOWED')) define ('ALLOWED',1); + require_once '../include/constant.php'; require_once('class_database.php'); require_once('class_user.php'); @@ -33,7 +35,6 @@ require_once('class_acc_account.php'); require_once('class_exercice.php'); $div=$_REQUEST['div']; mb_internal_encoding("UTF-8"); -define ('ALLOWED',1); /** *if $_SESSION['g_user'] is not set : echo a warning @@ -46,7 +47,24 @@ $g_user=new User($cn); if ( $g_user->check_dossier(dossier::id(),true) == 'X' ) exit(); $from_div = (isset($_REQUEST['ajax'])) ? 1 : $_GET['l']; - +if ( LOGINPUT) + { + $file_loginput=fopen($_ENV['TMP'].'/scenario-'.$_SERVER['REQUEST_TIME'].'.php','a+'); + fwrite ($file_loginput," $div -$html +$xml EOF; diff --git a/html/ajax_ledger.php b/html/ajax_ledger.php index a28aa3ac6..2c319c75e 100644 --- a/html/ajax_ledger.php +++ b/html/ajax_ledger.php @@ -28,7 +28,8 @@ - for reconcialiation - update of analytic content */ -define ('ALLOWED',1); +if ( ! defined('ALLOWED')) define ('ALLOWED',1); + require_once '../include/constant.php'; require_once('class_database.php'); require_once('class_user.php'); @@ -63,7 +64,24 @@ ajax_disconnected($div); $cn=new Database(dossier::id()); $g_parameter=new Own($cn); - +if ( LOGINPUT) + { + $file_loginput=fopen($_ENV['TMP'].'/scenario-'.$_SERVER['REQUEST_TIME'].'.php','a+'); + fwrite ($file_loginput,"0) { } $html = var_export($_REQUEST, true); +if ( LOGINPUT) + { + $file_loginput=fopen($_ENV['TMP'].'/scenario-'.$_SERVER['REQUEST_TIME'].'.php','a+'); + fwrite ($file_loginput,"Check(); if ($g_user->check_dossier(dossier::id()) == 'X') exit(); $xml=""; - +if ( LOGINPUT) + { + $file_loginput=fopen($_ENV['TMP'].'/scenario-'.$_SERVER['REQUEST_TIME'].'.php','a+'); + fwrite ($file_loginput,"Test NOALYSS"; - /* - * cherche pour fichier a include, s'il y en a alors les affiche - * avec une description - */ - $scan=scandir('../scenario/'); - $max=count($scan); - echo '
    '; - $get='test.php?'.http_build_query(array('script'=>"all", 'gDossier'=>$gDossierLogInput, 'description'=>"Tous les scripts")); - echo ''; - echo ''; - echo ''; - echo ''; +/* + * Loading of all scenario + */ +$scan=scandir('../scenario/'); +$maxscan=count($scan); +$cnt_scenario=0;$scenario=array(); - for ($e=0; $e<$max; $e++) - { - if (is_file('../scenario/'.$scan[$e])&&strpos($scan[$e], '.php')==true) - { - $description=""; - $a_description=file('../scenario/'.$scan[$e]); - $max_description=count($a_description); - for ($w=0; $w<$max_description; $w++) - { - if (strpos($a_description[$w], '@description:')==true) - { - $description=$a_description[$w]; - $description=str_replace('//@description:', '', $description); - } - } - $get='test.php?'.http_build_query(array('script'=>$scan[$e], 'gDossier'=>$gDossierLogInput, 'description'=>$description)); - echo ''; - echo ''; - echo ''; - echo ''; - } - } - echo '
    '; - echo ''; - echo "Tous "; - echo ''; - echo 'Tous les scripts
    '; - echo ''; - echo $scan[$e]; - echo ''; - echo ''.$description.'
    '; -} -else if ($script=='all') -{ - $scan=scandir('../scenario/'); - $maxscan=count($scan); - - echo ''; - for ($e_scan=0; $e_scan<$maxscan; $e_scan++) +for ($e_scan=0; $e_scan<$maxscan; $e_scan++) { if (is_file('../scenario/'.$scan[$e_scan])&&strpos($scan[$e_scan], '.php')==true) { @@ -129,13 +81,64 @@ else if ($script=='all') $description=str_replace('//@description:', '', $description); } } + $scenario[$cnt_scenario]['file']=$scan[$e_scan]; + $scenario[$cnt_scenario]['desc']=$description; + $cnt_scenario++; + + + } + } +$script=HtmlInput::default_value_get('script', ''); +if ($script=="") +{ + echo "

    Test NOALYSS

    "; + /* + * cherche pour fichier a include, s'il y en a alors les affiche + * avec une description + */ + + + echo '
    '; + $get='test.php?'.http_build_query(array('script'=>"all", 'gDossier'=>$gDossierLogInput, 'description'=>"Tous les scripts")); + echo ''; + echo ''; + echo ''; + echo ''; + + for ($e=0; $e<$cnt_scenario; $e++) + { + + $get='test.php?'.http_build_query(array('script'=>$scenario[$e]['file'], 'gDossier'=>$gDossierLogInput, 'description'=>$scenario[$e]['desc'])); + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + + } + echo '
    '; + echo ''; + echo "Tous "; + echo ''; + echo 'Tous les scripts
    '; + echo $e; + echo ''; + echo ''; + echo $scenario[$e]['file']; + echo ''; + echo ''.$scenario[$e]['desc'].'
    '; +} +else if ($script=='all') +{ + $nb=HtmlInput::default_value_get('nb_script', 0); + $start_mem=memory_get_usage(); $start_time=microtime(true); $script=str_replace('../', '', $script); - - echo '

    '.$script."

    "; - echo '

    description = '.$description.'

    '; - include '../scenario/'.$scan[$e_scan]; + + echo '

    '.$nb." ".$scenario[$nb]['file']."

    "; + echo '

    description = '.$scenario[$nb]["desc"].'

    '; + include '../scenario/'.$scenario[$nb]['file']; echo ''; echo ''; $end_mem=memory_get_usage(); @@ -150,8 +153,14 @@ else if ($script=='all') echo "

    Diff = ".(round(($end_mem-$start_mem)/1024/1024, 2))." Mbytes "; echo '

    '; echo "

    Execution script ".$script." time = ".(round(($end_time-$start_time), 4))." secondes

    "; - } - } + $nb++; + if ( $nb == $maxscan ) { + echo "Dernier test"; + } else { + $get='test.php?'.http_build_query(array('script'=>"all", 'gDossier'=>$gDossierLogInput, 'nb_script'=>$nb)); + echo '
    '; + echo $scenario[$nb]['file']; + } } else { From 54906579d9c6282fccc71361f59761f327d02594 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sat, 15 Nov 2014 17:07:06 +0100 Subject: [PATCH 070/119] Task #1044 - Implementation de Test Test files : ajout ajax --- scenario/scenario-ajax-add-card.php | 30 +++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 scenario/scenario-ajax-add-card.php diff --git a/scenario/scenario-ajax-add-card.php b/scenario/scenario-ajax-add-card.php new file mode 100644 index 000000000..a6e7b7c98 --- /dev/null +++ b/scenario/scenario-ajax-add-card.php @@ -0,0 +1,30 @@ + '42', + 'ctl' => 'div_new_card', + 'fd_id' => '3', + 'av_text1' => 'caisse', + 'av_text3' => '', + 'av_text4' => '', + 'av_text12' => '', + 'av_text5' => '', + 'av_text5_bt' => 'Recherche', + 'av_text13' => '', + 'av_text14' => '', + 'av_text15' => '', + 'av_text16' => '', + 'av_text17' => '', + 'av_text18' => '', + 'av_text23' => '', + 'sc' => 'Sauve', + 'op' => 'sc', +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); + ini_set('disable_functions', 'exit,die,header'); +include 'ajax_card.php'; +?> From 57af7542d5c4c5eb508798036757e9e77545f8e6 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sat, 15 Nov 2014 18:44:26 +0100 Subject: [PATCH 071/119] =?UTF-8?q?Task=20#1042=20-=20Am=C3=A9lioration=20?= =?UTF-8?q?VERIFBIL=20VERIFBIL=20:=20ajout=20des=20postes=20sans=20fiches?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/verif_bilan.inc.php | 126 ++++++++++++++++++++++++++++-------- 1 file changed, 99 insertions(+), 27 deletions(-) diff --git a/include/verif_bilan.inc.php b/include/verif_bilan.inc.php index f45a6cfba..a41107228 100644 --- a/include/verif_bilan.inc.php +++ b/include/verif_bilan.inc.php @@ -34,25 +34,14 @@ $exercice=$g_user->get_exercice(); echo '
    '; $sql_year=" and j_tech_per in (select p_id from parm_periode where p_exercice='".$g_user->get_exercice()."')"; -echo '
    '._('Vérification des journaux').''; -echo '
      '; -$deb=$cn->get_value("select sum (j_montant) from jrnx where j_debit='t' $sql_year "); -$cred=$cn->get_value("select sum (j_montant) from jrnx where j_debit='f' $sql_year "); - -if ( $cred == $deb ) -{ - $result =$g_succeed; -} -else -{ - $result = $g_failed; -} - -printf ('
    1. '._("Solde Grand Livre : debit %f credit %f %s").'
    2. ',$deb,$cred,$result); +echo '

      '._('Vérification des journaux').'

      '; $sql="select jrn_def_id,jrn_def_name from jrn_def"; $res=$cn->exec_sql($sql); $jrn=Database::fetch_all($res); +echo ''; +echo tr(th(_('Journal')).th(_('Débit'),' style="display:right"').th(_("Crédit"),' style="display:right"').th(_("Différence"),' style="display:right"').th('')); +$ix=0; foreach ($jrn as $l) { $id=$l['jrn_def_id']; @@ -68,30 +57,46 @@ else { $result = $g_failed; } - - printf ('
    3. '._("Journal %s Solde : debit %f credit %f %s").'
    4. ',$name,$deb,$cred,$result); + $class=($ix%2==0)?'odd':"even"; + print tr(td($name).td(nbm($deb),'class="num"').td(nbm($cred),'class="num"').td(nbm($result),'class="num"').td($result),"class=\"$class\""); + $ix++; } -echo ''; -echo ''; -echo '
      '._('Vérification des comptes').''; +$deb=$cn->get_value("select sum (j_montant) from jrnx where j_debit='t' $sql_year "); +$cred=$cn->get_value("select sum (j_montant) from jrnx where j_debit='f' $sql_year "); + +if ( $cred == $deb ) +{ + $result =$g_succeed; +} +else +{ + $result = $g_failed; +} +$class=($ix%2==0)?'odd':"even"; +print tr(td(_('Grand livre')).td(nbm($deb),' class="num"').td(nbm($cred),' class="num"').td(nbm($result),' class="num"') + .td($result),"class=\"$class\""); + +echo '
      '; +echo '
      '; +echo '
      '; +echo '

      '._('Vérification des comptes').'

      '; $bilan=new Acc_Bilan($cn); $periode=new Periode($cn); list ($start_periode,$end_periode)=$periode->get_limit($exercice); $bilan->from=$start_periode->p_id; $bilan->to=$end_periode->p_id; $bilan->verify(); -echo '
    '; echo '
    '; ?>
    -
    - - ';?> - +
    +

    + ';?> +

    - +

    get_exercice()."')"; @@ -108,6 +113,8 @@ echo '
    '; $sql_poste="select distinct j_poste,pcm_lib from jrnx join tmp_pcmn on (pcm_val=j_poste) where j_qcode =$1 $sql_year"; $a_qcode=$cn->get_array($sql_qcode); $res=$cn->prepare('get_poste',$sql_poste); + echo _("Résultat"); + if (count($a_qcode) == 0) { echo " OK $g_succeed";} else { echo " "._('Attention ').$g_failed;} ?>
      '; endfor; ?>
    -
    + +

    +

    + +

    + +get_array($sql_account_used); +$nb_account_used=count ($a_account_used); + if ( $nb_account_used == 0 ) + { + echo _('Résultat')." ".$g_succeed; + } + $ret=$cn->prepare('get_operation',$sql_concerned_operation); + +?> + + +

    + +

    + execute('get_operation',array($a_account_used[$i]['f_id'])); + $a_operation=Database::fetch_all($ret_operation); + $nb_operation=count($a_operation); + ?> + + + + + + + + + +
    + + + + + + + +
    + + \ No newline at end of file From 9462aa10c278ddcb47bd9088635e972390aafe28 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sat, 15 Nov 2014 18:45:06 +0100 Subject: [PATCH 072/119] Task #1044 - Implementation de Test VERIFBIL --- scenario/scenario-verif_bilan.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 scenario/scenario-verif_bilan.php diff --git a/scenario/scenario-verif_bilan.php b/scenario/scenario-verif_bilan.php new file mode 100644 index 000000000..a457b3bae --- /dev/null +++ b/scenario/scenario-verif_bilan.php @@ -0,0 +1,13 @@ + '27', + 'ac' => 'COMPTA/ADV/VERIFBIL', + 'go' => 'aller', +); +$_POST=array ( +); +$_POST['gDossier']=$gDossierLogInput; +$_GET['gDossier']=$gDossierLogInput; + $_REQUEST=array_merge($_GET,$_POST); +include 'verif_bilan.inc.php'; From 256d27974f190ad7f96b3547ebb84c20b956f7c6 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sat, 15 Nov 2014 19:52:32 +0100 Subject: [PATCH 073/119] =?UTF-8?q?Task=20#1045=20-=20Am=C3=A9lioration=20?= =?UTF-8?q?apparence=20=20:=20Apr=C3=A8s=20erreur=20:=20affichage=20dans?= =?UTF-8?q?=20l'=C3=A9cran?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/compta_ach.inc.php | 5 ++++- include/compta_fin.inc.php | 9 ++++++--- include/compta_ods.inc.php | 3 +++ include/compta_ven.inc.php | 10 +++++++--- include/operation_ods_new.inc.php | 4 ++-- 5 files changed, 22 insertions(+), 9 deletions(-) diff --git a/include/compta_ach.inc.php b/include/compta_ach.inc.php index fd2b9a6b4..2bc3b33a8 100644 --- a/include/compta_ach.inc.php +++ b/include/compta_ach.inc.php @@ -43,7 +43,7 @@ if (isset($_REQUEST['p_jrn'])) NoAccess(); exit - 1; } - +$p_msg=""; /* if a new invoice is encoded, we display a form for confirmation */ if (isset($_POST['view_invoice'])) { @@ -55,6 +55,7 @@ if (isset($_POST['view_invoice'])) catch (Exception $e) { alert($e->getMessage()); + $p_msg=$e->getMessage(); $correct = 1; } // if correct is not set it means it is correct @@ -97,6 +98,7 @@ if (isset($_POST['record'])) catch (Exception $e) { alert($e->getMessage()); + $p_msg=$e->getMessage(); $correct = 1; } // record the invoice @@ -186,6 +188,7 @@ echo ''; echo ''; echo '
    '; +echo '

    '.$p_msg.'

    '; echo "
    "; /* request for a predefined operation */ if ( isset($_REQUEST['pre_def']) && !isset($_POST['correct'])) diff --git a/include/compta_fin.inc.php b/include/compta_fin.inc.php index d53be9505..af32c1db0 100644 --- a/include/compta_fin.inc.php +++ b/include/compta_fin.inc.php @@ -57,7 +57,7 @@ if ( isset($_REQUEST['p_jrn']) && ( $jrn_priv == 'X')) NoAccess(); exit -1; } - +$p_msg=""; //---------------------------------------- // Confirm the operations //---------------------------------------- @@ -70,13 +70,14 @@ if ( isset($_POST['save'])) catch (Exception $e) { alert($e->getMessage()); + $p_msg=$e->getMessage(); $correct=1; } if ( ! isset ($correct )) { echo '
    '; - echo h1('Confirmation',''); - echo_warning("Attention, cette opération n'est pas encore sauvée : vous devez encore confirmer"); + echo h1(_('Confirmation'),''); + echo_warning(_("Attention, cette opération n'est pas encore sauvée : vous devez encore confirmer")); echo ''; echo HtmlInput::hidden('ac',$_REQUEST['ac']); echo $Ledger->confirm($_POST); @@ -101,6 +102,7 @@ if ( isset($_POST['confirm'])) catch (Exception $e) { alert($e->getMessage()); + $p_msg=$e->getMessage(); $correct=1; } if ( !isset($correct)) @@ -131,6 +133,7 @@ if ( isset($_POST['correct'])) //---------------------------------------- echo '
    '; +echo '

    '.$p_msg.'

    '; echo ''; echo HtmlInput::hidden('ledger_type','fin'); diff --git a/include/compta_ods.inc.php b/include/compta_ods.inc.php index 1f1d1da2f..0af21c0cd 100644 --- a/include/compta_ods.inc.php +++ b/include/compta_ods.inc.php @@ -61,6 +61,7 @@ if ($g_user->check_jrn($ledger->id) == 'X') NoAccess(); exit - 1; } +$p_msg=""; if (!isset($_POST['summary']) && !isset($_POST['save'])) { require('operation_ods_new.inc.php'); @@ -74,6 +75,7 @@ elseif (isset($_POST['summary'])) } catch (Exception $e) { echo alert($e->getMessage()); + $p_msg=$e->getMessage(); require('operation_ods_new.inc.php'); } @@ -103,6 +105,7 @@ elseif (isset($_POST['save'])) { require('operation_ods_new.inc.php'); alert($e->getMessage()); + $p_msg=$e->getMessage(); } return; } diff --git a/include/compta_ven.inc.php b/include/compta_ven.inc.php index 7a334b378..81c674054 100644 --- a/include/compta_ven.inc.php +++ b/include/compta_ven.inc.php @@ -36,7 +36,7 @@ $cn=new Database(dossier::id()); $str_dossier=dossier::get(); $ac="ac=".$_REQUEST['ac']; global $g_parameter; - +$p_msg=""; //---------------------------------------------------------------------- // Encode a new invoice // empty form for encoding @@ -64,14 +64,15 @@ global $g_parameter; catch (Exception $e) { alert($e->getMessage()); + $p_msg=$e->getMessage(); $correct=1; } // if correct is not set it means it is correct if ( ! isset($correct)) { echo '
    '; - echo h1('Confirmation',''); - echo_warning("Attention, cette opération n'est pas encore sauvée : vous devez encore confirmer"); + echo h1(_("Confirmation"),''); + echo_warning(_("Attention, cette opération n'est pas encore sauvée : vous devez encore confirmer")); echo ''; @@ -187,6 +188,7 @@ echo '
    '; echo '
    '; echo '
    '; + echo '

    '.$p_msg.'

    '; echo ""; /* request for a predefined operation */ if ( isset($_REQUEST['pre_def']) && ! isset($_POST['correct']) ) @@ -234,6 +236,8 @@ echo '
    '; echo ''; } echo '
    '; + + echo HtmlInput::button('act',_('Actualiser'),'onClick="compute_all_ledger();"'); echo HtmlInput::submit("view_invoice",_("Enregistrer")); echo HtmlInput::reset(_('Effacer ')); diff --git a/include/operation_ods_new.inc.php b/include/operation_ods_new.inc.php index ce1e9a40f..b65257a79 100644 --- a/include/operation_ods_new.inc.php +++ b/include/operation_ods_new.inc.php @@ -40,7 +40,7 @@ $ledger->id = ($ledger->id == -1) ? $first_ledger['jrn_def_id'] : $id_ledger; // check if we can write in the ledger if ( $g_user->check_jrn($ledger->id)=='X') { - alert("Vous ne pouvez pas écrire dans ce journal, contacter votre administrateur"); + alert(_("Vous ne pouvez pas écrire dans ce journal, contacter votre administrateur")); return; } echo '
    '; @@ -76,7 +76,7 @@ if ( isset ($_GET['action']) && ! isset($_POST['correct'])) } } - +print '

    '.$p_msg.'

    '; echo ''; echo dossier::hidden(); echo HtmlInput::request_to_hidden(array('ac')); From e7469be0e8aa61a780afc9bc18efd27206d92996 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sat, 15 Nov 2014 19:53:31 +0100 Subject: [PATCH 074/119] Acc_ledger : Arrondi Solde --- include/class_acc_account_ledger.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/class_acc_account_ledger.php b/include/class_acc_account_ledger.php index 230f86bdc..1c6c78874 100644 --- a/include/class_acc_account_ledger.php +++ b/include/class_acc_account_ledger.php @@ -283,7 +283,7 @@ class Acc_Account_Ledger return array('debit'=>$r['sum_deb'], 'credit'=>$r['sum_cred'], - 'solde'=>abs($r['sum_deb']-$r['sum_cred'])); + 'solde'=>abs(bcsub($r['sum_deb'],$r['sum_cred']))); } /*! * \brief isTva tell is a poste is used for VAT From 493009533d64070317a0bd78d4ea83a5d957633e Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sat, 15 Nov 2014 19:53:47 +0100 Subject: [PATCH 075/119] Documentation --- include/class_acc_bilan.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/class_acc_bilan.php b/include/class_acc_bilan.php index a54dce267..9bb0b4808 100644 --- a/include/class_acc_bilan.php +++ b/include/class_acc_bilan.php @@ -86,10 +86,11 @@ class Acc_Bilan $r.= ''; return $r; } - /*!\brief check and warn if an accound has the wrong saldo - * \param $p_message legend of the fieldset - * \param $p_type type of the Acccount ACT actif, ACTINV... - * \param $p_type the saldo must debit or credit + /** + * @brief check and warn if an accound has the wrong saldo + * @param $p_message legend of the fieldset + * @param $p_type type of the Acccount ACT actif, ACTINV... + * @param $p_type the saldo must debit or credit */ private function warning($p_message,$p_type,$p_deb) { @@ -111,7 +112,7 @@ class Acc_Bilan $obj->id=$line['pcm_val']; $solde=$obj->get_solde_detail($sql); - $solde_signed=$solde['debit']-$solde['credit']; + $solde_signed=bcsub($solde['debit'],$solde['credit']); if ( ($solde_signed < 0 && $p_deb == 'D' ) || From 14f3ab1527a95bdb2a4d0baa874262362c70e57e Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 16 Nov 2014 00:15:28 +0100 Subject: [PATCH 076/119] =?UTF-8?q?Task=20#1051=20-=20Ajout=20fiche=20:Cho?= =?UTF-8?q?ix=20cat=C3=A9gorie=20Am=C3=A9lioration=20pour=20ajout=20cat?= =?UTF-8?q?=C3=A9gorie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/ajax_card.php | 36 +++++++++++++++++++++++++++--------- html/js/scripts.js | 32 +++++++++++++++++++++++++++++++- include/class_html_input.php | 1 + include/class_iradio.php | 1 + 4 files changed, 60 insertions(+), 10 deletions(-) diff --git a/html/ajax_card.php b/html/ajax_card.php index 00a21f041..3906c6e9c 100644 --- a/html/ajax_card.php +++ b/html/ajax_card.php @@ -222,7 +222,7 @@ case 'bc': /* Before inserting a new card, the type must be selected */ /* ------------------------------------------------------------ */ case 'st': - $sql="select fd_id,fd_label from fiche_def"; + $sql="select fd_id,fd_label,fd_description from fiche_def"; /* if we filter thanks the ledger*/ if ( $ledger != -1 ) { @@ -275,7 +275,7 @@ case 'st': } $sql.=" ".$where." order by fd_label"; - $array=$cn->make_array($sql); + $array=$cn->get_array($sql); $html=HtmlInput::title_box(_("Choix de la catégorie"), $ctl); if ( empty($array)) @@ -287,22 +287,40 @@ case 'st': else { $r=''; - $r.='

    '; + $r.='

    '; $r.=_("Choississez la catégorie de fiche à laquelle vous aimeriez ajouter une fiche").'

    '; - $isel=new ISelect('fd_id'); - $isel->value=$array; + $r.='
    '; - $r.=''; + + $msg=_('Choisissez une catégorie svp'); + $r.='" ; + $r.=''; $r.=dossier::hidden(); $r.=(isset($ref))?HtmlInput::hidden('ref',1):''; - - $r.=$isel->input(); + $r.=_('Filtrer').' '.HtmlInput::filter_table("cat_card_table", '0,1', 0); + $r.=''; + for ($i=0;$i'; + $r.=''; + $r.=''; + + $r.=""; + } + $r.='
    '; + $r.=''.h($array[$i]['fd_label']).''; + $r.=''; + $r.=''.h($array[$i]['fd_description']).''; + $r.='
    '; + $r.=HtmlInput::hidden('fd_id',0); $r.='

    '; $r.=HtmlInput::submit('st','choix'); $r.=HtmlInput::button('Annuler',_('Annuler')," onclick=\"removeDiv('$ctl')\" "); $r.='

    '; $r.=''; - $r.='
    '; + $r.='
    '; $html.=$r; } diff --git a/html/js/scripts.js b/html/js/scripts.js index e8cd6905e..5d555549f 100644 --- a/html/js/scripts.js +++ b/html/js/scripts.js @@ -1891,7 +1891,8 @@ function filter_table(phrase, _id, colnr, start_row) { aCol[0] = colnr; } var ele; - + var tot_found=0; + for (var r = start_row; r < table.rows.length; r++) { var found = 0; for (var col = 0; col < aCol.length; col++) @@ -1908,6 +1909,7 @@ function filter_table(phrase, _id, colnr, start_row) { } if (found === 1) { + tot_found++; table.rows[r].style.display = ''; } else { table.rows[r].style.display = 'none'; @@ -1915,6 +1917,15 @@ function filter_table(phrase, _id, colnr, start_row) { $('info_div').style.display = "none"; $('info_div').innerHTML = ""; } + if (tot_found == 0) { + if ($('info_'+_id)) { + $('info_'+_id).innerHTML=" Aucun résultat "; + } + } else { + if ($('info_'+_id)) { + $('info_'+_id).innerHTML=" "; + } + } } /** * @brief @@ -2539,4 +2550,23 @@ function show_description(p_id) $('print_desc'+p_id).hide(); $('input_desc'+p_id).show(); +} +/** + * Hightlight the row we select and restore previous one + * @param {type} x + * @returns {undefined} + */ +var old_class = null; +var old_select = null; + +function select_cat(x) +{ + if (old_select != null) + { + $(old_select).className = old_class; + } + old_select = $('select_cat_row_' + x); + old_class = old_select.className; + $(old_select).className = "highlight"; + $('fd_id').value = x; } \ No newline at end of file diff --git a/include/class_html_input.php b/include/class_html_input.php index 3f8ea98f2..8ca0c4cd6 100755 --- a/include/class_html_input.php +++ b/include/class_html_input.php @@ -779,6 +779,7 @@ class HtmlInput "; + $r.=' '; return $r; } diff --git a/include/class_iradio.php b/include/class_iradio.php index 0112ba8d9..bf2175269 100644 --- a/include/class_iradio.php +++ b/include/class_iradio.php @@ -39,6 +39,7 @@ class IRadio extends HtmlInput $check = ( $this->selected == true || $this->selected == 't' ) ? "checked" : "unchecked"; $r = 'value\""; + $r.=' class="css-checkbox" '; $r.=($this->javascript != '') ? 'onclick="' . $this->javascript . '"' : ''; $r.=" $check > "; return $r; From c7703ab82ee99aeb152e22da93743d5645d95a11 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 16 Nov 2014 00:18:18 +0100 Subject: [PATCH 077/119] =?UTF-8?q?Task=20#1051=20-=20Ajout=20fiche=20:Cho?= =?UTF-8?q?ix=20cat=C3=A9gorie=20Am=C3=A9lioration=20pour=20ajout=20cat?= =?UTF-8?q?=C3=A9gorie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/js/card.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html/js/card.js b/html/js/card.js index 583d1da5c..7776852a1 100644 --- a/html/js/card.js +++ b/html/js/card.js @@ -439,11 +439,11 @@ function select_card_type(obj) var sx=0; if ( window.scrollY) { - sx=window.scrollY+40; + sx=window.scrollY+160; } else { - sx=document.body.scrollTop+60; + sx=document.body.scrollTop+160; } var str_style="top:"+sx+"px;height:30%"; From 2200e3f708e481cc8449a02d19d310d03e97c8a7 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 16 Nov 2014 00:32:08 +0100 Subject: [PATCH 078/119] =?UTF-8?q?Am=C3=A9lioration=20pour=20ajout=20cat?= =?UTF-8?q?=C3=A9gorie=20:=20dimension=20div?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/js/card.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/js/card.js b/html/js/card.js index 7776852a1..166dabd4c 100644 --- a/html/js/card.js +++ b/html/js/card.js @@ -446,7 +446,7 @@ function select_card_type(obj) sx=document.body.scrollTop+160; } - var str_style="top:"+sx+"px;height:30%"; + var str_style="top:"+sx+"px;height:auto"; waiting_box(); var popup={'id': content,'cssclass':'inner_box','style':str_style,'html':"",'drag':true}; From a4c7f8feeaad5ff3f15188689d4a184d9ccefac6 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 16 Nov 2014 10:10:33 +0100 Subject: [PATCH 079/119] =?UTF-8?q?Task=20#1042=20-=20Am=C3=A9lioration=20?= =?UTF-8?q?VERIFBIL=20VERIFBIL=20typo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/verif_bilan.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/verif_bilan.inc.php b/include/verif_bilan.inc.php index a41107228..f4670273e 100644 --- a/include/verif_bilan.inc.php +++ b/include/verif_bilan.inc.php @@ -34,7 +34,7 @@ $exercice=$g_user->get_exercice(); echo '
    '; $sql_year=" and j_tech_per in (select p_id from parm_periode where p_exercice='".$g_user->get_exercice()."')"; -echo '

    '._('Vérification des journaux').'

    '; +echo '

    '._('Vérification des journaux').'

    '; $sql="select jrn_def_id,jrn_def_name from jrn_def"; $res=$cn->exec_sql($sql); @@ -81,7 +81,7 @@ print tr(td(_('Grand livre')).td(nbm($deb),' class="num"').td(nbm($cred),' class echo ''; echo '
    '; echo '
    '; -echo '

    '._('Vérification des comptes').'

    '; +echo '

    '._('Vérification des comptes').'

    '; $bilan=new Acc_Bilan($cn); $periode=new Periode($cn); list ($start_periode,$end_periode)=$periode->get_limit($exercice); @@ -91,7 +91,7 @@ $bilan->verify(); echo '
    '; ?>
    -
    +

    ';?>

    @@ -148,7 +148,7 @@ echo '
    ';

    -

    From b167e906e9fcfd389b347be84d3ed8a283ca82ca Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 16 Nov 2014 10:45:25 +0100 Subject: [PATCH 080/119] =?UTF-8?q?Task=20#1045=20-=20Am=C3=A9lioration=20?= =?UTF-8?q?apparence=20=20:=20Apparence?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/search.inc.php | 2 +- include/template/search_top.php | 42 --------------------------------- 2 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 include/template/search_top.php diff --git a/include/search.inc.php b/include/search.inc.php index 47f943774..017c20ed0 100644 --- a/include/search.inc.php +++ b/include/search.inc.php @@ -60,7 +60,7 @@ if ($base == 'recherche.php' || $base == 'do.php') $div='search_op'; $action=""; $callback=""; - require 'template/search_top.php'; + echo HtmlInput::title_box(_('Recherche'), $div); echo '
    '; echo HtmlInput::get_to_hidden(array('ctlc','ledger')); $inside=true; diff --git a/include/template/search_top.php b/include/template/search_top.php deleted file mode 100644 index 8b2775578..000000000 --- a/include/template/search_top.php +++ /dev/null @@ -1,42 +0,0 @@ - -
    -'._("Fermer").''; - } -?> -
    -
    - -
    \ No newline at end of file From e4ab6765722f40f49a100efd3f02eeebc2f681c1 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 16 Nov 2014 10:49:49 +0100 Subject: [PATCH 081/119] =?UTF-8?q?Task=20#1045=20-=20Am=C3=A9lioration=20?= =?UTF-8?q?apparence=20=20:=20Apparence?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/class_iconcerned.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/class_iconcerned.php b/include/class_iconcerned.php index 2147b046e..bae88eef2 100644 --- a/include/class_iconcerned.php +++ b/include/class_iconcerned.php @@ -48,9 +48,9 @@ class IConcerned extends HtmlInput $r=sprintf(" - + - + ", $this->name, From ea933249c8acdbe43f8d54615068c881ea6b7e67 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 16 Nov 2014 15:20:05 +0100 Subject: [PATCH 082/119] =?UTF-8?q?Task=20#1044=20-=20Implementation=20de?= =?UTF-8?q?=20Test=20Ajout=20m=C3=A9canisme=20test=20pour=20ajax?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/function_javascript.php | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/include/function_javascript.php b/include/function_javascript.php index 081f4ea65..9997f7bd8 100644 --- a/include/function_javascript.php +++ b/include/function_javascript.php @@ -2709,12 +2709,13 @@ function unescapebycharacter($str) return array($char, 0); } } -/*!\brief When data are transfered thanks ajax in a xml document, the xml +/** + * @brief When data are transfered thanks ajax in a xml document, the xml * can not contains some character, to escape those characters, we must use this * function - *\param $p_xml the xml to escape - *\return the xml string with the forbidden char escaped - *\see ajax_card.js ajaxFid + *@param $p_xml the xml to escape + *@return the xml string with the forbidden char escaped + *@see ajax_card.js ajaxFid */ function escape_xml($p_xml) { @@ -2726,6 +2727,24 @@ function escape_xml($p_xml) $xml=str_replace('"','"',$xml); return $xml; } +/** + * @brief + * replace special char + *@param $p_xml the xml to escape + *@return the xml string with the forbidden char escaped + *@see ajax_card.js ajaxFid + *@see escape_xml + */ +function unescape_xml($p_xml) +{ + $xml=$p_xml; + $xml=str_replace('&','&',$xml); + $xml=str_replace('<','<',$xml); + $xml=str_replace('>','>',$xml); + $xml=str_replace(''',"'",$xml); + $xml=str_replace('"','"',$xml); + return $xml; +} /** *load all the javascript in once */ From 7a8169a80a8b476132b5dd6c8565cc6d0cc43219 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 16 Nov 2014 15:20:45 +0100 Subject: [PATCH 083/119] =?UTF-8?q?Task=20#1044=20-=20Implementation=20de?= =?UTF-8?q?=20Test=20Ajout=20m=C3=A9canisme=20test=20pour=20ajax?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/ajax_ledger.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/html/ajax_ledger.php b/html/ajax_ledger.php index 2c319c75e..a1ef7c46b 100644 --- a/html/ajax_ledger.php +++ b/html/ajax_ledger.php @@ -122,7 +122,7 @@ if ($ledger=="") ob_end_clean(); $html=escape_xml($html); - header('Content-type: text/xml; charset=UTF-8'); + if ( ! headers_sent()) { header('Content-type: text/xml; charset=UTF-8');} else { echo "HTML".unescape_xml($html);} echo << @@ -511,6 +511,12 @@ case 'save': ////////////////////////////////////////////////////////////////// $op->save_info($_POST['OTHER'],'OTHER'); $op->save_info($_POST['BON_COMMANDE'],'BON_COMMANDE'); + /////////////////////////////////////////////////////////////////// + // Save related + ////////////////////////////////////////////////////////////////// + $related=HtmlInput::default_value_post("related", "0"); + if ($related == "0" ) throw new Exception('Parameter not send -> related'.__FILE__.__LINE__,10); + $op->insert_related_action($related); } echo _('Opération sauvée'); @@ -574,8 +580,9 @@ case 'reverseop': break; } $html=escape_xml($html); -header('Content-type: text/xml; charset=UTF-8'); -echo << $div From bdf5a24b9ef5c256b5ac74d78c55a0dbcec18b32 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 16 Nov 2014 15:21:14 +0100 Subject: [PATCH 084/119] =?UTF-8?q?Am=C3=A9lioration=20d=C3=A9tail=20op?= =?UTF-8?q?=C3=A9ration=20:=20actions=20attach=C3=A9es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/class_acc_operation.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/class_acc_operation.php b/include/class_acc_operation.php index 2cdb612ba..33fb313b1 100644 --- a/include/class_acc_operation.php +++ b/include/class_acc_operation.php @@ -561,6 +561,18 @@ class Acc_Operation array($this->jr_id,$p_type,$p_info)); } } + + function insert_related_action($p_string) + { + if ($p_string == "") return; + $a_action=explode(',',$p_string); + for ($i=0;$idb,$a_action[$i]); + $action->operation=$this->jr_id; + $action->insert_operation(); + } + } static function test_me() { $_SESSION['g_user']='phpcompta'; From 537e8f2d73977b80738b2292a211408f0ac2d16e Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 16 Nov 2014 15:21:26 +0100 Subject: [PATCH 085/119] =?UTF-8?q?Am=C3=A9lioration=20d=C3=A9tail=20op?= =?UTF-8?q?=C3=A9ration=20:=20actions=20attach=C3=A9es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/class_html_input.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/include/class_html_input.php b/include/class_html_input.php index 8ca0c4cd6..d883fea27 100755 --- a/include/class_html_input.php +++ b/include/class_html_input.php @@ -861,5 +861,16 @@ class HtmlInput return $r; } - + /** + * + * @param type $p_operation_jr_id action_gestion_operation.ago_id + */ + static function button_action_remove_operation($p_operation) + { + $rmOperation=sprintf("javascript:if ( confirm('"._('Voulez-vous effacer cette relation ')."')==true ) {remove_operation('%s','%s');}", + dossier::id(), + $p_operation); + $js= '
    '."ⵝ".''; + return $js; + } } From 5d7beba2c61f17e375f493f3ff2a57eec08d8de2 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 16 Nov 2014 15:22:02 +0100 Subject: [PATCH 086/119] =?UTF-8?q?Task=20#1045=20-=20Am=C3=A9lioration=20?= =?UTF-8?q?apparence=20=20:=20Bouton=20pour=20ajout=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/class_irelated_action.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/class_irelated_action.php b/include/class_irelated_action.php index 73d9c128b..26bb8cdc0 100644 --- a/include/class_irelated_action.php +++ b/include/class_irelated_action.php @@ -46,9 +46,9 @@ class IRelated_Action extends HtmlInput $r=sprintf(" - + - + ", $this->id, From 7b875c805b962649038878c6d23e743ff8ca7b58 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 16 Nov 2014 15:22:46 +0100 Subject: [PATCH 087/119] typo --- include/class_acc_ledger_purchase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/class_acc_ledger_purchase.php b/include/class_acc_ledger_purchase.php index b01cce77f..fbc100d1e 100644 --- a/include/class_acc_ledger_purchase.php +++ b/include/class_acc_ledger_purchase.php @@ -1612,7 +1612,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger '

    '._('Déduction acompte ').h($acompte).'

    '. _('Libellé :' ).h($e_comm_paiement).'
    ';*/ $r.='

    ' . "Payé par " . ${'e_mp_qcode_' . $e_mp} . - " " . $fname->getName() . '

    ' . '

    ' . _('Déduction acompte ') . h($acompte) . '

    ' . + " " . $fname->getName() . ' ' . '

    ' . _('Déduction acompte ') . h($acompte) . '

    ' . _('Libellé :') . h($e_comm_paiement) ; $r.='
    '; $r.='
    '; From 5fbb8c1a14b9677f2b685b7a9016bf03de544f7c Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 16 Nov 2014 15:23:10 +0100 Subject: [PATCH 088/119] =?UTF-8?q?Am=C3=A9lioration=20d=C3=A9tail=20op?= =?UTF-8?q?=C3=A9ration=20:=20actions=20attach=C3=A9es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/class_follow_up.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/class_follow_up.php b/include/class_follow_up.php index 5de133a54..69b800d4a 100644 --- a/include/class_follow_up.php +++ b/include/class_follow_up.php @@ -1469,7 +1469,7 @@ class Follow_Up { global $cn; $array=$cn->get_array(" - select ag_id,ag_ref, + select ag_id,ag_ref,ago_id, ag_title from action_gestion join action_gestion_operation using(ag_id) From cbd188fb6d3a4bb79e045aca48ed7668486aa7ff Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 16 Nov 2014 15:24:38 +0100 Subject: [PATCH 089/119] typo --- html/js/gestion.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/js/gestion.js b/html/js/gestion.js index 3448612d9..4fcfc2a07 100644 --- a/html/js/gestion.js +++ b/html/js/gestion.js @@ -79,7 +79,7 @@ function update_document(p_dossier,p_id) */ function remove_operation(p_dossier,p_id) { - queryString="gDossier="+p_dossier+"&a=rmop&id="+p_id; + var queryString="gDossier="+p_dossier+"&a=rmop&id="+p_id; var action=new Ajax.Request ( "show_document.php", { From bbf9fb1dd05b8c26e0ce2fc98705d252d20f4dae Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 16 Nov 2014 15:25:38 +0100 Subject: [PATCH 090/119] =?UTF-8?q?Task=20#1045=20-=20Am=C3=A9lioration=20?= =?UTF-8?q?apparence=20=20:=20D=C3=A9tail=20op=C3=A9ration=20:=20avec=20on?= =?UTF-8?q?glet=20+=20action=20li=C3=A9e=20(ajout=20+=20suppression)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/js/scripts.js | 41 ++++++ html/style-classic.css | 65 ++++++--- include/class_acc_ledger.php | 12 +- include/class_acc_ledger_sold.php | 2 +- include/template/ledger_detail_ach.php | 89 +------------ include/template/ledger_detail_bottom.php | 152 +++++++++++++++++++--- include/template/ledger_detail_file.php | 2 +- include/template/ledger_detail_fin.php | 39 +++--- include/template/ledger_detail_misc.php | 39 +++--- include/template/ledger_detail_ven.php | 99 ++------------ 10 files changed, 291 insertions(+), 249 deletions(-) diff --git a/html/js/scripts.js b/html/js/scripts.js index 5d555549f..4cc5cc3cf 100644 --- a/html/js/scripts.js +++ b/html/js/scripts.js @@ -2569,4 +2569,45 @@ function select_cat(x) old_class = old_select.className; $(old_select).className = "highlight"; $('fd_id').value = x; +} +/** + * Show the DIV and hide the other, the array of possible DIV are + * in a_tabs, + * @param {array} a_tabs name of possible tabs + * @param {strng} p_display_tab tab to display + */ +function show_tabs(a_tabs,p_display_tab) +{ + try + { + if ( a_tabs.length == 0 ) trow ('a_tabs in empty'); + var i=0; + for ( i=0;ibuild_search_sql($_GET); @@ -618,12 +618,12 @@ class Acc_Ledger extends jrn_def_sql // show nav bar echo $bar; - \endcode - * \see build_search_sql - * \see display_search_form - * \see search_form + @endcode + * @see build_search_sql + * @see display_search_form + * @see search_form - * \return HTML string + * @return HTML string */ public function list_operation_to_reconcile($sql) diff --git a/include/class_acc_ledger_sold.php b/include/class_acc_ledger_sold.php index 7242caf41..5d01d2b5d 100644 --- a/include/class_acc_ledger_sold.php +++ b/include/class_acc_ledger_sold.php @@ -871,7 +871,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { $fname = new Fiche($this->db); $fname->get_by_qcode(${'e_mp_qcode_' . $e_mp}); $r.='

    ' . "Payé par " . ${'e_mp_qcode_' . $e_mp} . - " " . $fname->getName() . '

    ' . '

    ' . _('Déduction acompte ') . h($acompte) . '

    ' . + " " . $fname->getName() . ' ' . '

    ' . _('Déduction acompte ') . h($acompte) . '

    ' . _('Libellé :') . h($e_comm_paiement) ; $r.='
    '; } diff --git a/include/template/ledger_detail_ach.php b/include/template/ledger_detail_ach.php index 96f8471ad..5752e8867 100644 --- a/include/template/ledger_detail_ach.php +++ b/include/template/ledger_detail_ach.php @@ -85,18 +85,18 @@ - - - - +
    + + + + -
    Note
    + width = 25; - $inote->heigh = 5; + $inote->style=' class="itextarea" style="width:90%;height:100%;"'; $inote->value = strip_tags($obj->det->note); echo $inote->input(); ?> @@ -245,83 +245,8 @@ -
    -

    - label = 'Afficher'; - $ib->javascript = "g('detail_" . $div . "').style.display='block';g('a" . $div . "').style.display='none';"; - echo $ib->input(); - echo ' - diff --git a/include/template/ledger_detail_bottom.php b/include/template/ledger_detail_bottom.php index 9d259d2f3..c551d094f 100644 --- a/include/template/ledger_detail_bottom.php +++ b/include/template/ledger_detail_bottom.php @@ -1,9 +1,122 @@ +'writing_div'.$div,'label'=>_('Ecriture Comptable'),'display'=>'none'); +$a_tab['info_operation_div']=array('id'=>'info_operation_div'.$div,'label'=>_('Information'),'display'=>'none'); +$a_tab['linked_operation_div']=array('id'=>'linked_operation_div'.$div,'label'=>_('Opérations liées'),'display'=>'none'); +$a_tab['document_operation_div']=array('id'=>'document_operation_div'.$div,'label'=>_('Document'),'display'=>'block'); +$a_tab['linked_action_div']=array('id'=>'linked_action_div'.$div,'label'=>_('Actions liées'),'display'=>'none'); + +// show tabs +if ( $div != "popup") : + $a_tab['document_operation_div']['display']='block'; +?> +
      + $a_value): ?> + +
    • + + +
    • + +
    +$a_value): + $a_tab[$idx]['display']='block'; + endforeach; +endif; +?> + + info->command); $other=new IText('OTHER',$obj->info->other); ?> -
    -

    +
    + +

    + + +
    + jr_id); + $detail->get(); + ?> + + + '; + for ($e = 0; $e < count($detail->det->array); $e++) + { + $row = ''; + $q = $detail->det->array; + $view_history = sprintf('%s', $q[$e]['j_poste'], $gDossier, $q[$e]['j_poste']); + + $row.=td($view_history); + if ($q[$e]['j_qcode'] != '') + { + $fiche = new Fiche($cn); + $fiche->get_by_qcode($q[$e]['j_qcode']); + $view_history = sprintf('%s', $fiche->id, $gDossier, $q[$e]['j_qcode']); + } else + $view_history = ''; + $row.=td($view_history); + + if ($q[$e]['j_text']=="") + { + if ($q[$e]['j_qcode'] != '') + { + // nom de la fiche + $ff = new Fiche($cn); + $ff->get_by_qcode($q[$e]['j_qcode']); + $row.=td($ff->strAttribut(h(ATTR_DEF_NAME))); + } else + { + // libellé du compte + $name = $cn->get_value('select pcm_lib from tmp_pcmn where pcm_val=$1', array($q[$e]['j_poste'])); + $row.=td(h($name)); + } + } + else + $row.=td(h($q[$e]['j_text'])); + + $montant = td(nbm($q[$e]['j_montant']), 'class="num"'); + $row.=($q[$e]['j_debit'] == 't') ? $montant : td(''); + $row.=($q[$e]['j_debit'] == 'f') ? $montant : td(''); + $class=($e%2==0)?' class="even"':'class="odd"'; + + echo tr($row,$class); + } + ?> +
    +
    +
    +
    + +

    + @@ -13,10 +126,13 @@
    : input(); ?>
    -
    -

    - -

    +
    + +

    + jr_id=$jr_id; @@ -62,32 +178,38 @@ if ( $access=='W') {
    0) -{ ?> -
    -

    Actions liées

    +
    + +

    + '; for ($i = 0; $i < count($array); $i++) { + $remove=''; + if ( $access=='W') $remove=HtmlInput::button_action_remove_operation($array[$i]['ago_id']); if ( $div == 'popup') { - echo '
  • '.HtmlInput::detail_action($array[$i]['ag_id'], h($array[$i]['ag_ref']." ".$array[$i]['ag_title']),0).'
  • '; + echo '
  • '.HtmlInput::detail_action($array[$i]['ag_id'], h($array[$i]['ag_ref']." ".$array[$i]['ag_title']),0).$remove.'
  • '; } else { - echo '
  • '.HtmlInput::detail_action($array[$i]['ag_id'], h($array[$i]['ag_ref']." ".$array[$i]['ag_title']),1).'
  • '; + echo '
  • '.HtmlInput::detail_action($array[$i]['ag_id'], h($array[$i]['ag_ref']." ".$array[$i]['ag_title']),1).$remove.'
  • '; } } echo ''; - + $related=new IRelated_Action('related'); + $related->id='related'.$div; + if ( $access=='W') echo $related->input(); echo '
    '; -} ?> -
    +
    \ No newline at end of file diff --git a/include/template/ledger_detail_fin.php b/include/template/ledger_detail_fin.php index 4ac66c11a..f541b7729 100644 --- a/include/template/ledger_detail_fin.php +++ b/include/template/ledger_detail_fin.php @@ -67,26 +67,27 @@ echo td(_('Pièce')).td($itext->input());
    -
    - - - - - + - - -
    - Note -
    -width=25; -$inote->heigh=5; -$inote->value=strip_tags($obj->det->note); -echo $inote->input(); -?> + + + + + + + +
    + Note +
    + style=' class="itextarea" style="width:90%;height:100%;"'; + $inote->value = strip_tags($obj->det->note); + echo $inote->input(); + ?> + +
    +
    -
    diff --git a/include/template/ledger_detail_misc.php b/include/template/ledger_detail_misc.php index b97b4a831..517f22753 100644 --- a/include/template/ledger_detail_misc.php +++ b/include/template/ledger_detail_misc.php @@ -53,27 +53,26 @@ require_once ('class_anc_plan.php'); - - - - - - - - - -
    - Note -
    - width=25; - $inote->heigh=5; - $inote->value=strip_tags($obj->det->note); - echo $inote->input(); - ?> + + + + + + + +
    + Note +
    + style=' class="itextarea" style="width:90%;height:100%;"'; + $inote->value = strip_tags($obj->det->note); + echo $inote->input(); + ?> + +
    +
    - diff --git a/include/template/ledger_detail_ven.php b/include/template/ledger_detail_ven.php index c4ec3370f..0d10c6d16 100644 --- a/include/template/ledger_detail_ven.php +++ b/include/template/ledger_detail_ven.php @@ -94,26 +94,26 @@ echo $ipaid->input(); - - - - +
    - + + + + -
    + Note
    -width = 25; -$inote->heigh = 5; -$inote->value = strip_tags($obj->det->note); -echo $inote->input(); -?> + + style=' class="itextarea" style="width:90%;height:100%;"'; + $inote->value = strip_tags($obj->det->note); + echo $inote->input(); + ?>
    @@ -248,78 +248,7 @@ echo $inote->input();
    -
    -

    - -

    - label = 'Afficher'; - $ib->javascript = "g('detail_" . $div . "').style.display='block';g('a" . $div . "').style.display='none';"; - echo $ib->input(); - echo ' + -
    From acb55b37214ae5126482a3081e5911d4794fb142 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 16 Nov 2014 15:26:42 +0100 Subject: [PATCH 091/119] =?UTF-8?q?Ajout=20function=20pour=20enlever=20rel?= =?UTF-8?q?ation=20op=C3=A9ration=20-=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/template/detail-action.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/template/detail-action.php b/include/template/detail-action.php index 0f5dd568a..3a4de21c5 100644 --- a/include/template/detail-action.php +++ b/include/template/detail-action.php @@ -153,10 +153,7 @@ { if ( $p_view != 'READ') { - $rmOperation=sprintf("javascript:if ( confirm('"._('Voulez-vous effacer cette opération ')."')==true ) {remove_operation('%s','%s');}", - dossier::id(), - $operation[$o]['ago_id']); - $js= ''._("Effacer").''; + $js = HtmlInput::button_action_remove_operation($operation[$o]['ago_id']); echo '
  • '.$operation[$o]['str_date']." ".HtmlInput::detail_op($operation[$o]['jr_id'],$operation[$o]['jr_internal'])." ".h($operation[$o]['jr_comment'])." " .$js.'
  • '; } From ad0e173eeaed96b7fafbda05d62e7e1b58953c56 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 16 Nov 2014 16:47:16 +0100 Subject: [PATCH 092/119] =?UTF-8?q?Task=20#1045=20-=20Am=C3=A9lioration=20?= =?UTF-8?q?apparence=20=20:=20D=C3=A9tail=20op=C3=A9rations=20:=20montre?= =?UTF-8?q?=20le=20nbre=20de=20doc,=20action=20li=C3=A9e=20ou=20op=C3=A9ra?= =?UTF-8?q?tion=20li=C3=A9es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/template/ledger_detail_bottom.php | 94 +++++++++++++---------- 1 file changed, 53 insertions(+), 41 deletions(-) diff --git a/include/template/ledger_detail_bottom.php b/include/template/ledger_detail_bottom.php index c551d094f..7a0afdc4e 100644 --- a/include/template/ledger_detail_bottom.php +++ b/include/template/ledger_detail_bottom.php @@ -9,12 +9,31 @@ * Variables : $div = popup or box (det[0-9] * */ + +// Contains all the linked actions +$a_followup = Follow_Up::get_all_operation($jr_id); +// +// Contains all the linked operations +$oRap=new Acc_Reconciliation($cn); +$oRap->jr_id=$jr_id; +$aRap=$oRap->get(); + +// Detail of operation + $detail = new Acc_Misc($cn, $obj->jr_id); + $detail->get(); + + $nb_document=($detail->det->jr_pj_name != "")?1:0; + + +// Array of tab +// $a_tab['writing_div']=array('id'=>'writing_div'.$div,'label'=>_('Ecriture Comptable'),'display'=>'none'); $a_tab['info_operation_div']=array('id'=>'info_operation_div'.$div,'label'=>_('Information'),'display'=>'none'); -$a_tab['linked_operation_div']=array('id'=>'linked_operation_div'.$div,'label'=>_('Opérations liées'),'display'=>'none'); -$a_tab['document_operation_div']=array('id'=>'document_operation_div'.$div,'label'=>_('Document'),'display'=>'block'); -$a_tab['linked_action_div']=array('id'=>'linked_action_div'.$div,'label'=>_('Actions liées'),'display'=>'none'); +$a_tab['linked_operation_div']=array('id'=>'linked_operation_div'.$div,'label'=>_('Opérations liées').'('.count($aRap).')','display'=>'none'); +$a_tab['document_operation_div']=array('id'=>'document_operation_div'.$div,'label'=>_('Document').'('.$nb_document.')','display'=>'block'); +$a_tab['linked_action_div']=array('id'=>'linked_action_div'.$div,'label'=>_('Actions liées').'('.count($a_followup).')','display'=>'none'); + // show tabs if ( $div != "popup") : $a_tab['document_operation_div']['display']='block'; @@ -53,8 +72,7 @@ endif;
    jr_id); - $detail->get(); + ?> @@ -134,9 +152,7 @@ endif;

    jr_id=$jr_id; -$aRap=$oRap->get(); + if ($aRap != null ) { $tableid="tb".$div; echo '
    '; @@ -176,40 +192,36 @@ if ( $access=='W') { } ?> +
    + +

    + -
    - -

    - - '; - for ($i = 0; $i < count($array); $i++) - { - $remove=''; - if ( $access=='W') $remove=HtmlInput::button_action_remove_operation($array[$i]['ago_id']); - if ( $div == 'popup') - { - echo '
  • '.HtmlInput::detail_action($array[$i]['ag_id'], h($array[$i]['ag_ref']." ".$array[$i]['ag_title']),0).$remove.'
  • '; - } - else - { - echo '
  • '.HtmlInput::detail_action($array[$i]['ag_id'], h($array[$i]['ag_ref']." ".$array[$i]['ag_title']),1).$remove.'
  • '; - } - } - echo ''; - $related=new IRelated_Action('related'); - $related->id='related'.$div; - if ( $access=='W') echo $related->input(); - echo '
    '; +/** + * show possible linked actions + */ +echo '
      '; +for ($i = 0; $i < count($a_followup); $i++) +{ + $remove=''; + if ( $access=='W') $remove=HtmlInput::button_action_remove_operation($a_followup[$i]['ago_id']); + if ( $div == 'popup') + { + echo '
    • '.HtmlInput::detail_action($a_followup[$i]['ag_id'], h($a_followup[$i]['ag_ref']." ".$a_followup[$i]['ag_title']),0).$remove.'
    • '; + } + else + { + echo '
    • '.HtmlInput::detail_action($a_followup[$i]['ag_id'], h($a_followup[$i]['ag_ref']." ".$a_followup[$i]['ag_title']),1).$remove.'
    • '; + } +} +echo '
    '; +$related=new IRelated_Action('related'); +$related->id='related'.$div; + if ( $access=='W') echo $related->input(); +echo '
    '; ?> Date: Sun, 16 Nov 2014 20:09:49 +0100 Subject: [PATCH 093/119] =?UTF-8?q?Task=20#1045=20-=20Am=C3=A9lioration=20?= =?UTF-8?q?apparence=20=20:=20Comptabilit=C3=A9=20analytique=20ajout=C3=A9?= =?UTF-8?q?e=20dans=20fen=C3=AAtre=20d=C3=A9tail=20op=C3=A9ration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/template/ledger_detail_ach.php | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/include/template/ledger_detail_ach.php b/include/template/ledger_detail_ach.php index 5752e8867..3522dc0d5 100644 --- a/include/template/ledger_detail_ach.php +++ b/include/template/ledger_detail_ach.php @@ -1,6 +1,7 @@
    MY_ANALYTIC != 'nu' && $div == 'popup') + if ($owner->MY_ANALYTIC != 'nu' ) { $anc = new Anc_Plan($cn); $a_anc = $anc->get_list(' order by pa_id '); $x = count($a_anc); /* set the width of the col */ - echo '
    '; + $str_anc.=''; /* add hidden variables pa[] to hold the value of pa_id */ - echo Anc_Plan::hidden($a_anc); + $str_anc.=Anc_Plan::hidden($a_anc); } echo ''; for ($e = 0; $e < count($obj->det->array); $e++) @@ -154,7 +155,8 @@ $row = ''; $q = $obj->det->array[$e]; $fiche = new Fiche($cn, $q['qp_fiche']); - $view_card_detail = HtmlInput::card_detail($fiche->strAttribut(ATTR_DEF_QUICKCODE), "", ' class="line" '); + $qcode=$fiche->strAttribut(ATTR_DEF_QUICKCODE); + $view_card_detail = HtmlInput::card_detail($qcode, "", ' class="line" '); $row = td($view_card_detail); $sym_tva = ''; @@ -212,18 +214,21 @@ $total_tvac+=$tvac; $total_htva+=$htva; /* Analytic accountancy */ - if ($owner->MY_ANALYTIC != "nu" && $div == 'popup') + if ($owner->MY_ANALYTIC != "nu" /*&& $div == 'popup'*/ ) { $poste = $fiche->strAttribut(ATTR_DEF_ACCOUNT); if (preg_match('/^(6|7)/', $poste)) { $anc_op = new Anc_Operation($cn); $anc_op->j_id = $q['j_id']; + $anc_op->in_div=$div; echo HtmlInput::hidden('op[]', $anc_op->j_id); /* compute total price */ bcscale(2); - - $row.=$anc_op->display_table(1, $htva, $div); + $str_anc.=''; + $str_anc.=td($qcode); + $str_anc.=td(nbm($htva)); + $str_anc.=''; } else { $row.=td(''); From 0c65cced2336158dc0d4620a510fe8dbfb571e12 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 16 Nov 2014 20:10:50 +0100 Subject: [PATCH 094/119] =?UTF-8?q?Task=20#1045=20-=20Am=C3=A9lioration=20?= =?UTF-8?q?apparence=20=20:=20Comptabilit=C3=A9=20analytique=20ajout=C3=A9?= =?UTF-8?q?e=20dans=20fen=C3=AAtre=20d=C3=A9tail=20op=C3=A9ration=20Adapta?= =?UTF-8?q?tion=20pour=20clef=20de=20r=C3=A9partition?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/js/acc_ledger.js | 4 +-- html/js/anc_script.js | 17 ++++------ html/style-classic.css | 18 +++++----- include/class_anc_operation.php | 13 ++++--- include/template/ledger_detail_bottom.php | 41 +++++++++++++++++++---- include/template/ledger_detail_fin.php | 22 ++++++++---- include/template/ledger_detail_misc.php | 20 +++++++---- include/template/ledger_detail_ven.php | 22 +++++++----- 8 files changed, 104 insertions(+), 53 deletions(-) diff --git a/html/js/acc_ledger.js b/html/js/acc_ledger.js index 24aec008b..849b739e5 100644 --- a/html/js/acc_ledger.js +++ b/html/js/acc_ledger.js @@ -984,8 +984,8 @@ function op_save(obj) parameters:queryString, onFailure:null, onSuccess:infodiv - } - ); + } + ); } return false; } catch (e) diff --git a/html/js/anc_script.js b/html/js/anc_script.js index efef19707..a4887a98f 100644 --- a/html/js/anc_script.js +++ b/html/js/anc_script.js @@ -106,8 +106,8 @@ function anc_refresh_remain(p_table, p_seq) var tot_table = compute_total_table(p_table, p_seq); var remain = tot_line - tot_table; remain = Math.round(remain * 100) / 100; - var popup_table = p_table.toString(); - p_table = popup_table.replace("popup", ""); + // var popup_table = p_table.toString(); +// p_table = popup_table.replace("popup", ""); $('remain' + p_table).innerHTML = remain; if (remain == 0) { @@ -432,19 +432,13 @@ function anc_key_compute(p_dossier, p_table, p_amount, p_key_id) * @param p_amount amount to distribute * @param p_ledger */ -function anc_key_choice(p_dossier, p_table, p_amount) +function anc_key_choice(p_dossier, p_table, p_amount,p_ledger) { waiting_box(); var op = 'op=anc_key_choice'; var queryString = op + "&gDossier=" + p_dossier + "&t=" + p_table + "&amount=" + p_amount; try { - var ledger=$('p_jrn'); - if (ledger == null ) { - error_message('error : ledger is null '); - return; - } - - queryString+='&led='+ledger.value; + queryString+='&led='+p_ledger; var action = new Ajax.Request( "ajax_misc.php", { @@ -467,7 +461,8 @@ function anc_key_choice(p_dossier, p_table, p_amount) var code_html = getNodeText(html[0]); // Firefox ne prend que les 4096 car. code_html = unescape_xml(code_html); console.log(code_html); - add_div({id: name_ctl, cssclass: 'inner_box', style: 'top:30%;right:35%;position:absolute', drag: 1}); + var position=fixed_position(50,120); + add_div({id: name_ctl, cssclass: 'inner_box', style: position, drag: 1}); $(name_ctl).innerHTML = code_html; } catch (e) { diff --git a/html/style-classic.css b/html/style-classic.css index f48707cca..762285f02 100644 --- a/html/style-classic.css +++ b/html/style-classic.css @@ -1519,18 +1519,19 @@ li.tabs_selected { color:red; margin-left: 2px; padding: 12px 15px 15px 15px; - border-top-left-radius: 0px; - border-top-right-radius: 15px; + border-top-left-radius: 10px; + border-top-right-radius: 10px; border:1px #879ed4 solid; + font-weight: bold; } li.tabs { display:inline; background-color: blue; color:wheat;margin-left: 2px; - padding: 15px 15px 0px 15px; - border-top-left-radius: 15px; - border-top-right-radius: 15px; + padding: 10px 10px 0px 10px; + border-top-left-radius: 10px; + border-top-right-radius: 10px; border:1px #879ed4 solid; } @@ -1538,9 +1539,9 @@ li.tabs:hover { display:inline; background-color: lightblue; color:wheat;margin-left: 2px; - padding: 15px 15px 0px 15px; - border-top-left-radius: 15px; - border-top-right-radius: 15px; + padding: 10px 10px 0px 10px; + border-top-left-radius: 10px; + border-top-right-radius: 10px; border:1px #879ed4 solid; } @@ -1548,6 +1549,7 @@ ul.tabs a { text-decoration: none; color:white; display:inline; + } ul.tabs a:hover { text-decoration: none; diff --git a/include/class_anc_operation.php b/include/class_anc_operation.php index 17458c8a5..c87d9535f 100644 --- a/include/class_anc_operation.php +++ b/include/class_anc_operation.php @@ -59,7 +59,7 @@ class Anc_Operation * @brief signed of the amount */ var $oa_positive; - + var $in_div; /*< name of the div if any, default empty string*/ /*!\brief constructor * */ @@ -70,6 +70,7 @@ class Anc_Operation $this->oa_jrnx_id_source=null; $this->oa_positive='Y'; $this->has_data=0; + $this->in_div=""; } /*!\brief add a row to the table operation_analytique * \note if $this->oa_group if 0 then a sequence id will be computed for @@ -542,7 +543,7 @@ class Anc_Operation $count=0; $remain=$p_amount; - $ctrl_remain="remain".$table_id; + $ctrl_remain="remain".$this->in_div.$table_id; for ( $i=0; $i < $nb_row;$i++) { @@ -585,7 +586,7 @@ class Anc_Operation } $value=new INum(); - $value->javascript='onchange="format_number(this);anc_refresh_remain(\''.$table_id.'\',\''.$p_seq.'\')"'; + $value->javascript='onchange="format_number(this);anc_refresh_remain(\''.$this->in_div.$table_id.'\',\''.$p_seq.'\')"'; $value->name="val[".$p_seq."][]"; $value->size=6; $value->value=(isset($val[$p_seq][$i]))?$val[$p_seq][$i]:$p_amount; @@ -602,7 +603,7 @@ class Anc_Operation { $style_remain=($remain==0)?'style="color:green"':' style="color:red"'; $result.=" Reste à imputer = ". - ''. + ''. $remain.''; // add a button to add a row $button=new IButton(); @@ -615,9 +616,11 @@ class Anc_Operation * Add a button for distribution key * */ + + $ledger=$this->db->get_value('select j_jrn_def from jrnx where j_id=$1',array($this->j_id)); $gDossier=Dossier::id(); $button_key=new IButton(); - $button_key->javascript="anc_key_choice(".$gDossier.",'".$p_id."$table_id',$p_amount);"; + $button_key->javascript="anc_key_choice(".$gDossier.",'".$p_id."$table_id',$p_amount,'".$ledger."');"; $button_key->name="js".$p_id.$p_seq; $button_key->label=_("Clef"); $result .= $button_key->input(); diff --git a/include/template/ledger_detail_bottom.php b/include/template/ledger_detail_bottom.php index 7a0afdc4e..b72a417e0 100644 --- a/include/template/ledger_detail_bottom.php +++ b/include/template/ledger_detail_bottom.php @@ -1,3 +1,4 @@ +
    'writing_div'.$div,'label'=>_('Ecriture Compta $a_tab['info_operation_div']=array('id'=>'info_operation_div'.$div,'label'=>_('Information'),'display'=>'none'); $a_tab['linked_operation_div']=array('id'=>'linked_operation_div'.$div,'label'=>_('Opérations liées').'('.count($aRap).')','display'=>'none'); $a_tab['document_operation_div']=array('id'=>'document_operation_div'.$div,'label'=>_('Document').'('.$nb_document.')','display'=>'block'); -$a_tab['linked_action_div']=array('id'=>'linked_action_div'.$div,'label'=>_('Actions liées').'('.count($a_followup).')','display'=>'none'); +$a_tab['linked_action_div']=array('id'=>'linked_action_div'.$div,'label'=>_('Actions Gestion').'('.count($a_followup).')','display'=>'none'); +$a_tab['analytic_div']=array('id'=>'analytic_div'.$div,'label'=>_('Comptabilité Analytique'),'display'=>'none'); // show tabs @@ -45,7 +47,7 @@ if ( $div != "popup") : ?>
  • - +
  • @@ -228,6 +230,33 @@ echo ''; require_once('template/ledger_detail_file.php'); ?> + + +
    + +

    + + MY_ANALYTIC != "nu") : + if ( strpos('
    '; + $str_anc .= ''; /* add hidden variables pa[] to hold the value of pa_id */ - echo Anc_Plan::hidden($a_anc); + $str_anc .= Anc_Plan::hidden($a_anc); } echo ''; for ($e=0;$edet->array);$e++) { @@ -153,15 +154,24 @@ echo ''; $row.=($q[$e]['j_debit']=='t')?$montant:td(''); $row.=($q[$e]['j_debit']=='f')?$montant:td(''); /* Analytic accountancy */ - if ( $owner->MY_ANALYTIC != "nu" && $div == 'popup') + if ( $owner->MY_ANALYTIC != "nu" /*&& $div == 'popup'*/) { $poste=$fiche->strAttribut(ATTR_DEF_ACCOUNT); if ( preg_match('/^(6|7)/',$q[$e]['j_poste'])) { + $qcode=$fiche->strAttribut(ATTR_DEF_QUICKCODE); $anc_op=new Anc_Operation($cn); $anc_op->j_id=$q[$e]['j_id']; - $row.= HtmlInput::hidden('op[]',$anc_op->j_id); - $row.=$anc_op->display_table(1,$q[$e]['j_montant'],$div); + $anc_op->in_div=$div; + $str_anc.=''; + $str_anc.=td($poste); + $str_anc.=td($qcode); + $str_anc.=td(nbm($q[$e]['j_montant'])); + $str_anc.=''; + $str_anc.=''; } else { $row.=td(''); diff --git a/include/template/ledger_detail_misc.php b/include/template/ledger_detail_misc.php index 517f22753..fd7225dc9 100644 --- a/include/template/ledger_detail_misc.php +++ b/include/template/ledger_detail_misc.php @@ -5,7 +5,7 @@ require_once('template/ledger_detail_top.php'); require_once('class_anc_operation.php'); require_once('class_anc_plan.php'); - + $str_anc=""; ?> MY_ANALYTIC != 'nu' && $div == 'popup'){ + if ($owner->MY_ANALYTIC != 'nu' /* && $div == 'popup' */ ){ $anc=new Anc_Plan($cn); $a_anc=$anc->get_list(' order by pa_id '); $x=count($a_anc); /* set the width of the col */ - echo ''; + $str_anc.=''; /* add hidden variables pa[] to hold the value of pa_id */ - echo Anc_Plan::hidden($a_anc); + $str_anc.= Anc_Plan::hidden($a_anc); } echo ''; $amount_idx=0; @@ -152,14 +152,20 @@ $amount_idx=0; $row.=($q[$e]['j_debit']=='t')?$montant:td(''); $row.=($q[$e]['j_debit']=='f')?$montant:td(''); /* Analytic accountancy */ - if ( $owner->MY_ANALYTIC != "nu" && $div=='popup'){ + if ( $owner->MY_ANALYTIC != "nu" /*&& $div=='popup'*/){ if ( preg_match('/^(6|7)/',$q[$e]['j_poste'])) { echo HtmlInput::hidden("amount_t".$amount_idx,$q[$e]['j_montant']); $anc_op=new Anc_Operation($cn); $anc_op->j_id=$q[$e]['j_id']; - echo HtmlInput::hidden('op[]',$anc_op->j_id); - $row.=$anc_op->display_table(1,$q[$e]['j_montant'],$div); + $anc_op->in_div=$div; + $str_anc.=''; + $str_anc.=HtmlInput::hidden('op[]',$anc_op->j_id); + $str_anc.=td($q[$e]['j_qcode']); + $str_anc.=td($q[$e]['j_poste']); + $str_anc.=td($q[$e]['j_montant']); + $str_anc.=$anc_op->display_table(1,$q[$e]['j_montant'],$div); + $str_anc.=''; $amount_idx++; } else { $row.=td(''); diff --git a/include/template/ledger_detail_ven.php b/include/template/ledger_detail_ven.php index 0d10c6d16..dbb7bf579 100644 --- a/include/template/ledger_detail_ven.php +++ b/include/template/ledger_detail_ven.php @@ -7,6 +7,7 @@ $tab_rapprochement=$div."rapproch"; $tab_receipt=$div."receipt"; $tab_document=$div."document"; + $str_anc=""; ?>
    input(); } else echo th(_('Total'), 'style="text-align:right"'); - if ($owner->MY_ANALYTIC != 'nu' && $div == 'popup') + if ($owner->MY_ANALYTIC != 'nu' /*&& $div == 'popup'*/) { $anc = new Anc_Plan($cn); $a_anc = $anc->get_list(" order by pa_id "); $x = count($a_anc); /* set the width of the col */ - echo '
    '; + $str_anc.=''; /* add hidden variables pa[] to hold the value of pa_id */ - echo Anc_Plan::hidden($a_anc); + $str_anc.=Anc_Plan::hidden($a_anc); } echo ''; @@ -159,7 +160,8 @@ echo $ipaid->input(); $row = ''; $q = $obj->det->array[$e]; $fiche = new Fiche($cn, $q['qs_fiche']); - $view_card_detail = HtmlInput::card_detail($fiche->strAttribut(ATTR_DEF_QUICKCODE), "", ' class="line" '); + $qcode=$fiche->strAttribut(ATTR_DEF_QUICKCODE); + $view_card_detail = HtmlInput::card_detail($qcode, "", ' class="line" '); $row.=td($view_card_detail); if ($owner->MY_UPDLAB == 'Y') { @@ -211,18 +213,22 @@ echo $ipaid->input(); $total_tvac = bcadd($total_tvac, $tvac); $total_htva = bcadd($total_htva, $htva); /* Analytic accountancy */ - if ($owner->MY_ANALYTIC != "nu" && $div == 'popup') + if ($owner->MY_ANALYTIC != "nu" /*&& $div == 'popup' */ ) { $poste = $fiche->strAttribut(ATTR_DEF_ACCOUNT); if (preg_match('/^(6|7)/', $poste)) { $anc_op = new Anc_Operation($cn); + $anc_op->in_div=$div; $anc_op->j_id = $q['j_id']; echo HtmlInput::hidden('op[]', $anc_op->j_id); /* compute total price */ bcscale(2); - - $row.=$anc_op->display_table(1, $htva, $div); + $str_anc.=''; + $str_anc.=td($qcode); + $str_anc.=td(nbm($htva)); + $str_anc.=''; + // $row.=($div == 'popup') ? $anc_op->display_table(1, $htva, $div):""; } else { $row.=td(''); @@ -248,7 +254,7 @@ echo $ipaid->input();
    ' . _('Compt. Analytique') . '
    CodeMontant' . _('Compt. Analytique') . '
    '.$anc_op->display_table(1, $htva, $div).'',$str_anc) ==0 ): + ?> + + + +
    + + + + + + + + + + + +
    MY_ANALYTIC != 'nu' && $div=='popup'){ - echo ''; + if ($owner->MY_ANALYTIC != 'nu' /*&& $div=='popup' */){ + echo ''; } $per=new Periode($cn,$obj->det->jr_tech_per); @@ -268,11 +297,11 @@ if ( $div != 'popup' ) { echo ''; - echo '
    '._('Compt. Analytique').''._('Compt. Analytique').'
    '; + $str_anc.= HtmlInput::hidden('op[]',$anc_op->j_id); + $str_anc.=$anc_op->display_table(1,$q[$e]['j_montant'],$div); + $str_anc.='
    '._('Compt. Analytique').'
    CodePosteMontant' . _('Compt. Analytique') . '
    ' . _('Compt. Analytique') . '
    CodeMontant' . _('Compt. Analytique') . '
    '.$anc_op->display_table(1, $htva, $div).'
    - + From 3ab56691ac27a42f069430c86d86aa2fb6bc6285 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 16 Nov 2014 20:12:32 +0100 Subject: [PATCH 095/119] =?UTF-8?q?Task=20#1044=20-=20Implementation=20de?= =?UTF-8?q?=20Test=20Nouvelle=20constante=20LOGINPUT=20pour=20le=20d=C3=A9?= =?UTF-8?q?veloppement=20et=20les=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/constant.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/constant.php b/include/constant.php index 7308a3a63..f032e0169 100644 --- a/include/constant.php +++ b/include/constant.php @@ -59,11 +59,12 @@ $g_captcha=false; $g_failed=""; $g_succeed=""; /* uncomment for development */ -/* -define ('SVNINFO',6722); + +/*define ('SVNINFO',6722); define ("DEBUG",true); define ("LOGINPUT",true); */ + define ('SVNINFO',6723); define ("DEBUG",false); define ("LOGINPUT",false); From 3a818a9aeb82c60d9d14ed134ca9792c7246ba6a Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 16 Nov 2014 20:24:17 +0100 Subject: [PATCH 096/119] =?UTF-8?q?Task=20#1045=20-=20Am=C3=A9lioration=20?= =?UTF-8?q?apparence=20=20:=20Gestion=20Cache=20les=20check=20quand=20on?= =?UTF-8?q?=20ferme=20la=20fen=C3=AAtre?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/js/scripts.js | 7 +++++++ include/class_html_input.php | 12 ++++++++++-- include/template/action_other_action.php | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/html/js/scripts.js b/html/js/scripts.js index 4cc5cc3cf..be2112148 100644 --- a/html/js/scripts.js +++ b/html/js/scripts.js @@ -2451,6 +2451,13 @@ function action_show_checkbox() a[i].style.display = 'block'; } } +function action_hide_checkbox() +{ + var a = document.getElementsByName('ag_id_td'); + for (var i = 0; i < a.length; i++) { + a[i].style.display = 'none'; + } +} /** * * @param {type} obj diff --git a/include/class_html_input.php b/include/class_html_input.php index d883fea27..aa473b34a 100755 --- a/include/class_html_input.php +++ b/include/class_html_input.php @@ -700,10 +700,18 @@ class HtmlInput } return $_REQUEST[$ind]; } - static function title_box($name,$div,$mod="close") + /** + * Title for boxes + * @param type $name Title + * @param type $div element id + * @param type $mod hide or close + * @param type $p_js if $mod is hide then you can add a javascript + * @return type + */ + static function title_box($name,$div,$mod="close",$p_js="") { if ($mod=='close') $r=HtmlInput::anchor_close($div); - if ($mod=='hide') $r=HtmlInput::anchor_hide(_('Fermer'),"$('$div').hide()"); + if ($mod=='hide') $r=HtmlInput::anchor_hide(_('Fermer'),"$('$div').hide();$p_js"); if ( $mod == 'none') $r=""; $r.=h2($name,' class="title" '); return $r; diff --git a/include/template/action_other_action.php b/include/template/action_other_action.php index 8f6d855cf..bb51613a1 100644 --- a/include/template/action_other_action.php +++ b/include/template/action_other_action.php @@ -14,7 +14,7 @@ echo HtmlInput::request_to_hidden(array("closed_action","remind_date_end","remin "tdoc", "action_query","date_start","date_end","hsstate","searchtag")); ?>