noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 02/02: Bug : with VAT partially deductible an


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 02/02: Bug : with VAT partially deductible and negative amount , it was a balance error , to solve this , the debit is computed (by SQL query ) before inserting into JRN , it slows down the operation but the result is correct
Date: Sat, 19 Mar 2016 12:57:09 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit db6340a84abc159e1b982fd6059a0bc4dc4ab007
Author: Dany De Bontridder <address@hidden>
Date:   Sat Mar 19 13:48:54 2016 +0100

    Bug : with VAT partially deductible and negative amount , it was a balance 
error , to solve this , the debit is computed (by SQL query ) before inserting 
into JRN , it slows down the operation but the result is correct
---
 include/class/class_acc_ledger_purchase.php |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/include/class/class_acc_ledger_purchase.php 
b/include/class/class_acc_ledger_purchase.php
index b656bb7..950f78a 100644
--- a/include/class/class_acc_ledger_purchase.php
+++ b/include/class/class_acc_ledger_purchase.php
@@ -768,7 +768,9 @@ class  Acc_Ledger_Purchase extends Acc_Ledger
             $acc_operation=new Acc_Operation($this->db);
             $acc_operation->date=$e_date;
             $acc_operation->echeance=$e_ech;
-            $acc_operation->amount=abs(round($tot_debit,2));
+            // Total DEB
+            $acc_operation->amount=$this->db->get_value("select sum(j_montant) 
from jrnx where j_grpt = $1 and j_debit='t'",
+                    array($seq));
             $acc_operation->desc=$e_comm;
             $acc_operation->grpt=$seq;
             $acc_operation->jrn=$p_jrn;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]