feat(receipt): 添加客户编号字段

- 在 Receipt 结构体中新增 CustomNumber 字段
- 用于存储客户的唯一标识信息
- 支持后续按客户编号查询和统计功能
This commit is contained in:
2025-12-19 16:58:39 +08:00
parent eb4c3e3241
commit 3c1fa079cf
5 changed files with 49 additions and 4 deletions

View File

@@ -130,3 +130,13 @@ func (r *expense) Ik3cloud(ctx context.Context, expenseId int64) (err error) {
reply := 0 reply := 0
return xClient.Call(ctx, "Ik3cloud", expenseId, &reply) return xClient.Call(ctx, "Ik3cloud", expenseId, &reply)
} }
// Cancel @TITLE 作废
func (r *expense) Cancel(ctx context.Context, expenseId int64) (err error) {
xClient, err := client.GetClient(r)
if err != nil {
return
}
reply := 0
return xClient.Call(ctx, "Cancel", expenseId, &reply)
}

View File

@@ -19,7 +19,8 @@ type ArgsReceiptList struct {
} }
type ReceiptSearch struct { type ReceiptSearch struct {
ReceiptSerial string // 收汇单号 ReceiptSerial string // 收汇单号
PayName string // 付款单位 CustomId int64 // 客户筛选
CustomName string // 客户筛选
BankName string // 结汇银行 BankName string // 结汇银行
ReceiptDateStart *time.Time // 创建开始时间 ReceiptDateStart *time.Time // 创建开始时间
ReceiptDateEnd *time.Time // 创建结束时间 ReceiptDateEnd *time.Time // 创建结束时间
@@ -31,7 +32,8 @@ type ReplyReceiptList struct {
type ReceiptItem struct { type ReceiptItem struct {
Id int64 `json:"id"` Id int64 `json:"id"`
ReceiptSerial string `json:"receiptSerial"` ReceiptSerial string `json:"receiptSerial"`
PayName string `json:"payName"` CustomId int64 `json:"customId"`
CustomName string `json:"customName"`
ReceiptDate time.Time `json:"receiptDate"` ReceiptDate time.Time `json:"receiptDate"`
Currency string `json:"currency"` Currency string `json:"currency"`
CurrencyName string `json:"currencyName"` CurrencyName string `json:"currencyName"`
@@ -65,7 +67,7 @@ type ReceiptAdd struct {
CurrencyName string // 币种名称 CurrencyName string // 币种名称
CurrencySymbol string // 币种符号 CurrencySymbol string // 币种符号
CurrencyRate decimal.Decimal // 币种汇率 CurrencyRate decimal.Decimal // 币种汇率
PayName string // 付款单位 CustomId int64 // 客户id
BankName string // 结汇银行 BankName string // 结汇银行
EntryAmount decimal.Decimal // 外币入账金额 EntryAmount decimal.Decimal // 外币入账金额
ForeignFee decimal.Decimal // 国外扣费 ForeignFee decimal.Decimal // 国外扣费
@@ -91,7 +93,8 @@ type ReplyReceiptInfo struct {
CurrencyName string `json:"currencyName"` CurrencyName string `json:"currencyName"`
CurrencySymbol string `json:"currencySymbol"` CurrencySymbol string `json:"currencySymbol"`
CurrencyRate decimal.Decimal `json:"currencyRate"` CurrencyRate decimal.Decimal `json:"currencyRate"`
PayName string `json:"payName"` CustomId int64 `json:"customId"`
CustomName string `json:"customName"`
BankName string `json:"bankName"` BankName string `json:"bankName"`
EntryAmount decimal.Decimal `json:"entryAmount"` EntryAmount decimal.Decimal `json:"entryAmount"`
ForeignFee decimal.Decimal `json:"foreignFee"` ForeignFee decimal.Decimal `json:"foreignFee"`
@@ -127,3 +130,23 @@ func (r *receipt) Edit(ctx context.Context, args ArgsReceiptEdit) (err error) {
reply := 0 reply := 0
return xClient.Call(ctx, "Edit", args, &reply) return xClient.Call(ctx, "Edit", args, &reply)
} }
// Ik3cloud @TITLE 金蝶同步
func (r *receipt) Ik3cloud(ctx context.Context, receiptId int64) (err error) {
xClient, err := client.GetClient(r)
if err != nil {
return
}
reply := 0
return xClient.Call(ctx, "Ik3cloud", receiptId, &reply)
}
// Cancel @TITLE 作废
func (r *receipt) Cancel(ctx context.Context, receiptId int64) (err error) {
xClient, err := client.GetClient(r)
if err != nil {
return
}
reply := 0
return xClient.Call(ctx, "Cancel", receiptId, &reply)
}

View File

@@ -18,6 +18,7 @@ type ArgsReceivableList struct {
type ReceivableSearch struct { type ReceivableSearch struct {
ReceivableSerial string // 收款单据号 ReceivableSerial string // 收款单据号
CustomId int64 // 客户id CustomId int64 // 客户id
CustomName string // 客户名称
InvoiceSerial string // 出运发票号 InvoiceSerial string // 出运发票号
CreatedAtStart *time.Time // 创建开始时间 CreatedAtStart *time.Time // 创建开始时间
CreatedAtEnd *time.Time // 创建结束时间 CreatedAtEnd *time.Time // 创建结束时间

View File

@@ -140,3 +140,13 @@ func (r *request) Ik3cloud(ctx context.Context, requestId int64) (err error) {
reply := 0 reply := 0
return xClient.Call(ctx, "Ik3cloud", requestId, &reply) return xClient.Call(ctx, "Ik3cloud", requestId, &reply)
} }
// Cancel @TITLE 作废
func (r *request) Cancel(ctx context.Context, requestId int64) (err error) {
xClient, err := client.GetClient(r)
if err != nil {
return
}
reply := 0
return xClient.Call(ctx, "Cancel", requestId, &reply)
}

View File

@@ -22,6 +22,7 @@ type ArgsReceiptSave struct {
Rate decimal.Decimal // 汇率 Rate decimal.Decimal // 汇率
Remarks string // 备注 Remarks string // 备注
Costs []ReceiptCost // 费用明细 Costs []ReceiptCost // 费用明细
CustomNumber string // 客户编号
} }
type ReceiptCost struct { type ReceiptCost struct {