Openbravo Issue Tracking System - Localization Pack: Spain |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0045819 | Localization Pack: Spain | SII | public | 2021-01-29 14:54 | 2021-03-02 09:46 |
|
Reporter | vmromanos | |
Assigned To | juabaez | |
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | | |
Merge Request Status | |
Regression date | |
Regression introduced by commit | |
Regression level | |
Review Assigned To | |
Support ticket | |
OBNetwork customer | |
Regression introduced in release | |
|
Summary | 0045819: Wrong data model in aeatsii_payment |
Description | 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
|
Steps To Reproduce | Run org.openbravo.test.model.IndexesTest and see the error. |
Proposed Solution | 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 |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | |
|
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 | |
Notes |
|
|
I confirm that aeatsii_payment_cashvat_v_id and fin_payment_id contains the same information in aeatsii_payment table |
|
|
|
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
|
|
|
|
(0126467)
|
hgbot
|
2021-03-02 09:46
|
|
|
|
(0126468)
|
hgbot
|
2021-03-02 09:46
|
|
|
|
(0126469)
|
hgbot
|
2021-03-02 09:46
|
|
|
|
(0126470)
|
hgbot
|
2021-03-02 09:46
|
|
|