|
|
|
@ -612,24 +612,26 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { |
|
|
|
|
|
|
|
|
|
InvoiceInfo invoiceInfo = convertToInvoiceInfo(invoice); |
|
|
|
|
log.info("进行价税分离的发票信息为:{}", invoiceInfo); |
|
|
|
|
|
|
|
|
|
ServiceResult<InvoiceInfo> invoiceResult = new ServiceResult<>(); |
|
|
|
|
//0523晚成伟提出新需求,客运汽车票必须实名才可以进行价税分离
|
|
|
|
|
// if(SNFplxEnum.KYQCP.getFplxDm().equals(fplxdm)){
|
|
|
|
|
// if(StringUtils.isEmpty(invoice.getRiderName()) || StringUtils.isEmpty(invoice.getIdcardNo())){
|
|
|
|
|
// return result;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
ServiceResult<InvoiceInfo> invoiceResult = this.valoremTaxCount(invoiceInfo, "Y"); |
|
|
|
|
InvoiceInfo data = invoiceResult.getData(); |
|
|
|
|
if (data != null) { |
|
|
|
|
invoice.setIsDeductible(data.getIsDeductible()); |
|
|
|
|
invoice.setTaxRate(data.getTaxRate()); |
|
|
|
|
if (data.getInvoiceAmount() != null) { |
|
|
|
|
invoice.setTotalAmount(data.getInvoiceAmount().toString()); |
|
|
|
|
if(SNFplxEnum.KYQCP.getFplxDm().equals(fplxdm)){ |
|
|
|
|
if(StringUtils.isEmpty(invoice.getRiderName()) || StringUtils.isEmpty(invoice.getIdcardNo())){ |
|
|
|
|
log.info("非实名的实名客票 不需要做价税分离"); |
|
|
|
|
} |
|
|
|
|
if (data.getTaxAmount() != null) { |
|
|
|
|
invoice.setTotalTax(data.getTaxAmount().toString()); |
|
|
|
|
invoiceResult.setMsg("ok"); |
|
|
|
|
invoiceResult.setResult(true); |
|
|
|
|
}else { |
|
|
|
|
invoiceResult = this.valoremTaxCount(invoiceInfo, "Y"); |
|
|
|
|
InvoiceInfo data = invoiceResult.getData(); |
|
|
|
|
if (data != null) { |
|
|
|
|
invoice.setIsDeductible(data.getIsDeductible()); |
|
|
|
|
invoice.setTaxRate(data.getTaxRate()); |
|
|
|
|
if (data.getInvoiceAmount() != null) { |
|
|
|
|
invoice.setTotalAmount(data.getInvoiceAmount().toString()); |
|
|
|
|
} |
|
|
|
|
if (data.getTaxAmount() != null) { |
|
|
|
|
invoice.setTotalTax(data.getTaxAmount().toString()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -637,16 +639,6 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { |
|
|
|
|
log.info("价税分离失败:{}", invoiceResult.getMsg()); |
|
|
|
|
return invoiceResult.getMsg(); |
|
|
|
|
} |
|
|
|
|
// DynamicContextHolder.push(DbConstant.BASICS_READ);
|
|
|
|
|
//
|
|
|
|
|
// SysDeptEntity orgByCompCode = sysDeptDao.getOrgByCompCode(compCode);
|
|
|
|
|
// log.info("查询的组织信息为:{}",JSONObject.toJSONString(orgByCompCode));
|
|
|
|
|
// if(orgByCompCode != null) {
|
|
|
|
|
// reimburse.setGfTaxNo(orgByCompCode.getTaxno());
|
|
|
|
|
// reimburse.setGfName(orgByCompCode.getTaxname());
|
|
|
|
|
// reimburse.setGfAddressAndPhone(orgByCompCode.getAddress() + orgByCompCode.getPhone());
|
|
|
|
|
// reimburse.setGfBankAndNo(orgByCompCode.getBank() + orgByCompCode.getAccount());
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
reimburse = convertToReimburse(invoice, reimburse, fplxdm, company); |
|
|
|
|
|
|
|
|
@ -717,7 +709,9 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter { |
|
|
|
|
reimburse.setSelectId(uuid); |
|
|
|
|
|
|
|
|
|
reimburse.setTaxRate(invoice.getTaxRate()); |
|
|
|
|
reimburse.setTaxCode(getTaxCode(invoice.getTaxRate())); |
|
|
|
|
if(invoice.getTaxRate() != null) { |
|
|
|
|
reimburse.setTaxCode(getTaxCode(invoice.getTaxRate())); |
|
|
|
|
} |
|
|
|
|
reimburse.setIsDeduction(invoice.getIsDeductible()); |
|
|
|
|
|
|
|
|
|
if (StringUtils.isNoneBlank(reimburse.getInvoiceCode())) { |
|
|
|
|