[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 157/162: Currency - fix view
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 157/162: Currency - fix view |
Date: |
Sat, 11 Jul 2020 13:24:11 -0400 (EDT) |
sparkyx pushed a commit to annotated tag E-4
in repository noalyss.
commit 588442f9336997e9ff61f0dca9394c5fb7c146e1
Author: Dany De Bontridder <danydb@noalyss.eu>
AuthorDate: Sat Jan 12 13:44:37 2019 +0100
Currency - fix view
---
include/sql/patch/upgrade131.sql | 4 +++-
sql/upgrade.sql | 13 +++++++++++++
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/include/sql/patch/upgrade131.sql b/include/sql/patch/upgrade131.sql
index 17dd1c8..9a004b5 100644
--- a/include/sql/patch/upgrade131.sql
+++ b/include/sql/patch/upgrade131.sql
@@ -1,6 +1,6 @@
begin;
-drop VIEW public.v_detail_sale;
+drop VIEW if exists public.v_detail_sale;
CREATE OR REPLACE VIEW public.v_detail_sale as
WITH m AS (
@@ -145,6 +145,8 @@ join operation_currency as oc on (oc.j_id=q1.j_id)
group by x.j_poste,x.j_id
;
+drop view if exists v_all_card_currency;
+
create or replace view v_all_card_currency as
select sum(oc_amount) as sum_oc_amount,sum(oc_vat_amount) as
sum_oc_vat_amount,x.f_id,x.j_id
from
diff --git a/sql/upgrade.sql b/sql/upgrade.sql
index e69de29..e8af5a3 100644
--- a/sql/upgrade.sql
+++ b/sql/upgrade.sql
@@ -0,0 +1,13 @@
+begin;
+insert into "parameter" (pr_id ) values ('MY_DEFAULT_ROUND_ERROR_DEB');
+insert into "parameter" (pr_id ) values ('MY_DEFAULT_ROUND_ERROR_CRED');
+drop view if exists v_all_card_currency;
+
+create or replace view v_all_card_currency as
+select sum(oc_amount) as sum_oc_amount,sum(oc_vat_amount) as
sum_oc_vat_amount,f_id,j_id
+from
+operation_currency
+join jrnx using (j_id)
+group by f_id,j_id;
+
+commit ;
\ No newline at end of file
- [Noalyss-commit] [noalyss] 158/162: PHP 7.2 mistyped command, (continued)
- [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
- [Noalyss-commit] [noalyss] 149/162: Fix problem with total in balance export, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 150/162: by default jrn is an empty array, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 152/162: Merge branch 'r700-currency' of gitlab.noalyss.eu:noalyss/noalyss into r700-currency, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 154/162: Currency : because of Misc Operation, the tiers must also be saved into operation_currency. Fix also PRINTJRN for currency, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 161/162: Typo, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 162/162: Currency : set default accounting for change difference when using currency, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 157/162: Currency - fix view,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 160/162: Database upgrade, Dany De Bontridder, 2020/07/11