Custom taxAmount for Bank Transaction causing validation error
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- node.js, typescript
- 领域
- api
调研方向
The field docs are in src/gen/model/accounting/lineItem.ts around lines 38-41, and the call is createBankTransactions with a Spend type and a custom taxAmount. Start by checking whether the SDK or the Xero API performs the tax check, since the generated code may only pass the value through. Done means reproducing the 52.23 vs 52.28 error and either fixing the SDK path or documenting that the API rejects it. The issue has had no reply for over a year, so confirm with maintainers first.
由索引模型根据 Issue 内容生成。
描述
SDK you're using (please complete the following information):
- Version 13.0.0
Describe the bug
The accounting model LineItem says that you can set a custom taxAmount if the auto calculated amount is wrong. It seems this is possible when creating Invoices but not when creating Bank Transactions.
This is possible via the UI for both bank transactions and invoices, so it just seems to be a validation error that is blocking it.
Creating a 'Spend' BankTransaction using the API with an adjusted TaxAmount results in a Validation Error:
[Message] => Tax amount 52.23 is incorrect for INPUT2 tax type, should be 52.28
To Reproduce
Steps to reproduce the behavior:
const result = await xero.accountingApi
.createBankTransactions(tenantId, {
bankTransactions: [
{
type: BankTransaction.TypeEnum.SPEND,
bankAccount: {
code: account,
},
isReconciled: true,
contact: { name: 'Contact' },
date,
reference
lineItems: [
{
description: 'Description',
quantity: 1,
unitAmount: 261.4,
accountCode,
taxAmount: 52.23,
},
],
},
],
})
Expected behavior
If I pass in a custom taxAmount then I expect the bank transaction to be created with the custom tax amount as it is on the UI, not to validate it and throw an error.
Screenshots
Additional context
The docs linked at the top suggest this is possible and the only limitation seems to be a validation making sure the tax matches
- 主要语言
- TypeScript
- 星标
- 264
- 派生
- 177
- 平均合并
- 10 小时 5 分钟
- 30 天内合并 PR
- 5
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
XeroAPI/xero-node 的其他 Issue
-
`getClientCredentialsToken()` sends `scopes` (comma-joined) instead of the OAuth `scope` parameter未关闭
难度 2/5 1-3 小时 新手友好度 82/100
-
难度 3/5 半天 新手友好度 55/100
-
TrackingOptionId value missing from accountingApi.getInvoices()可能已有人在做 @miachillgood 于 152 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 18/100
-
BankTransaction type is missing the batchPayment object.可能已有人在做 @miachillgood 于 171 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 22/100
-
难度 3/5 1-2 天 新手友好度 35/100
查看 XeroAPI/xero-node 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
super-productivity/super-productivity#12128 · 2 条评论 ·
维护者通常 1 天内回复
-
A docs change can fail pnpm check, because outreach lint and gen:types both write .astro/ at once可能已有人在做 @2389400626lh-ops 今天认领。 未关闭Area: Infrastructure Area: Outreach Bug Difficulty: Low Good First Issue Priority: Low
难度 2/5 1-3 小时 新手友好度 78/100
DouglasNeuroInformatics/OpenDataCapture#1956 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 72/100
justyns/silverbullet-ai#199 ·
-
bug
难度 2/5 1-3 小时 新手友好度 83/100
spartan-ng/spartan#1931 ·
维护者通常 2 天内回复