Subversion Repositories SmartDukaan

Rev

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

Rev 12543 Rev 12591
Line 131... Line 131...
131
           FROM inventoryItem ii 
131
           FROM inventoryItem ii 
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 ii.lastScanType != 'MARKED_BAD' 
136
           AND (transferStatus is NULL or transferStatus != 'IN_TRANSIT')
137
           AND (transferStatus is NULL or transferStatus != 'IN_TRANSIT')
137
           AND ii.physicalWarehouseId NOT IN (select id from inventory.warehouse where vendor_id= 40 
138
           AND ii.physicalWarehouseId NOT IN (select id from inventory.warehouse where vendor_id= 40 
138
	and inventoryType = 'GOOD' and warehouseType ='OURS_THIRDPARTY' and source in (3,7,8)) 
139
	and inventoryType = 'GOOD' and warehouseType ='OURS_THIRDPARTY' and source in (3,7,8)) 
139
           GROUP BY ii.id, ii.itemId, ii.currentQuantity) t 
140
           GROUP BY ii.id, ii.itemId, ii.currentQuantity) t 
140
    JOIN purchase p 
141
    JOIN purchase p