[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 149/238: Currency : purchase, save all detail
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 149/238: Currency : purchase, save all detail also in currency, fix problem with the advance payment |
Date: |
Sat, 26 Oct 2019 04:40:54 -0400 (EDT) |
sparkyx pushed a commit to annotated tag rel7110
in repository noalyss.
commit 2601b09570195d2643ed6c0b90acd62fafb0bcb4
Author: Dany De Bontridder <address@hidden>
Date: 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] 132/238: Translation, (continued)
- [Noalyss-commit] [noalyss] 132/238: Translation, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 120/238: Currency : send the saldo for financial ledger, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 145/238: 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, 2019/10/26
- [Noalyss-commit] [noalyss] 140/238: Misc. Operation : input : Missing tag TR, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 137/238: Translation, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 141/238: Currency : for misc. operation, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 164/238: Currency Show currency info for MISC, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 161/238: PHP 7.2 incomptability : sizeof of not array, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 166/238: Typo, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 154/238: by default jrn is an empty array, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 149/238: Currency : purchase, save all detail also in currency, fix problem with the advance payment,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 160/238: Protect parameters, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 157/238: Merge branch 'r700-currency' of gitlab.noalyss.eu:noalyss/noalyss into r700-currency, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 162/238: Currency - fix view, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 150/238: Currency : detail operation Sale , the amount in currency were wrong in the summary, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 165/238: Database upgrade, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 158/238: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss into r700-currency, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 167/238: Currency : set default accounting for change difference when using currency, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 159/238: Currency : because of Misc Operation, the tiers must also be saved into operation_currency. Fix also PRINTJRN for currency, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 173/238: Mantis #0001682: CA - ajouter possibilité d'exporter le plan analytique, missing file, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 177/238: Mantis #1643: Déplacement du "bouton" «retour en-haut/calculatrice», Dany De Bontridder, 2019/10/26