| Line 92... |
Line 92... |
| 92 |
" join Vendor v on v.id = w.vendor" +
|
92 |
" join Vendor v on v.id = w.vendor" +
|
| 93 |
" left join ActivatedImei ai on ai.serialNumber = lii.serialNumber" +
|
93 |
" left join ActivatedImei ai on ai.serialNumber = lii.serialNumber" +
|
| 94 |
" join WarehouseInventoryItem wi on wi.serialNumber = lii.serialNumber" +
|
94 |
" join WarehouseInventoryItem wi on wi.serialNumber = lii.serialNumber" +
|
| 95 |
" join WarehouseScan ws on (ws.orderId = o.id and ws.type = 'SALE' and wi.id = ws.inventoryItemId)" +
|
95 |
" join WarehouseScan ws on (ws.orderId = o.id and ws.type = 'SALE' and wi.id = ws.inventoryItemId)" +
|
| 96 |
" join Item i on i.id=l.itemId " +
|
96 |
" join Item i on i.id=l.itemId " +
|
| 97 |
"where i.catalogItemId=:catalogId and o.billingTimestamp between :startDate and :endDate and (o.refundTimestamp is null or o.refundTimestamp <= :endDate)"),
|
97 |
"where i.catalogItemId=:catalogId and o.billingTimestamp >= :startDate and :endDate is null or o.billingTimestamp < :endDate and (o.refundTimestamp is null or o.refundTimestamp <= :endDate)"),
|
| 98 |
|
98 |
|
| 99 |
|
99 |
|
| 100 |
})
|
100 |
})
|
| 101 |
//@NamedNativeQuery(name = "Order.findByEmailAddress", query = "select * from transaction.`order` o where o.id = '1694173'", resultClass = Order.class)
|
101 |
//@NamedNativeQuery(name = "Order.findByEmailAddress", query = "select * from transaction.`order` o where o.id = '1694173'", resultClass = Order.class)
|
| 102 |
|
102 |
|