feat(erp): 更新报销单据结构并移除工作流字段

- 在 payable.go 中添加 CostAmount 字段用于加减费用金额
- 移除 request.go 中 RequestIds 字段
- 移除 RequestItem 和 ReplyRequestList 结构中的 WorkflowId、WorkflowStatus 和 WorkflowReason 字段
This commit is contained in:
2025-12-19 14:12:42 +08:00
parent 0315faea07
commit d44f208a84
4 changed files with 52 additions and 23 deletions

View File

@@ -120,3 +120,13 @@ func (r *expense) Edit(ctx context.Context, args ArgsExpenseEdit) (err error) {
reply := 0 reply := 0
return xClient.Call(ctx, "Edit", args, &reply) return xClient.Call(ctx, "Edit", args, &reply)
} }
// Ik3cloud @TITLE 同步
func (r *expense) Ik3cloud(ctx context.Context, expenseId int64) (err error) {
xClient, err := client.GetClient(r)
if err != nil {
return
}
reply := 0
return xClient.Call(ctx, "Ik3cloud", expenseId, &reply)
}

View File

@@ -30,7 +30,6 @@ type ReplyPayableList struct {
type PayableItem struct { type PayableItem struct {
Id int64 `json:"id"` Id int64 `json:"id"`
PayableSerial string `json:"payableSerial"` PayableSerial string `json:"payableSerial"`
FactoryName string `json:"factoryName"`
AccountingSerial string `json:"accountingSerial"` AccountingSerial string `json:"accountingSerial"`
Amount decimal.Decimal `json:"amount"` Amount decimal.Decimal `json:"amount"`
Currency string `json:"currency"` Currency string `json:"currency"`
@@ -54,29 +53,27 @@ func (p *payable) List(ctx context.Context, args ArgsPayableList) (reply ReplyPa
} }
type ReplyPayableInfo struct { type ReplyPayableInfo struct {
Id int64 `json:"id"` Id int64 `json:"id"`
PayableSerial string `json:"payableSerial"` PayableSerial string `json:"payableSerial"`
AccountingSerial string `json:"accountingSerial"` AccountingSerial string `json:"accountingSerial"`
InvoiceSerial string `json:"invoiceSerial"` InvoiceSerial string `json:"invoiceSerial"`
FactoryName string `json:"factoryName"` Amount decimal.Decimal `json:"amount"`
FactoryBank string `json:"factoryBank"` Currency string `json:"currency"`
FactoryBankAccount string `json:"factoryBankAccount"` CurrencyName string `json:"currencyName"`
Amount decimal.Decimal `json:"amount"` CurrencyRate decimal.Decimal `json:"currencyRate"`
Currency string `json:"currency"` CurrencySymbol string `json:"currencySymbol"`
CurrencyName string `json:"currencyName"` PurchaseStaffId int64 `json:"purchaseStaffId"`
CurrencyRate decimal.Decimal `json:"currencyRate"` IsConfirm int64 `json:"isConfirm"`
CurrencySymbol string `json:"currencySymbol"` CreatedAt *time.Time `json:"createdAt"`
PurchaseStaffId int64 `json:"purchaseStaffId"` UpdatedAt *time.Time `json:"updatedAt"`
IsConfirm int64 `json:"isConfirm"` Products []PayableProductItem `json:"products"`
CreatedAt *time.Time `json:"createdAt"` Costs []PayableCostItem `json:"costs"`
UpdatedAt *time.Time `json:"updatedAt"`
Products []PayableProductItem `json:"products"`
Costs []PayableCostItem `json:"costs"`
} }
type PayableProductItem struct { type PayableProductItem struct {
Id int64 `json:"id"` Id int64 `json:"id"`
AccountingProductId int64 `json:"accountingProductId"` AccountingProductId int64 `json:"accountingProductId"`
FactoryName string `json:"factoryName"`
Name string `json:"name"` Name string `json:"name"`
Serial string `json:"serial"` Serial string `json:"serial"`
PayableCount int64 `json:"payableCount"` PayableCount int64 `json:"payableCount"`
@@ -89,10 +86,11 @@ type PayableProductItem struct {
} }
type PayableCostItem struct { type PayableCostItem struct {
Id int64 `json:"id"` Id int64 `json:"id"`
Name string `json:"name"` FactoryName string `json:"factoryName"`
Amount decimal.Decimal `json:"amount"` Name string `json:"name"`
Remarks string `json:"remarks"` Amount decimal.Decimal `json:"amount"`
Remarks string `json:"remarks"`
} }
// Info @TITLE 详情 // Info @TITLE 详情
@@ -114,3 +112,13 @@ func (p *payable) Confirm(ctx context.Context, payableId int64) (err error) {
reply := 0 reply := 0
return xClient.Call(ctx, "Confirm", payableId, &reply) return xClient.Call(ctx, "Confirm", payableId, &reply)
} }
// Ik3cloud @TITLE 金蝶同步
func (p *payable) Ik3cloud(ctx context.Context, payableId int64) (err error) {
xClient, err := client.GetClient(p)
if err != nil {
return
}
reply := 0
return xClient.Call(ctx, "Ik3cloud", payableId, &reply)
}

View File

@@ -130,3 +130,13 @@ func (r *request) Edit(ctx context.Context, args ArgsRequestEdit) (err error) {
reply := 0 reply := 0
return xClient.Call(ctx, "Edit", args, &reply) return xClient.Call(ctx, "Edit", args, &reply)
} }
// Ik3cloud @TITLE 同步
func (r *request) Ik3cloud(ctx context.Context, requestId int64) (err error) {
xClient, err := client.GetClient(r)
if err != nil {
return
}
reply := 0
return xClient.Call(ctx, "Ik3cloud", requestId, &reply)
}

View File

@@ -35,6 +35,7 @@ type PayableProductItem struct {
TaxAmount decimal.Decimal // 税额 TaxAmount decimal.Decimal // 税额
UnitAmount decimal.Decimal // 含税金额 UnitAmount decimal.Decimal // 含税金额
ExTaxUnitAmount decimal.Decimal // 不含税金额 ExTaxUnitAmount decimal.Decimal // 不含税金额
CostAmount decimal.Decimal // 加减费用金额
} }
// Save @TITLE 保存应付 // Save @TITLE 保存应付