Files
service/ik3cloud/payable.go
kanade f1a0a9af62 feat(ik3cloud): 添加推送日期字段到财务相关实体
- 在payable结构体中添加PushDate字段
- 在payment结构体中添加PushDate字段
- 在receipt结构体中添加PushDate字段
- 在receivable结构体中添加PushDate字段
2026-07-15 15:57:11 +08:00

63 lines
1.9 KiB
Go

package ik3cloud
import (
"context"
"time"
"git.kumo.work/shama/service/client"
"github.com/shopspring/decimal"
)
type payable struct {
}
type ArgsPayableSave struct {
PayableId int64 // 应付单id
Number string // 编码
InvoiceSerial string // 发票号
CustomNumber string // 客户编码
FactoryNumber string // 工厂编码
PushDate time.Time // 推送日期
Date time.Time // 日期
CurrencyNumber string // 币种
DepartmentNumber string // 部门
StaffCgyNumber string // 业务员
Rate decimal.Decimal // 汇率
Products []PayableProductItem // 商品
}
type PayableProductItem struct {
FactoryNumber string // 工厂编码
Number string // 商品编码
Name string // 商品名称
Count decimal.Decimal // 数量
UnitPrice decimal.Decimal // 含税单价
AddTaxRate decimal.Decimal // 税率
ExTaxUnitPrice decimal.Decimal // 不含税单价
TaxAmount decimal.Decimal // 税额
UnitAmount decimal.Decimal // 含税金额
ExTaxUnitAmount decimal.Decimal // 不含税金额
CostAmount decimal.Decimal // 加减费用金额
Unit string // 单位
CustomsSerial string // 海关编码
}
// Save @TITLE 保存应付
func (p *payable) Save(ctx context.Context, args ArgsPayableSave) (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 *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)
}