Validate line before calculating premiums
About this task
Add code to ensure that all audit amount fields have values on the audit Details screen. For example, in the general liability line, the code checks that the auditor has entered a value in each Audited Payroll field. The value of the Audited Payroll field is the audit field defined in Add audited basis to the data model.
Procedure
-
In Studio, navigate to , and open
gw.lob.line.lineLineValidation. For Golf Cart, opengw.log.go.GOLineValidation. -
Add the validateLineForAudit method. This method determines whether all audit amount fields have values prior to calculating premiums.
override function validateLineForAudit() { allAuditAmountsShouldBeFilledIn() } -
Define the allAuditAmountsShouldBeFilledIn method. For example, in the general liability line, this
method checks that all
glExposure.AuditedBasisfields have a value.
