From 84e78ec7ade9a600b9b000fc59a9a6620d689b62 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Sun, 23 Aug 2020 20:43:50 +0530 Subject: [PATCH] fix: Negative SLE not created for fraction qty or qty less than 1 --- erpnext/stock/stock_ledger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index e1b3730f2f..f4490f1b01 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -31,7 +31,7 @@ def make_sl_entries(sl_entries, allow_negative_stock=False, via_landed_cost_vouc sle['posting_time'] = now_datetime().strftime('%H:%M:%S.%f') if cancel: - sle['actual_qty'] = -flt(sle.get('actual_qty'), 0) + sle['actual_qty'] = -flt(sle.get('actual_qty')) if sle['actual_qty'] < 0 and not sle.get('outgoing_rate'): sle['outgoing_rate'] = get_incoming_outgoing_rate_for_cancel(sle.item_code,