feat(erp): 新增字典和分类管理功能
- 添加 dict 包,包含字体、分类和字典相关结构体与方法 - 实现分类的增删改查接口 - 实现字典的增删改查接口 - 在 receivable.go 中扩展字段支持汇率、部门、业务员等信息 - 新增 payment.go 文件,实现付款单保存功能 - 引入 time 和 decimal 包以支持日期和金额类型字段
This commit is contained in:
47
ik3cloud/payment.go
Normal file
47
ik3cloud/payment.go
Normal file
@@ -0,0 +1,47 @@
|
||||
package ik3cloud
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"git.kumo.work/shama/service/client"
|
||||
"git.kumo.work/shama/service/ik3cloud/constant"
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
type payment struct {
|
||||
}
|
||||
|
||||
type ArgsPaymentSave struct {
|
||||
PaymentId int64 // 付款单id
|
||||
Number string // 付款单编号
|
||||
PaymentType constant.PaymentType // 付款类型
|
||||
PayeeNameType string // 收款单位类型
|
||||
PayeeName string // 收款单位
|
||||
CurrencyNumber string // 币种
|
||||
DepartmentNumber string // 采购部门
|
||||
StaffNumber string // 采购员
|
||||
Remarks string // 备注
|
||||
Costs []PaymentCostItem // 费用
|
||||
Rate decimal.Decimal // 汇率
|
||||
Date time.Time // 业务日期 2006-01-02 15:04:05
|
||||
}
|
||||
type PaymentCostItem struct {
|
||||
Amount decimal.Decimal // 金额
|
||||
Date time.Time // 费用日期
|
||||
InvoiceSerial string // 发票号
|
||||
DepartmentNumber string // 核算部门
|
||||
SettlementMethod string // 结算方式
|
||||
PaymentPurpose string // 付款用途
|
||||
ExpenseItem string // 费用项目
|
||||
}
|
||||
|
||||
// Save @TITLE 保存付款单
|
||||
func (p *payment) Save(ctx context.Context, args ArgsPaymentSave) (entity Entity, err error) {
|
||||
xClient, err := client.GetClient(p)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
err = xClient.Call(ctx, "Save", args, &entity)
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user