Openbravo Issue Tracking System - Openbravo Localizations
View Issue Details
0047556Openbravo LocalizationsLocalization Portugalpublic2021-08-16 14:082021-09-16 17:48
psanjuan 
vmromanos 
urgentmajoralways
closedfixed 
30Openbravo Appliance 14.04
 
 
0047556: The element 'TaxTable' in namespace 'urn:OECD:StandardAuditFile-Tax:PT_1.04_01' has incomplete content.
The element 'TaxTable' in namespace 'urn:OECD:StandardAuditFile-Tax:PT_1.04_01' has incomplete content. List of possible elements expected: 'TaxTableEntry' in namespace 'urn:OECD:StandardAuditFile-Tax:PT_1.04_01'
In an environment with the PT Certification code installed in 19Q3 with the "performance" enhancements, launch e-fatura file for one store and within a given period of time.

The error above is shown.

See files attached below:

https://drive.google.com/drive/folders/1c2zgDRCYj2yVrqaJOvi73yqidy_eDPRK [^]
(XML files with errors)

Summary errors document:
https://docs.google.com/spreadsheets/d/1mj-LK3q9q_Mcvy-ybLHQVYopJ4yfhlwU3Vh1enoAQ5E/edit#gid=1443170639 [^]
No tags attached.
related to defect 0047558 closed vmromanos The 'MasterFiles' start tag on line 27 position 6 does not match the end tag of 'AuditFile'. 
caused by feature request 0046902 new psanjuan It should be possible to launch e-fatura file for an organization 
related to defect 0047557 closed vmromanos Unexpected XML declaration. The XML declaration must be the first node in the document and no white space characters are allowed 
png image_2021_08_16T09_47_08_566Z.png (65,205) 2021-08-16 14:17
https://issues.openbravo.com/file_download.php?file_id=16111&type=bug
png
Issue History
2021-08-16 14:08psanjuanNew Issue
2021-08-16 14:08psanjuanAssigned To => psanjuan
2021-08-16 14:11psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=23002#r23002
2021-08-16 14:11psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=23003#r23003
2021-08-16 14:14psanjuanIssue cloned0047557
2021-08-16 14:14psanjuanRelationship addedrelated to 0047557
2021-08-16 14:17psanjuanFile Added: image_2021_08_16T09_47_08_566Z.png
2021-08-16 14:41psanjuanNote Added: 0131143
2021-08-16 15:49psanjuanRelationship addedrelated to 0047558
2021-09-16 10:19vmromanosStatusnew => scheduled
2021-09-16 10:19vmromanosAssigned Topsanjuan => vmromanos
2021-09-16 10:19vmromanosRelationship addedcaused by 0046902
2021-09-16 10:27vmromanosNote Added: 0131858
2021-09-16 13:51hgbotNote Added: 0131865
2021-09-16 13:56hgbotNote Added: 0131867
2021-09-16 14:00hgbotNote Added: 0131868
2021-09-16 14:25hgbotNote Added: 0131870
2021-09-16 17:48hgbotResolutionopen => fixed
2021-09-16 17:48hgbotStatusscheduled => closed
2021-09-16 17:48hgbotNote Added: 0131879
2021-09-16 17:48hgbotNote Added: 0131880
2021-09-16 17:48hgbotNote Added: 0131881
2021-09-16 17:48hgbotNote Added: 0131882
2021-09-16 17:48hgbotNote Added: 0131883
2021-09-16 17:48hgbotNote Added: 0131884
2021-09-16 17:48hgbotNote Added: 0131885
2021-09-16 17:48hgbotNote Added: 0131886

Notes
(0131143)
psanjuan   
2021-08-16 14:41   
http://practicsbs.zendesk.com/hc/requests/10719 [^]
(0131858)
vmromanos   
2021-09-16 10:27   
This issue is caused by 0046902, which is not applied to the module yet. Anyway we will fix it now to make sure this part works fine when that FR is ready
(0131865)
hgbot   
2021-09-16 13:51   
Merge Request created: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt/-/merge_requests/17 [^]
(0131867)
hgbot   
2021-09-16 13:56   
Merge Request created: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt/-/merge_requests/18 [^]
(0131868)
hgbot   
2021-09-16 14:00   
Merge Request created: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt/-/merge_requests/19 [^]
(0131870)
hgbot   
2021-09-16 14:25   
Merge Request created: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt/-/merge_requests/20 [^]
(0131879)
hgbot   
2021-09-16 17:48   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt [^]
Changeset: 00f825c069e810c9b5f2836855973aa621764111
Author: Víctor Martínez Romanos <victor.martinez@openbravo.com>
Date: 2021-09-16T14:15:33+02:00
URL: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt/-/commit/00f825c069e810c9b5f2836855973aa621764111 [^]

Fixed ISSUE-47556: TaxTable not generated when exporting by organization

If the SAFT is exported by organization (not by legal entity as it is originally
designed), the TaxTable section was not generated sometimes.

The code was filtering by the tax rates defined at the organization for which the
SAFT is being generated or by any of its parents.

The fix removes this filtering as it's not needed, because there is previously a query
that gets the invoices and orders for the given organization or any of its children,
and that is used later on to retrieve the tax rates.
Any tax rate applied to these documents is a candidate to be included into the SAFT,
regardless of its organization.

---
M src/com/practicsbs/saftpt/data/ExportMFTaxTable.java
M src/com/practicsbs/saftpt/data/TaxTable_data.xsql
---
(0131880)
hgbot   
2021-09-16 17:48   
Merge request merged: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt/-/merge_requests/20 [^]
(0131881)
hgbot   
2021-09-16 17:48   
Merge request merged: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt/-/merge_requests/19 [^]
(0131882)
hgbot   
2021-09-16 17:48   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt [^]
Changeset: 478ce1e7bbbcadfd03bb4c313be478df28b88a18
Author: Víctor Martínez Romanos <victor.martinez@openbravo.com>
Date: 2021-09-16T13:43:07+02:00
URL: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt/-/commit/478ce1e7bbbcadfd03bb4c313be478df28b88a18 [^]

Fixed ISSUE-47556: TaxTable not generated when exporting by organization

If the SAFT is exported by organization (not by legal entity as it is originally
designed), the TaxTable section was not generated sometimes.

The reason is a wrong call to the ad_isorgincluded() function in the query that
retrieves the taxes. It failed when the tax rate was defined at any parent org
of the organization we are generating the SAFT for.

The fix removes this wrong call to ad_isorgincluded() as in the same queries we
are filtering by the organizations within the tree, so there is no need to apply
a new filter over the tax rate's organization. In other words, if the document
(invoice or order) belongs to this organization or any children, then the tax
rate must be included into the SAFT regardless its organization.

As a small collateral effect, this fix will improve a little bit the general performance.

---
M src/com/practicsbs/saftpt/data/ExportMFTaxTable.java
M src/com/practicsbs/saftpt/data/TaxTable_data.xsql
---
(0131883)
hgbot   
2021-09-16 17:48   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt [^]
Changeset: e810c4e589669ae7bfcf042b4a9d9f14e5e01d32
Author: Víctor Martínez Romanos <victor.martinez@openbravo.com>
Date: 2021-09-16T13:44:02+02:00
URL: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt/-/commit/e810c4e589669ae7bfcf042b4a9d9f14e5e01d32 [^]

Fixed ISSUE-47556: TaxTable not generated when exporting by organization

If the SAFT is exported by organization (not by legal entity as it is originally
designed), the TaxTable section was not generated sometimes.

The reason is a wrong call to the ad_isorgincluded() function in the query that
retrieves the taxes. It failed when the tax rate was defined at any parent org
of the organization we are generating the SAFT for.

The fix removes this wrong call to ad_isorgincluded() as in the same queries we
are filtering by the organizations within the tree, so there is no need to apply
a new filter over the tax rate's organization. In other words, if the document
(invoice or order) belongs to this organization or any children, then the tax
rate must be included into the SAFT regardless its organization.

As a small collateral effect, this fix will improve a little bit the general performance.

---
M src/com/practicsbs/saftpt/data/ExportMFTaxTable.java
M src/com/practicsbs/saftpt/data/TaxTable_data.xsql
---
(0131884)
hgbot   
2021-09-16 17:48   
Merge request merged: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt/-/merge_requests/18 [^]
(0131885)
hgbot   
2021-09-16 17:48   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt [^]
Changeset: 5d9e1aad55c90702e89f3633ee752f1dcc39d0e0
Author: Víctor Martínez Romanos <victor.martinez@openbravo.com>
Date: 2021-09-16T13:31:55+02:00
URL: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt/-/commit/5d9e1aad55c90702e89f3633ee752f1dcc39d0e0 [^]

Fixed ISSUE-47556: TaxTable not generated when exporting by organization

If the SAFT is exported by organization (not by legal entity as it is originally
designed), the TaxTable section was not generated sometimes.

The reason is a wrong call to the ad_isorgincluded() function in the query that
retrieves the taxes. It failed when the tax rate was defined at any parent org
of the organization we are generating the SAFT for.

The fix removes this wrong call to ad_isorgincluded() as in the same queries we
are filtering by the organizations within the tree, so there is no need to apply
a new filter over the tax rate's organization. In other words, if the document
(invoice or order) belongs to this organization or any children, then the tax
rate must be included into the SAFT regardless its organization.

As a small collateral effect, this fix will improve a little bit the general performance.

---
M src/com/practicsbs/saftpt/data/ExportMFTaxTable.java
M src/com/practicsbs/saftpt/data/TaxTable_data.xsql
---
(0131886)
hgbot   
2021-09-16 17:48   
Merge request merged: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt/-/merge_requests/17 [^]