[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 07/33: Bug for reversed operation when curren
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 07/33: Bug for reversed operation when currency are used |
Date: |
Thu, 11 Nov 2021 06:02:43 -0500 (EST) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 5b3bb3ece86ef1c558182e0b7307e9e9c4c62f2e
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Fri Oct 1 13:22:59 2021 +0200
Bug for reversed operation when currency are used
---
include/class/acc_ledger.class.php | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/class/acc_ledger.class.php
b/include/class/acc_ledger.class.php
index b74305f..bd60303 100644
--- a/include/class/acc_ledger.class.php
+++ b/include/class/acc_ledger.class.php
@@ -284,7 +284,9 @@ class Acc_Ledger extends jrn_def_sql
array($this->jr_grpt_id));
for ($l=0; $l<count($a_jid); $l++)
{
+ // jrnx.j_id to reverse
$row=$a_jid[$l]['j_id'];
+
// Make also the change into jrnx
$sql="insert into jrnx (
j_date,j_montant,j_poste,j_grpt,
@@ -304,6 +306,8 @@ class Acc_Ledger extends jrn_def_sql
throw (new Exception(__FILE__.__LINE__."SQL ERROR [ $sql
]"));
}
$aj_id=$this->db->fetch(0);
+
+ // jrnx.j_id of the reversed operation
$j_id=$aj_id['j_id'];
/* automatic lettering */
@@ -337,6 +341,10 @@ class Acc_Ledger extends jrn_def_sql
{
throw new Exception(__FILE__.__LINE__."SQL ERROR [ $sql
]");
}
+ // Reverse also in the currency table
+ $this->db->exec_sql("insert into operation_currency
(oc_amount,oc_vat_amount,oc_price_unit,j_id) "
+ . " select
0-oc_amount,0-oc_vat_amount,oc_price_unit,$j_id from operation_currency where
j_id=$1",
+ [$row]);
}
$sql="insert into jrn (
jr_id,
- [Noalyss-commit] [noalyss] 01/33: Cosmetic : move dialog horizontally and vertically, (continued)
- [Noalyss-commit] [noalyss] 01/33: Cosmetic : move dialog horizontally and vertically, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 02/33: Cosmetic : add button close for filter, dialog box search operation, TVA, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 09/33: Rounded for currency, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 08/33: Operation details : calcul correctement la différence avec les opérations extournées, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 12/33: Button close for new card, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 06/33: Bug rounded : show amount in currency with 4 dec., Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 10/33: For Misc Operation in currency , show the currency amount / row, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 11/33: Bug for reversed operation when currency are used, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 03/33: Improve HttpInput::extract , the array is set and not passed anymore, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 05/33: Bug : pour non-assujetti , pas de calcul en devise, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 07/33: Bug for reversed operation when currency are used,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 14/33: Typo, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 13/33: Compute.php it happens that the argument are not numeric, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 16/33: Documentation, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 15/33: Bug #2079 : 0002079: Recherche de carte : guillement ne passe pas, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 21/33: Cosmetic #2082 : OD parfois ajout différence de change, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 18/33: Bug : currency_id was nullable script compatible PSQL 10, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 20/33: Cosmetic #0002080 : NOT-FOUND, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 22/33: Cosmetic #0002081: PRINTTVA : l'export PDF de la TVA, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 23/33: Fix : date before 2000 throws an exception, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 25/33: Improve ACC_LEDGER compute internal ledger code in base 36, Dany De Bontridder, 2021/11/11