| Line 27... |
Line 27... |
| 27 |
" join TagListing tl on tl.itemId = i.id" +
|
27 |
" join TagListing tl on tl.itemId = i.id" +
|
| 28 |
" join ActivatedImei ai on ai.serialNumber = ii.serialNumber" +
|
28 |
" join ActivatedImei ai on ai.serialNumber = ii.serialNumber" +
|
| 29 |
" where ii.goodQuantity = 1 and ai.activationTimestamp is not null" +
|
29 |
" where ii.goodQuantity = 1 and ai.activationTimestamp is not null" +
|
| 30 |
" and i.brand != 'Live Demo' and ii.fofoId = :fofoId"),
|
30 |
" and i.brand != 'Live Demo' and ii.fofoId = :fofoId"),
|
| 31 |
|
31 |
|
| - |
|
32 |
@NamedQuery(name = "InventoryItem.selectActivatedStockAmountByFofoIds",
|
| - |
|
33 |
query = "select ii.fofoId, coalesce(sum(tl.sellingPrice), 0) from InventoryItem ii" +
|
| - |
|
34 |
" join Item i on i.id = ii.itemId" +
|
| - |
|
35 |
" join TagListing tl on tl.itemId = i.id" +
|
| - |
|
36 |
" join ActivatedImei ai on ai.serialNumber = ii.serialNumber" +
|
| - |
|
37 |
" where ii.goodQuantity = 1 and ai.activationTimestamp is not null" +
|
| - |
|
38 |
" and i.brand != 'Live Demo' and ii.fofoId in :fofoIds group by ii.fofoId"),
|
| - |
|
39 |
|
| 32 |
@NamedQuery(name = "InventoryItem.selectPurchaseSummary",
|
40 |
@NamedQuery(name = "InventoryItem.selectPurchaseSummary",
|
| 33 |
query = "select new com.spice.profitmandi.dao.model.ItemPurchaseSummaryModel(" +
|
41 |
query = "select new com.spice.profitmandi.dao.model.ItemPurchaseSummaryModel(" +
|
| 34 |
"ii.id, o.billingTimestamp,o.invoiceNumber, cast(li.unitPrice as float), li.item)" +
|
42 |
"ii.id, o.billingTimestamp,o.invoiceNumber, cast(li.unitPrice as float), li.item)" +
|
| 35 |
"from InventoryItem ii " +
|
43 |
"from InventoryItem ii " +
|
| 36 |
"join Purchase p on p.id = ii.purchaseId " +
|
44 |
"join Purchase p on p.id = ii.purchaseId " +
|