我正在从我的系统将数据发布到 QBO API,并且所有交易都以
JournalEntry
的形式发布。在正常会计中,过帐负日记账分录是很常见的,但当我尝试通过 API 这样做时,我得到 Error 2290
,Negative amount not supported on transaction line
。我怎样才能绕过这个,因为它似乎是一个非常常见的用例?
您可以在此处从 QBO API 重现错误:https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/journalentry
{
"Line": [
{
"JournalEntryLineDetail": {
"PostingType": "Debit",
"AccountRef": {
"name": "Opening Bal Equity",
"value": "39"
}
},
"DetailType": "JournalEntryLineDetail",
"Amount": "-100.0",
"Id": "0",
"Description": "nov portion of rider insurance"
},
{
"JournalEntryLineDetail": {
"PostingType": "Credit",
"AccountRef": {
"name": "Notes Payable",
"value": "44"
}
},
"DetailType": "JournalEntryLineDetail",
"Amount": 100.0,
"Description": "nov portion of rider insurance"
}
]
}
错误:
{
"responseHeader": {
"status": 400,
"message": "",
"intuitTid": "1-653f9b94-4d7cf9f5129c893b74025b8c",
"realmID": "4620816365234297530"
},
"response": {
"Fault": {
"Error": [
{
"Message": "Amount is invalid",
"Detail": "Negative amount -100 not supported on a transaction line",
"code": "2290",
"element": "Line.Amount"
}
],
"type": "ValidationFault"
},
"time": "2023-10-30T05:03:32.257-07:00"
}
}
我写这个答案是因为我还没有找到不同的解决方案,在手动转到我的 QBO 开发帐户并发布负面日记条目后,会发生以下情况。
我正在 Quickbooks 中创建一个日记条目,其中有 4 个行项目均为负值。我使用的账户是贷方的“未存入资金”和借方的“预付费用”。
然后,当我单击底部的“保存”时,Quickbooks 日记帐分录中的值会更新,以显示“未存入资金”的负贷方现在为正借方,反之亦然。
因此,这里显而易见的是,在 Quickbooks Online 中,无论出于何种原因,负日记帐分录都会作为交换的借方/贷方分录过帐。
这对我来说似乎很奇怪,因为与我交谈过的几乎每个会计团队都需要负日记账分录,而不仅仅是交换贷方/借方(尽管我认为它等于相同的总数)。我认为这是使用 Quickbooks Online 的唯一方法。