Openbravo Issue Tracking System - Openbravo Localizations |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0046262 | Openbravo Localizations | Localization Portugal | public | 2021-04-14 09:00 | 2021-04-27 15:46 |
|
Reporter | psanjuan | |
Assigned To | markmm82 | |
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 30 | OS Version | Openbravo Appliance 14.04 |
Product Version | | |
Target Version | | Fixed in Version | | |
Merge Request Status | |
Regression date | |
Regression introduced by commit | |
Regression level | |
Support ticket | 23186 |
OBNetwork customer | Gold |
Regression introduced in release | |
|
Summary | 0046262: SAFT code must export the region search key if a tax rate has a region setup |
Description | SAFT code must export the region search key if a tax rate has a region setup |
Steps To Reproduce | In an PT enviroment with the SAFT code installed and the Portuguese taxes applied, create some sales transactions and export the e-fatura file.
While reviwing the file you will see below data en the tag TaxCountryCode
<TaxCountryRegion>Algarve</TaxCountryRegion>
|
Proposed Solution | Above is not the correct value expected, but the region code or RegionValue.
in the Openbravo regions dataset, all PT regions have PT as RegionValue, but Acores and Madeira, that have PT-AC and PT-MA, respectively. |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0046260 | | closed | markmm82 | Wrong region code for Açores and Madeira regions. Rest of regions need to have the code PT | related to | defect | 0047501 | | closed | vmromanos | TaxCountryRegion value 'Madeira' is not a valid instance of the element type error in org.openbravo.saftpt.wscommunication |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2021-04-14 09:00 | psanjuan | New Issue | |
2021-04-14 09:00 | psanjuan | Assigned To | => psanjuan |
2021-04-14 09:00 | psanjuan | OBNetwork customer | => No |
2021-04-14 10:31 | maite | Resolution time | => 1620165600 |
2021-04-14 10:31 | maite | Support ticket | => 23186 |
2021-04-14 10:31 | maite | OBNetwork customer | No => Gold |
2021-04-14 10:31 | maite | Issue Monitored: maite | |
2021-04-19 12:54 | aferraz | Assigned To | psanjuan => markmm82 |
2021-04-19 14:43 | markmm82 | Status | new => scheduled |
2021-04-19 19:11 | markmm82 | Note Added: 0127375 | |
2021-04-19 19:13 | markmm82 | Note Added: 0127376 | |
2021-04-20 14:07 | psanjuan | Relationship added | related to 0046260 |
2021-04-20 14:08 | psanjuan | Note Added: 0127386 | |
2021-04-20 17:12 | markmm82 | Note Edited: 0127375 | bug_revision_view_page.php?bugnote_id=0127375#r22348 |
2021-04-20 17:16 | markmm82 | Note Edited: 0127376 | bug_revision_view_page.php?bugnote_id=0127376#r22350 |
2021-04-23 14:07 | aferraz | Note Added: 0127500 | |
2021-04-23 14:07 | aferraz | Status | scheduled => resolved |
2021-04-23 14:07 | aferraz | Resolution | open => fixed |
2021-04-23 14:31 | aferraz | Note Deleted: 0127500 | |
2021-04-23 14:37 | hgbot | Note Added: 0127508 | |
2021-04-23 14:37 | aferraz | Status | resolved => closed |
2021-04-23 14:40 | hgbot | Status | closed => resolved |
2021-04-23 14:40 | hgbot | Note Added: 0127509 | |
2021-04-23 14:55 | aferraz | Status | resolved => closed |
2021-04-26 09:37 | hgbot | Status | closed => resolved |
2021-04-26 09:37 | hgbot | Note Added: 0127530 | |
2021-04-27 15:46 | aferraz | Status | resolved => closed |
2021-08-12 12:43 | vmromanos | Relationship added | related to 0047501 |
Notes |
|
(0127375)
|
markmm82
|
2021-04-19 19:11
(edited on: 2021-04-20 17:12) |
|
Test Plan 1: Tax rate with tax region defined different than Portugal Iso Code
In an PT enviroment with the SAFT code installed and the Portuguese taxes applied, create a sales order, add a line and use a tax rate defined for "Portugal" country and "Açores" region. Complete the document.
Create a new E-Fatura record for the organization used for the previously created order, select this month and use "today" as from and to dates.
Create a new "Process request" and schedule to run immediately the "Export SAFT PT" process. Execute it.
Go to previously created e-fatura. Notice a new document was attached to it related to exported e-fatura.
If you download and review the file you will see below data en the tag TaxCountryCode:
<TaxCountryRegion>PT-AC</TaxCountryRegion>
This is correct as the selected tax rate has a Acora as the defined region and this region has "AC" as region search code that is different than default Portugla regions search code: PT
|
|
|
(0127376)
|
markmm82
|
2021-04-19 19:13
(edited on: 2021-04-20 17:16) |
|
Test Plan 2: Tax rate without tax region defined or with tax region search key = PT
In an PT enviroment with the SAFT code installed and the Portuguese taxes applied, create a sales order, add a line and use a tax rate defined for "Portugal" country but without any region defined. Complete the document.
Create another sales order, add a line and use a tax rate defined for "Portugal" country, this time with any region defined different than AC and MA. Complete the document.
Create a new E-Fatura record for the organization used for the previously created order, select this month and use "today" as from and to dates.
Create a new "Process request" and schedule to run immediately the "Export SAFT PT" process. Execute it.
Go to previously created e-fatura. Notice a new document was attached to it related to the exported e-fatura.
If you download and review the file you will see below data en the tag TaxCountryCode:
<TaxCountryRegion>PT</TaxCountryRegion>
This is correct as the selected tax rate doesn't has any region defined (for the first order) and the country code is the same than the region search key for the second one.
|
|
|
|
Updated solution
For those regions where Country ISO Code "PT" is equal to the region code "PT", only export "PT".
For those regions where Country ISO Code "PT" is not equal to the region code "AT", export a concatenate value = PT-AC (Country ISO Code - Region Code) |
|
|
(0127508)
|
hgbot
|
2021-04-23 14:37
|
|
Repository: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt [^]
Changeset: 0258635fdfebbc5997564ac987a7db866d50c129
Author: Mark <markmm82@gmail.com>
Date: 2021-04-23T08:54:11-03:00
URL: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt/-/commit/0258635fdfebbc5997564ac987a7db866d50c129 [^]
Fixes ISSUE-46262: Correct TaxCountryRegion value when exporting e-fatura document
If exported documents are using a tax with a region defined, then the tax region code will be set as the value of the <TaxCountryRegion> tag.
If the tax rate region search key is the same than the country ISO code, then the country ISO Code will be used.
In case the tax rate region search key is not the same than the country ISO code, then the country ISO Code concatenated with the region search key will be used as TaxCountryRegion tag value
---
M src/com/practicsbs/saftpt/data/ExportMFTaxTable.java
M src/com/practicsbs/saftpt/data/ExportSourceDocs.java
M src/com/practicsbs/saftpt/data/ExportSourceDocsPayments.java
M src/com/practicsbs/saftpt/data/ExportSourceDocsWorkingDocuments.java
M src/com/practicsbs/saftpt/data/TaxTable_data.xsql
---
|
|
|
(0127509)
|
hgbot
|
2021-04-23 14:40
|
|
Repository: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt [^]
Changeset: 0258635fdfebbc5997564ac987a7db866d50c129
Author: Mark <markmm82@gmail.com>
Date: 2021-04-23T08:54:11-03:00
URL: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt/-/commit/0258635fdfebbc5997564ac987a7db866d50c129 [^]
Fixes ISSUE-46262: Correct TaxCountryRegion value when exporting e-fatura document
If exported documents are using a tax with a region defined, then the tax region code will be set as the value of the <TaxCountryRegion> tag.
If the tax rate region search key is the same than the country ISO code, then the country ISO Code will be used.
In case the tax rate region search key is not the same than the country ISO code, then the country ISO Code concatenated with the region search key will be used as TaxCountryRegion tag value
---
M src/com/practicsbs/saftpt/data/ExportMFTaxTable.java
M src/com/practicsbs/saftpt/data/ExportSourceDocs.java
M src/com/practicsbs/saftpt/data/ExportSourceDocsPayments.java
M src/com/practicsbs/saftpt/data/ExportSourceDocsWorkingDocuments.java
M src/com/practicsbs/saftpt/data/TaxTable_data.xsql
---
|
|
|
(0127530)
|
hgbot
|
2021-04-26 09:37
|
|
Repository: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt [^]
Changeset: 0258635fdfebbc5997564ac987a7db866d50c129
Author: Mark <markmm82@gmail.com>
Date: 2021-04-23T08:54:11-03:00
URL: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt/-/commit/0258635fdfebbc5997564ac987a7db866d50c129 [^]
Fixes ISSUE-46262: Correct TaxCountryRegion value when exporting e-fatura document
If exported documents are using a tax with a region defined, then the tax region code will be set as the value of the <TaxCountryRegion> tag.
If the tax rate region search key is the same than the country ISO code, then the country ISO Code will be used.
In case the tax rate region search key is not the same than the country ISO code, then the country ISO Code concatenated with the region search key will be used as TaxCountryRegion tag value
---
M src/com/practicsbs/saftpt/data/ExportMFTaxTable.java
M src/com/practicsbs/saftpt/data/ExportSourceDocs.java
M src/com/practicsbs/saftpt/data/ExportSourceDocsPayments.java
M src/com/practicsbs/saftpt/data/ExportSourceDocsWorkingDocuments.java
M src/com/practicsbs/saftpt/data/TaxTable_data.xsql
---
|
|