mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 12:19:12 +00:00
refactor: simplify conditional logic
Command: `sourcery review --fix --enable de-morgan .`
This commit is contained in:
@@ -1711,7 +1711,7 @@ def get_datetime_limit_condition(detail):
|
||||
def validate_negative_qty_in_future_sle(args, allow_negative_stock=False):
|
||||
if allow_negative_stock or is_negative_stock_allowed(item_code=args.item_code):
|
||||
return
|
||||
if not (args.actual_qty < 0 or args.voucher_type == "Stock Reconciliation"):
|
||||
if args.actual_qty >= 0 and args.voucher_type != "Stock Reconciliation":
|
||||
return
|
||||
|
||||
neg_sle = get_future_sle_with_negative_qty(args)
|
||||
|
||||
Reference in New Issue
Block a user