Custom taxAmount for Bank Transaction causing validation error
まだ誰も着手していません。
評価
- 難易度
- 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分
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 日以内に返信