Class ActiveVatRateServiceImpl
java.lang.Object
ch.tocco.nice2.optional.finance.impl.service.vat.ActiveVatRateServiceImpl
- All Implemented Interfaces:
ActiveVatRateService
-
Constructor Summary
ConstructorDescriptionActiveVatRateServiceImpl
(TextResources textResources, DateDelimitedEntityService dateDelimitedEntityService) -
Method Summary
Modifier and TypeMethodDescriptiongetActiveVatRateForVatCode
(Entity vatCode) get the active entity for a vat code from the list of related vat rategetOptionalVatRateValueOnDate
(Entity vatCode, org.joda.time.LocalDate date) get the vat rate value of the passed vat code on the passed date.getVatRateOnDate
(Entity vatCode, org.joda.time.LocalDate date) get the vat rate of the passed vat code on the passed dategetVatRateValueOnDate
(Entity vatCode, org.joda.time.LocalDate date) get the vat rate value of the passed vat code on the passed date do not pass any Vat_code that does not need to have a Vat_rate!boolean
isVatRateInVatCodeActive
(Entity vatCode) is the currently set vat rate ind vat code the correct onevoid
resetVatCode
(Entity vatCode) reset the vat rate on the vat code uses getActiveVatRateForVatCode
-
Constructor Details
-
ActiveVatRateServiceImpl
public ActiveVatRateServiceImpl(TextResources textResources, DateDelimitedEntityService dateDelimitedEntityService)
-
-
Method Details
-
isVatRateInVatCodeActive
Description copied from interface:ActiveVatRateService
is the currently set vat rate ind vat code the correct one- Specified by:
isVatRateInVatCodeActive
in interfaceActiveVatRateService
- Parameters:
vatCode
- the vat code- Returns:
- true, if the correct vat rate is set
-
getActiveVatRateForVatCode
Description copied from interface:ActiveVatRateService
get the active entity for a vat code from the list of related vat rate- Specified by:
getActiveVatRateForVatCode
in interfaceActiveVatRateService
- Parameters:
vatCode
- the vat code- Returns:
- the current vat rate
-
resetVatCode
Description copied from interface:ActiveVatRateService
reset the vat rate on the vat code uses getActiveVatRateForVatCode- Specified by:
resetVatCode
in interfaceActiveVatRateService
- Parameters:
vatCode
- the vat code
-
getVatRateOnDate
Description copied from interface:ActiveVatRateService
get the vat rate of the passed vat code on the passed date- Specified by:
getVatRateOnDate
in interfaceActiveVatRateService
- Parameters:
vatCode
- the vat codedate
- date which defines the vat rate
-
getVatRateValueOnDate
Description copied from interface:ActiveVatRateService
get the vat rate value of the passed vat code on the passed date do not pass any Vat_code that does not need to have a Vat_rate!- Specified by:
getVatRateValueOnDate
in interfaceActiveVatRateService
- Parameters:
vatCode
- the vat codedate
- date which defines the vat rate
-
getOptionalVatRateValueOnDate
public Optional<BigDecimal> getOptionalVatRateValueOnDate(Entity vatCode, org.joda.time.LocalDate date) Description copied from interface:ActiveVatRateService
get the vat rate value of the passed vat code on the passed date.- Specified by:
getOptionalVatRateValueOnDate
in interfaceActiveVatRateService
- Parameters:
vatCode
- the vat codedate
- date which defines the vat rate
-