fix: Negative SLE not created for fraction qty or qty less than 1
This commit is contained in:
parent
a1d3537f2a
commit
84e78ec7ad
@ -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')
|
sle['posting_time'] = now_datetime().strftime('%H:%M:%S.%f')
|
||||||
|
|
||||||
if cancel:
|
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'):
|
if sle['actual_qty'] < 0 and not sle.get('outgoing_rate'):
|
||||||
sle['outgoing_rate'] = get_incoming_outgoing_rate_for_cancel(sle.item_code,
|
sle['outgoing_rate'] = get_incoming_outgoing_rate_for_cancel(sle.item_code,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user