ariesy 修改税率为整数

release
yefei 2 years ago
parent 0cecd31d98
commit 02d3b08808
  1. 18
      dxhy-erp/src/main/java/com/dxhy/erp/service/SNPushCheckRecordService.java

@ -564,20 +564,20 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter {
int index = taxRateDetail.indexOf("%"); int index = taxRateDetail.indexOf("%");
if (index > 0) { if (index > 0) {
taxRateDetail = taxRateDetail.substring(0, taxRateDetail.length() - 1); taxRateDetail = taxRateDetail.substring(0, taxRateDetail.length() - 1);
Float num = Float.parseFloat(taxRateDetail); // Float num = Float.parseFloat(taxRateDetail);
if (num > 9) { // if (num > 9) {
taxRateDetail = "0." + taxRateDetail; // taxRateDetail = "0." + taxRateDetail;
} else { // } else {
if (!taxRateDetail.startsWith("0")) { // if (!taxRateDetail.startsWith("0")) {
taxRateDetail = "0.0" + taxRateDetail; // taxRateDetail = "0.0" + taxRateDetail;
} // }
} // }
} }
} }
} }
if ("11".equals(invoiceType)) { if ("11".equals(invoiceType)) {
taxRateDetail = "0.000"; taxRateDetail = "0";
} }
log.info("明细-发票税率为:{}", taxRateDetail); log.info("明细-发票税率为:{}", taxRateDetail);
snDetailMap.put("taxRate", taxRateDetail); snDetailMap.put("taxRate", taxRateDetail);

Loading…
Cancel
Save