Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0026137Openbravo ERP09. Financial managementpublic2014-04-01 20:382014-05-07 18:12
shuehner 
eduardo_Argal 
normalmajorhave not tried
closedfixed 
5
pi 
 
Sandrahuguet
Core
Production - Confirmed Stable
2012-08-29
https://code.openbravo.com/erp/devel/pi/rev/78585c145c1f [^]
No
0026137: ant compile.buildvalidation -Dmodule=org.openbravo.advpaymentmngt fails
compiling the buildvalidation for aprm fails

     [java] 295 [main] INFO org.openbravo.data.Sqlc - File: /home/huehner/ob/branches/pi_retail_pg/modules/org.openbravo.advpaymentmngt/src-util/buildvalidation/src/org/openbravo/advpaymentmngt/buildvalidation/WrongPaymentScheduleDetailsCheck_data.xsql processed
     [java] 312 [main] ERROR org.openbravo.data.Sqlc - SQL error in query: SELECT count(*) AS existing
     [java] FROM (
     [java] SELECT o.c_order_id, o.documentno
     [java] FROM c_order o
     [java] JOIN fin_payment_schedule pso ON o.c_order_id = pso.c_order_id
     [java] WHERE EXISTS (SELECT 1
     [java] FROM c_invoice i
     [java] JOIN c_invoiceline il ON il.c_invoice_id = i.c_invoice_id
     [java] JOIN c_orderline ol ON il.c_orderline_id = ol.c_orderline_id
     [java] WHERE ol.c_order_id = o.c_order_id
     [java] AND i.docstatus = 'CO'
     [java] AND NOT EXISTS (SELECT 1 FROM fin_payment_scheduledetail psd
     [java] JOIN fin_payment_schedule psi ON psd.fin_payment_schedule_invoice = psi.fin_payment_schedule_id
     [java] WHERE il.c_invoice_id = psi.c_invoice_id
     [java] AND psd.fin_payment_schedule_order = pso.fin_payment_schedule_id)
     [java] GROUP BY il.c_invoice_id
     [java] HAVING sum(il.linenetamt +coalesce(c_getinvoiceline_taxamount(il.c_invoiceline_id),0)) != 0)
     [java] AND EXISTS (SELECT 1 FROM fin_payment_scheduledetail psdo
     [java] WHERE psdo.fin_payment_schedule_order = pso.fin_payment_schedule_id)) o
     [java] JOIN c_orderline ol ON ol.c_order_id = o.c_order_id
     [java] JOIN c_invoiceline il ON il.c_orderline_id = ol.c_orderline_id
     [java] JOIN c_invoice i ON i.c_invoice_id = il.c_invoice_id
     [java] WHERE i.docstatus <> 'VO'
     [java] AND NOT EXITS (SELECT 1 FROM c_invoice_reverse WHERE c_invoice_reverse.c_invoice_id = inv.c_invoice_id)
     [java]
     [java] org.postgresql.util.PSQLException: ERROR: syntax error at or near "SELECT"
     [java] Position: 1535
     [java] at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
postgresql9.1 + install.source of pi
rm -rf modules/org.openbravo.advpaymentmngt/src-util/buildvalidation/src/src/
ant compile.buildvalidation -Dmodule=org.openbravo.advpaymentmngt
No tags attached.
related to defect 0001443 closed user71 Create Accounting Report window not well formated 
Issue History
2014-04-01 20:38shuehnerNew Issue
2014-04-01 20:38shuehnerAssigned To => dmiguelez
2014-04-01 20:38shuehnerModules => Core
2014-04-01 20:38shuehnerTriggers an Emergency Pack => No
2014-04-02 12:17shuehnerNote Added: 0066061
2014-04-02 12:18shuehnerNote Added: 0066063
2014-04-02 12:19shuehnerRegression level => Production - Confirmed Stable
2014-04-02 12:19shuehnerRegression date => 2012-08-29
2014-04-02 12:19shuehnerRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/78585c145c1f [^]
2014-04-02 13:43shuehnerRelationship addedrelated to 0001443
2014-04-28 11:43eduardo_ArgalStatusnew => scheduled
2014-04-28 11:43eduardo_ArgalAssigned Todmiguelez => eduardo_Argal
2014-04-28 11:43eduardo_Argalfix_in_branch => pi
2014-04-28 11:45hgbotCheckin
2014-04-28 11:45hgbotNote Added: 0066644
2014-04-28 11:45hgbotStatusscheduled => resolved
2014-04-28 11:45hgbotResolutionopen => fixed
2014-04-28 11:45hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/11602bd040b152826474e0b02d16aff4a60d5e7c [^]
2014-05-05 18:29SandrahuguetReview Assigned To => Sandrahuguet
2014-05-06 11:09SandrahuguetNote Added: 0066835
2014-05-06 11:09SandrahuguetStatusresolved => closed
2014-05-07 18:12hudsonbotCheckin
2014-05-07 18:12hudsonbotNote Added: 0066980

Notes
(0066061)
shuehner   
2014-04-02 12:17   
First found:
last line of that sql
has typo: EXITS instead of EXISTS

  AND NOT EXITS (SELECT 1 FROM c_invoice_reverse WHERE c_invoice_reverse.c_invoice_id = inv.c_invoice_id)


but when fixing that on pgsql9.1 getting more errors:
ERROR: missing FROM-clause entry for table "inv"
LINE 24: ...ce_reverse WHERE c_invoice_reverse.c_invoice_id = inv.c_invo...
(0066063)
shuehner   
2014-04-02 12:18   
the wrong exit line has been added in this change (2012).

So it is a regression:
changeset: 17810:78585c145c1f
user: Ioritz Cia <ioritz.cia@openbravo.com>
date: Wed Aug 29 12:04:22 2012 +0200
files: modules/org.openbravo.advpaymentmngt/src-util/buildvalidation/src/org/openbravo/advpaymentmngt/buildvalidation/WrongPaymentScheduleDetailsCheck_data.xsql
description:
Fixes issue 1443: 'Wrong payment plan on invoiced orders' alert.
Query needs to be corrected.
(0066644)
hgbot   
2014-04-28 11:45   
Repository: erp/devel/pi
Changeset: 11602bd040b152826474e0b02d16aff4a60d5e7c
Author: Eduardo Argal Guibert <eduardo.argal <at> openbravo.com>
Date: Mon Apr 28 11:45:02 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/11602bd040b152826474e0b02d16aff4a60d5e7c [^]

Fixes bug 26137: ant compile.buildvalidation fails

---
M modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/buildvalidation/WrongPaymentScheduleDetailsCheckData.class
M modules/org.openbravo.advpaymentmngt/src-util/buildvalidation/src/org/openbravo/advpaymentmngt/buildvalidation/WrongPaymentScheduleDetailsCheck_data.xsql
M modules/org.openbravo.advpaymentmngt/src-util/buildvalidation/src/src/org/openbravo/advpaymentmngt/buildvalidation/WrongPaymentScheduleDetailsCheckData.java
---
(0066835)
Sandrahuguet   
2014-05-06 11:09   
Code review + testing ok
(0066980)
hudsonbot   
2014-05-07 18:12   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/02ca2648bcdc [^]
Maturity status: Test