CANAL : add symbol for operation : history card & accounting
This commit is contained in:
parent
660273fa0c
commit
2b1bcd58b2
2 changed files with 8 additions and 5 deletions
|
|
@ -188,7 +188,8 @@ class Acc_Account_Ledger
|
||||||
,(select cr_code_iso from currency where id=jrn.currency_id) as cr_code_iso
|
,(select cr_code_iso from currency where id=jrn.currency_id) as cr_code_iso
|
||||||
,j_montant
|
,j_montant
|
||||||
,oc_amount
|
,oc_amount
|
||||||
,oc_vat_amount
|
,oc_vat_amount ,
|
||||||
|
case when exists(select 1 from operation_analytique oa where j1.j_id=oa.j_id) then 1 else 0 end as op_analytic
|
||||||
from jrnx as j1
|
from jrnx as j1
|
||||||
left join operation_currency as va on (j1.j_id = va.j_id )
|
left join operation_currency as va on (j1.j_id = va.j_id )
|
||||||
join jrn_def on (jrn_def_id=j_jrn_def )
|
join jrn_def on (jrn_def_id=j_jrn_def )
|
||||||
|
|
@ -455,14 +456,14 @@ class Acc_Account_Ledger
|
||||||
$sum_deb=bcadd($sum_deb,$op['deb_montant']);
|
$sum_deb=bcadd($sum_deb,$op['deb_montant']);
|
||||||
$class=($idx%2 == 0)?'class="odd"':$class=' class="even"';
|
$class=($idx%2 == 0)?'class="odd"':$class=' class="even"';
|
||||||
$idx++;
|
$idx++;
|
||||||
|
$op_analytic=($op['op_analytic']==1)?'<span style="float:right;background:black;color:white;">∋</span>':'';
|
||||||
echo "<TR $class name=\"tr_" . $let . "_" . $from_div . "\">" .
|
echo "<TR $class name=\"tr_" . $let . "_" . $from_div . "\">" .
|
||||||
"<TD>".smaller_date(format_date($op['j_date']))."</TD>".
|
"<TD>".smaller_date(format_date($op['j_date']))."</TD>".
|
||||||
td(h($op['jr_pj_number'])).
|
td(h($op['jr_pj_number'])).
|
||||||
"<TD>".h($op['j_qcode'])."</TD>".
|
"<TD>".h($op['j_qcode'])."</TD>".
|
||||||
"<TD>".$vw_operation."</TD>".
|
"<TD>".$vw_operation."</TD>".
|
||||||
"<TD>".$tiers."</TD>".
|
"<TD>".$tiers."</TD>".
|
||||||
"<TD>".h($op['description'])."</TD>".
|
"<TD>".h($op['description']).$op_analytic."</TD>".
|
||||||
td($op['jr_optype']);
|
td($op['jr_optype']);
|
||||||
/// If the currency is not the default one , then show the amount
|
/// If the currency is not the default one , then show the amount
|
||||||
if ( $op['currency_id'] > 0 )
|
if ( $op['currency_id'] > 0 )
|
||||||
|
|
|
||||||
|
|
@ -758,7 +758,8 @@ class Fiche
|
||||||
(select cr_code_iso from currency where id=jrn.currency_id) as cr_code_iso,
|
(select cr_code_iso from currency where id=jrn.currency_id) as cr_code_iso,
|
||||||
j_montant,
|
j_montant,
|
||||||
sum_oc_amount as oc_amount,
|
sum_oc_amount as oc_amount,
|
||||||
sum_oc_vat_amount as oc_vat_amount
|
sum_oc_vat_amount as oc_vat_amount ,
|
||||||
|
case when exists(select 1 from operation_analytique oa where j1.j_id=oa.j_id) then 1 else 0 end as op_analytic
|
||||||
from jrnx as j1 left join jrn_def on jrn_def_id=j_jrn_def
|
from jrnx as j1 left join jrn_def on jrn_def_id=j_jrn_def
|
||||||
left join (select j_id,
|
left join (select j_id,
|
||||||
coalesce(oc_amount,0) as sum_oc_amount ,
|
coalesce(oc_amount,0) as sum_oc_amount ,
|
||||||
|
|
@ -1020,13 +1021,14 @@ class Fiche
|
||||||
$idx++;
|
$idx++;
|
||||||
|
|
||||||
$tiers=$operation->find_tiers($op['jr_id'], $op['j_id'], $op['j_qcode']);
|
$tiers=$operation->find_tiers($op['jr_id'], $op['j_id'], $op['j_qcode']);
|
||||||
|
$op_analytic=($op['op_analytic']==1)?'<span style="float:right;background:black;color:white;">∋</span>':'';
|
||||||
echo "<TR $class name=\"tr_" . $let . "_" . $from_div . "\">" .
|
echo "<TR $class name=\"tr_" . $let . "_" . $from_div . "\">" .
|
||||||
"<TD>".smaller_date(format_date($op['j_date_fmt']))."</TD>".
|
"<TD>".smaller_date(format_date($op['j_date_fmt']))."</TD>".
|
||||||
td(h($op['jr_pj_number'])).
|
td(h($op['jr_pj_number'])).
|
||||||
td($op['j_poste']).
|
td($op['j_poste']).
|
||||||
"<TD>".$vw_operation."</TD>".
|
"<TD>".$vw_operation."</TD>".
|
||||||
td($tiers).
|
td($tiers).
|
||||||
"<TD>".h($op['description'])."</TD>".
|
"<TD>".h($op['description']).$op_analytic."</TD>".
|
||||||
td($op['jr_optype']);
|
td($op['jr_optype']);
|
||||||
|
|
||||||
/// If the currency is not the default one , then show the amount
|
/// If the currency is not the default one , then show the amount
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue