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

View Revisions: Issue #47765 All Revisions ] Back to Issue ]
Summary 0047765: Problem posting multiple invoices in the same collection
Revision 2021-09-27 20:39 by lbressan
Description The 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)
Revision 2021-09-27 20:37 by lbressan
Description The 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 [^]


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker