From 54216fe860db10946e8787dce99e70fbd55b1499 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sat, 21 Jul 2018 13:07:44 +0200 Subject: [PATCH] Task #1656 - Historique : ordre des colonnes #0001656: Historique : ordre des colonnes --- include/class/acc_ledger_search.class.php | 62 +++++++++++++++-------- include/history_operation.inc.php | 7 ++- 2 files changed, 47 insertions(+), 22 deletions(-) diff --git a/include/class/acc_ledger_search.class.php b/include/class/acc_ledger_search.class.php index 40cb60886..f2fdb2b8a 100644 --- a/include/class/acc_ledger_search.class.php +++ b/include/class/acc_ledger_search.class.php @@ -660,24 +660,30 @@ class Acc_Ledger_Search $Max=Database::num_row($Res); if ($Max==0) + { return array(0, _("Aucun enregistrement trouvé")); + } $r.=''; $r.=""; - $r.=""; - if ($this->type=='ALL') - { - $r.=th('Journal'); - } $r.=''; if ($p_paid!=0) + { $r.=''; + } $r.=''; - $r.=''; + $r.=th('Journal'); + if ( $this->type != "ODS") + { + $r.=''; + } + $r.=""; $r.=''; $r.=th('Notes', ' style="width:15%"'); $r.=''; @@ -699,24 +705,18 @@ class Acc_Ledger_Search $row=Database::fetch_array($Res, $i); if ($i%2==0) + { $tr=''; + } else + { $tr=''; + } $r.=$tr; //internal code // button modify - $r.=""; - if ($this->type=='ALL') - $r.=td($row['jrn_def_name']); + + // date $r.=""; + + // Ledger + $r.=td($row['jrn_def_name']); - // Tiers - $other=($row['quick_code']!='')?HtmlInput::card_detail($row['quick_code'],h($row['name'].' '.$row['first_name'])):''; - $r.=td($other); + + if ($this->type != 'ODS') + { + // Tiers + $other=($row['quick_code']!='')?HtmlInput::card_detail($row['quick_code'],h($row['name'].' '.$row['first_name'])):''; + $r.=td($other); + } + + // Internal number + $r.=""; + // comment $r.="'; if ($row['jr_rapt']=='paid') + { $amount_paid=bcadd($amount_paid, $t_amount); + } else + { $amount_unpaid=bcadd($amount_unpaid, $t_amount); + } } // Rapprochement diff --git a/include/history_operation.inc.php b/include/history_operation.inc.php index 2acc4fae5..20113ba9f 100644 --- a/include/history_operation.inc.php +++ b/include/history_operation.inc.php @@ -42,6 +42,7 @@ switch($ledger_type) { case 'ACH': $ask_pay=1; + $p_array['ledger_type']='ACH'; break; case 'ODS': $ask_pay=0; @@ -53,9 +54,11 @@ switch($ledger_type) break; case 'VEN': $ask_pay=1; + $p_array['ledger_type']='VEN'; break; case 'FIN': $ask_pay=0; + $p_array['ledger_type']='FIN'; break; } @@ -95,7 +98,9 @@ if (!isset($p_array['date_start'])) } else { - $msg='

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

'; + $date_start=$http->get("date_start","string",""); + $date_end=$http->get("date_end","string",""); + $msg='

'.sprintf(_("Période %s au %s "),$date_start,$date_end) .'

'; } /* compute the sql stmt */
"._("n° interne")."'.$table->get_header(0).''.$table->get_header(1).''; + } if ($p_paid!=0) + { $r.=''.$table->get_header(2).''.$table->get_header(3).''.$table->get_header(4).''.$table->get_header(4).'"._("n° interne")."'.$table->get_header(6).''.$table->get_header(5).'
"; - // If url contains - // - - $href=basename($_SERVER['PHP_SELF']); - - - $r.=sprintf('%s ', - $row['jr_id'], $gDossier, $row['jr_internal']); - $r.=""; $r.=$row['str_jr_date']; @@ -736,10 +736,24 @@ class Acc_Ledger_Search $r.=""; $r.=$row['jr_pj_number']; $r.=""; + $r.=sprintf('%s ', + $row['jr_id'], $gDossier, $row['jr_internal']); + $r.=""; $tmp_jr_comment=h($row['jr_comment']); @@ -757,7 +771,9 @@ class Acc_Ledger_Search $positive=$this->cn->get_value("select qf_amount from quant_fin where jr_id=$1", array($row['jr_id'])); if ($this->cn->count()!=0) + { $positive=($positive<0)?1:0; + } } $r.=""; $t_amount=$row['jr_montant']; @@ -788,9 +804,13 @@ class Acc_Ledger_Search $h->name="set_jr_id".$row['jr_id']; $r.=''.$w->input().$h->input().'