Openbravo Issue Tracking System - Retail Modules
View Issue Details
0036024Retail ModulesRetail Widgetspublic2017-05-17 13:242017-05-17 13:30
aferraz 
Retail 
normalminorhave not tried
newopen 
30Professional Appliance
 
 
No
0036024: Error in Best Selling Store widget
Error in Best Selling Store widget
Run Best Selling Store widget.

Following exception is raised:

Exception while fetching the summary columns of the widget Best Selling Store. It is not supported using as summaries columns that are defined using a subquery, or that are defined using a summary function.
 Query = select sum(quantity), sum(totalsales), sum(totaldiscount), sum(totaldiscpercentage)/count(*), sum(totalcost), sum(markup)/count(*), sum(grossmargin), sum(grossmarginpercentage)/count(*) from OrderLineTax olt where olt.salesOrderLine = sol)),2) as totalsales,
round(sum(tc.cost),2) as totalcost,
case when round(sum(tc.cost),2)>0 then round(sum(sol.lineNetAmount + (select sum(taxAmount) from OrderLineTax olt where olt.salesOrderLine = sol))/(sum(tc.cost)),2) else NULL end as markup,
round(sum(sol.lineNetAmount + (select sum(taxAmount) from OrderLineTax olt where olt.salesOrderLine = sol)-tc.cost),2) as grossmargin,
round((sum(sol.lineNetAmount + (select sum(taxAmount) from OrderLineTax olt where olt.salesOrderLine = sol)-tc.cost)/sum(sol.lineNetAmount + (select sum(taxAmount) from OrderLineTax olt where olt.salesOrderLine = sol)))*100,2) as grossmarginpercentage
from TransactionCost as tc
join tc.inventoryTransaction as t
right join t.goodsShipmentLine as iol
left join iol.salesOrderLine as sol
left join sol.salesOrder as o
left join o.obposApplications as posapp
left join o.organization as org
where o.salesTransaction = 'Y'
and o.documentStatus = 'CO'
and posapp.client.id=:client
and posapp.organization.id IN (:organizationList)
and to_date(to_char(o.creationDate, 'YYYY-MM-DD'), 'YYYY-MM-DD')>=to_date(:datefrom,'YYYY-MM-DD')
and to_date(to_char(o.creationDate, 'YYYY-MM-DD'), 'YYYY-MM-DD')<=to_date(:dateto,'YYYY-MM-DD')
and 1=1
group by org.name, org.id
No tags attached.
related to defect 0032604 closed alostale Openbravo ERP Stock by Warehouse widget logs error message 
Issue History
2017-05-17 13:24aferrazNew Issue
2017-05-17 13:24aferrazAssigned To => Retail
2017-05-17 13:24aferrazTriggers an Emergency Pack => No
2017-05-17 13:30aferrazNote Added: 0096641
2017-05-17 13:30aferrazRelationship addedrelated to 0032604

Notes
(0096641)
aferraz   
2017-05-17 13:30   
Error discovered reading openbravo.log from rolcar.cloud.openbravo.com