Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0014699Openbravo ERP09. Financial managementpublic2010-09-24 18:272010-12-22 00:00
stalker 
dalsasua 
normalminoralways
closedduplicate 
302.6.27-11-generic
2.50MP20 
 
Core
No
0014699: Import budget process fails
Process ImportBudget fails with claim from Postgres... incompatible arguments for COALESCE....
Export buget in Excel, edit it, save to CSV, import file in "Master Data Management || Import Data || Import File Loader || Import File Loader", then open any line in "Master Data Management || Import Data || Import Budget || Import Budget" and click "Import Budget"
apply patch to ImportBudget_data.xsql:

571,582c571,582
< WHERE COALESCE(I_BudgetLine.C_ELEMENTVALUE_ID,'1') = COALESCE(bl.C_ELEMENTVALUE_ID,'1')
< AND COALESCE(I_BudgetLine.C_Period_ID,'1') = COALESCE(bl.C_Period_ID,'1')
< AND COALESCE(I_BudgetLine.C_Bpartner_ID,'1') = COALESCE(bl.C_Bpartner_ID,'1')
< AND COALESCE(I_BudgetLine.AD_OrgTrx_ID,'1') = COALESCE(bl.AD_OrgTrx_ID,'1')
< AND COALESCE(I_BudgetLine.C_SalesRegion_ID,'1') = COALESCE(bl.C_SalesRegion_ID,'1')
< AND COALESCE(I_BudgetLine.C_Project_ID,'1') = COALESCE(bl.C_Project_ID,'1')
< AND COALESCE(I_BudgetLine.C_Campaign_ID,'1') = COALESCE(bl.C_Campaign_ID,'1')
< AND COALESCE(I_BudgetLine.C_Activity_ID,'1') = COALESCE(bl.C_Activity_ID,'1')
< AND COALESCE(I_BudgetLine.C_BP_Group_ID,'1') = COALESCE(bl.C_BP_Group_ID,'1')
< AND COALESCE(I_BudgetLine.M_Product_ID,'1') = COALESCE(bl.M_Product_ID,'1')
< AND COALESCE(I_BudgetLine.M_Product_Category_ID,'1') = COALESCE(bl.M_Product_Category_ID,'1')
< AND COALESCE(I_BudgetLine.C_Currency_ID,'1') = COALESCE(bl.C_Currency_ID,'1')
---
> WHERE COALESCE(I_BudgetLine.C_ELEMENTVALUE_ID,-1) = COALESCE(bl.C_ELEMENTVALUE_ID,-1)
> AND COALESCE(I_BudgetLine.C_Period_ID,-1) = COALESCE(bl.C_Period_ID,-1)
> AND COALESCE(I_BudgetLine.C_Bpartner_ID,-1) = COALESCE(bl.C_Bpartner_ID,-1)
> AND COALESCE(I_BudgetLine.AD_OrgTrx_ID,-1) = COALESCE(bl.AD_OrgTrx_ID,-1)
> AND COALESCE(I_BudgetLine.C_SalesRegion_ID,-1) = COALESCE(bl.C_SalesRegion_ID,-1)
> AND COALESCE(I_BudgetLine.C_Project_ID,-1) = COALESCE(bl.C_Project_ID,-1)
> AND COALESCE(I_BudgetLine.C_Campaign_ID,-1) = COALESCE(bl.C_Campaign_ID,-1)
> AND COALESCE(I_BudgetLine.C_Activity_ID,-1) = COALESCE(bl.C_Activity_ID,-1)
> AND COALESCE(I_BudgetLine.C_BP_Group_ID,-1) = COALESCE(bl.C_BP_Group_ID,-1)
> AND COALESCE(I_BudgetLine.M_Product_ID,-1) = COALESCE(bl.M_Product_ID,-1)
> AND COALESCE(I_BudgetLine.M_Product_Category_ID,-1) = COALESCE(bl.M_Product_Category_ID,-1)
> AND COALESCE(I_BudgetLine.C_Currency_ID,-1) = COALESCE(bl.C_Currency_ID,-1)
No tags attached.
duplicate of defect 00152022.50MP25 closed adrianromero Import Budget failure 
? ReportBudgetGenerateExcelXLS.ods (15,669) 2010-09-24 18:34
https://issues.openbravo.com/file_download.php?file_id=3123&type=bug
csv ReportBudgetGenerateExcelXLS.csv (2,021) 2010-09-24 18:35
https://issues.openbravo.com/file_download.php?file_id=3124&type=bug
Issue History
2010-09-24 18:27stalkerNew Issue
2010-09-24 18:27stalkerAssigned To => dalsasua
2010-09-24 18:30stalkerNote Added: 0031355
2010-09-24 18:32stalkerNote Edited: 0031355bug_revision_view_page.php?bugnote_id=0031355#r926
2010-09-24 18:34stalkerFile Added: ReportBudgetGenerateExcelXLS.ods
2010-09-24 18:35stalkerFile Added: ReportBudgetGenerateExcelXLS.csv
2010-09-24 18:41stalkerNote Edited: 0031355bug_revision_view_page.php?bugnote_id=0031355#r927
2010-09-27 12:15Xpand-ITIssue Monitored: Xpand-IT
2010-11-16 14:24networkbRelationship addedrelated to 0015202
2010-12-21 13:49adrianromeroRelationship replacedduplicate of 0015202
2010-12-21 13:49adrianromeroStatusnew => closed
2010-12-21 13:49adrianromeroResolutionopen => duplicate
2010-12-22 00:00anonymoussf_bug_id0 => 3141452

Notes
(0031355)
stalker   
2010-09-24 18:30   
(edited on: 2010-09-24 18:41)
I'm not sure about the value, which I used for replacement ... -1 -> '1'

Anyway, import works fine now.

PS. Strange thing... It looks like nobody has used "import budget" feature since OB migrated from OIDS to UUIDS.... WOW! :)