You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.1 KiB
58 lines
1.1 KiB
package com.dxhy.erp.enums;
|
|
|
|
import com.dxhy.common.vo.Tax;
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
/**
|
|
* 税率 税码关系表
|
|
*/
|
|
public enum TaxRateCodeEnum {
|
|
X0("0","X0"),
|
|
X1("16","X1"),
|
|
X2("13","X2"),
|
|
X3("10","X3"),
|
|
X4("9","X4"),
|
|
X5("6","X5"),
|
|
X6("5","X6"),
|
|
X7("3","X7"),
|
|
X8("2","X8"),
|
|
X9("1","X9"),
|
|
|
|
;
|
|
|
|
|
|
private String taxRate;
|
|
|
|
private String code;
|
|
|
|
public static String getCode(String taxRate) {
|
|
for (TaxRateCodeEnum codeEnum : TaxRateCodeEnum.values()) {
|
|
if (codeEnum.getTaxRate().equals(taxRate)) {
|
|
return codeEnum.getCode();
|
|
}
|
|
}
|
|
return X0.getCode();
|
|
}
|
|
|
|
TaxRateCodeEnum(String taxRate, String code) {
|
|
this.taxRate = taxRate;
|
|
this.code = code;
|
|
}
|
|
|
|
public String getTaxRate() {
|
|
return taxRate;
|
|
}
|
|
|
|
public void setTaxRate(String taxRate) {
|
|
this.taxRate = taxRate;
|
|
}
|
|
|
|
public String getCode() {
|
|
return code;
|
|
}
|
|
|
|
public void setCode(String code) {
|
|
this.code = code;
|
|
}
|
|
}
|
|
|