Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0002486Openbravo ERP09. Financial managementpublic2008-01-09 10:182008-07-04 19:05
user71 
cromero 
normalminoralways
closedfixed 
5
 
2.40beta 
No
Core
No
0002486: Saving records in Payment Status Management Lines

Merely clicking the 'Save' button in :

Financial Management->Receivables & Payables->Transactions->Payment Status Management->Header->Lines

will produce error :

"ERROR : COALESCE types character and integer cannot be matched'

I found the offending codes in database trigger "c_dpmline_chk_restriction_trg" line 15:

... OR(COALESCE(OLD.STATUS_FROM, 0) <> COALESCE(NEW.STATUS_FROM, 0)) OR(COALESCE(OLD.STATUS_TO, 0) <> COALESCE(NEW.STATUS_TO, 0)))) THEN

Changing it to

... OR(COALESCE(OLD.STATUS_FROM, '') <> COALESCE(NEW.STATUS_FROM, '')) OR(COALESCE(OLD.STATUS_TO, '') <> COALESCE(NEW.STATUS_TO, '')))) THEN

Seems to solve the problem. Is this correct?, please advice.

Openbravo 2.35
Debian Etch
Postgresql 8.2/lenny
Tomcat5.5
Java 1.5
No tags attached.
depends on backport 0003613 closed cromero Saving records in Payment Status Management Line 
Issue History
2008-07-04 19:05plujanStatusresolved => closed
2008-07-04 19:05plujanFixed in Version2.40alpha-r2 => 2.40beta

Notes
(0006075)
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=1867543 [^]
(0002981)
cromero   
2008-01-29 12:50   
(edited on: 2008-06-12 09:24)
Logged In: YES
user_id=1500614
Originator: NO

Fixed in the trunk since revision 2166.

Yes you are right, in PostgreSQL is not allowed to use different types of data in a COALESCE (Oracle makes cast automatically).

Carlos Romero
Openbravo Team