diff --git a/erp/expense.go b/erp/expense.go index 6a9cd53..48f4267 100644 --- a/erp/expense.go +++ b/erp/expense.go @@ -120,3 +120,13 @@ func (r *expense) Edit(ctx context.Context, args ArgsExpenseEdit) (err error) { reply := 0 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) +} diff --git a/erp/payable.go b/erp/payable.go index a31acb9..5b891d0 100644 --- a/erp/payable.go +++ b/erp/payable.go @@ -30,7 +30,6 @@ type ReplyPayableList struct { type PayableItem struct { Id int64 `json:"id"` PayableSerial string `json:"payableSerial"` - FactoryName string `json:"factoryName"` AccountingSerial string `json:"accountingSerial"` Amount decimal.Decimal `json:"amount"` Currency string `json:"currency"` @@ -54,29 +53,27 @@ func (p *payable) List(ctx context.Context, args ArgsPayableList) (reply ReplyPa } type ReplyPayableInfo struct { - Id int64 `json:"id"` - PayableSerial string `json:"payableSerial"` - AccountingSerial string `json:"accountingSerial"` - InvoiceSerial string `json:"invoiceSerial"` - FactoryName string `json:"factoryName"` - FactoryBank string `json:"factoryBank"` - FactoryBankAccount string `json:"factoryBankAccount"` - Amount decimal.Decimal `json:"amount"` - Currency string `json:"currency"` - CurrencyName string `json:"currencyName"` - CurrencyRate decimal.Decimal `json:"currencyRate"` - CurrencySymbol string `json:"currencySymbol"` - PurchaseStaffId int64 `json:"purchaseStaffId"` - IsConfirm int64 `json:"isConfirm"` - CreatedAt *time.Time `json:"createdAt"` - UpdatedAt *time.Time `json:"updatedAt"` - Products []PayableProductItem `json:"products"` - Costs []PayableCostItem `json:"costs"` + Id int64 `json:"id"` + PayableSerial string `json:"payableSerial"` + AccountingSerial string `json:"accountingSerial"` + InvoiceSerial string `json:"invoiceSerial"` + Amount decimal.Decimal `json:"amount"` + Currency string `json:"currency"` + CurrencyName string `json:"currencyName"` + CurrencyRate decimal.Decimal `json:"currencyRate"` + CurrencySymbol string `json:"currencySymbol"` + PurchaseStaffId int64 `json:"purchaseStaffId"` + IsConfirm int64 `json:"isConfirm"` + CreatedAt *time.Time `json:"createdAt"` + UpdatedAt *time.Time `json:"updatedAt"` + Products []PayableProductItem `json:"products"` + Costs []PayableCostItem `json:"costs"` } type PayableProductItem struct { Id int64 `json:"id"` AccountingProductId int64 `json:"accountingProductId"` + FactoryName string `json:"factoryName"` Name string `json:"name"` Serial string `json:"serial"` PayableCount int64 `json:"payableCount"` @@ -89,10 +86,11 @@ type PayableProductItem struct { } type PayableCostItem struct { - Id int64 `json:"id"` - Name string `json:"name"` - Amount decimal.Decimal `json:"amount"` - Remarks string `json:"remarks"` + Id int64 `json:"id"` + FactoryName string `json:"factoryName"` + Name string `json:"name"` + Amount decimal.Decimal `json:"amount"` + Remarks string `json:"remarks"` } // Info @TITLE 详情 @@ -114,3 +112,13 @@ func (p *payable) Confirm(ctx context.Context, payableId int64) (err error) { reply := 0 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) +} diff --git a/erp/request.go b/erp/request.go index 702572f..7f59b45 100644 --- a/erp/request.go +++ b/erp/request.go @@ -130,3 +130,13 @@ func (r *request) Edit(ctx context.Context, args ArgsRequestEdit) (err error) { reply := 0 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) +} diff --git a/ik3cloud/payable.go b/ik3cloud/payable.go index 5e628a0..370a78a 100644 --- a/ik3cloud/payable.go +++ b/ik3cloud/payable.go @@ -35,6 +35,7 @@ type PayableProductItem struct { TaxAmount decimal.Decimal // 税额 UnitAmount decimal.Decimal // 含税金额 ExTaxUnitAmount decimal.Decimal // 不含税金额 + CostAmount decimal.Decimal // 加减费用金额 } // Save @TITLE 保存应付