diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py
index 4ea2a5f..d8f28af 100644
--- a/erpnext/controllers/sales_and_purchase_return.py
+++ b/erpnext/controllers/sales_and_purchase_return.py
@@ -106,24 +106,25 @@
 
 def validate_quantity(doc, args, ref, valid_items, already_returned_items):
 	fields = ['qty']
-	if doc.doctype in ['Purchase Invoice', 'Purchase Receipt']:
+	if doc.doctype in ['Purchase Receipt', 'Purchase Invoice']:
 		fields.extend(['received_qty', 'rejected_qty'])
 
 	already_returned_data = already_returned_items.get(args.item_code) or {}
 
 	for column in fields:
-		return_qty = flt(already_returned_data.get(column, 0)) if len(already_returned_data) > 0 else 0
-		referenced_qty = ref.get(column)
-		max_return_qty = flt(referenced_qty) - return_qty
+		returned_qty = flt(already_returned_data.get(column, 0)) if len(already_returned_data) > 0 else 0
+		reference_qty = ref.get(column)
+		max_returnable_qty = flt(reference_qty) - returned_qty
 		label = column.replace('_', ' ').title()
-
-		if flt(args.get(column)) > 0:
-			frappe.throw(_("{0} must be negative in return document").format(label))
-		elif return_qty >= referenced_qty and flt(args.get(column)) != 0:
-			frappe.throw(_("Item {0} has already been returned").format(args.item_code), StockOverReturnError)
-		elif abs(args.get(column)) > max_return_qty:
-			frappe.throw(_("Row # {0}: Cannot return more than {1} for Item {2}")
-				.format(args.idx, referenced_qty, args.item_code), StockOverReturnError)
+		if reference_qty:	
+			if flt(args.get(column)) > 0:
+				frappe.throw(_("{0} must be negative in return document").format(label))
+			elif returned_qty >= reference_qty and args.get(column):
+				frappe.throw(_("Item {0} has already been returned")
+					.format(args.item_code), StockOverReturnError)
+			elif abs(args.get(column)) > max_returnable_qty:
+				frappe.throw(_("Row # {0}: Cannot return more than {1} for Item {2}")
+					.format(args.idx, reference_qty, args.item_code), StockOverReturnError)
 
 def get_ref_item_dict(valid_items, ref_item_row):
 	from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos
