ariesy 增加单个字段排序&认证查询导出条件修改

release
yefei 2 years ago
parent c4687d0b71
commit 01cdf4faf9
  1. 24
      dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java

@ -832,7 +832,7 @@ public class SDNYMainProcessController extends AbstractController {
sapInvoiceDetail.setZSM(getZSM(tax.toString()));
BigDecimal tax1 = tax.multiply(new BigDecimal("100"));
sapInvoiceDetail.setZTAX(tax1.toString());
if (tax1.compareTo(new BigDecimal("100")) < 1) {
if (tax1.compareTo(new BigDecimal("100")) > 0) {
sapInvoiceDetail.setZTAX(taxRate);
}else if (tax1.scale() > 2){
DecimalFormat decimalFormat = new DecimalFormat("#.00");
@ -1258,11 +1258,25 @@ public class SDNYMainProcessController extends AbstractController {
}
public static void main(String[] args) {
// DecimalFormat decimalFormat = new DecimalFormat("#.00");
// String formattedDecimal = decimalFormat.format(new BigDecimal("15"));
// BigDecimal bigDecimal = new BigDecimal("0.13");
// boolean b = bigDecimal.compareTo(new BigDecimal("1")) < 1;
// System.out.println();
SAPInvoiceDetail sapInvoiceDetail = new SAPInvoiceDetail();
String taxRate = "6.00";
BigDecimal tax = new BigDecimal(taxRate);
BigDecimal tax1 = tax.multiply(new BigDecimal("100"));
sapInvoiceDetail.setZTAX(tax1.toString());
if (tax1.compareTo(new BigDecimal("100")) > 0) {
sapInvoiceDetail.setZTAX(taxRate);
}else if (tax1.scale() > 2){
DecimalFormat decimalFormat = new DecimalFormat("#.00");
String formattedDecimal = decimalFormat.format(new BigDecimal("15"));
BigDecimal bigDecimal = new BigDecimal("0.13");
boolean b = bigDecimal.compareTo(new BigDecimal("1")) < 1;
System.out.println();
String formattedDecimal = decimalFormat.format(tax1);
sapInvoiceDetail.setZTAX(formattedDecimal);
}
System.out.println("sapInvoiceDetail="+sapInvoiceDetail.getZTAX());
}
}

Loading…
Cancel
Save