You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Current »


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

PropertyTypeForeigner IdFriendly code propertyComment
BookPeriodOM.Accounting.BookPeriodBookPeriod_Id
Book period (month) of the booking
JournalOM.Accounting.JournalJournal_IdJournalCode
PayCodeOM.Accounting.PayCodePayCode_IdPayCodeCodePayment delay (30 days, ...)
GLTransactionsList of OM.Accounting.GLTrans

see here under
DocNumberlong

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.
BookDateDateTime

Date of the document
DueDateDateTime?

Due date for the payment (sales & purchase invoices)
IsLockedbool

The booking is locked by and for the accountant level and cannot be modified anymore.
IsImportedbool

The booking was imported from another software
IsTempbool

The booking is a temporary one for simulation
IsCheckedbool

The booking is locked by and for the input profile and can only be modified by the accountant profile or higher (administrator).
IsDocbool

There is a document (pdf, jpeg, ...) attached to the invoice
IsVatCompletelyDeclaredbool


VatStatus



Memostring

Note attached to the document
MemoTypeshort

0 - None
1 - Green
5 - Yellow
9 - Red
Reference



PaymentStatusshort?

null - None
1 - Block
2 - Approved
3 - Paid

CommentPayment


Note for the payment status


GLTrans

Type: OM.Accounting.GLTrans

PropertyTypeForeigner IdFriendly code propertyComment
GLTransHeaderOM.Accounting.GLTransHeaderGLTransHeader_Id

BookPeriodOM.Accounting.BookPeriodBookPeriod_Id
Same as GLTransHeader.BookPeriod
CurrencyOM.CurrencyCurrency_IdCurrencyCodeCurrency of the folder or another currency (but not empty)
GLAccountOM.Accounting.GLAccountGLAccount_IdGLAccountCode
GLAccount2OM.Accounting.GLAccountGLAccount2_IdGLAccount2CodeUsed to show the contrapart account in the misc.op generated for the permanent inventory
(not used in BE legislation)
CentralAccountTypeOM.Accounting.CentralAccountTypeCentralAccountType_IdCentralAccountTypeCodeSame as GLAccount.CentralAccountType at the time of the booking
VatOM.Accounting.VatVat_IdVatCodeFor sales and purchase, the Vat:
  • has to be defined for the vat account (411000, 451000 for example)
  • could be defined for the sales or purchase account (604000, 700000 for example)
DeductibilityRateOM.Accounting.DeductibilityRateDeductibilityRate_IdDeductibilityRateCodeIf the VAT is partially deductible, this has to be defined
CustomerOM.CustomerCustomer_IdCustomerCodeFor sales, bank and misc.op. on customers
SupplierOM.SupplierSupplier_IdSupplierCodeFor purchases, bank and misc.op. on suppliers
GLTransOM.Accounting.GLTransGLTrans_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
GLMatchOM.Accounting.GLMatchGLMatch_IdGLMacthCodeIf the transaction is in a matching, this is the matching reference
CodaTransactionOM.Accounting.CodaTransactionCodaTransaction_Id

VatPeriodOM.Accounting.BookPeriodVatPeriod_Id

LineOrderint

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
ValueDateDateTime

For sales, purchase and misc.op. = GLTransHeader.BookDate
For bank, ValueDate can be different that the BookDate
OldestMatchedDateDateTime?

If the transaction is inside a matching
OldestMatchDate = GLMatch.OldestMatchDate
else
OldestMatchDate = ValueDate
Amountdecimal

Signed amount of the transaction. Debit = +, Credit = -
Amount2decimal?

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
VatBaseAmountdecimal?

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.
TurnOverAmountdecimal?

For Customer/Supplier transaction.
Sign is the same as the VatBaseAmount.
VatTaxAmountdecimal?

For Customer/Supplier transaction.
Sign is the same as the VatBaseAmount.
CurrencyAmountdecimal?

Amount * CurrencyRate
CurrencyRatedecimal?


CurrencyVatBaseAmountdecimal?

VatBaseAmount * CurrencyRate (if VatBaseAmount is not null)
CurrencyVatTaxAmountdecimal?

VatTaxAmount * CurrencyRate (if VatTaxAmount is not null)
CommentBookingstring

Comment input in the left side of the header in the encoding form is going on the Customer/Supplier transaction.
CommentBooking2string

Not used in BE legislation. Used if FolderSettings.LocalizedComment = true.
CommentExternalstring

Comment input in the right side of the header in the encoding form.
Comes only on the Customer/Supplier transaction.
Referencestring

Not used in BE legislation.
BankStatementReferencestring


VatDateDateTime?


VatEventshort

UnKnown
Delivery
Payment
IsNegativeBookingbool

Not use
IsVatInputByUserbool

True when the user encode the VAT amount in the right grid of the encoding form.
IsVatAllocationbool

True when the transaction is generated for the Vat grid.
IsCodabool

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



  • No labels