feat(paymentRefund): 新增付款退款单功能
- 添加付款退款单常量定义及类型枚举 - 在 Ik3cloud 结构体中注册付款退款单模块 - 实现付款退款单保存接口 Save - 实现付款退款单作废接口 Cancel - 定义付款退款单参数结构体及费用明细项
This commit is contained in:
@@ -19,6 +19,7 @@ const (
|
|||||||
ActionRecPayPurpose Action = "CN_RECPAYPURPOSE" // 收付款用途
|
ActionRecPayPurpose Action = "CN_RECPAYPURPOSE" // 收付款用途
|
||||||
ActionExpense Action = "BD_Expense" // 费用项目
|
ActionExpense Action = "BD_Expense" // 费用项目
|
||||||
ActionPayment Action = "AP_PAYBILL" // 付款单
|
ActionPayment Action = "AP_PAYBILL" // 付款单
|
||||||
|
ActionPaymentRefund Action = "AP_REFUNDBILL" // 付款退款单
|
||||||
ActionInformation Action = "BOS_ASSISTANTDATA_DETAIL" // 辅助资料
|
ActionInformation Action = "BOS_ASSISTANTDATA_DETAIL" // 辅助资料
|
||||||
ActionReceiptAction Action = "AR_RECEIVEBILL" // 收款单
|
ActionReceiptAction Action = "AR_RECEIVEBILL" // 收款单
|
||||||
ActionBankAccount Action = "CN_BANKACNT" // 银行账户
|
ActionBankAccount Action = "CN_BANKACNT" // 银行账户
|
||||||
@@ -42,6 +43,7 @@ var ActionIdField = map[Action]string{
|
|||||||
ActionRecPayPurpose: "",
|
ActionRecPayPurpose: "",
|
||||||
ActionExpense: "",
|
ActionExpense: "",
|
||||||
ActionPayment: "FID",
|
ActionPayment: "FID",
|
||||||
|
ActionPaymentRefund: "FID",
|
||||||
ActionInformation: "FEntryID",
|
ActionInformation: "FEntryID",
|
||||||
ActionReceiptAction: "FID",
|
ActionReceiptAction: "FID",
|
||||||
}
|
}
|
||||||
@@ -62,6 +64,7 @@ var ActionNumberField = map[Action]string{
|
|||||||
ActionRecPayPurpose: "FNumber",
|
ActionRecPayPurpose: "FNumber",
|
||||||
ActionExpense: "FNumber",
|
ActionExpense: "FNumber",
|
||||||
ActionPayment: "FBillNo",
|
ActionPayment: "FBillNo",
|
||||||
|
ActionPaymentRefund: "FBillNo",
|
||||||
ActionInformation: "FNumber",
|
ActionInformation: "FNumber",
|
||||||
ActionReceiptAction: "FBillNo",
|
ActionReceiptAction: "FBillNo",
|
||||||
}
|
}
|
||||||
@@ -97,6 +100,12 @@ const (
|
|||||||
ReceiptTypeReceipt ReceiptType = "SKDLX09_SYS" // 收款单
|
ReceiptTypeReceipt ReceiptType = "SKDLX09_SYS" // 收款单
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type PaymentRefundType = string
|
||||||
|
|
||||||
|
const (
|
||||||
|
PaymentRefundTypePurchase PaymentRefundType = "FKTKDLX01_SYS" // 采购业务退款单
|
||||||
|
)
|
||||||
|
|
||||||
type InformationType = string
|
type InformationType = string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -7,19 +7,20 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Ik3cloud struct {
|
type Ik3cloud struct {
|
||||||
Department department // 部门
|
Department department // 部门
|
||||||
Staff staff // 员工
|
Staff staff // 员工
|
||||||
Position position // 职位
|
Position position // 职位
|
||||||
Contact contact // 联系人
|
Contact contact // 联系人
|
||||||
Factory factory // 工厂
|
Factory factory // 工厂
|
||||||
Custom custom // 客户
|
Custom custom // 客户
|
||||||
Product product // 产品
|
Product product // 产品
|
||||||
Receivable receivable // 应收
|
Receivable receivable // 应收
|
||||||
Payable payable // 应付
|
Payable payable // 应付
|
||||||
Dict dict // 字典
|
Dict dict // 字典
|
||||||
Payment payment // 付款单
|
Payment payment // 付款单
|
||||||
Information information // 资料
|
Information information // 资料
|
||||||
Receipt receipt // 收款单
|
Receipt receipt // 收款单
|
||||||
|
PaymentRefund paymentRefund // 付款退款单
|
||||||
}
|
}
|
||||||
|
|
||||||
type Entity struct {
|
type Entity struct {
|
||||||
|
|||||||
53
ik3cloud/paymentRefund.go
Normal file
53
ik3cloud/paymentRefund.go
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
package ik3cloud
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"git.kumo.work/shama/service/client"
|
||||||
|
"git.kumo.work/shama/service/ik3cloud/constant"
|
||||||
|
"github.com/shopspring/decimal"
|
||||||
|
)
|
||||||
|
|
||||||
|
type paymentRefund struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
type ArgsPaymentRefundSave struct {
|
||||||
|
PaymentRefundId int64 // 付款退款单id
|
||||||
|
Number string // 付款退款单编号
|
||||||
|
RefundType constant.PaymentRefundType // 付款退款单类型
|
||||||
|
PayUnitType string // 付款单位类型
|
||||||
|
PayUnit string // 付款单位(退款供应商)
|
||||||
|
CurrencyNumber string // 币种
|
||||||
|
Rate decimal.Decimal // 汇率
|
||||||
|
Date time.Time // 业务日期 2006-01-02 15:04:05
|
||||||
|
Remarks string // 备注
|
||||||
|
Costs []PaymentRefundCostItem // 费用
|
||||||
|
}
|
||||||
|
|
||||||
|
type PaymentRefundCostItem struct {
|
||||||
|
PaymentPurpose string // 原付款用途
|
||||||
|
Amount decimal.Decimal // 金额
|
||||||
|
BankAccount string // 我方银行账号
|
||||||
|
InvoiceSerial string // 发票号
|
||||||
|
}
|
||||||
|
|
||||||
|
// Save @TITLE 保存付款退款单
|
||||||
|
func (p *paymentRefund) Save(ctx context.Context, args ArgsPaymentRefundSave) (entity Entity, err error) {
|
||||||
|
xClient, err := client.GetClient(p)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
err = xClient.Call(ctx, "Save", args, &entity)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Cancel @TITLE 作废
|
||||||
|
func (p *paymentRefund) 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)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user