Merge branch '1.0-fixed' into '1.0'

Automatic MR created by OCA2FC Migrator

See merge request flectra-community/account-financial-reporting!2
This commit is contained in:
Thomas Winteler 2021-07-14 12:29:14 +00:00
commit 0a64b9f55c

View File

@ -149,7 +149,7 @@ WITH
(SELECT coalesce(regexp_replace(tag.name,
'[^0-9\\.]+', '', 'g'), ' ') AS code,
tag.name, tag.id,
coalesce(sum(movetax.tax_base_amount), 0.00) AS net,
coalesce(sum(CASE WHEN movetax.balance >= 0 THEN movetax.tax_base_amount ELSE movetax.tax_base_amount * -1 END), 0.00) AS net,
coalesce(sum(movetax.balance), 0.00) AS tax
FROM
account_account_tag AS tag
@ -201,7 +201,7 @@ WITH
taxgroups AS
(SELECT coalesce(taxgroup.sequence, 0) AS code,
taxgroup.name, taxgroup.id,
coalesce(sum(movetax.tax_base_amount), 0.00) AS net,
coalesce(sum(CASE WHEN movetax.balance >= 0 THEN movetax.tax_base_amount ELSE movetax.tax_base_amount * -1 END), 0.00) AS net,
coalesce(sum(movetax.balance), 0.00) AS tax
FROM
account_tax_group AS taxgroup
@ -255,7 +255,7 @@ WITH
SELECT
tag.id AS report_tax_id, ' ' AS code,
tax.name, tax.id,
coalesce(sum(movetax.tax_base_amount), 0.00) AS net,
coalesce(sum(CASE WHEN movetax.balance >= 0 THEN movetax.tax_base_amount ELSE movetax.tax_base_amount * -1 END), 0.00) AS net,
coalesce(sum(movetax.balance), 0.00) AS tax
FROM
report_vat_report_taxtag AS tag
@ -310,7 +310,7 @@ WITH
SELECT
taxtag.id AS report_tax_id, ' ' AS code,
tax.name, tax.id,
coalesce(sum(movetax.tax_base_amount), 0.00) AS net,
coalesce(sum(CASE WHEN movetax.balance >= 0 THEN movetax.tax_base_amount ELSE movetax.tax_base_amount * -1 END), 0.00) AS net,
coalesce(sum(movetax.balance), 0.00) AS tax
FROM
report_vat_report_taxtag AS taxtag