feat(ik3cloud): 新增收款单功能并完善作废接口
- 新增收款单常量定义及映射配置 - 新增收款单类型枚举定义 - 新增收款单服务模块,支持保存和作废操作 - 在应付、应收、付款模块中补充作废接口实现 - 定义收款单保存参数结构体及费用明细结构体
This commit is contained in:
@@ -20,6 +20,7 @@ const (
|
||||
ActionExpense Action = "BD_Expense" // 费用项目
|
||||
ActionPayment Action = "AP_PAYBILL" // 付款单
|
||||
ActionInformation Action = "BOS_ASSISTANTDATA_DETAIL" // 辅助资料
|
||||
ActionReceiptAction Action = "AR_RECEIVEBILL" // 收款单
|
||||
)
|
||||
|
||||
var ActionIdField = map[Action]string{
|
||||
@@ -40,6 +41,7 @@ var ActionIdField = map[Action]string{
|
||||
ActionExpense: "",
|
||||
ActionPayment: "FID",
|
||||
ActionInformation: "FEntryID",
|
||||
ActionReceiptAction: "FID",
|
||||
}
|
||||
var ActionNumberField = map[Action]string{
|
||||
ActionDepartment: "FNumber",
|
||||
@@ -59,6 +61,7 @@ var ActionNumberField = map[Action]string{
|
||||
ActionExpense: "FNumber",
|
||||
ActionPayment: "FBillNo",
|
||||
ActionInformation: "FNumber",
|
||||
ActionReceiptAction: "FBillNo",
|
||||
}
|
||||
|
||||
type OperatorType = string
|
||||
@@ -76,6 +79,13 @@ const (
|
||||
PaymentTypeRequest PaymentType = "FKDLX11_SYS" // 报销付款单
|
||||
)
|
||||
|
||||
type ReceiptType = string
|
||||
|
||||
const (
|
||||
ReceiptTypeReceiptFx ReceiptType = "SKDLX08_SYS" // 收汇水单
|
||||
ReceiptTypeReceipt ReceiptType = "SKDLX09_SYS" // 收款单
|
||||
)
|
||||
|
||||
type InformationType = string
|
||||
|
||||
const (
|
||||
|
||||
@@ -19,6 +19,7 @@ type Ik3cloud struct {
|
||||
Dict dict // 字典
|
||||
Payment payment // 付款单
|
||||
Information information // 资料
|
||||
Receipt receipt // 收款单
|
||||
}
|
||||
|
||||
type Entity struct {
|
||||
|
||||
@@ -47,3 +47,13 @@ func (p *payable) Save(ctx context.Context, args ArgsPayableSave) (entity Entity
|
||||
err = xClient.Call(ctx, "Save", args, &entity)
|
||||
return
|
||||
}
|
||||
|
||||
// Cancel @TITLE 作废
|
||||
func (p *payable) Cancel(ctx context.Context, args Unique) (err error) {
|
||||
xClient, err := client.GetClient(p)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Cancel", args, &reply)
|
||||
}
|
||||
|
||||
@@ -45,3 +45,13 @@ func (p *payment) Save(ctx context.Context, args ArgsPaymentSave) (entity Entity
|
||||
err = xClient.Call(ctx, "Save", args, &entity)
|
||||
return
|
||||
}
|
||||
|
||||
// Cancel @TITLE 作废
|
||||
func (p *payment) Cancel(ctx context.Context, args Unique) (err error) {
|
||||
xClient, err := client.GetClient(p)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Cancel", args, &reply)
|
||||
}
|
||||
|
||||
52
ik3cloud/receipt.go
Normal file
52
ik3cloud/receipt.go
Normal file
@@ -0,0 +1,52 @@
|
||||
package ik3cloud
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"git.kumo.work/shama/service/client"
|
||||
"git.kumo.work/shama/service/ik3cloud/constant"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
type receipt struct {
|
||||
}
|
||||
type ArgsReceiptSave struct {
|
||||
ReceiptId int64 // 收款单ID
|
||||
Number string // 单据编号
|
||||
ReceiptType constant.ReceiptType // 收款单类型
|
||||
Date time.Time // 收款单日期
|
||||
DepartmentNumber string // 部门编号
|
||||
StaffXsyNumber string // 业务员编号
|
||||
CurrencyNumber string // 币种编号
|
||||
Rate decimal.Decimal // 汇率
|
||||
Remarks string // 备注
|
||||
Costs []ReceiptCost // 费用明细
|
||||
}
|
||||
|
||||
type ReceiptCost struct {
|
||||
InvoiceSerial string // 发票号
|
||||
DepartmentNumber string // 部门编号
|
||||
Amount decimal.Decimal // 金额
|
||||
Remarks string // 备注
|
||||
}
|
||||
|
||||
// Save @TITLE 保存收款单
|
||||
func (r *receipt) Save(ctx context.Context, args ArgsReceiptSave) (entity Entity, err error) {
|
||||
xClient, err := client.GetClient(r)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Save", args, &entity)
|
||||
return
|
||||
}
|
||||
|
||||
// Cancel @TITLE 作废
|
||||
func (r *receipt) Cancel(ctx context.Context, args Unique) (err error) {
|
||||
xClient, err := client.GetClient(r)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Cancel", args, &reply)
|
||||
}
|
||||
@@ -50,3 +50,13 @@ func (r *receivable) Save(ctx context.Context, args ArgsReceivableSave) (entity
|
||||
err = xClient.Call(ctx, "Save", args, &entity)
|
||||
return
|
||||
}
|
||||
|
||||
// Cancel @TITLE 作废
|
||||
func (r *receivable) Cancel(ctx context.Context, args Unique) (err error) {
|
||||
xClient, err := client.GetClient(r)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
reply := 0
|
||||
return xClient.Call(ctx, "Cancel", args, &reply)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user