| Line 62... |
Line 62... |
| 62 |
|
62 |
|
| 63 |
@NamedQuery(name = "ActivatedImei.selectActivatedGrnPendingAmount", query = "select cast(sum(o.lineItem.unitPrice) as float )"
|
63 |
@NamedQuery(name = "ActivatedImei.selectActivatedGrnPendingAmount", query = "select cast(sum(o.lineItem.unitPrice) as float )"
|
| 64 |
+ " from Order o join LineItemImei limei on o.lineItem.id=limei.lineItemId join FofoStore fs on fs.id=o.retailerId left join ActivatedImei ai on limei.serialNumber = ai.serialNumber "
|
64 |
+ " from Order o join LineItemImei limei on o.lineItem.id=limei.lineItemId join FofoStore fs on fs.id=o.retailerId left join ActivatedImei ai on limei.serialNumber = ai.serialNumber "
|
| 65 |
+ " where o.status in (12, 9) and ai.activationTimestamp is not null and o.partnerGrnTimestamp is null and o.retailerId=:fofoId group by o.retailerId"),
|
65 |
+ " where o.status in (12, 9) and ai.activationTimestamp is not null and o.partnerGrnTimestamp is null and o.retailerId=:fofoId group by o.retailerId"),
|
| 66 |
|
66 |
|
| - |
|
67 |
@NamedQuery(name = "ActivatedImei.selectActivatedGrnPendingAmountByFofoIds", query = "select o.retailerId, cast(sum(o.lineItem.unitPrice) as float )"
|
| - |
|
68 |
+ " from Order o join LineItemImei limei on o.lineItem.id=limei.lineItemId join FofoStore fs on fs.id=o.retailerId left join ActivatedImei ai on limei.serialNumber = ai.serialNumber "
|
| - |
|
69 |
+ " where o.status in (12, 9) and ai.activationTimestamp is not null and o.partnerGrnTimestamp is null and o.retailerId in :fofoIds group by o.retailerId"),
|
| - |
|
70 |
|
| 67 |
@NamedQuery(name = "ActivatedImei.getMonthlyUnbilledTertiaryPrice", query = "select new com.spice.profitmandi.dao.model.PartnerWiseActivatedNotBilledTotal(ii.fofoId, sum((tl.mop)), DATE_FORMAT(ai.activationTimestamp, '%Y-%m')) "
|
71 |
@NamedQuery(name = "ActivatedImei.getMonthlyUnbilledTertiaryPrice", query = "select new com.spice.profitmandi.dao.model.PartnerWiseActivatedNotBilledTotal(ii.fofoId, sum((tl.mop)), DATE_FORMAT(ai.activationTimestamp, '%Y-%m')) "
|
| 68 |
+" from InventoryItem ii" +
|
72 |
+" from InventoryItem ii" +
|
| 69 |
" join Item i on i.id=ii.itemId" +
|
73 |
" join Item i on i.id=ii.itemId" +
|
| 70 |
" join TagListing tl on tl.itemId=i.id" +
|
74 |
" join TagListing tl on tl.itemId=i.id" +
|
| 71 |
" join ActivatedImei ai on ai.serialNumber=ii.serialNumber" +
|
75 |
" join ActivatedImei ai on ai.serialNumber=ii.serialNumber" +
|