[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 66/73: Devise correct autoliquidation not tak
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 66/73: Devise correct autoliquidation not taken into account for currency |
Date: |
Fri, 28 May 2021 05:26:49 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 185325a3b400d1dc25cdb9f65ae46cc60293d15b
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Mon May 24 14:08:04 2021 +0200
Devise correct autoliquidation not taken into account for currency
---
include/class/acc_ledger_purchase.class.php | 3 +--
include/class/acc_ledger_sold.class.php | 1 +
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/class/acc_ledger_purchase.class.php
b/include/class/acc_ledger_purchase.class.php
index b6164ca..aeb2269 100644
--- a/include/class/acc_ledger_purchase.class.php
+++ b/include/class/acc_ledger_purchase.class.php
@@ -566,7 +566,6 @@ class Acc_Ledger_Purchase extends Acc_Ledger
/* Save all the items without vat and no deductible vat and
expense*/
for ($i=0;$i< $nb_item;$i++)
{
- $n_both=0;
if ( empty(${'e_march'.$i}) || empty(${'e_quant'.$i}) )
continue;
/* First we save all the items without vat */
@@ -768,7 +767,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger
*/
$operation_currency=new Operation_currency_SQL($this->db);
$operation_currency->oc_amount=$acc_amount->amount_currency;
-
$operation_currency->oc_vat_amount=$acc_amount->amount_vat_currency;
+
$operation_currency->oc_vat_amount=($tva_both==0)?$acc_amount->amount_vat_currency:0;
$operation_currency->oc_price_unit=${'e_march'.$i.'_price'};
$operation_currency->j_id=$j_id;
$operation_currency->insert();
diff --git a/include/class/acc_ledger_sold.class.php
b/include/class/acc_ledger_sold.class.php
index ad362e7..7c766d7 100644
--- a/include/class/acc_ledger_sold.class.php
+++ b/include/class/acc_ledger_sold.class.php
@@ -382,6 +382,7 @@ class Acc_Ledger_Sold extends Acc_Ledger {
$tot_tva = round($tot_tva, 2);
} else {
$n_both = $tva_item;
+ $tva_item_currency = 0;
if ($n_both<0)
{
$tot_debit=round(bcadd($tot_debit,
abs($n_both)),2);
- [Noalyss-commit] [noalyss] 63/73: Unit test : update, (continued)
- [Noalyss-commit] [noalyss] 63/73: Unit test : update, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 65/73: Task #0001992: Prévision, calcul avec comptabilité analytique, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 54/73: Security : Check the folder, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 05/73: comptability version 7.4 warning null is not a countable, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 48/73: PLpgSQL function , format properly the accounting before inserting fiche_detail and tmp_pcmn tables, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 51/73: Code rewriting : doc and remove duplicated function, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 58/73: Improve Manage_Table_SQL : missing param for execute-query, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 59/73: Correct menu PARAM, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 61/73: Bootstrap 4.6, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 64/73: cosmetic : menu on small screen, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 66/73: Devise correct autoliquidation not taken into account for currency,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 67/73: remove debug info, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 68/73: Payment by bank : currency info was missing, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 70/73: Bootstrap 4.6, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 69/73: Javascript format date, transform space into dot, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 71/73: Cosmetic : adapt for small screen , add border to cells, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 72/73: code improve rename scripts.js -> noalyss_script.js, Dany De Bontridder, 2021/05/28
- [Noalyss-commit] [noalyss] 73/73: Balance : code cleaning and cosmetic, Dany De Bontridder, 2021/05/28