ziwen 1 year ago
parent
commit
c68e27ac4c
1 changed files with 6 additions and 2 deletions
  1. 6 2
      controller/census/invoice_payment.go

+ 6 - 2
controller/census/invoice_payment.go

@@ -1853,7 +1853,9 @@ func (ct *InvoicePaymentController) NotInvoiceList(c *gin.Context) {
 						if v.InvoiceAmountTotal > v.PaymentAmountTotal {
 							// 有合规登记或补录合同过的,有serviceAmountMap信息
 							if _,ok := serviceAmountMap[registerId]; ok {
-								v.NotInvoicedAmountTotal = serviceAmountMap[registerId][v.ServiceProductId].ServiceAmount - v.InvoiceAmountTotal
+								if _,ok2 := serviceAmountMap[registerId][v.ServiceProductId]; ok2{
+									v.NotInvoicedAmountTotal = serviceAmountMap[registerId][v.ServiceProductId].ServiceAmount - v.InvoiceAmountTotal
+								}
 							} else {
 								// 预登记没有合同套餐金额信息
 								v.NotInvoicedAmountTotal = v.InvoiceAmountTotal - v.PaymentAmountTotal
@@ -1861,7 +1863,9 @@ func (ct *InvoicePaymentController) NotInvoiceList(c *gin.Context) {
 						} else {
 							if _,ok := serviceAmountMap[registerId]; ok {
 								// 有合规登记或补录合同过的,有serviceAmountMap信息
-								v.NotInvoicedAmountTotal = serviceAmountMap[registerId][v.ServiceProductId].ServiceAmount - v.PaymentAmountTotal
+								if _,ok2 := serviceAmountMap[registerId][v.ServiceProductId]; ok2{
+									v.NotInvoicedAmountTotal = serviceAmountMap[registerId][v.ServiceProductId].ServiceAmount - v.PaymentAmountTotal
+								}
 							} else {
 								// 预登记没有合同套餐金额信息
 								v.NotInvoicedAmountTotal = v.PaymentAmountTotal - v.InvoiceAmountTotal