tech.deepdreams.worker.services.deduction.PresFamServicev2020Impl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of worker-civ-impl Show documentation
Show all versions of worker-civ-impl Show documentation
Payroll Worker API project for Spring Boot
package tech.deepdreams.worker.services.deduction;
import java.util.Map;
import tech.deepdreams.worker.api.services.DeductionService;
import tech.deepdreams.worker.constants.CIVElementCode;
import tech.deepdreams.worker.constants.LocalConstantCode;
import tech.deepdreams.worker.api.enums.CountryCode;
public class PresFamServicev2020Impl implements DeductionService{
public Double calculateEmployee(Map params) {
return 0.0 ;
}
public Double calculateEmployer(Map params) {
Double value = (Double) params.get(LocalConstantCode.CODE_CONTRIB_SALARY) ;
Double minSalary = (Double) params.get(LocalConstantCode.CODE_SMIG) ;
return Math.min(value, minSalary) * PRES_FAM_RATE * 0.01 ;
}
private static final Double PRES_FAM_RATE = 5.75 ;
public CountryCode country() {
return CountryCode.CIV ;
}
public String code() {
return CIVElementCode.CODE_ALL_FAM ;
}
public int version() {
return 2020 ;
}
}