Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#64837 Incident ID:15670 - *Selecting to query the ‘Time-Phased Sales History’ screen without selecting any period generates a DB log error

open
nobody
None
5
2011-09-14
2011-09-14
omfgppc
No

Description:

Querying without selecting any period generates a DB log error in ‘Time-Phased Sales History’ screen

Steps to Reproduce:
1. Sales->Analysis->Time Phased Sales History
2. Select a calendar from the drop down list
3. Un Select all the periods and click on Query button
4. Observe that an error message is displayed and a DB log error is generated

DB log error:
Wed 14. Sep 18:16:12 2011 ERROR: syntax error at or near ")"
LINE 32: )
^
QPSQL: Unable to create query
-- Group: timePhasedSales
-- Name: detail
-- Notes:

SELECT

cust_id, cust_number, cust_name,

uom, warehous_code
-- Loop through each period bucket to find bookings for period

FROM (
SELECT cohist_invcdate,

cust_id, cust_number, cust_name

, warehous_code

, round((cohist_qtyshipped * currtobase(cohist_curr_id, cohist_unitprice, cohist_invcdate)), 2) AS amount
, ' USD-$' ::text AS uom

FROM cohist JOIN itemsite ON (itemsite_id=cohist_itemsite_id)
JOIN item ON (item_id=itemsite_item_id)

JOIN site() ON (itemsite_warehous_id=warehous_id)

JOIN custinfo ON (cohist_cust_id=cust_id)

WHERE ((cohist_invcdate BETWEEN
)
)) data
GROUP BY

cust_id, cust_number, cust_name,

uom, warehous_code
ORDER BY

cust_number,

uom, warehous_code;

Additional information

For the entire bug information, please visit

http://www.xtuple.org/xtincident/view/bugs/15670

Discussion