[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 35/218: Task #448 : correct bug when saving i
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 35/218: Task #448 : correct bug when saving into quant_purchase |
Date: |
Thu, 12 Sep 2019 15:58:35 -0400 (EDT) |
sparkyx pushed a commit to branch entreprise
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] 38/218: Task #448 : currency improve detail of operation, (continued)
- [Noalyss-commit] [noalyss] 38/218: Task #448 : currency improve detail of operation, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 09/218: Currency : add security for setting, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 13/218: indent, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 17/218: Currency : fix rounded bugs in detail operation, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 18/218: task #448 : Currency : display currency info into operation detail, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 20/218: Task #448 : check currency rate > 0 and payment in eur, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 23/218: Display the balance difference, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 25/218: Task #448 : payment method VEN, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 30/218: remove debug info, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 32/218: Task #448 : SQL integrated into upgrade128, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 35/218: Task #448 : correct bug when saving into quant_purchase,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 36/218: Bug in QUANT_PURCHASE , dp_dep_priv is not saved, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 42/218: remove debug, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 55/218: integrate fix for bug in insert_quant_purchase which cannot save private fee Conflicts: include/sql/patch/upgrade128.sql, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 29/218: Task #448 : currency_id = 0 for the default currency + display currency rate in confirm operation, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 34/218: Task #448 : Currency : purchase, fix bug for autoreverse VAT, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 40/218: Fix bug quant_purchase , private fee not saved, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 45/218: Fix todo_list : if list empty , gets an error in php 7.2, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 49/218: Update documentation, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 54/218: Bug 1600 : alphanumeric accounting must be case insensitive, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 59/218: Security fix : f_id is a number, Dany De Bontridder, 2019/09/12