|
@@ -72,14 +72,14 @@ public class InvoiceServiceImpl implements InvoiceService {
|
|
|
JSONObject goodsItem = new JSONObject();
|
|
JSONObject goodsItem = new JSONObject();
|
|
|
goodsItem.put("djhh", "1"); // 单据行号
|
|
goodsItem.put("djhh", "1"); // 单据行号
|
|
|
goodsItem.put("fphxz", "0"); // 发票行性质:0=正常行
|
|
goodsItem.put("fphxz", "0"); // 发票行性质:0=正常行
|
|
|
- goodsItem.put("spmc", "测试商品"); // 商品名称
|
|
|
|
|
|
|
+ goodsItem.put("spmc", "*经纪代理服务*物流辅助服务代理服务费"); // 商品名称
|
|
|
goodsItem.put("jldw", "月"); //计量单位
|
|
goodsItem.put("jldw", "月"); //计量单位
|
|
|
goodsItem.put("spsl", 1.00); // 商品数量
|
|
goodsItem.put("spsl", 1.00); // 商品数量
|
|
|
goodsItem.put("ssbm", "3040802010100000000"); // 19位税收编码
|
|
goodsItem.put("ssbm", "3040802010100000000"); // 19位税收编码
|
|
|
goodsItem.put("hsdj", invoiceRequest.getHsje()); // 含税单价
|
|
goodsItem.put("hsdj", invoiceRequest.getHsje()); // 含税单价
|
|
|
goodsItem.put("hsje", invoiceRequest.getHsje()); // 商品含税金额
|
|
goodsItem.put("hsje", invoiceRequest.getHsje()); // 商品含税金额
|
|
|
BigDecimal[] result =TaxAmountCalculator.calculateFromTaxIncluded(invoiceRequest.getHsje(), BigDecimal.valueOf(0.06));
|
|
BigDecimal[] result =TaxAmountCalculator.calculateFromTaxIncluded(invoiceRequest.getHsje(), BigDecimal.valueOf(0.06));
|
|
|
- goodsItem.put("tax", 0.06); // 税率13%
|
|
|
|
|
|
|
+ goodsItem.put("tax", 0.06); // 税率6%
|
|
|
goodsItem.put("se", result[1]); // 商品税额
|
|
goodsItem.put("se", result[1]); // 商品税额
|
|
|
content.put("mxxx", new JSONObject[]{goodsItem});
|
|
content.put("mxxx", new JSONObject[]{goodsItem});
|
|
|
logger.info("开票参数组装完成 参数{}",content);
|
|
logger.info("开票参数组装完成 参数{}",content);
|