All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tech.deepdreams.worker.deduction.CNAMGSServicev2016Impl Maven / Gradle / Ivy

The newest version!
package tech.deepdreams.worker.deduction;
import java.util.Map;
import tech.deepdreams.worker.api.services.DeductionService;
import tech.deepdreams.worker.api.util.CommonCodes;
import tech.deepdreams.worker.api.enums.CountryCode;
import tech.deepdreams.worker.constants.ElementCode;
import tech.deepdreams.worker.constants.LocalConstantCode;

public class CNAMGSServicev2016Impl implements DeductionService{
	
	
	public Double calculateEmployee(Map params) {
		Double minimumSalary = (Double) params.get(CommonCodes.CODE_SMIG) ;
		Double contribSalary = (Double) params.get(LocalConstantCode.CODE_GROSS_TAXABLE_SALARY) ;
		return Math.max(Math.min(contribSalary, 2_500_000.0), minimumSalary) * 0.02 ;
	}

	
	public Double calculateEmployer(Map params) {
		Double minimumSalary = (Double) params.get(CommonCodes.CODE_SMIG) ;
		Double contribSalary = (Double) params.get(LocalConstantCode.CODE_GROSS_TAXABLE_SALARY) ;
		return Math.max(Math.min(contribSalary, 2_500_000.0), minimumSalary) * 0.041 ;
	}
	
	
	public CountryCode country() {
		return CountryCode.GAB ;
	}
	
	
	public String code() {
		return ElementCode.CODE_CNAMGS ;
	}
	
	
	public int version() {
		return 2016 ;
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy