package accounting import ( "context" "git.kumo.work/shama/service/client" "git.kumo.work/shama/service/erp/bean" "github.com/shopspring/decimal" ) type audit struct { } type ArgsAuditSubmit struct { StaffId int64 // 操作人 AccountingId int64 // 做账合同id AuditItems []bean.AuditItem // 审核 } // Submit @TITLE 提交审核 func (a *audit) Submit(ctx context.Context, args ArgsAuditSubmit) (err error) { xClient, err := client.GetClient(a) if err != nil { return } reply := 0 err = xClient.Call(ctx, "Submit", args, &reply) return } type ArgsAuditAppendCost struct { StaffId int64 // 操作人 AccountingId int64 // 做账合同id AuditItems []bean.AuditItem // 审核 AppendCost ArgsAppendAddCost // 追加费用 } type ArgsAppendAddCost struct { Products []AppendAddCostProduct FactoryId int64 // 工厂id Name string // 费用名 Amount decimal.Decimal // 金额 Remarks string // 备注信息 } type AppendAddCostProduct struct { AccountingProductId int64 // 做账产品id BeforeAmount decimal.Decimal // 改前金额 Amount decimal.Decimal // 调整金额 AfterAmount decimal.Decimal // 改后金额 } // AppendCost @TITLE 追加费用 func (a *audit) AppendCost(ctx context.Context, args ArgsAuditAppendCost) (workflowId int64, err error) { xClient, err := client.GetClient(a) if err != nil { return } err = xClient.Call(ctx, "AppendCost", args, &workflowId) return }