Supplier invoice XML

SUPPLIER INVOICE (header)

Name Type Mandatory Description
<Record Type =”24“> Long Y Type of object to import. 24 is for supplier invoice
<DBId></DBId> Long Y Database ID in DeMaSy
<Number></Number> Char(50) Y Number of the invoice
<SupplierName></SupplierName> Char(75) Y Supplier Name (has to match existing supplier name)
NB: If the unique supplier file number is provided the name can be omitted
<Date></Date> Date/Time Y Date of the invoice (YYYYMMDD)
<Currency></Currency> Char(10) Y Currency use in the invoice
<CurrencyRate></CurrencyRate> Double N Currency rate if the used currency is not capital currency
<Description></Description> Char(255) Y Description of the invoice
<Type></Type> Integer Y Type of transaction:
1 = Invoice / 8 = Credit Note
3 = Permanent order / 6 = Initial
7 = Advance payment
9=WriteOff
<SupplierFileNumber></SupplierFileNumber> Long Y Supplier Number (mandatory is no name specified)
<IntraComVATNum></IntraComVATNum> Char(50) N Intra-community VAT Number
<DocumentPathFileName></DocumentPathFileName> Char(255) N File Name of the Document
<PaidByCreditCard></PaidByCreditCard> Integer N Is the invoice already paid by Credit Card ?:
1 = True / 0 = False
</Record> Y End of block

SUPPLIER INVOICE (details)

Name Type Mandatory Description
<Record Type =”25“> Long Y Type of object to import. 25 is for supplier invoice detail
<DBId></DBId> Long Y Database ID in DeMaSy
<InvoiceNumber></InvoiceNumber> Char(50) Y Invoice number linked to the detail
<ArticleCode></ArticleCode> Char(50) N Article Code
<CYArticlePrice></CYArticlePrice> Double N Unit price (transaction currency)
<ArticlePrice></ArticlePrice> Double N Unit price (capital currency)
<ArticleNumber></ArticleNumber> Double N Quantity of article
<CyAmount></CyAmount> Double Y Amount (transaction currency)
<Amount></Amount> Double N Amount (capital currency) – optional
<VATCode></VATCode> Char(20) Y Vat Code
<VATCodeRate></VATCodeRate> Double Y VAT Rate
<CYVATValue></CYVATValue> Double Y VAT Value (transaction currency)
<VATValue></VATValue> Double N VAT Value (capital currency) – optional
<CyTotal></CyTotal> Double N Total with VAT
<Description></Description> Char(255) N Description
<DGLAccountNumber></DGLAccountNumber> Char(50) N Debit Account (empty = supplier default)
<CGLAccountNumber></CGLAccountNumber> Char(50) N Credit Account (empty = supplier default)
<PLCenterCode></PLCenterCode> Char(50) N Profit and Loss center code
</Record> Y End of block
  1. If an article code is specified, an article price and an article number must be specified.
  2. The Amount must be equal to the ArticleNumber * ArticlePrice
  3. The CyAmount must be equal to the ArticleNumber * CyArticlePrice
  4. The VATValue must be equal to the Amount * VATCodeRate / 100.
  5. The CyVATValue must be equal to the CyAmount * VATCodeRate / 100.
  6. The CyTotal must be equal to the CyAmount + CyVATValue or CyAmount + (CyAmount * CyVATRate / 100)
  7. If the DGLAccountNumber is specified and not the CGLAccountNumber the CGLAccountNumber will be replaced by the supplier account specified in the options. As counterpart the expenses account will be used according to the default logic for the supplier expenses account .
  8. If the CGLAccountNumber is specified and not the DGLAccountNumber the DGLAccountNumber will be replaced by the supplier account specified in the options. As counterpart the expenses account will be used according to the default logic for the supplier expenses account .
  9. If the 2 Accounts are specified, one of the two accounts must be the supplier general ledger account.
  10. If there is no account specified the system will use as the following defaults:
    Invoice: D = default expenses account / C = supplier account
    Credit Note: D = supplier account / C = default expenses account.