Custom taxAmount for Bank Transaction causing validation error
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- node.js, typescript
- Lĩnh vực
- api
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 264
- Fork
- 177
- Merge trung bình
- 10 giờ 5 phút
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của XeroAPI/xero-node
-
`getClientCredentialsToken()` sends `scopes` (comma-joined) instead of the OAuth `scope` parameterĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 55/100
-
TrackingOptionId value missing from accountingApi.getInvoices()Có thể đã có người làm @miachillgood đã nhận 152 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 18/100
-
BankTransaction type is missing the batchPayment object.Có thể đã có người làm @miachillgood đã nhận 171 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 22/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
Tất cả issue của XeroAPI/xero-node
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
super-productivity/super-productivity#12128 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
A docs change can fail pnpm check, because outreach lint and gen:types both write .astro/ at onceCó thể đã có người làm @2389400626lh-ops đã nhận hôm nay. Đang mởArea: Infrastructure Area: Outreach Bug Difficulty: Low Good First Issue Priority: Low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
DouglasNeuroInformatics/OpenDataCapture#1956 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 72/100
justyns/silverbullet-ai#199 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
spartan-ng/spartan#1931 ·
Maintainer thường phản hồi trong vòng 2 ngày