// {{ requestClaimForTaxCredit (action) @MemberOrder(sequence = "1") public void requestClaimForTaxCredit(final TaxCreditRate taxCreditRate) { CorrespondenceType correspondenceType = CorrespondenceType.lookup("CLM", getContainer()); Integer year = this.getTaxYear().getYear(); String taxCreditCode = taxCreditRate.getType().getCode(); Customer customer = getTaxRecord().getCustomer(); correspondenceType.createRequest(customer, "" + year, taxCreditCode); }
@Override public void apply(Customer customer, Properties properties) { Integer year = Integer.parseInt(properties.getProperty("taxYear")); String taxCreditCode = properties.getProperty("taxCreditCode"); CustomerTaxRecord taxRecord = taxRecords.forCustomer(customer); TaxYear taxYear = TaxYear.lookup(year, container); CustomerTaxYear customerTaxYear = taxRecord.taxYearFor(year); TaxCreditType taxCreditType = TaxCreditType.lookup(taxCreditCode, container); TaxCreditRate taxCreditRate = TaxCreditRate.lookup(taxYear, taxCreditType, container); customerTaxYear.claimTaxCredit(taxCreditRate); }
public List<TaxCreditRate> choices0RequestClaimForTaxCredit() { return getContainer().allMatches(TaxCreditRate.class, TaxCreditRate.forTaxYear(this)); }