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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0047765
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementmajoralways2021-09-27 20:372021-10-14 09:53
ReporterlbressanView Statuspublic 
Assigned Tofernando_merino 
PriorityhighResolutionfixedFixed in VersionPR22Q1
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseOracleJava version
OS VersionDatabase versionAnt version
Product VersionPR20Q3.4SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0047765: Problem posting multiple invoices in the same collection

DescriptionThe problem is that the DESCRIPTION field of the FIN_PAYMENT table is defined as VARCHAR2 (255 BYTE), note that they are BYTEs not characters. It is important to note that this occurs on an Oracle database.
The problem occurs when trying to pay multiple bills in the same payment. When they are few, it is saved without problems in the DESCRIPTION field. In English "Invoice No .: and the invoices involved" is saved. When it is saved in Spanish, "Invoice Nº: and the implied invoices" is saved. When there are several and it exceeds the size of 255 characters, the Java algorithm itself cuts the string and places an ellipsis so that the string does not exceed the 255 character limit. The problem occurs when it is exactly 255 characters, because the algorithm in java checks that it is 255 CHARACTERS. If it is 255 characters, it is considered good and sends it to be registered in the database. The problem is that the string has 255 characters, which are not the same as bytes, because the character º does not occupy 1 but 2 bytes. 254 one-byte characters, plus one of 2 bytes make 256 bytes, which do not fit in the field defined in the database. Logically this only occurs with the Spanish language.

Validation in java
https://gitlab.com/openbravo/projects/platform/openbravo/-/blob/master/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java#L302 [^]

ERROR: ORA-12899: el valor es demasiado grande para la columna "OBISOPRO"."FIN_PAYMENT"."DESCRIPTION" (real: 256, máximo: 255)
Steps To Reproduce1.Have the Spanish translation installed (I imagine the Spanish localization pack)
2.In our case, which we also attached, we came up with 7 invoices (the document number contained 12 characters each).
3.Create at least 7 invoices.
4.Create a payment and click 'Add payment details'. Select the 7 invoices and press 'Done'
Proposed Solution1. Change column definition from VARCHAR to NVARCHAR
2. [Nice to have] Review other DESCRIPTION columns and adapt them too
TagsNo tags attached.
Attached Filespng file icon ErrorPago.png [^] (186,692 bytes) 2021-09-27 20:40

- Relationships Relation Graph ] Dependency Graph ]
related to design defect 0047832 newRetail Retail Modules Problem introducing long descriptions in some tables (Retail Pack Modules) 
depends on defect 0047840 closedfernando_merino Openbravo ERP API Change: Change DESCRIPTION column from VARCHAR to NVARCHAR type in FIN_PAYMENT table 
related to design defect 0047831 newTriage Finance Openbravo ERP Problem introducing long descriptions in some tables (CORE) 
causes defect 0047868 closedfernando_merino Modules Character mismatch in sql query in PopulateBankInstructions_data.xsql 

-  Notes
(0132298)
hgbot (developer)
2021-10-11 13:11

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/439 [^]
(0132339)
hgbot (developer)
2021-10-14 09:53

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: daf70fb0536158e00f6237de654ec2251824e671
Author: fernando_merino <fernando.merino@openbravo.com>
Date: 2021-10-11T13:15:00+02:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/daf70fb0536158e00f6237de654ec2251824e671 [^]

Fixes ISSUE-47765: Change type definition of column FIN_PAYMENT from VARCHAR to NVARCHAR

---
M src-db/database/model/tables/FIN_PAYMENT.xml
---
(0132340)
hgbot (developer)
2021-10-14 09:53

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/439 [^]

- Issue History
Date Modified Username Field Change
2021-09-27 20:37 lbressan New Issue
2021-09-27 20:37 lbressan Assigned To => Triage Finance
2021-09-27 20:37 lbressan Modules => Core
2021-09-27 20:37 lbressan Regression date => 2021-10-18
2021-09-27 20:37 lbressan Triggers an Emergency Pack => No
2021-09-27 20:39 lbressan Description Updated View Revisions
2021-09-27 20:40 lbressan File Added: ErrorPago.png
2021-09-28 16:11 vmromanos Regression date 2021-10-18 =>
2021-09-28 16:11 vmromanos Proposed Solution updated
2021-09-28 16:11 vmromanos Status new => acknowledged
2021-09-30 17:35 vmromanos Assigned To Triage Finance => fernando_merino
2021-10-11 13:11 hgbot Note Added: 0132298
2021-10-11 13:29 fernando_merino Relationship added related to 0047831
2021-10-13 13:03 fernando_merino Relationship added depends on 0047840
2021-10-14 09:53 hgbot Resolution open => fixed
2021-10-14 09:53 hgbot Status acknowledged => closed
2021-10-14 09:53 hgbot Fixed in Version => PR22Q1
2021-10-14 09:53 hgbot Note Added: 0132339
2021-10-14 09:53 hgbot Note Added: 0132340
2021-10-14 09:53 aferraz Relationship added related to 0047832
2021-10-18 14:45 aferraz Relationship added causes 0047868


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker