Subversion Repositories SmartDukaan

Rev

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

Rev 31657 Rev 31695
Line 54... Line 54...
54
 
54
 
55
})
55
})
56
 
56
 
57
@NamedNativeQueries({
57
@NamedNativeQueries({
58
 
58
 
59
		@NamedNativeQuery(name = "scheme.getActiveScheme", query = "select si.catalog_id from catalog.scheme s join fofo.scheme_item si on s.id = si.scheme_id "
59
		@NamedNativeQuery(name = "scheme.getActiveScheme", query = "select si.catalog_id from catalog.scheme s join "
-
 
60
				+ " fofo.scheme_item si on s.id = si.scheme_id join item i on i.catalog_item_id = si.catalog_id"
60
				+ " where s.active_timestamp is not null and start_date_time <= :startDate and end_date_time >= :startDate and type = 'SPECIAL_SUPPORT' order by active_timestamp desc "),
61
				+ " where s.active_timestamp is not null and start_date_time <= :startDate and end_date_time >= :startDate and type = 'SPECIAL_SUPPORT' and i.hsnCode = '85171300' order by active_timestamp desc "),
61
 
62
 
62
		@NamedNativeQuery(name = "scheme.selectMissedActivationSale", query = "select cs.id as scheme_id, ai.serial_number, sr.order_id, ii.id as inventory_item_id, ai.activation_timestamp"
63
		@NamedNativeQuery(name = "scheme.selectMissedActivationSale", query = "select cs.id as scheme_id, ai.serial_number, sr.order_id, ii.id as inventory_item_id, ai.activation_timestamp"
63
				+ " from fofo.activated_imei ai "
64
				+ " from fofo.activated_imei ai "
64
				+ "   join fofo.inventory_item ii on ai.serial_number = ii.serial_number "
65
				+ "   join fofo.inventory_item ii on ai.serial_number = ii.serial_number "
65
				+ "   join catalog.item i on i.id = ii.item_id "
66
				+ "   join catalog.item i on i.id = ii.item_id "