refactor: simplify conditional logic

Command: `sourcery review --fix --enable de-morgan .`
This commit is contained in:
barredterra
2023-12-05 11:22:55 +01:00
parent 5da3e532c9
commit eb9ee3f79b
51 changed files with 104 additions and 85 deletions

View File

@@ -1062,11 +1062,11 @@ def get_outstanding_invoices(
if (
min_outstanding
and max_outstanding
and not (outstanding_amount >= min_outstanding and outstanding_amount <= max_outstanding)
and (outstanding_amount < min_outstanding or outstanding_amount > max_outstanding)
):
continue
if not d.voucher_type == "Purchase Invoice" or d.voucher_no not in held_invoices:
if d.voucher_type != "Purchase Invoice" or d.voucher_no not in held_invoices:
outstanding_invoices.append(
frappe._dict(
{