|
@@ -493,7 +493,7 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
if(!b){
|
|
if(!b){
|
|
|
List<String> invoiceIds = this.queryIncomeBindInvoice(invoicingVo);
|
|
List<String> invoiceIds = this.queryIncomeBindInvoice(invoicingVo);
|
|
|
invoice.setCanInvoice(false);
|
|
invoice.setCanInvoice(false);
|
|
|
- invoice.setErrMsg("订单已开票。发票序号是"+ invoiceIds.toString());
|
|
|
|
|
|
|
+ invoice.setErrMsg("订单已开票。发票编号是"+ invoiceIds.toString());
|
|
|
return invoice;
|
|
return invoice;
|
|
|
}
|
|
}
|
|
|
invoice.setCanInvoice(true);
|
|
invoice.setCanInvoice(true);
|
|
@@ -654,6 +654,7 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
public InvoiceingResult addInvoicing(InsPlyIncomeInvoiceVO invoicingVo) {
|
|
public InvoiceingResult addInvoicing(InsPlyIncomeInvoiceVO invoicingVo) {
|
|
|
log.info("开票:invoicingVo=[{}]", JSONUtil.toJsonStr(invoicingVo));
|
|
log.info("开票:invoicingVo=[{}]", JSONUtil.toJsonStr(invoicingVo));
|
|
|
try {
|
|
try {
|
|
|
|
|
+ this.valide4Invoicing(invoicingVo);
|
|
|
InvoiceingResult result = new InvoiceingResult();
|
|
InvoiceingResult result = new InvoiceingResult();
|
|
|
InsPlyIncomeInvoice invoice = new InsPlyIncomeInvoice();
|
|
InsPlyIncomeInvoice invoice = new InsPlyIncomeInvoice();
|
|
|
BeanUtils.copyProperties(invoicingVo, invoice);
|
|
BeanUtils.copyProperties(invoicingVo, invoice);
|
|
@@ -694,6 +695,21 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 开票前的校验
|
|
|
|
|
+ *
|
|
|
|
|
+ * @author lipf
|
|
|
|
|
+ * @date 2026/5/28 9:25
|
|
|
|
|
+ */
|
|
|
|
|
+ private void valide4Invoicing(InsPlyIncomeInvoiceVO invoicingVo) {
|
|
|
|
|
+ if(invoicingVo == null){
|
|
|
|
|
+ throw new ServiceException("无法开票,开票参数为空");
|
|
|
|
|
+ }
|
|
|
|
|
+ if(StrUtil.isEmpty(invoicingVo.getInvoiceNo())){
|
|
|
|
|
+ throw new ServiceException("发票号不能为空");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public BigDecimal getInvoicingAmount(String invoicingId) {
|
|
public BigDecimal getInvoicingAmount(String invoicingId) {
|
|
|
BigDecimal ctualReceivedAmount = new BigDecimal(BigInteger.ZERO);
|
|
BigDecimal ctualReceivedAmount = new BigDecimal(BigInteger.ZERO);
|