From 2b1bcd58b20c50dce36d7efe6ebf9dbc76ce99e5 Mon Sep 17 00:00:00 2001 From: sparkyx Date: Mon, 8 Nov 2021 13:17:06 +0100 Subject: [PATCH] CANAL : add symbol for operation : history card & accounting --- include/class/acc_account_ledger.class.php | 7 ++++--- include/class/fiche.class.php | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/include/class/acc_account_ledger.class.php b/include/class/acc_account_ledger.class.php index 25cbeef2f..25952327f 100644 --- a/include/class/acc_account_ledger.class.php +++ b/include/class/acc_account_ledger.class.php @@ -188,7 +188,8 @@ class Acc_Account_Ledger ,(select cr_code_iso from currency where id=jrn.currency_id) as cr_code_iso ,j_montant ,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 left join operation_currency as va on (j1.j_id = va.j_id ) 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']); $class=($idx%2 == 0)?'class="odd"':$class=' class="even"'; $idx++; - + $op_analytic=($op['op_analytic']==1)?'':''; echo "" . "".smaller_date(format_date($op['j_date']))."". td(h($op['jr_pj_number'])). "".h($op['j_qcode'])."". "".$vw_operation."". "".$tiers."". - "".h($op['description'])."". + "".h($op['description']).$op_analytic."". td($op['jr_optype']); /// If the currency is not the default one , then show the amount if ( $op['currency_id'] > 0 ) diff --git a/include/class/fiche.class.php b/include/class/fiche.class.php index 847ea092a..6a12dd01f 100644 --- a/include/class/fiche.class.php +++ b/include/class/fiche.class.php @@ -758,7 +758,8 @@ class Fiche (select cr_code_iso from currency where id=jrn.currency_id) as cr_code_iso, j_montant, 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 left join (select j_id, coalesce(oc_amount,0) as sum_oc_amount , @@ -1020,13 +1021,14 @@ class Fiche $idx++; $tiers=$operation->find_tiers($op['jr_id'], $op['j_id'], $op['j_qcode']); + $op_analytic=($op['op_analytic']==1)?'':''; echo "" . "".smaller_date(format_date($op['j_date_fmt']))."". td(h($op['jr_pj_number'])). td($op['j_poste']). "".$vw_operation."". td($tiers). - "".h($op['description'])."". + "".h($op['description']).$op_analytic."". td($op['jr_optype']); /// If the currency is not the default one , then show the amount