Subversion Repositories SmartDukaan

Rev

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

Rev 28004 Rev 28008
Line 55... Line 55...
55
				+ " i.modelNumber, i.color, foi.quantity*foi.mop, foi.quantity)"
55
				+ " i.modelNumber, i.color, foi.quantity*foi.mop, foi.quantity)"
56
				+ " from FofoStore fs join FofoOrder fo on fs.id = fo.fofoId join FofoOrderItem foi on foi.orderId = fo.id  join "
56
				+ " from FofoStore fs join FofoOrder fo on fs.id = fo.fofoId join FofoOrderItem foi on foi.orderId = fo.id  join "
57
				+ " Item i on i.id = foi.itemId where fo.cancelledTimestamp is null and fs.active = true "
57
				+ " Item i on i.id = foi.itemId where fo.cancelledTimestamp is null and fs.active = true "
58
				+ " and foi.createTimestamp >= :startDate and fs.warehouseId in :warehouseId and foi.brand in :brand order by foi.itemId desc"),
58
				+ " and foi.createTimestamp >= :startDate and fs.warehouseId in :warehouseId and foi.brand in :brand order by foi.itemId desc"),
59
 
59
 
-
 
60
		@NamedQuery(name = "FofoOrder.selectValueOfActivatedImeis", query = "select new com.spice.profitmandi.common.model.ActivatedImeisWithSellingPrice("
-
 
61
				+ "  fo.fofoId, foi.brand, sum(CAST(foi.mop  AS int) * foi.quantity)) "
-
 
62
				+ " from FofoOrder fo join FofoOrderItem foi on fo.id = foi.orderId join FofoLineItem fli on foi.id = fli.fofoOrderItemId join ActivatedImei ai on "
-
 
63
				+ " fli.serialNumber = ai.serialNumber where  fo.createTimestamp between :startDate and :endDate and  fo.fofoId = :fofoId and fo.cancelledTimestamp is null group by foi.brand"),
-
 
64
		
60
		@NamedQuery(name = "FofoOrder.selectPartnersSaleByCatalogId", query = "select new com.spice.profitmandi.dao.model.FofoIdQtyModel("
65
		@NamedQuery(name = "FofoOrder.selectPartnersSaleByCatalogId", query = "select new com.spice.profitmandi.dao.model.FofoIdQtyModel("
61
				+ " fs.id,sum(case when foi.quantity is null then 0 else  foi.quantity end))"
66
				+ " fs.id,sum(case when foi.quantity is null then 0 else  foi.quantity end))"
62
				+ " from FofoStore fs  join FofoOrder fo on fs.id = fo.fofoId  "
67
				+ " from FofoStore fs  join FofoOrder fo on fs.id = fo.fofoId  "
63
				+ " join FofoOrderItem foi on foi.orderId = fo.id join  TagListing tl on tl.itemId = foi.itemId "
68
				+ " join FofoOrderItem foi on foi.orderId = fo.id join  TagListing tl on tl.itemId = foi.itemId "
64
				+ " join Item i on i.id = tl.itemId"
69
				+ " join Item i on i.id = tl.itemId"