Class CreateBalanceDunningVoucherTask
java.lang.Object
ch.tocco.nice2.optional.debitor.impl.services.dunning.CreateBalanceDunningVoucherTask
- All Implemented Interfaces:
OptionalTask<Tuple2<Entity,
,BigDecimal>, Entity> PersistTask<Tuple2<Entity,
BigDecimal>, Entity>
public class CreateBalanceDunningVoucherTask
extends Object
implements OptionalTask<Tuple2<Entity,BigDecimal>,Entity>
task that creates a balance dunning voucher
-
Constructor Summary
ConstructorDescriptionCreateBalanceDunningVoucherTask
(VoucherService voucherService, ActiveVatRateService activeVatRateService, VatReverseCalculationService vatReverseCalculationService, Entity debitor, org.joda.time.LocalDate dateForBalanceVouchers) -
Method Summary
Modifier and TypeMethodDescriptiondoRun
(Tuple2<Entity, BigDecimal> values, CommandContext commandContext) getCorrectAmount
(@Nullable Entity vatCode, org.joda.time.LocalDate date, BigDecimal amountToCompensate) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.persist.core.api.exec.OptionalTask
run
Methods inherited from interface ch.tocco.nice2.persist.core.api.exec.PersistTask
andThenDo, compose, compose2, composeWhen, discardResult, expand, expand, getDescription, ifElse, orWhen, orWhenNot, passWhen, passWhenNot, skipErrors, unwrap
-
Constructor Details
-
CreateBalanceDunningVoucherTask
public CreateBalanceDunningVoucherTask(VoucherService voucherService, ActiveVatRateService activeVatRateService, VatReverseCalculationService vatReverseCalculationService, Entity debitor, org.joda.time.LocalDate dateForBalanceVouchers)
-
-
Method Details
-
doRun
public Entity doRun(Tuple2<Entity, BigDecimal> values, CommandContext commandContext) throws PersistException, InterruptedException- Specified by:
doRun
in interfaceOptionalTask<Tuple2<Entity,
BigDecimal>, Entity> - Throws:
PersistException
InterruptedException
-
getCorrectAmount
public BigDecimal getCorrectAmount(@Nullable @Nullable Entity vatCode, org.joda.time.LocalDate date, BigDecimal amountToCompensate)
-