Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0002041Openbravo ERP09. Financial managementpublic2007-10-04 18:532008-06-12 09:43
user71 
cromero 
normalminoralways
closedfixed 
5
 
2.35 
No
Core
No
0002041: Error in bank statement and cash journal process
When the "Process" button in Bank Statement or Cash Journal is pressed a red background "Error:" message shows in the top of the record without further explanation. The stament or journal remain not processed.

In postgresql.log this errors show (in this case on bank statement, the cash statement error log its similiar):

NOTICE: Updating PInstance - Processing 1034760
NOTICE: AD_UPDATE_PINSTANCE
CONTEXT: SQL statement "SELECT Ad_Update_PInstance( $1 , NULL, 'Y', NULL, NULL)"
PL/pgSQL function "c_bankstatement_post" line 50 at perform
NOTICE: ----<<C_Settlement_Post>>
CONTEXT: SQL statement "SELECT C_Settlement_Post(NULL, $1 )"
PL/pgSQL function "c_bankstatement_post" line 487 at perform
NOTICE: @ERROR=function ad_column_identifier_std("unknown", numeric) does not exist
CONTEXT: SQL statement "SELECT C_Settlement_Post(NULL, $1 )"
PL/pgSQL function "c_bankstatement_post" line 487 at perform
NOTICE: GettingBankAccountInfo
NOTICE: @ERROR=
NOTICE: AD_UPDATE_PINSTANCE
CONTEXT: SQL statement "SELECT Ad_Update_PInstance( $1 , NULL, 'N', 0, $2 )"
PL/pgSQL function "c_bankstatement_post" line 575 at perform

.

I have tested this in 3 diferent enviroments:

Ob 2.33
WinXP Pro sp2.
Tomcat 5.5
JDK 1.5.07
Ant 1.7
Postgresql 8.2.5

Ob 2.34
WinXP Pro sp2
Tomcat 5.5
JDK 1.5.07
And 1.7
Postgresql 8.2.5

Ob 2.33
Mac Os X 10.4.10
Tomcat 5.5
JDK 1.5.07
Ant 1.7
Postgresql 8.2.5 (this db data was migrated from an XP install generated one)

 
No tags attached.
Issue History

Notes
(0005630)
user71   
2005-06-01 00:00   
(edited on: 2008-06-12 09:43)
This bug was originally reported in SourceForge bug tracker and then migrated to Mantis.

You can see the original bug report in:
https://sourceforge.net/support/tracker.php?aid=1807637 [^]
(0002287)
cromero   
2007-10-20 10:55   
(edited on: 2008-06-12 09:22)
Logged In: YES
user_id=1500614
Originator: NO

Fixed.

Modified function c_settlement_post to make it work in Postgre version.

Carlos Romero
Openbravo Team
(0002288)
rafaroda   
2007-10-31 13:21   
(edited on: 2008-06-12 09:22)
Logged In: YES
user_id=1892190
Originator: NO

Verification assigned to rafaroda.
(0002289)
user71   
2007-11-20 13:54   
(edited on: 2008-06-12 09:22)
Logged In: YES
user_id=1900228
Originator: NO

Hi,

could you please post the attachment with the code for the new "c_settlement_post" function that solves this issue?

Thanks!
(0002290)
cromero   
2007-11-21 09:59   
(edited on: 2008-06-12 09:22)
Logged In: YES
user_id=1500614
Originator: NO

New postgres version of this function can be generated now from subversion repository.
The problem here was located in the C_SETTLEMENT_POST function: function ad_column_identifier is of type:
  ad_column_identifier_std(p_tablename "varchar", p_record_id "varchar")
and there were some calls to this function without cast for the second parameter (it's needed to include to_char())

Hope this helps

Carlos Romero
Openbravo Team