[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 145/162: Currency : purchase, save all detail
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 145/162: Currency : purchase, save all detail also in currency, fix problem with the advance payment |
Date: |
Sat, 11 Jul 2020 13:24:07 -0400 (EDT) |
sparkyx pushed a commit to annotated tag E-4
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] 137/162: Currency : for misc. operation, (continued)
- [Noalyss-commit] [noalyss] 137/162: Currency : for misc. operation, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 135/162: Translation, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 136/162: Misc. Operation : input : Missing tag TR, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 140/162: Currency : meaning 1 EUR is worth x currency for Sales, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 141/162: 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, 2020/07/11
- [Noalyss-commit] [noalyss] 143/162: Currency : detail operation Purchase , the amount in currency were wrong in the summary, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 132/162: Translation, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 138/162: Currency : Precision 6, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 142/162: Currency : history for accounting , correct amount in currency, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 144/162: remove commented code, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 145/162: Currency : purchase, save all detail also in currency, fix problem with the advance payment,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 146/162: Currency : detail operation Sale , the amount in currency were wrong in the summary, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 139/162: Currency : precision 6, display default currency , protect used currency against delete, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 147/162: Task #1660 : place the button for the inventory on the top, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 148/162: New function findSide return D if number is <0, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 155/162: Protect parameters, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 156/162: PHP 7.2 incomptability : sizeof of not array, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 158/162: PHP 7.2 mistyped command, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 159/162: Currency Show currency info for MISC, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 151/162: Task #0001309: Association d'une opération avec elle-même., Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 153/162: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss into r700-currency, Dany De Bontridder, 2020/07/11