QBXML_SDK_Samples icon indicating copy to clipboard operation
QBXML_SDK_Samples copied to clipboard

JournalEntryAdd QBXML - Element TxnDate included gives an error

Open sherjackson opened this issue 7 years ago • 0 comments

Hello, the following is showing in the QBXML SDK log file.

20171220.181153 E 7128 XercesSAXErrorHandler Element 'TxnDate' is not valid for content model: '(TxnDate?,RefNumber?,Memo?,IsAdjustment?,((IsHomeCurrencyAdjustment|(IsAmountsEnteredInHomeCurrency?,CurrencyRef?,ExchangeRate?)))?,ExternalGUID?,((JournalDebitLine|JournalCreditLine))+)' -- error at line 2, column 551 in XML data.

When I look at the XML being passed in it is as follows:

<?xml version="1.0"?><?qbxml version="13.0"?><QBXML><QBXMLMsgsRq onError="continueOnError"><JournalEntryAddRq requestID="CV-1"><JournalEntryAdd defMacro="TxnID:CV-1"><RefNumber>CV-1</RefNumber><TxnDate>2017-12-20</TxnDate><JournalCreditLine defMacro="LineTxnID:CV-1"><TxnLineID>CV-1</TxnLineID><AccountRef><ListID>80000033-1510159577</ListID></AccountRef><Amount>42.93</Amount></JournalCreditLine><JournalDebitLine defMacro="LineTxnID:CV-2"><TxnLineID>CV-2</TxnLineID><AccountRef><ListID>8000005B-1510159969</ListID></AccountRef><Amount>42.93</Amount></JournalDebitLine></JournalEntryAdd></JournalEntryAddRq></QBXMLMsgsRq></QBXML>

If I comment it out in the code it goes past this error. Thoughts as Journal Entries should really be able to have the date indicated on import as it may differ from current date.

sherjackson avatar Dec 20 '17 23:12 sherjackson