diff --git a/include/ajax/ajax_anc_detail_operation.php b/include/ajax/ajax_anc_detail_operation.php index 733859806..81844a9bc 100644 --- a/include/ajax/ajax_anc_detail_operation.php +++ b/include/ajax/ajax_anc_detail_operation.php @@ -79,7 +79,7 @@ for ($i=0;$i< $nb_row;$i++) { echo td($detail_row['po_name']); } $amount=$detail_row['oa_amount']; - if ( $detail_row['oa_positive']=="N") {$amount=bcmult($amount,-1);} + if ( $detail_row['oa_positive']=="N") {$amount=bcmul($amount,-1);} echo td($amount,'style="text-align:right"'); $debit=($detail_row['oa_debit'] == 'f')?"C":"D"; echo td($debit); diff --git a/include/anc_od.inc.php b/include/anc_od.inc.php index 65e789824..6daaeb4b6 100644 --- a/include/anc_od.inc.php +++ b/include/anc_od.inc.php @@ -58,7 +58,7 @@ echo ' '._('Nouveau').' -'._('Liste opérations').' '._('Liste opérations').' diff --git a/include/class/anc_operation.class.php b/include/class/anc_operation.class.php index 6e1ecef98..f3c2be8ec 100644 --- a/include/class/anc_operation.class.php +++ b/include/class/anc_operation.class.php @@ -173,19 +173,20 @@ class Anc_Operation $cond="$where (oa_date >= to_date('$p_from','DD.MM.YYYY') or oa_date >= to_date('$p_from','DD.MM.YYYY') )"; $where=" and "; } - if ( $p_to!="" ) + if ( $p_to!="" ) { $cond.="$where (oa_date <=to_date('$p_to','DD.MM.YYYY') or oa_date <=to_date('$p_to','DD.MM.YYYY')) "; - + $where=" and "; + } + + $cond .= $where." j_id is null "; + $sql=" select distinct oa_group, to_char(oa_date,'DD.MM.YYYY') as str_date , oa_date, - oa_description, - jr_pj_number, - jr_id + oa_description from operation_analytique as oa - left join (select jr_id,jr_pj_number,j_id from jrn join jrnx on (jr_grpt_id=j_grpt) ) as m on (m.j_id=oa.j_id) $cond order by oa_date "; return $this->db->get_array($sql); @@ -294,7 +295,6 @@ class Anc_Operation $ret.= ""; $ret.=th(_("Date")); $ret.=th(_("Libellé")); - $ret.=th(_("Num Pièce")); $ret.=th(""); $ret.=th(""); $i=0; @@ -311,16 +311,10 @@ class Anc_Operation $ret.=""; $ret.=td($row['str_date']); $ret.=td(h($row['oa_description'])); - $ret.=td(h($row['jr_pj_number'])); $js="anc_remove_operation(".$gDossier.",".$oldgroup.")"; $ret.=""; - if ( $row['jr_id'] != "") { - $js="viewOperation({$row['jr_id']},{$gDossier})"; - - } else { - $js="anc_detail_op({$row['oa_group']},{$gDossier})"; - } + $js="anc_detail_op({$row['oa_group']},{$gDossier})"; $ret .= ""; $ret.=""; }
".HtmlInput::image_click("trash-24.gif", $js, _("Effacer"))."". HtmlInput::image_click("crayon-mod-b24.png", $js, _("Modifier"))."