[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 29/173: Currency : purchase, save all detail
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 29/173: Currency : purchase, save all detail also in currency, fix problem with the advance payment |
Date: |
Mon, 22 Mar 2021 12:58:30 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 2601b09570195d2643ed6c0b90acd62fafb0bcb4
Author: Dany De Bontridder <danydb@noalyss.eu>
AuthorDate: Sun Jan 6 15:22:36 2019 +0100
Currency : purchase, save all detail also in currency, fix problem with
the advance payment
---
include/class/acc_ledger_purchase.class.php | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/include/class/acc_ledger_purchase.class.php
b/include/class/acc_ledger_purchase.class.php
index 90911de..f93bbae 100644
--- a/include/class/acc_ledger_purchase.class.php
+++ b/include/class/acc_ledger_purchase.class.php
@@ -788,7 +788,14 @@ class Acc_Ledger_Purchase extends Acc_Ledger
}
$let_client=$acc_operation->insert_jrnx();
-
+ // --- insert also the currency amount for the customer
+ $operation_currency=new Operation_currency_SQL($this->db);
+ $operation_currency->oc_amount=$tot_amount_cur;
+ $operation_currency->oc_vat_amount=0;
+ $operation_currency->oc_price_unit=0;
+ $operation_currency->j_id=$let_client ;
+ $operation_currency->insert();
+
if ( $g_parameter->MY_TVA_USE=='Y')
{
/* save all vat
@@ -933,9 +940,9 @@ class Acc_Ledger_Purchase extends Acc_Ledger
$cust_amount=bcsub($cust_amount, $tot_tva_reversed);
// Convert paid amount in EUR
- $acompte=bcdiv($acompte, $p_currency_rate);
+ $acompte_defcur=bcdiv($acompte, $p_currency_rate);
- $famount=bcsub($cust_amount,$acompte);
+ $famount=bcsub($cust_amount,$acompte_defcur);
$acc_pay->poste=$poste_val;
$acc_pay->qcode=$fqcode;
- [Noalyss-commit] [noalyss] 05/173: Merge branch 'master' into r700-currency, (continued)
- [Noalyss-commit] [noalyss] 05/173: Merge branch 'master' into r700-currency, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 12/173: Translation, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 14/173: use of httpInput, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 15/173: Translation, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 19/173: Translation, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 24/173: Currency : meaning 1 EUR is worth x currency for Sales, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 30/173: Currency : detail operation Sale , the amount in currency were wrong in the summary, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 20/173: Misc. Operation : input : Missing tag TR, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 22/173: Currency : Precision 6, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 25/173: Currency : the meaning is : 1 euro is worth xxx Currency , so we divide the amount with the currency rate to compute the EUR value, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 29/173: Currency : purchase, save all detail also in currency, fix problem with the advance payment,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 33/173: Fix problem with total in balance export, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 31/173: Task #1660 : place the button for the inventory on the top, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 32/173: New function findSide return D if number is <0, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 35/173: Task #0001309: Association d'une opération avec elle-même., Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 36/173: Merge branch 'r700-currency' of gitlab.noalyss.eu:noalyss/noalyss into r700-currency, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 41/173: PHP 7.2 incomptability : sizeof of not array, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 45/173: Database upgrade, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 53/173: Mantis #0001682: CA - ajouter possibilité d'exporter le plan analytique, missing file, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 56/173: Mantis #1626: AFFICHAGE BALANCE FICHE - soldes nuls au débit, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 58/173: Mantis #1665: Pouvoir modifier l'ordre dans les listing de compta analytique, Dany De Bontridder, 2021/03/22