|
@@ -1592,7 +1592,7 @@ func (ct *InvoicePaymentController) NotInvoiceList(c *gin.Context) {
|
|
|
if v.ServiceProductId == 1 {
|
|
|
if serviceAmount, ok := serviceAmountMap[v.ContractRegisterId]; ok {
|
|
|
item := fms.NotInvoicePaymentSummaryItem{
|
|
|
- NotInvoicedAmountTotal: serviceAmount[2].ServiceAmount,
|
|
|
+ NotInvoicedAmountOriginTotal: serviceAmount[2].ServiceAmount,
|
|
|
ServiceProductId: 2,
|
|
|
}
|
|
|
item.SellerId = v.SellerId
|
|
@@ -1605,7 +1605,7 @@ func (ct *InvoicePaymentController) NotInvoiceList(c *gin.Context) {
|
|
|
} else {
|
|
|
if serviceAmount, ok := serviceAmountMap[v.ContractRegisterId]; ok {
|
|
|
item := fms.NotInvoicePaymentSummaryItem{
|
|
|
- NotInvoicedAmountTotal: serviceAmount[1].ServiceAmount,
|
|
|
+ NotInvoicedAmountOriginTotal: serviceAmount[1].ServiceAmount,
|
|
|
ServiceProductId: 1,
|
|
|
}
|
|
|
item.SellerId = v.SellerId
|
|
@@ -1621,7 +1621,7 @@ func (ct *InvoicePaymentController) NotInvoiceList(c *gin.Context) {
|
|
|
// 套餐是ficc权益都有的,但是都没进行过开票到款,补充两个套餐的内容,直接用合同金额当作未开票金额即可
|
|
|
if serviceAmount, ok := serviceAmountMap[v.ContractRegisterId]; ok {
|
|
|
item1 := fms.NotInvoicePaymentSummaryItem{
|
|
|
- NotInvoicedAmountTotal: serviceAmount[2].ServiceAmount,
|
|
|
+ NotInvoicedAmountOriginTotal: serviceAmount[2].ServiceAmount,
|
|
|
ServiceProductId: 2,
|
|
|
}
|
|
|
item1.SellerId = v.SellerId
|
|
@@ -1631,7 +1631,7 @@ func (ct *InvoicePaymentController) NotInvoiceList(c *gin.Context) {
|
|
|
NotInvoiceSummaryMap[v.ContractRegisterId] = append(NotInvoiceSummaryMap[v.ContractRegisterId], &item1)
|
|
|
|
|
|
item2 := fms.NotInvoicePaymentSummaryItem{
|
|
|
- NotInvoicedAmountTotal: serviceAmount[1].ServiceAmount,
|
|
|
+ NotInvoicedAmountOriginTotal: serviceAmount[1].ServiceAmount,
|
|
|
ServiceProductId: 1,
|
|
|
}
|
|
|
item2.SellerId = v.SellerId
|
|
@@ -1645,7 +1645,7 @@ func (ct *InvoicePaymentController) NotInvoiceList(c *gin.Context) {
|
|
|
// 只有ficc套餐,但是未进行过开票到款,手动补充信息
|
|
|
if serviceAmount, ok := serviceAmountMap[v.ContractRegisterId]; ok {
|
|
|
item1 := fms.NotInvoicePaymentSummaryItem{
|
|
|
- NotInvoicedAmountTotal: serviceAmount[1].ServiceAmount,
|
|
|
+ NotInvoicedAmountOriginTotal: serviceAmount[1].ServiceAmount,
|
|
|
ServiceProductId: 1,
|
|
|
}
|
|
|
item1.SellerId = v.SellerId
|
|
@@ -1659,7 +1659,7 @@ func (ct *InvoicePaymentController) NotInvoiceList(c *gin.Context) {
|
|
|
// 只有权益套餐,但是未进行过开票到款,手动补充信息
|
|
|
if serviceAmount, ok := serviceAmountMap[v.ContractRegisterId]; ok {
|
|
|
item2 := fms.NotInvoicePaymentSummaryItem{
|
|
|
- NotInvoicedAmountTotal: serviceAmount[2].ServiceAmount,
|
|
|
+ NotInvoicedAmountOriginTotal: serviceAmount[2].ServiceAmount,
|
|
|
ServiceProductId: 2,
|
|
|
}
|
|
|
item2.SellerId = v.SellerId
|
|
@@ -1703,28 +1703,29 @@ func (ct *InvoicePaymentController) NotInvoiceList(c *gin.Context) {
|
|
|
// fmt.Println("v.ServiceProductId:", v.ServiceProductId)
|
|
|
// fmt.Println("v.NotInvoicedAmountTotal:", v.NotInvoicedAmountTotal)
|
|
|
// fmt.Println("registerId:",registerId)
|
|
|
- if v.NotInvoicedAmountTotal == 0 {
|
|
|
+ if v.NotInvoicedAmountOriginTotal == 0 {
|
|
|
if v.InvoiceAmountTotal > v.PaymentAmountTotal {
|
|
|
// 有合规登记或补录合同过的,有serviceAmountMap信息
|
|
|
if _, ok := serviceAmountMap[registerId]; ok {
|
|
|
if _, ok2 := serviceAmountMap[registerId][v.ServiceProductId]; ok2 {
|
|
|
- v.NotInvoicedAmountTotal = serviceAmountMap[registerId][v.ServiceProductId].ServiceAmount - v.InvoiceAmountTotal
|
|
|
+ v.NotInvoicedAmountOriginTotal = serviceAmountMap[registerId][v.ServiceProductId].ServiceAmount - v.InvoiceAmountTotal
|
|
|
}
|
|
|
} else {
|
|
|
// 预登记没有合同套餐金额信息
|
|
|
- v.NotInvoicedAmountTotal = v.InvoiceAmountTotal - v.PaymentAmountTotal
|
|
|
+ v.NotInvoicedAmountOriginTotal = v.InvoiceAmountTotal - v.PaymentAmountTotal
|
|
|
}
|
|
|
} else {
|
|
|
if _, ok := serviceAmountMap[registerId]; ok {
|
|
|
// 有合规登记或补录合同过的,有serviceAmountMap信息
|
|
|
if _, ok2 := serviceAmountMap[registerId][v.ServiceProductId]; ok2 {
|
|
|
- v.NotInvoicedAmountTotal = serviceAmountMap[registerId][v.ServiceProductId].ServiceAmount - v.PaymentAmountTotal
|
|
|
+ v.NotInvoicedAmountOriginTotal = serviceAmountMap[registerId][v.ServiceProductId].ServiceAmount - v.PaymentAmountTotal
|
|
|
}
|
|
|
} else {
|
|
|
// 预登记没有合同套餐金额信息
|
|
|
- v.NotInvoicedAmountTotal = v.PaymentAmountTotal - v.InvoiceAmountTotal
|
|
|
+ v.NotInvoicedAmountOriginTotal = v.PaymentAmountTotal - v.InvoiceAmountTotal
|
|
|
}
|
|
|
}
|
|
|
+ v.NotInvoicedAmountTotal = v.NotInvoicedAmountOriginTotal/v.RMBRate
|
|
|
}
|
|
|
// 补充销售信息
|
|
|
if v.SellerId > 0 && v.RaiSellerId > 0 {
|