Subversion Repositories SmartDukaan

Rev

Rev 35426 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35426 Rev 35487
Line 22... Line 22...
22
                + " from Item i "
22
                + " from Item i "
23
                + " left join  WarehouseInventoryItem wi on i.id = wi.itemId"
23
                + " left join  WarehouseInventoryItem wi on i.id = wi.itemId"
24
                + " left join CategorisedCatalog cc on cc.catalogId = i.catalogItemId and cc.endDate is null "
24
                + " left join CategorisedCatalog cc on cc.catalogId = i.catalogItemId and cc.endDate is null "
25
                + " where ((cc.status is null OR cc.status = 'OTHER' OR cc.status = 'SLOWMOVING')) and i.categoryId in (10006,10009,10010) group by i.catalogItemId having (sum(wi.currentQuantity) = 0 OR sum(wi.currentQuantity) IS NULL)"),
25
                + " where ((cc.status is null OR cc.status = 'OTHER' OR cc.status = 'SLOWMOVING')) and i.categoryId in (10006,10009,10010) group by i.catalogItemId having (sum(wi.currentQuantity) = 0 OR sum(wi.currentQuantity) IS NULL)"),
26
 
26
 
-
 
27
        @NamedQuery(name = "Catalog.selectAllStatusAndBrandWise", query = "select c.id" +
-
 
28
                " from Catalog c " +
-
 
29
                " join CategorisedCatalog cc on c.id = cc.catalogId and cc.endDate is null" +
-
 
30
                " where cc.status in  (:statuses) and c.brand in :brands"),
-
 
31
 
27
 
32
 
28
        @NamedQuery(
33
        @NamedQuery(
29
                name = "Catalog.findAllWithNoGoodStock",
34
                name = "Catalog.findAllWithNoGoodStock",
30
                query = "select i.catalogItemId "
35
                query = "select i.catalogItemId "
31
                        + " from Item i "
36
                        + " from Item i "