[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 35/238: Task #448 : correct bug when saving i
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 35/238: Task #448 : correct bug when saving into quant_purchase |
Date: |
Sat, 26 Oct 2019 04:40:20 -0400 (EDT) |
sparkyx pushed a commit to annotated tag rel7110
in repository noalyss.
commit 6029d9141418d547761ccb9838bc4a4474dc6c62
Author: Dany De Bontridder <address@hidden>
Date: Sat May 12 12:53:01 2018 +0200
Task #448 : correct bug when saving into quant_purchase
---
include/class/acc_ledger_purchase.class.php | 5 ++++-
include/sql/patch/upgrade128.sql | 6 +++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/include/class/acc_ledger_purchase.class.php
b/include/class/acc_ledger_purchase.class.php
index f1202ea..a3974d3 100644
--- a/include/class/acc_ledger_purchase.class.php
+++ b/include/class/acc_ledger_purchase.class.php
@@ -589,6 +589,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger
// Set the currency rate
$acc_amount->set_parameter("currency_rate", $p_currency_rate);
$acc_amount->convert_euro();
+ $amount_euro=$acc_amount->amount;
// Compute VAT or take the given one
if ( $g_parameter->MY_TVA_USE=='Y')
@@ -624,6 +625,8 @@ class Acc_Ledger_Purchase extends Acc_Ledger
$tot_amount=round(bcadd($tot_amount,$acc_amount->amount),2);
+ $tot_amount=round(bcadd($tot_amount,$acc_amount->amount_nd),2);
+
$tot_amount=round(bcadd($tot_amount,$acc_amount->amount_perso),2);
/* get the account and explode if necessary */
$sposte=$fiche->strAttribut(ATTR_DEF_ACCOUNT);
@@ -708,7 +711,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger
,$j_id /* 2 */
,${"e_march".$i} /* 3 */
,${"e_quant".$i} /* 4 */
- ,round($acc_amount->amount,2) /* 5 */
+ ,round($amount_euro,2) /* 5 */
,$acc_amount->amount_vat /* 6 */
,$oTva->get_parameter('id') /* 7 */
,$acc_amount->amount_nd /* 8 */
diff --git a/include/sql/patch/upgrade128.sql b/include/sql/patch/upgrade128.sql
index a491ed5..8a1bf87 100644
--- a/include/sql/patch/upgrade128.sql
+++ b/include/sql/patch/upgrade128.sql
@@ -78,9 +78,9 @@ COMMENT ON COLUMN public.currency.cr_name IS 'Name of the
currency' ;
CREATE TABLE public.operation_currency (
id bigserial NOT NULL,
- oc_amount numeric(6) NOT NULL, -- amount in currency
- oc_vat_amount numeric(6) NULL DEFAULT 0, -- vat amount in currency
- oc_price_unit numeric(6) NULL, -- unit price in currency
+ oc_amount numeric(20,6) NOT NULL, -- amount in currency
+ oc_vat_amount numeric(20,6) NULL DEFAULT 0, -- vat amount in currency
+ oc_price_unit numeric(20,6) NULL, -- unit price in currency
j_id int8 NOT NULL, -- fk to jrnx
CONSTRAINT operation_currency_pk PRIMARY KEY (id)
);
- [Noalyss-commit] [noalyss] 31/238: task #448 : currency always used and remove parameter 'use_currency' from parameters, add SQL script, (continued)
- [Noalyss-commit] [noalyss] 31/238: task #448 : currency always used and remove parameter 'use_currency' from parameters, add SQL script, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 32/238: Task #448 : SQL integrated into upgrade128, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 28/238: Task #448 : currency , EUR cannot be changed and not display, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 33/238: Task #448 : correct bug if VAT Rate = 0 , amount was reset, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 25/238: Task #448 : payment method VEN, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 30/238: remove debug info, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 16/238: Currency : insert operation with currency in VEN and ACH, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 38/238: Task #448 : currency improve detail of operation, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 42/238: remove debug, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 39/238: integrate fix for bug in insert_quant_purchase which cannot save private fee, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 35/238: Task #448 : correct bug when saving into quant_purchase,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 36/238: Bug in QUANT_PURCHASE , dp_dep_priv is not saved, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 43/238: Missing ob_start, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 41/238: Fix bug quant_purchase , private fee not saved, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 44/238: Task #448 : add info about currency into History of cards and accounting, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 46/238: Merge branch 'r700-currency' of ssh://ns3git/srv/git/noalyss into r700-currency, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 50/238: Protect function nb , return the string if the parameter is not a float, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 53/238: Missing class : missing class for acc_ledger, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 51/238: New version of libreoffice use the numeric in another way, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 45/238: Fix todo_list : if list empty , gets an error in php 7.2, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 47/238: typo, Dany De Bontridder, 2019/10/26