Custom taxAmount for Bank Transaction causing validation error
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- node.js, typescript
- Bereich
- api
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- TypeScript
- Sterne
- 264
- Forks
- 177
- Ø Merge
- 10 Std. 5 Min.
- Gemergte PRs (30 T.)
- 5
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus XeroAPI/xero-node
-
`getClientCredentialsToken()` sends `scopes` (comma-joined) instead of the OAuth `scope` parameterOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
-
Schwierigkeit 3/5 Ein halber Tag Anfängerfreundlichkeit 55/100
-
TrackingOptionId value missing from accountingApi.getInvoices()Evtl. vergeben @miachillgood hat das vor 152 Tagen übernommen. Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 18/100
-
BankTransaction type is missing the batchPayment object.Evtl. vergeben @miachillgood hat das vor 171 Tagen übernommen. Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 22/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
Alle Issues in XeroAPI/xero-node
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
super-productivity/super-productivity#12128 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
A docs change can fail pnpm check, because outreach lint and gen:types both write .astro/ at onceEvtl. vergeben @2389400626lh-ops hat das heute übernommen. OffenArea: Infrastructure Area: Outreach Bug Difficulty: Low Good First Issue Priority: Low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
DouglasNeuroInformatics/OpenDataCapture#1956 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 72/100
justyns/silverbullet-ai#199 ·
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
spartan-ng/spartan#1931 ·
Maintainer antworten meist innerhalb von 2 Tagen