Additionally, if the Title Company funding type was "Net" {{Order.Loans.Funding.TitleFundingType}} I would not need these documents visible.
Here’s my HUD/Seller version based on an earlier code you provided:
Code: Select all
# From enumeration in SoftPro.Accounting.Client.Orders
SettlementType_CDF = 0
SettlementType_CSS = 2
SettlementType_HUD1 = 1
# Later logic will set variable to True if report should be run.
enableReport = False
if int(Order.SettlementType) == SettlementType_CSS:
pass
elif int(Order.SettlementType) == SettlementType_HUD1:
# Search all lines in first HUD for line 603
allLines = Order.HUDs[0].Lines
matches = [l for l in allLines if l.Number == 603]
if len(matches) == 1:
# We found 603 - now run final tests.
line = matches[0]
description = '' if line.Description is 'CASH FROM SELLER' else line.Description
enableReport = description == 'CASH TO SELLER'
elif int(Order.SettlementType) == SettlementType_CDF:
pass
# Return enable flag after scanning the order.
return enableReport