Files
service/ik3cloud/receivable.go
kanade 361c61cbe7 fix(receipt): 修复银行账户字段映射问题
- 将银行账户字段从配置项改为付款成本项目的银行账户字段
- 解决了发票逻辑中银行账户信息错误映射的问题
2026-01-15 10:22:27 +08:00

64 lines
2.0 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 // 汇率
Date time.Time // 日期
DomesticShippingCost decimal.Decimal // 国内运费
ForeignShippingCost decimal.Decimal // 国外运费
ForeignCommission decimal.Decimal // 出口佣金
}
type ReceivableProductItem struct {
Number string // 商品编码
Name string // 商品名称
Count int64 // 数量
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 // 单位
}
// 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)
}