For the type, "OM" stand for the namespace prefix "Winbooks.TORM.OM"
Decimal separator is a point
Date are given in Unix Timestamp. Example: "/Date(1520491871000)/" = GMT: Thursday, March 8, 2018 6:51:11 AM
Schema
The schema is this one:
- GLTransHeader
- → BookPeriod
- → Journal
- → PayCode
- GLTransactions (List of OM.Accounting.GLTrans)
- → BookPeriod (the same as in the header, it's repeated to improve the performances of some queries)
- → Currency
- → GLAccount
- → Supplier
- → Customer
- → Vat
- → GLTrans (parent GLTrans in case of subtransactions for the difference of payment or the VAT in the financial and misc.op.)
- → GLMatch
OM
GLTransHeader
Type: OM.Accounting.GLTransHeader
Property | Type | Foreigner Id | Friendly code property | Comment |
---|---|---|---|---|
BookPeriod | OM.Accounting.BookPeriod | BookPeriod_Id | Book period (month) of the booking | |
Journal | OM.Accounting.Journal | Journal_Id | JournalCode | |
PayCode | OM.Accounting.PayCode | PayCode_Id | PayCodeCode | Payment delay (30 days, ...) |
GLTransactions | List of OM.Accounting.GLTrans | see here under | ||
DocNumber | long | Number of the doc in the journal. This number can be reinitialized every fiscal year or every book period, depending on the settings of the folder. | ||
BookDate | DateTime | Date of the document | ||
DueDate | DateTime? | Due date for the payment (sales & purchase invoices) | ||
IsLocked | bool | The booking is locked by and for the accountant level and cannot be modified anymore. | ||
IsImported | bool | The booking was imported from another software | ||
bool | ||||
IsChecked | bool | The booking is locked by and for the input profile and can only be modified by the accountant profile or higher (administrator). | ||
IsDoc | bool | There is a document (pdf, jpeg, ...) attached to the invoice | ||
bool | ||||
Memo | string | Note attached to the document | ||
MemoType | short | 0 - None 1 - Green 5 - Yellow 9 - Red | ||
Reference | ||||
PaymentStatus | short? | null - None | ||
CommentPayment | Note for the payment status |
GLTrans
Type: OM.Accounting.GLTrans
Property | Type | Foreigner Id | Friendly code property | Comment |
---|---|---|---|---|
GLTransHeader | OM.Accounting.GLTransHeader | GLTransHeader_Id | ||
BookPeriod | OM.Accounting.BookPeriod | BookPeriod_Id | Same as GLTransHeader.BookPeriod | |
Currency | OM.Currency | Currency_Id | CurrencyCode | Currency of the folder or another currency (but not empty) |
GLAccount | OM.Accounting.GLAccount | GLAccount_Id | GLAccountCode | |
GLAccount2 | OM.Accounting.GLAccount | GLAccount2_Id | GLAccount2Code | Used to show the contrapart account in the misc.op generated for the permanent inventory (not used in BE legislation) |
CentralAccountType | OM.Accounting.CentralAccountType | CentralAccountType_Id | CentralAccountTypeCode | Same as GLAccount.CentralAccountType at the time of the booking |
Vat | OM.Accounting.Vat | Vat_Id | VatCode | For sales and purchase, the Vat:
|
DeductibilityRate | OM.Accounting.DeductibilityRate | DeductibilityRate_Id | DeductibilityRateCode | If the VAT is partially deductible, this has to be defined |
Customer | OM.Customer | Customer_Id | CustomerCode | For sales, bank and misc.op. on customers |
Supplier | OM.Supplier | Supplier_Id | SupplierCode | For purchases, bank and misc.op. on suppliers |
GLTrans | OM.Accounting.GLTrans | GLTrans_Id | In case of the transaction is a sub transcation of a parent one (difference of payment for example), this is a reference to the parent one | |
GLMatch | OM.Accounting.GLMatch | GLMatch_Id | GLMacthCode | If the transaction is in a matching, this is the matching reference |
CodaTransaction | OM.Accounting.CodaTransaction | CodaTransaction_Id | ||
OM.Accounting.BookPeriod | VatPeriod_Id | |||
LineOrder | int | For sales and purchase, LineOrder is going from 0 to N, by 1. The transaction on the customer or supplier has to be with LineOrder = 0. For bank&cash and misc.op., LineOrder is going from 1000 to Nx1000, by 1000. In case if difference of payment, it's on the LineOrder xx20 for the transaction xx00. When we insert a transaction between 1000 and 2000, it will have the LineOrder 1500 | ||
ValueDate | DateTime | For sales, purchase and misc.op. = GLTransHeader.BookDate For bank, ValueDate can be different that the BookDate | ||
OldestMatchedDate | DateTime? | If the transaction is inside a matching OldestMatchDate = GLMatch.OldestMatchDate else OldestMatchDate = ValueDate | ||
Amount | decimal | Signed amount of the transaction. Debit = +, Credit = - | ||
Amount2 | decimal? | If an alternative currency is defined for the folder (rarely done), it's the amount in the alternative currency at the rate of the booking | ||
VatBaseAmount | decimal? | For Customer/Supplier transaction and the VAT transaction except the VAT sub-transactions (in case of partially deductible VAT for example, see the example in the Excel file here below). For purchases and credit note on purchase, the sign is the same as the sign of the amount on the Vat transaction. | ||
TurnOverAmount | decimal? | For Customer/Supplier transaction. Sign is the same as the VatBaseAmount. | ||
VatTaxAmount | decimal? | For Customer/Supplier transaction. Sign is the same as the VatBaseAmount. | ||
CurrencyAmount | decimal? | Amount * CurrencyRate | ||
CurrencyRate | decimal? | |||
CurrencyVatBaseAmount | decimal? | VatBaseAmount * CurrencyRate (if VatBaseAmount is not null) | ||
CurrencyVatTaxAmount | decimal? | VatTaxAmount * CurrencyRate (if VatTaxAmount is not null) | ||
CommentBooking | string | Comment input in the left side of the header in the encoding form is going on the Customer/Supplier transaction. | ||
CommentBooking2 | string | Not used in BE legislation. Used if FolderSettings.LocalizedComment = true. | ||
CommentExternal | string | Comment input in the right side of the header in the encoding form. Comes only on the Customer/Supplier transaction. | ||
Reference | string | Not used in BE legislation. | ||
BankStatementReference | string | |||
DateTime? | ||||
short | UnKnown Delivery Payment | |||
bool | Not use | |||
IsVatInputByUser | bool | True when the user encode the VAT amount in the right grid of the encoding form. | ||
IsVatAllocation | bool | True when the transaction is generated for the Vat grid. | ||
IsCoda | bool | True when the transaction has a coda detail. |
Important remark
Pay attention to the signs and when the following fields are filled: Vat, VatBaseAmount, TurnOverAmount, VatTaxAmount and the CurrencyXxx.
You can download an example of booking for sale, purchase and their credit notes here.
You should compare what you get through your POST with what you get when you encode via Wow.
You can view that in the Tools / Support / Explorer form / GLTransactionHeader and GLTransaction.
You can also view some of these fields in the TAB List of the encoding form.
Example of purchase, purchase credit notes, sales, sales credit notes: Booking sales and purchases.xlsx