JournalEntryLines
Manages individual lines within QuickBooks Journal Entries, supporting creation, updates, deletion, and queries for detailed accounting entries.
Table Specific Information
JournalEntries are unique in that the Credit Line Items and Debit Line Items must add up to the same total in one transaction. It is not possible to change a Journal Line Item one at a time and thus end up with an unbalanced transaction. Note that while Journal Entry Lines can be created with a new Journal Entry, they cannot be added or removed from an existing Journal Entry.
Select
By default, SupportEnhancedSQL is set to true, and the following will be honored if present. Other filters will be executed client side. If SupportEnhancedSQL is set to false, only the following filters will be honored.
QuickBooks allows only a small subset of columns to be used in the WHERE clause of a SELECT query. These columns can only be used with the equals or = comparison. The available columns for JournalEntries are Id, Date, TimeModified, ReferenceNumber, LineEntityName, LineEntityId, LineAccount, and LineAccountId. TimeModified and Date may be used with the >, >=, <, <=, or = conditions and may be used twice to specify a range. ReferenceNumber may be used with the = or LIKE conditions to establish a starts-with, ends-with, or contains syntax. For example:
SELECT * FROM JournalEntryLines WHERE TimeModified > '1/1/2011' AND TimeModified < '2/1/2011' AND ReferenceNumber LIKE '%12345%'
Insert
To add a JournalEntry, at least one Credit and one Debit Line must be added. Both types of lines are denoted by the Line columns. Debit Lines have a LineType of Debit while Credit Lines have a LineType of Credit. For example, to insert a JournalEntry:
INSERT INTO JournalEntryLines#TEMP (ReferenceNumber, LineType, LineAccount, LineAmount) VALUES ('12345', 'Credit', 'Retained Earnings', '100') INSERT INTO JournalEntryLines#TEMP (ReferenceNumber, LineType, LineAccount, LineAmount) VALUES ('12345', 'Credit', 'Note Payable - Bank of Anycity', '20') INSERT INTO JournalEntryLines#TEMP (ReferenceNumber, LineType, LineAccount, LineAmount) VALUES ('12345', 'Debit', 'Checking', '120') INSERT INTO JournalEntryLines (ReferenceNumber, LineType, LineAccount, LineAmount) SELECT ReferenceNumber, LineType, LineAccount, LineAmount FROM JournalEntryLines#TEMP
To delete a JournalEntry, simply perform a DELETE statement and set the Id equal to the JournalEntryId you wish to delete. For example:
DELETE FROM JournalEntries WHERE Id = '16336-1450191232'
Columns
Name | Type | ReadOnly | References | ColumnSize | Description |
ID [KEY] | String | True | 255 |
The unique identifier for the journal entry line, formatted as JournalEntryId|ItemLineId. | |
JournalEntryID | String | False | 255 |
The unique identifier of the journal entry to which this line belongs. | |
ReferenceNumber | String | False | 21 |
The reference number assigned to the journal entry transaction. | |
TxnNumber | Integer | True |
The transaction number, which is distinct from the Quickbooks generated ID. | ||
Date | Date | False |
The date of the transaction. If specified in a SELECT query's WHERE clause, it overrides the pseudo columns StartDate and EndDate. | ||
CreditLineCount | Integer | False |
The total number of credit lines included in the journal entry. | ||
DebitLineCount | Integer | False |
The total number of debit lines included in the journal entry. | ||
LineId | String | True | 255 |
The unique identifier for this specific journal entry line. | |
LineType | String | False | 100 |
Specifies whether this line is a credit or a debit. | |
LineAccount | String | False | 1000 |
The name of the account associated with this line, either a credit or a debit. | |
LineAccountId | String | False |
Accounts.ID | 255 |
The unique identifier of the account associated with this line, either a credit or a debit. |
LineAmount | Decimal | False |
The monetary amount associated with this credit or debit line. | ||
LineEntityName | String | False | 1000 |
The name of the entity (such as a customer or vendor) linked to this line. | |
LineEntityId | String | False | 255 |
The unique identifier of the entity linked to this line. | |
LineMemo | String | False | 5000 |
A memo or note providing additional details about this line. | |
LineClass | String | False | 1000 |
The class name associated with this line, used for categorization. | |
LineClassId | String | False |
Class.ID | 255 |
The unique identifier of the class associated with this line. |
LineStatus | String | False | 13 |
The billing status of this line, indicating whether it is billable or non-billable. 使用できる値は次のとおりです。Empty, Billable, NotBillable, HasBeenBilled | |
LineTaxItem | String | False | 100 |
The name of the sales tax item applied to this line, available only in Canada, UK, and Australia versions of QuickBooks. | |
LineTaxItemId | String | False | 255 |
The unique identifier of the sales tax item applied to this line, available only in Canada, UK, and Australia versions of QuickBooks. | |
CurrencyName | String | False | 64 |
The name of the currency used for this line. Requires QBXML version 8.0 or higher. | |
CurrencyId | String | False |
Currency.ID | 255 |
The unique identifier of the currency used for this line. Requires QBXML version 8.0 or higher. |
ExchangeRate | Double | False |
The exchange rate used to convert this currency into the home currency of the QuickBooks file. | ||
IsHomeCurrencyAdjustment | Boolean | False |
Indicates if the transaction is adjusted for the home currency. If true, the Currency and ExchangeRate fields default to the home currency. | ||
EditSequence | String | False | 16 |
A versioning identifier for this line item, used to track changes. | |
TimeModified | Datetime | False |
The timestamp of when this journal entry line was last modified. | ||
TimeCreated | Datetime | False |
The timestamp of when this journal entry line was created. |