use of org.estatio.tax.dom.TaxRate in project estatio by estatio.
the class Api method putTax.
// //////////////////////////////////////
@ActionSemantics(Of.IDEMPOTENT)
public void putTax(@Named("atPath") final String atPath, @Named("reference") final String reference, @Named("name") final String name, @Named("description") final String description, @Named("externalReference") @Optional final String externalReference, @Named("ratePercentage") final BigDecimal percentage, @Named("rateStartDate") final LocalDate startDate, @Named("rateExternalReference") @Optional final String rateExternalReference) {
final ApplicationTenancy applicationTenancy = applicationTenancies.findTenancyByPath(atPath);
final Tax tax = taxes.findOrCreate(reference, name, applicationTenancy);
tax.setExternalReference(externalReference);
tax.setDescription(description);
final TaxRate rate = tax.newRate(startDate, percentage);
rate.setExternalReference(rateExternalReference);
}
Aggregations