Subversion Repositories SmartDukaan

Rev

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

Rev 31423 Rev 31425
Line 124... Line 124...
124
				+ " SchemeInOut sio join InventoryItem ii on sio.inventoryItemId=ii.id join com.spice.profitmandi.dao.entity.catalog.Item i on i.id=ii.itemId join FofoStore fs on fs.id=ii.fofoId "
124
				+ " SchemeInOut sio join InventoryItem ii on sio.inventoryItemId=ii.id join com.spice.profitmandi.dao.entity.catalog.Item i on i.id=ii.itemId join FofoStore fs on fs.id=ii.fofoId "
125
				+ " join com.spice.profitmandi.dao.entity.user.User u on u.id = fs.id join Address ua on u.addressId = ua.id join Scheme s on sio.schemeId=s.id join Purchase p on p.id=ii.purchaseId"
125
				+ " join com.spice.profitmandi.dao.entity.user.User u on u.id = fs.id join Address ua on u.addressId = ua.id join Scheme s on sio.schemeId=s.id join Purchase p on p.id=ii.purchaseId"
126
				+ " left join FofoLineItem fli on fli.inventoryItemId=ii.id left join FofoOrderItem foi on foi.id=fli.fofoOrderItemId left join FofoOrder fo on fo.id=foi.orderId where  " +
126
				+ " left join FofoLineItem fli on fli.inventoryItemId=ii.id left join FofoOrderItem foi on foi.id=fli.fofoOrderItemId left join FofoOrder fo on fo.id=foi.orderId where  " +
127
				" foi.createTimestamp  between :startDate and :endDate " +
127
				" foi.createTimestamp  between :startDate and :endDate " +
128
				" and ii.createTimestamp  between :startDate and :endDate " +
128
				" and ii.createTimestamp  between :startDate and :endDate " +
129
				"and i i.fofoId= :fofoId "),
129
				"and ii.fofoId= :fofoId "),
130
 
130
 
131
		@NamedQuery(name = "FofoOrder.selectInvoiceSchemeOutSummaryReport", query = "select new com.spice.profitmandi.dao.model.FocoSchemeOutReportModel(fo.invoiceNumber, foi.quantity, foi.brand,"
131
		@NamedQuery(name = "FofoOrder.selectInvoiceSchemeOutSummaryReport", query = "select new com.spice.profitmandi.dao.model.FocoSchemeOutReportModel(fo.invoiceNumber, foi.quantity, foi.brand,"
132
				+ " foi.modelName, foi.modelNumber, foi.color,  sum(cast(sio.amount As float)) ) FROM FofoOrderItem foi join FofoOrder fo on fo.id=foi.orderId join FofoLineItem fli on "
132
				+ " foi.modelName, foi.modelNumber, foi.color,  sum(cast(sio.amount As float)) ) FROM FofoOrderItem foi join FofoOrder fo on fo.id=foi.orderId join FofoLineItem fli on "
133
				+ " fli.fofoOrderItemId=foi.id join SchemeInOut sio on sio.inventoryItemId=fli.inventoryItemId join Scheme s on s.id=sio.schemeId where s.type ='IN' and fo.fofoId= :fofoId and"
133
				+ " fli.fofoOrderItemId=foi.id join SchemeInOut sio on sio.inventoryItemId=fli.inventoryItemId join Scheme s on s.id=sio.schemeId where s.type ='IN' and fo.fofoId= :fofoId and"
134
				+ " fo.createTimestamp between :startDate and :endDate and sio.rolledBackTimestamp is null group by fo.id, foi.id "),
134
				+ " fo.createTimestamp between :startDate and :endDate and sio.rolledBackTimestamp is null group by fo.id, foi.id "),