Sfoglia il codice sorgente

任务 #94449 增加预收付款、预收票额字段

zou.yingbin 4 anni fa
parent
commit
9f5af14354
4 ha cambiato i file con 49 aggiunte e 13 eliminazioni
  1. 15 3
      docs/docs.go
  2. 15 3
      docs/swagger.json
  3. 12 3
      docs/swagger.yaml
  4. 7 4
      models/ermcp.go

+ 15 - 3
docs/docs.go

@@ -12168,6 +12168,10 @@ var doc = `{
                 "relatedgoodstype": {
                     "description": "关联商品类型 - 1:期货合约 2:现货品种",
                     "type": "integer"
+                },
+                "remark": {
+                    "description": "备注",
+                    "type": "string"
                 }
             }
         },
@@ -12215,7 +12219,7 @@ var doc = `{
                     "type": "string"
                 },
                 "daikaiamount": {
-                    "description": "待开票额",
+                    "description": "应收(开)票额",
                     "type": "number"
                 },
                 "deliveryenddate": {
@@ -12278,6 +12282,14 @@ var doc = `{
                     "description": "已收付额(收款或付款)",
                     "type": "number"
                 },
+                "preinvoiceamount": {
+                    "description": "预收(开)票额",
+                    "type": "number"
+                },
+                "prepayamount": {
+                    "description": "预收付额",
+                    "type": "number"
+                },
                 "price": {
                     "description": "价格",
                     "type": "number"
@@ -12315,7 +12327,7 @@ var doc = `{
                     "type": "number"
                 },
                 "reckonedamount": {
-                    "description": "已收付额(已确定额)",
+                    "description": "实际已收付额(已确定额,已收付总额-已退款总额)",
                     "type": "number"
                 },
                 "reckonotheramount": {
@@ -12355,7 +12367,7 @@ var doc = `{
                     "type": "number"
                 },
                 "unpayamount": {
-                    "description": "待支收额(支付或收款)",
+                    "description": "应收付款额(应支付或应收款)",
                     "type": "number"
                 },
                 "unpricedqty": {

+ 15 - 3
docs/swagger.json

@@ -12152,6 +12152,10 @@
                 "relatedgoodstype": {
                     "description": "关联商品类型 - 1:期货合约 2:现货品种",
                     "type": "integer"
+                },
+                "remark": {
+                    "description": "备注",
+                    "type": "string"
                 }
             }
         },
@@ -12199,7 +12203,7 @@
                     "type": "string"
                 },
                 "daikaiamount": {
-                    "description": "待开票额",
+                    "description": "应收(开)票额",
                     "type": "number"
                 },
                 "deliveryenddate": {
@@ -12262,6 +12266,14 @@
                     "description": "已收付额(收款或付款)",
                     "type": "number"
                 },
+                "preinvoiceamount": {
+                    "description": "预收(开)票额",
+                    "type": "number"
+                },
+                "prepayamount": {
+                    "description": "预收付额",
+                    "type": "number"
+                },
                 "price": {
                     "description": "价格",
                     "type": "number"
@@ -12299,7 +12311,7 @@
                     "type": "number"
                 },
                 "reckonedamount": {
-                    "description": "已收付额(已确定额)",
+                    "description": "实际已收付额(已确定额,已收付总额-已退款总额)",
                     "type": "number"
                 },
                 "reckonotheramount": {
@@ -12339,7 +12351,7 @@
                     "type": "number"
                 },
                 "unpayamount": {
-                    "description": "待支收额(支付或收款)",
+                    "description": "应收付款额(应支付或应收款)",
                     "type": "number"
                 },
                 "unpricedqty": {

+ 12 - 3
docs/swagger.yaml

@@ -3848,6 +3848,9 @@ definitions:
       relatedgoodstype:
         description: 关联商品类型 - 1:期货合约 2:现货品种
         type: integer
+      remark:
+        description: 备注
+        type: string
     type: object
   models.ErmcpModel:
     properties:
@@ -3882,7 +3885,7 @@ definitions:
         description: 创建时间
         type: string
       daikaiamount:
-        description: 待开票额
+        description: 应收(开)票额
         type: number
       deliveryenddate:
         description: 交割结束日
@@ -3929,6 +3932,12 @@ definitions:
       payamount:
         description: 已收付额(收款或付款)
         type: number
+      preinvoiceamount:
+        description: 预收(开)票额
+        type: number
+      prepayamount:
+        description: 预收付额
+        type: number
       price:
         description: 价格
         type: number
@@ -3957,7 +3966,7 @@ definitions:
         description: 调整金额
         type: number
       reckonedamount:
-        description: 已收付额(已确定额)
+        description: 实际已收付额(已确定额,已收付总额-已退款总额)
         type: number
       reckonotheramount:
         description: 其它费用
@@ -3987,7 +3996,7 @@ definitions:
         description: 合计总额
         type: number
       unpayamount:
-        description: 待支收额(支付或收款)
+        description: 应收付款额(应支付或应收款)
         type: number
       unpricedqty:
         description: 未定价量

+ 7 - 4
models/ermcp.go

@@ -175,9 +175,11 @@ type ErmcpModel struct {
 	PricedQty          float64 `json:"pricedqty"  xorm:"'PRICEDQTY'"`                   // 已定价量
 	UnsureQty          float64 `json:"unsureqty"  xorm:"'UNSUREQTY'"`                   // 未确定量
 	PayAmount          float64 `json:"payamount"  xorm:"'PAYAMOUNT'"`                   // 已收付额(收款或付款)
-	UnpayAmount        float64 `json:"unpayamount"`                                     // 待支收额(支付或收款)
+	UnpayAmount        float64 `json:"unpayamount"`                                     // 应收付款额(应支付或应收款)
+	PrePayAmount       float64 `json:"prepayamount"`                                    // 预收付额
 	InvoiceAmount      float64 `json:"invoiceamount"  xorm:"'INVOICEAMOUNT'"`           // 已开票额
-	DaikaiAmount       float64 `json:"daikaiamount"  xorm:"'DAIKAIAMOUNT'"`             // 待开票额
+	DaikaiAmount       float64 `json:"daikaiamount"  xorm:"'DAIKAIAMOUNT'"`             // 应收(开)票额
+	PreInvoiceAmount   float64 `json:"preinvoiceamount"`                                // 预收(开)票额
 	StartDate          string  `json:"startdate"  xorm:"'STARTDATE'"`                   // 点价开始日
 	EndDate            string  `json:"enddate"  xorm:"'ENDDATE'"`                       // 点价结束日
 	DeliveryStartDate  string  `json:"deliverystartdate"  xorm:"'DELIVERYSTARTDATE'"`   // 交割开始日
@@ -201,7 +203,7 @@ type ErmcpModel struct {
 	LoanAmount         float64 `json:"loanamount"  xorm:"'LoanAmount'"`                 // 贷款总额=已定价额+调整金额
 	Contractno         string  `json:"contractno"  xorm:"'Contractno'"`                 // 合同编号
 	TotalAmount        float64 `json:"totalamount"  xorm:"'-'"`                         // 合计总额
-	ReckonedAmount     float64 `json:"reckonedamount"  xorm:"'ReckonedAmount'"`         // 已收付额(已确定额)
+	ReckonedAmount     float64 `json:"reckonedamount"  xorm:"'ReckonedAmount'"`         // 实际已收付额(已确定额,已收付总额-已退款总额)
 	BUYUSERID          int64   `json:"-"  xorm:"'BUYUSERID'"`                           // 采购方ID
 	SELLUSERID         int64   `json:"-"  xorm:"'SELLUSERID'"`                          // 销售方ID
 	AUDITTIME          string  `json:"audittime"  xorm:"'AUDITTIME'"`                   // 审核时间
@@ -219,7 +221,8 @@ func (r *ErmcpModel) calc() {
 	// #94293 公式调整:合计总额不再加保证金
 	r.TotalAmount = r.LoanAmount + r.ReckonOtherAmount
 	r.UnpayAmount = r.TotalAmount - r.ReckonedAmount
-
+	r.PrePayAmount = r.ReckonedAmount - r.TotalAmount
+	r.PreInvoiceAmount = r.InvoiceAmount - r.TotalAmount
 	if r.Contracttype == 1 {
 		//采购合同, 取销售方名称
 		r.AccountName = mtpcache.GetUserNameByUserId(r.SELLUSERID)