Subversion Repositories SmartDukaan

Rev

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

Rev 11220 Rev 11311
Line 132... Line 132...
132
           JOIN scanNew s 
132
           JOIN scanNew s 
133
                ON (s.inventoryItemId = ii.id) 
133
                ON (s.inventoryItemId = ii.id) 
134
           WHERE (ii.lastScanType IN ('PURCHASE', 'SALE_RET', 'MARKED_GOOD') 
134
           WHERE (ii.lastScanType IN ('PURCHASE', 'SALE_RET', 'MARKED_GOOD') 
135
           OR ii.currentQuantity>1)
135
           OR ii.currentQuantity>1)
136
           AND (transferStatus is NULL or transferStatus != 'IN_TRANSIT')
136
           AND (transferStatus is NULL or transferStatus != 'IN_TRANSIT')
137
           AND ii.physicalWarehouseId !=16
137
           AND ii.physicalWarehouseId NOT IN (16, 1771) 
138
           GROUP BY ii.id, ii.itemId, ii.currentQuantity) t 
138
           GROUP BY ii.id, ii.itemId, ii.currentQuantity) t 
139
    JOIN purchase p 
139
    JOIN purchase p 
140
        ON (p.id = t.purchaseId) 
140
        ON (p.id = t.purchaseId) 
141
    JOIN lineitem l 
141
    JOIN lineitem l 
142
        ON (l.purchaseOrder_id = p.purchaseOrder_id AND l.itemId = t.itemId)
142
        ON (l.purchaseOrder_id = p.purchaseOrder_id AND l.itemId = t.itemId)