Custom Business Rules

Discussions related to custom development with Select.
Post Reply
cgriffin
Posts: 22
Joined: Mon Nov 17, 2014 6:14 pm

Custom Business Rules

Post by cgriffin » Wed Jan 06, 2016 5:20 pm

Good afternoon,

I am trying to create a business rule which states that if - Order.Title.TitleInsuranceCalculations.PolicyType =' Simultaneous' and Order.CDFs.Lines.Charges.Description = 'Title - Owner's Title Insurance' but value in Order.Title.TitleInsuranceCalculations.OwnersPolicy.PremiumCalculation.SimultaneousPremium is not reflected in Order.CDFs.Lines.Charges, then RaiseError.

Is something like this possible?

Thank you,
Colin.

BobRichards
Posts: 982
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Custom Business Rules

Post by BobRichards » Thu Jan 07, 2016 10:23 pm

Forgive me but I don't quite understand the root of the question.

Under the conditions you stipulate (Simultaneous policy and fixed charge description), when the SI net owner's premium field is calculated, the amount will be appended as a charge on the the line specified underneath (H.01 by default for an out-of-the-box installation of Select). What is an example of the problem you are trying to prevent?
Bob Richards, Software Developer, SoftPro

cgriffin
Posts: 22
Joined: Mon Nov 17, 2014 6:14 pm

Re: Custom Business Rules

Post by cgriffin » Fri Jan 08, 2016 11:47 am

Good morning Bob,

We have encountered situations where we have a value in SI net owner's premium. However, on the CD, example line H.01 where that value for -SI net owner's premium - has been mapped to, individuals are zeroing out that amount in H.01 incorrectly. Which can result in us not charging for the 'Simultaneous Policy' but issuing it, and thus taking a loss. We would like to have a business rule, which raises an error, when they attempt to do this, and possibly expand this to other similar situations.

Thank you,
Colin.

cgriffin
Posts: 22
Joined: Mon Nov 17, 2014 6:14 pm

Re: Custom Business Rules

Post by cgriffin » Mon Jan 11, 2016 4:13 pm

Good afternoon,

I was wondering if anyone had an opportunity to review my response?

Thank you,
Colin.

BobRichards
Posts: 982
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Custom Business Rules

Post by BobRichards » Mon Jan 11, 2016 5:13 pm

(Sorry, I thought I responded last Friday. Too much stuff - not enough time!)

Would it be acceptable to have a rule make the H.01 charge amount read-only so no-one can delete it, but you can re-allocate the payees/payors? Said another way, if the charge source is a Loan or Owner's policy with the criteria you originally stated, it will become read-only.
Bob Richards, Software Developer, SoftPro

cgriffin
Posts: 22
Joined: Mon Nov 17, 2014 6:14 pm

Re: Custom Business Rules

Post by cgriffin » Mon Jan 11, 2016 6:38 pm

Good afternoon Bob,

I totally understand, not enough hours in the day.

Could the read-only be applied just to specific groups?

For example, for administrators it would not be read-only, but for an Escrow Officer it would be read-only?

Or at least someway or how have an option to update it, outside of ready only if needed?

I appreciate you could update from the 'source' (Title Premium Section - SI net owner's premium), but I was just curious.

As I anticipate being asked this question from my Manager, is the reason for the alternative, due to system constraints, or is it considered a better solution?

Thank you,
Colin.

cgriffin
Posts: 22
Joined: Mon Nov 17, 2014 6:14 pm

Re: Custom Business Rules

Post by cgriffin » Wed Jan 13, 2016 11:45 am

Good morning,

I was wondering if anyone had an opportunity to review my response?

Thank you,
Colin.

cgriffin
Posts: 22
Joined: Mon Nov 17, 2014 6:14 pm

Re: Custom Business Rules

Post by cgriffin » Fri Jan 15, 2016 12:21 pm

Good morning,

I was wondering if anyone had an opportunity to review my response?

Thank you,
Colin.

cgriffin
Posts: 22
Joined: Mon Nov 17, 2014 6:14 pm

Re: Custom Business Rules

Post by cgriffin » Mon Jan 18, 2016 4:48 pm

Good afternoon,

May I please have an update?

Thank you,
Colin.

BobRichards
Posts: 982
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Custom Business Rules

Post by BobRichards » Tue Jan 19, 2016 4:02 pm

Here is a rule for you. It enforces that the amount of the OP premium sent by the TIPs screen is not altered - but it does allow the user to move it between columns (from Borrower-Paid at Closing to Borrower-Paid at Closing, etc.) and split the amount between different between different columns as it sums up to the amount sent.

Code: Select all

from System import *
from SoftPro.ClientModel import *
from SoftPro.OrderTracking.Client import *
from SoftPro.OrderTracking.Client.Orders import *

##############################################################################
#
#	Rule file name: OTHER160001 - Ensure user doesn't alter Simutaneous OP 
#									premium in CDF line charge.
#
#	Validation rule:  Ignore templates and HUD1 orders.
#		Ensure that any OP premium sent to CDF charge by TIPs screen is not
#		altered by enduser.  Amount is sent to "Borrower-Paid At Closing"
#		but can be in any box on charge and can be split up as long as
#		summation equals sent premium.
#
# Version
#	1: Original
#
##############################################################################

def CDFLine_Charges_Validate(args):
	
	# Ignore templates.
	order = args.Context.Root
	if order.IsTemplate:
		return
	
	# Ignore HUD1 orders.
	isCdfOrder = (IOrderItem.HasProperty(order, 'SettlementType')
		and order.SettlementType == SettlementType.CDF)
	if not isCdfOrder:
		return
	
	# Examine all charges for all lines.
	for charge in args.Context.Charges:

		# Look for charges sourced by Owner Policies.
		item = charge.GetSource()
		if item is not None and item.Type == TitleProductType.OwnersPolicy:
			# We found an OP.  See if this is one is part of a Simultaneous Policy.				
			titleInsCalc = item.Parent
			if not titleInsCalc:
				return
				
			if titleInsCalc.PolicyType == PolicyType.Simultaneous:
				# Found OP as part of a Simultaneous Policy: Exit if calculated amount is zero.
				if item.PremiumCalculation.SimultaneousPremium == 0:
					return					
				
				# Validate that this charge equals entire Simultaneous Premium.
				if item.PremiumCalculation.SimultaneousPremium != charge.Amount:
					s = ("Charge on Line {} ({}) is from Simultaneous Owner's Policy and is required to be ${}"
					.format(charge.Parent.SectionNumber,
						charge.Description,
						'%.2f' % item.PremiumCalculation.SimultaneousPremium))
					args.RaiseError(s)

Bob Richards, Software Developer, SoftPro

Post Reply