Subversion Repositories SmartDukaan

Rev

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

Rev 15045 Rev 16264
Line 465... Line 465...
465
 	where s.scannedAt between #{startDate} and #{endDate} 
465
 	where s.scannedAt between #{startDate} and #{endDate} 
466
 	AND s.warehouseId IN (select id from inventory.warehouse where vendor_id= 40 and inventoryType = 'GOOD' and warehouseType ='OURS_THIRDPARTY' and source in (3,7,8))
466
 	AND s.warehouseId IN (select id from inventory.warehouse where vendor_id= 40 and inventoryType = 'GOOD' and warehouseType ='OURS_THIRDPARTY' and source in (3,7,8))
467
 	group by itemId, s.type
467
 	group by itemId, s.type
468
</select>
468
</select>
469
 
469
 
-
 
470
<select id="fetchMismatchScansPerTransferInvoiceNumber" parameterType="java.util.Date" resultType="transferInvoiceScan" >
-
 
471
	SELECT r.shipmentReference, t.id transferLotId, r.source, r.quantity, 
-
 
472
	CASE r.inventoryType WHEN 1 THEN 'GOOD' WHEN 2 THEN 'BAD' END inventoryType, 
-
 
473
	1000 * UNIX_TIMESTAMP(DATE(r.createdOn)) date, sum(s.quantity) scannedQuantity 
-
 
474
	FROM removalStockShipmentReference r JOIN transferLot t on r.id = t.shipmentReference 
-
 
475
	JOIN scanNew s on t.id = s.transferLotId WHERE DATE(r.createdOn) = #{date} 
-
 
476
	AND s.scannedAt BETWEEN #{date} and ADDDATE(#{date},1) AND s.type= 'WAREHOUSE_TRANSFER_IN' 
-
 
477
	GROUP BY r.id, r.source, r.inventoryType, r.quantity 
-
 
478
	HAVING sum(s.quantity)!=r.quantity
-
 
479
</select>
-
 
480
 
470
</mapper>
481
</mapper>