|
|
|
@ -750,8 +750,9 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
//将类似于0.03数据格式转化为3.00
|
|
|
|
|
if (snInvoiceDetail.getTaxRate() != null && snInvoiceDetail.getTaxRate() != "") { |
|
|
|
|
sapInvoiceDetail.setZTAX(snInvoiceDetail.getTaxRate()); |
|
|
|
|
if (snInvoiceDetail.equals("0")) { |
|
|
|
|
if ( "0".equals(snInvoiceDetail.getTaxRate())){ |
|
|
|
|
sapInvoiceDetail.setZTAX("0.00"); |
|
|
|
|
// sapInvoiceDetail.setZSM(sapInvoiceDetail.getZTAX());
|
|
|
|
|
} |
|
|
|
|
if (snInvoiceDetail.getTaxRate().contains(".")) { |
|
|
|
|
String getTaxRate = snInvoiceDetail.getTaxRate(); |
|
|
|
@ -759,6 +760,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
getTaxRate = getTaxRate.substring(0, 4); |
|
|
|
|
} |
|
|
|
|
BigDecimal tax = new BigDecimal(getTaxRate); |
|
|
|
|
sapInvoiceDetail.setZSM(getZSM(tax.toString())); |
|
|
|
|
BigDecimal tax1 = tax.multiply(new BigDecimal("100")); |
|
|
|
|
sapInvoiceDetail.setZTAX(tax1.toString()); |
|
|
|
|
} |
|
|
|
@ -776,7 +778,12 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
sapInvoiceDetail.setZGSJBM(snInvoiceDetail.getCommodityCode()); |
|
|
|
|
sapInvoiceDetail.setZSE(snInvoiceDetail.getTax()); |
|
|
|
|
sapInvoiceDetail.setZSL(snInvoiceDetail.getQuantity()); |
|
|
|
|
sapInvoiceDetail.setZSM(getZSM(snInvoiceDetail.getTaxRate())); |
|
|
|
|
String zsmTax = snInvoiceDetail.getTaxRate(); |
|
|
|
|
if (zsmTax != null && zsmTax != "" && zsmTax.length() > 4){ |
|
|
|
|
zsmTax = zsmTax.substring(0,4); |
|
|
|
|
} |
|
|
|
|
// sapInvoiceDetail.setZSM(getZSM(snInvoiceDetail.getTaxRate()));
|
|
|
|
|
sapInvoiceDetail.setZSM(getZSM(zsmTax)); |
|
|
|
|
sapInvoiceDetail.setZGGXH(snInvoiceDetail.getSpecificationModel()); |
|
|
|
|
if (snInvoice.getInvoiceCode() != null) { |
|
|
|
|
sapInvoiceDetail.setZTID(snInvoice.getInvoiceCode() + snInvoice.getInvoiceNumber() + snFplx); |
|
|
|
@ -806,6 +813,19 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
info.setZTAX(replace + ".00"); |
|
|
|
|
info.setZSM(getZSM(divide.toString())); |
|
|
|
|
} |
|
|
|
|
if (taxRate != null && taxRate.contains(".")){ |
|
|
|
|
if (taxRate.length() >4){ |
|
|
|
|
taxRate = taxRate.substring(0,4); |
|
|
|
|
BigDecimal tax = new BigDecimal(taxRate); |
|
|
|
|
info.setZSM(getZSM(tax.toString())); |
|
|
|
|
BigDecimal tax1 = tax.multiply(new BigDecimal("100")); |
|
|
|
|
info.setZTAX(tax1.toString()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (taxRate != null && "0".equals(taxRate)){ |
|
|
|
|
info.setZTAX("0.00"); |
|
|
|
|
info.setZSM(getZSM(info.getZTAX())); |
|
|
|
|
} |
|
|
|
|
if (invoiceLineList == null || invoiceLineList.size() == 0) { |
|
|
|
|
if (info.getZTAX() == null || info.getZTAX() == "") { |
|
|
|
|
info.setZTAX("0.00"); |
|
|
|
|