Openbravo Issue Tracking System - Localization Pack: Spain
View Issue Details
0045819Localization Pack: SpainSIIpublic2021-01-29 14:542021-03-02 09:46
vmromanos 
juabaez 
normalmajoralways
closedfixed 
5
 
 
0045819: Wrong data model in aeatsii_payment
IndexesTest 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

Run org.openbravo.test.model.IndexesTest and see the error.
Things 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
No tags attached.
Issue History
2021-01-29 14:54vmromanosNew Issue
2021-01-29 14:54vmromanosAssigned To => Jorge Bravo
2021-01-29 15:10shuehnerIssue Monitored: shuehner
2021-03-01 10:16Jorge BravoAssigned ToJorge Bravo => juabaez
2021-03-01 18:22juabaezStatusnew => scheduled
2021-03-01 19:30juabaezNote Added: 0126433
2021-03-01 20:04juabaezNote Added: 0126434
2021-03-01 20:26hgbotNote Added: 0126435
2021-03-02 09:46hgbotResolutionopen => fixed
2021-03-02 09:46hgbotStatusscheduled => closed
2021-03-02 09:46hgbotNote Added: 0126467
2021-03-02 09:46hgbotNote Added: 0126468
2021-03-02 09:46hgbotNote Added: 0126469
2021-03-02 09:46hgbotNote Added: 0126470

Notes
(0126433)
juabaez   
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   
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   
2021-03-01 20:26   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.sii/-/merge_requests/13 [^]
(0126467)
hgbot   
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   
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   
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   
2021-03-02 09:46   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.sii/-/merge_requests/13 [^]