public class PaymentRequestTaxAreaValidation extends GenericValidation
Constructor and Description |
---|
PaymentRequestTaxAreaValidation() |
Modifier and Type | Method and Description |
---|---|
org.kuali.rice.krad.service.BusinessObjectService |
getBusinessObjectService() |
protected boolean |
listContainsValue(ArrayList<BigDecimal> list,
BigDecimal value)
Returns true if the specified ArrayList contains the specified BigDecimal value.
|
ArrayList<BigDecimal> |
retrieveTaxRates(String incomeClassCode,
String incomeTaxTypeCode)
Retrieve active NonResidentAlien tax rate percent from database based on the specified income class and federal/state tax type.
|
void |
setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService) |
boolean |
validate(AttributedDocumentEvent event)
Process business rules applicable to tax area data before calculating the withholding tax on payment request.
|
protected boolean |
validateTaxIncomeClass(PaymentRequestDocument preq)
Validates tax income class: when Non-Reportable income class is chosen, all other fields shall be left blank;
It assumed that the input tax income class code is valid (existing and active in the system) since it's chosen from drop-down list.
|
protected boolean |
validateTaxIndicators(PaymentRequestDocument preq)
Validates rules among tax treaty, gross up, foreign source, USAID, other exempt, and Special W-4.
|
protected boolean |
validateTaxRates(PaymentRequestDocument preq)
Validates federal and state tax rates based on each other and the income class.
|
setQuitOnFail, shouldQuitOnFail, stageValidation
getParameterProperties, populateParameterFromEvent, populateParametersFromEvent, setParameterProperties
public PaymentRequestTaxAreaValidation()
public boolean validate(AttributedDocumentEvent event)
paymentRequest
- - payment request documentprotected boolean validateTaxIncomeClass(PaymentRequestDocument preq)
paymentRequest
- - payment request documentprotected boolean validateTaxRates(PaymentRequestDocument preq)
paymentRequest
- - payment request documentprotected boolean validateTaxIndicators(PaymentRequestDocument preq)
paymentRequest
- - payment request documentpublic ArrayList<BigDecimal> retrieveTaxRates(String incomeClassCode, String incomeTaxTypeCode)
incomeClassCode
- The specified income class type code.incomeTaxTypeCode
- The specified income tax type code.protected boolean listContainsValue(ArrayList<BigDecimal> list, BigDecimal value)
list
- the specified ArrayListvalue
- the specified BigDecimalpublic org.kuali.rice.krad.service.BusinessObjectService getBusinessObjectService()
public void setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService)
Copyright © 2004–2016 The Kuali Foundation. All rights reserved.