#0001594: CA - liste opérations affiche toutes les opérations

Filtre : uniquement opérations diverses
This commit is contained in:
Dany De Bontridder 2018-07-17 09:27:55 +02:00
parent 77a82954ae
commit c22e77ca06
3 changed files with 10 additions and 16 deletions

View file

@ -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);

View file

@ -58,7 +58,7 @@ echo '
<A class="mtitle" HREF="?ac='.$http->request("ac").'&new&'.$str_dossier.'"> '._('Nouveau').' </A>
</td>
<td class="mtitle" >
<A class="mtitle" HREF="?ac='.$http->request("ac").'&see&'.$str_dossier.'">'._('Liste opérations').' </A
<A class="mtitle" HREF="?ac='.$http->request("ac").'&see&'.$str_dossier.'">'._('Liste opérations').' </A>
</td>
</tr>
</table>

View file

@ -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.= "<table id=\"anc_operation_list_tb\"class=\"result\">";
$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.="<tr $row_id $class>";
$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.="<td>".HtmlInput::image_click("trash-24.gif", $js, _("Effacer"))."</td>";
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 .= "<td>". HtmlInput::image_click("crayon-mod-b24.png", $js, _("Modifier"))."</td>";
$ret.="</tr>";
}