Subversion Repositories SmartDukaan

Rev

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

Rev 28468 Rev 28474
Line 100... Line 100...
100
				+ "	 from FofoStore fs  join  Order o on fs.id = o.retailerId"
100
				+ "	 from FofoStore fs  join  Order o on fs.id = o.retailerId"
101
				+ "  join LineItem li on o.id = li.orderId " + "  join TagListing tl on tl.itemId = li.itemId "
101
				+ "  join LineItem li on o.id = li.orderId " + "  join TagListing tl on tl.itemId = li.itemId "
102
				+ "  join Item i on i.id = tl.itemId  where "
102
				+ "  join Item i on i.id = tl.itemId  where "
103
				+ "	 fs.active = 1 and fs.internal = 0 and o.status in (3,4) and i.catalogItemId in :catalogItemId group by fs.id"),
103
				+ "	 fs.active = 1 and fs.internal = 0 and o.status in (3,4) and i.catalogItemId in :catalogItemId group by fs.id"),
104
 
104
 
-
 
105
		@NamedQuery(name = "Order.selectGrnPendingOrderByCatalogId", query = "select new com.spice.profitmandi.dao.model.FofoIdCatalogQtyModel("
-
 
106
				+ "  fs.warehouseId,fs.id,i.catalogItemId,sum(li.quantity )) from FofoStore fs join  Order o on fs.id = o.retailerId "
-
 
107
				+ "  join LineItem li on o.id = li.orderId  join TagListing tl on tl.itemId = li.itemId "
-
 
108
				+ "  join Item i on (i.id = tl.itemId ) where " + "	 fs.active = 1 and fs.internal = 0 and"
-
 
109
				+ "  o.billingTimestamp is not null and o.refundTimestamp is null and o.deliveryTimestamp is null"
-
 
110
				+ "  and i.catalogItemId in :catalogItemId group by i.catalogItemId, fs.id"),
-
 
111
 
-
 
112
		@NamedQuery(name = "Order.selectPendingIndentOrderByCatalogId", query = "select new com.spice.profitmandi.dao.model.FofoIdCatalogQtyModel("
-
 
113
				+ "  fs.warehouseId,fs.id,i.catalogItemId,sum(case when li.quantity is null then 0 else  li.quantity end))"
-
 
114
				+ "	 from FofoStore fs  join  Order o on fs.id = o.retailerId"
-
 
115
				+ "  join LineItem li on o.id = li.orderId " + "  join TagListing tl on tl.itemId = li.itemId "
-
 
116
				+ "  join Item i on i.id = tl.itemId  where "
-
 
117
				+ "	 fs.active = 1 and fs.internal = 0 and o.status in (3,4) and i.catalogItemId in :catalogItemId group by i.catalogItemId, fs.id"),
-
 
118
 
105
		@NamedQuery(name = "Order.selectAllGrnPendingOrderByRange", query = "select new com.spice.profitmandi.dao.model.FofoIdItemDetailModel("
119
		@NamedQuery(name = "Order.selectAllGrnPendingOrderByRange", query = "select new com.spice.profitmandi.dao.model.FofoIdItemDetailModel("
106
				+ "  fs.warehouseId,fs.id,sum(li.quantity ),i.brand,i.modelName,i.modelNumber,i.catalogItemId) from FofoStore fs join  Order o on fs.id = o.retailerId "
120
				+ "  fs.warehouseId,fs.id,sum(li.quantity ),i.brand,i.modelName,i.modelNumber,i.catalogItemId) from FofoStore fs join  Order o on fs.id = o.retailerId "
107
				+ "  join LineItem li on o.id = li.orderId  join TagListing tl on tl.itemId = li.itemId "
121
				+ "  join LineItem li on o.id = li.orderId  join TagListing tl on tl.itemId = li.itemId "
108
				+ "  join Item i on (i.id = tl.itemId ) where " + "	 fs.active = 1 and fs.internal = 0 and"
122
				+ "  join Item i on (i.id = tl.itemId ) where " + "	 fs.active = 1 and fs.internal = 0 and"
109
				+ "  o.billingTimestamp is not null and o.refundTimestamp is null and o.deliveryTimestamp is null"
123
				+ "  o.billingTimestamp is not null and o.refundTimestamp is null and o.deliveryTimestamp is null"