Custom taxAmount for Bank Transaction causing validation error
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- node.js, typescript
- Ambito
- api
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 264
- Fork
- 177
- Merge medio
- 10h 5m
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di XeroAPI/xero-node
-
`getClientCredentialsToken()` sends `scopes` (comma-joined) instead of the OAuth `scope` parameterAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 3/5 Mezza giornata Idoneità per principianti 55/100
-
TrackingOptionId value missing from accountingApi.getInvoices()Forse già presa @miachillgood l’ha presa 152 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 18/100
-
BankTransaction type is missing the batchPayment object.Forse già presa @miachillgood l’ha presa 171 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 22/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
Tutte le issue di XeroAPI/xero-node
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
super-productivity/super-productivity#12128 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
A docs change can fail pnpm check, because outreach lint and gen:types both write .astro/ at onceForse già presa @2389400626lh-ops l’ha presa oggi. ApertaArea: Infrastructure Area: Outreach Bug Difficulty: Low Good First Issue Priority: Low
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
DouglasNeuroInformatics/OpenDataCapture#1956 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 72/100
justyns/silverbullet-ai#199 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
spartan-ng/spartan#1931 ·
I maintainer di solito rispondono entro 2 giorni