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

68 lines
2.3 KiB
Go

package ik3cloud
import (
"context"
"time"
"git.kumo.work/shama/service/client"
"github.com/shopspring/decimal"
)
type receivable struct {
}
type ArgsReceivableSave struct {
ReceivableId int64 // 应收单id
InvoiceSerial string // 发票号
Number string // 编码
CustomNumber string // 客户编码
CurrencyNumber string // 币种
DepartmentNumber string // 部门
StaffXsyNumber string // 业务员
Products []ReceivableProductItem // 商品
Rate decimal.Decimal // 汇率
PushDate time.Time // 推送时间
Date time.Time // 日期
DomesticShippingCost decimal.Decimal // 国内运费
ForeignShippingCost decimal.Decimal // 国外运费
ForeignCommission decimal.Decimal // 出口佣金
Consignee string // 收货人
}
type ReceivableProductItem struct {
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 // 不含税金额
ExportCost decimal.Decimal // 外销成本
MinusTaxRate decimal.Decimal // 退税率
MinusTaxAmount decimal.Decimal // 退税额
Unit string // 单位
MinusTaxDifference decimal.Decimal // 退税差额
CustomsSerial string // 海关编码
}
// Save @TITLE 保存应收
func (r *receivable) Save(ctx context.Context, args ArgsReceivableSave) (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 *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)
}