tech.deepdreams.worker.services.deduction.CFCServicev1977Impl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of worker-cmr-impl Show documentation
Show all versions of worker-cmr-impl Show documentation
Payroll Worker CMR Impl project for Java 17
package tech.deepdreams.worker.services.deduction;
import java.util.Map;
import tech.deepdreams.worker.api.services.DeductionService;
import tech.deepdreams.worker.api.enums.CountryCode;
import tech.deepdreams.worker.constants.ElementCode;
import tech.deepdreams.worker.constants.LocalConstantCode;
public class CFCServicev1977Impl implements DeductionService{
@Override
public Double calculateEmployee(Map params) {
Double value = (Double) params.get(LocalConstantCode.CODE_GROSS_TAXABLE_SALARY) ;
return (value - value%1000) * 0.01 ;
}
@Override
public Double calculateEmployer(Map params) {
Double value = (Double) params.get(LocalConstantCode.CODE_GROSS_TAXABLE_SALARY) ;
return value * 0.015 ;
}
public CountryCode country() {
return CountryCode.CMR ;
}
public String code() {
return ElementCode.CODE_CFC ;
}
public int version() {
return 1977 ;
}
}