Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0045819
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Localization Pack: Spain] SIImajoralways2021-01-29 14:542021-03-02 09:46
ReportervmromanosView Statuspublic 
Assigned Tojuabaez 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Regression date
Regression introduced by commit
Regression level
Review Assigned To
Regression introduced in release
Summary

0045819: Wrong data model in aeatsii_payment

DescriptionIndexesTest detects the following problem:

"Missing index in aeatsii_payment.aeatsii_payment_cashvat_v_ID. Because of child tab relationship in window SII Monitor from tab Payments SII Data to Cash Criterion Payments"


Digging into the data model I realize aeatsii_payment_cashvat_v_ID is the primary key of a view (aeatsii_payment_cashvat_v). However the aeatsii_payment.aeatsii_payment_cashvat_v_ID is a fk to fin_payment.fin_payment_id.
Besides, the aeatsii_payment table already has a fin_payment_id column, so it seems aeatsii_payment.aeatsii_payment_cashvat_v_ID and aeatsii_payment.fin_payment_id actually have duplicated info.


The aeatsii_payment_cashvat_v PK is actually a fin_payment_id, which is also returned as a separate column within the view.
This aeatsii_payment_cashvat_v view is linked to the Cash Criterion Payments tab within SII Monitor. It seems to be a read only tab with information.



I think the purpose of this mess is to be able to show the "Payments SII Data" (aeatsii_payment) tab under "Cash Criterion Payments" (aeatsii_payment_cashvat_v). If this is the case, and if both aeatsii_payment.aeatsii_payment_cashvat_v_ID and aeatsii_payment.fin_payment_id columns store the same information as I guess (please confirm!), it means that the model is wrong defined and it should be improved

Steps To ReproduceRun org.openbravo.test.model.IndexesTest and see the error.
Proposed SolutionThings that should be done:

1. Deleting aeatsii_payment.aeatsii_payment_cashvat_v_ID column
2. Setting aeatsii_payment.fin_payment_id as "link to parent column" in the table definition

Note that aeatsii_payment.fin_payment_id has the right FK and index, so it should work fine
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0126433)
juabaez (reporter)
2021-03-01 19:30

I confirm that aeatsii_payment_cashvat_v_id and fin_payment_id contains the same information in aeatsii_payment table
(0126434)
juabaez (reporter)
2021-03-01 20:04

Test Plan

- Configure the organization with cash vat
- Create a sales invoice, set cash vat to selected
- Add a new line with a product and verify tha tax rate selected is "Entregas IVA 21% IVA de Caja"
- Complete invoice and send to SII
- Add a payment in for the invoice.
- Go to window SII Monitor and now to tab Cash Criterion Payments
- Send payment in to SII
- See that a new row in Payments SII Data was create and has the relation with father row
(0126435)
hgbot (developer)
2021-03-01 20:26

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.sii/-/merge_requests/13 [^]
(0126467)
hgbot (developer)
2021-03-02 09:46

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.sii [^]
Changeset: 5572c48529faf71fc8235f973bd6cbfd313bf3f6
Author: Juan Baez <juabaez@gmail.com>
Date: 2021-03-01T16:20:12-03:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.sii/-/commit/5572c48529faf71fc8235f973bd6cbfd313bf3f6 [^]

Fixed ISSUE-45819 remove duplicated column from table aeatsii_payment

---
M src-db/database/model/tables/AEATSII_PAYMENT.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src/org/openbravo/module/sii/process/PaymentSending.java
---
(0126468)
hgbot (developer)
2021-03-02 09:46

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.sii [^]
Changeset: b9d7712f1810f9146b46fe3cbf113b16b0167c8d
Author: Juan Baez <juabaez@gmail.com>
Date: 2021-03-01T16:26:05-03:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.sii/-/commit/b9d7712f1810f9146b46fe3cbf113b16b0167c8d [^]

Fixed ISSUE-45819 update module version and module info

---
M src-db/database/sourcedata/AD_MODULE.xml
---
(0126469)
hgbot (developer)
2021-03-02 09:46

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.sii [^]
Changeset: 99be0251b9f7032ec2ad4e854d4611b2df1ecad0
Author: Víctor Martínez Romanos <victor.martinez@openbravo.com>
Date: 2021-03-02T08:39:17+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.sii/-/commit/99be0251b9f7032ec2ad4e854d4611b2df1ecad0 [^]

Related to ISSUE-45819: updated copyright year
---
M src/org/openbravo/module/sii/process/PaymentSending.java
---
(0126470)
hgbot (developer)
2021-03-02 09:46

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.sii/-/merge_requests/13 [^]

- Issue History
Date Modified Username Field Change
2021-01-29 14:54 vmromanos New Issue
2021-01-29 14:54 vmromanos Assigned To => Jorge Bravo
2021-01-29 15:10 shuehner Issue Monitored: shuehner
2021-03-01 10:16 Jorge Bravo Assigned To Jorge Bravo => juabaez
2021-03-01 18:22 juabaez Status new => scheduled
2021-03-01 19:30 juabaez Note Added: 0126433
2021-03-01 20:04 juabaez Note Added: 0126434
2021-03-01 20:26 hgbot Note Added: 0126435
2021-03-02 09:46 hgbot Resolution open => fixed
2021-03-02 09:46 hgbot Status scheduled => closed
2021-03-02 09:46 hgbot Note Added: 0126467
2021-03-02 09:46 hgbot Note Added: 0126468
2021-03-02 09:46 hgbot Note Added: 0126469
2021-03-02 09:46 hgbot Note Added: 0126470


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker