Currency - fix view

This commit is contained in:
Dany De Bontridder 2019-01-12 13:44:37 +01:00
parent 46b4cdf0aa
commit 588442f933
2 changed files with 16 additions and 1 deletions

View file

@ -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

View file

@ -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 ;