[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 08/11: improve Operation detail : show Analyt
From: |
dwm |
Subject: |
[Noalyss-commit] [noalyss] 08/11: improve Operation detail : show Analytic imputation for VAT Not Deductible |
Date: |
Sun, 15 Dec 2024 09:51:26 -0500 (EST) |
sparkyx pushed a commit to branch stable
in repository noalyss.
commit dc93eb1b3afdacced2d1f91825581739b6d56eee
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sat Dec 14 17:17:17 2024 +0100
improve Operation detail : show Analytic imputation for VAT Not Deductible
---
include/template/ledger_detail_ach.php | 48 +++++++++++++++++++++++++++++++++-
1 file changed, 47 insertions(+), 1 deletion(-)
diff --git a/include/template/ledger_detail_ach.php
b/include/template/ledger_detail_ach.php
index 9f7397459..f623c899c 100644
--- a/include/template/ledger_detail_ach.php
+++ b/include/template/ledger_detail_ach.php
@@ -274,7 +274,53 @@ global $div,$g_parameter,$cn,$access,$jr_id,$obj;
$str_anc.=td($poste);
$str_anc.=td(nbm($htva)." {$side}");
$str_anc.=$anc_op->display_table(1, $htva, $div);
- }
+
+ $str_anc.='</tr>';
+ /* check there is no other row for this one like
TVA_ND */
+ /**
+ * @var $anl_extra array of rows from
operation_analytique concerning the current record
+ *
+ */
+ $anl_extra=$cn->get_array('select distinct
j1.f_id,
+ o1.j_id j_id_anx,
+ j1.j_poste,
+ j1.j_debit,
+ j1.j_montant
+ from operation_analytique o1
+ join jrnx j1 on (o1.j_id=j1.j_id)
+ where oa_jrnx_id_source = $1',
+ [$q['j_id']]);
+ if (count($anl_extra) > 0)
+ {
+ foreach ($anl_extra as $item_anl_extra) {
+
+ $anc_op = new Anc_Operation($cn);
+ $anc_op->j_id =$item_anl_extra['j_id_anx'];
+ $anc_op->in_div=uniqid();
+ $side=($item_anl_extra['j_debit'] ==
'f')?'C':'D';
+ $n="";
+ if ( $item_anl_extra['f_id'] != "") {
+ $n=$cn->get_value('select ad_value
from fiche_detail
+ where
+ f_id =$1
+ and ad_id=$2'
+
,[$item_anl_extra['f_id'],ATTR_DEF_QUICKCODE]);
+ }
+
+ /* compute total price */
+ bcscale(2);
+ $str_anc.='<tr>';
+ $str_anc.=td($n);
+ $str_anc.=td($item_anl_extra['j_poste']);
+
+
$str_anc.=td(nbm($item_anl_extra['j_montant'])." {$side}");
+ $str_anc.=$anc_op->display_table(0, $htva,
$anc_op->in_div);
+
+ $str_anc.='</tr>';
+ }
+
+ }
+ }
}
$class=($e%2==0)?' class="even"':'class="odd"';
/*
- [Noalyss-commit] [noalyss] branch stable updated (87930cbe3 -> c64f356cf), dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 02/11: FIX : some doc in comment, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 01/11: NEW #0002395: C0TVA : pouvoir choisir la contrepartie pour l'autoliquidation, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 08/11: improve Operation detail : show Analytic imputation for VAT Not Deductible,
dwm <=
- [Noalyss-commit] [noalyss] 07/11: improve doc, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 09/11: Operation Analytic : save_form_plan_vat_nd , check that the total is the same as the VAT ND amount, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 11/11: VAT ND Analytic : fix bug, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 05/11: FIX P0TVA when no data, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 10/11: Documentation, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 04/11: FIX : Tax_Summary->check fails when there is no data, check was not correct, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 06/11: New : label cannot be empty, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 03/11: Convert upgrade.sql to upgrade202.sql, dwm, 2024/12/15