From f33787a70638ab880fb16844752334262b9facf6 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 29 Jul 2015 18:08:10 +0530 Subject: [PATCH] [fix] Get serial nos using FIFO in Return Delivery Note --- erpnext/stock/get_item_details.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 82446ed420..faf3d98c0f 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -300,7 +300,7 @@ def get_serial_nos_by_fifo(args, item_doc): order by timestamp(purchase_date, purchase_time) asc limit %(qty)s""", { "item_code": args.item_code, "warehouse": args.warehouse, - "qty": cint(args.qty) + "qty": abs(cint(args.qty)) })) def get_actual_batch_qty(batch_no,warehouse,item_code):