fix: handle shareholder option in payment entry
This commit is contained in:
@@ -558,7 +558,7 @@ def get_outstanding_reference_documents(args):
|
||||
|
||||
# Get negative outstanding sales /purchase invoices
|
||||
negative_outstanding_invoices = []
|
||||
if args.get("party_type") not in ["Student", "Employee", "Shareholder"] and not args.get("voucher_no"):
|
||||
if args.get("party_type") in ("Supplier", "Customer") and not args.get("voucher_no"):
|
||||
negative_outstanding_invoices = get_negative_outstanding_invoices(args.get("party_type"),
|
||||
args.get("party"), args.get("party_account"), party_account_currency, company_currency)
|
||||
|
||||
@@ -589,7 +589,7 @@ def get_outstanding_reference_documents(args):
|
||||
|
||||
# Get all SO / PO which are not fully billed or aginst which full advance not paid
|
||||
orders_to_be_billed = []
|
||||
if (args.get("party_type") != "Student"):
|
||||
if (args.get("party_type") in ("Supplier", "Customer")):
|
||||
orders_to_be_billed = get_orders_to_be_billed(args.get("posting_date"),args.get("party_type"),
|
||||
args.get("party"), party_account_currency, company_currency)
|
||||
|
||||
@@ -601,8 +601,6 @@ def get_orders_to_be_billed(posting_date, party_type, party, party_account_curre
|
||||
voucher_type = 'Sales Order'
|
||||
elif party_type == "Supplier":
|
||||
voucher_type = 'Purchase Order'
|
||||
elif party_type == "Employee":
|
||||
voucher_type = None
|
||||
else:
|
||||
voucher_type = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user