[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 01/01: Bug 1786: Comptabilité analytique : TV
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 01/01: Bug 1786: Comptabilité analytique : TVA non déductible bloque |
Date: |
Fri, 17 Jan 2020 14:19:24 -0500 (EST) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit f3061301bcc1b6d602dfca55ee87cf1f3f73964e
Author: Dany De Bontridder <address@hidden>
AuthorDate: Wed Jan 15 13:29:14 2020 +0100
Bug 1786: Comptabilité analytique : TVA non déductible bloque
---
include/class/acc_ledger_purchase.class.php | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/include/class/acc_ledger_purchase.class.php
b/include/class/acc_ledger_purchase.class.php
index b8cce05..3fb6492 100644
--- a/include/class/acc_ledger_purchase.class.php
+++ b/include/class/acc_ledger_purchase.class.php
@@ -402,7 +402,9 @@ class Acc_Ledger_Purchase extends Acc_Ledger
$p_acc_operation->poste = $dna;
$p_acc_operation->desc=$this->find_label($dna)." ND_TVA
".$p_fiche->strAttribut(ATTR_DEF_QUICKCODE);
$j_id = $p_acc_operation->insert_jrnx();
- if ( $g_parameter->MY_ANALYTIC != "nu" )
+ if ( $g_parameter->MY_ANALYTIC != "nu"
+ &&
$g_parameter->match_analytic($p_fiche->strAttribut(ATTR_DEF_ACCOUNT))
+ )
{
$op=new Anc_Operation($this->db);
$op->oa_group=$p_group;
@@ -441,7 +443,9 @@ class Acc_Ledger_Purchase extends Acc_Ledger
if ($p_nd_amount->nd_ded_vat > 0)
$p_tot_debit = bcadd($p_tot_debit, $p_nd_amount->nd_ded_vat);
$j_id = $p_acc_operation->insert_jrnx();
- if ( $g_parameter->MY_ANALYTIC != "nu" )
+ if ( $g_parameter->MY_ANALYTIC != "nu"
+ &&
$g_parameter->match_analytic($p_fiche->strAttribut(ATTR_DEF_ACCOUNT))
+ )
{
$op=new Anc_Operation($this->db);
$op->oa_group=$p_group;