This article describes the functional effect of the software on a number of fields in the sales invoices XML. This XML needs to be submitted with the web service method Sales - ProcessSalesInvoices(sessionID, administrationId, xmlDoc).  


PAY ATTENTION

Going through the XML-schema is recommended. This information can be very useful and is described in English. 


Web address of the XML schema of sales invoices 


http://www.yukiworks.be/schemas/SalesInvoices.xsd


Example XML schema


<SalesInvoices xmlns="urn:xmlns:http://www.theyukicompany.com:salesinvoices" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SalesInvoice>
<Reference>XX-1234</Reference>
<Subject>Testfactuur - 1</Subject>
<PaymentMethod>ElectronicTransfer</PaymentMethod>
<PaymentID>1234-456</PaymentID>
<Process>true</Process>
<EmailToCustomer>false</EmailToCustomer>
<Layout />
<Date>2012-06-22</Date>
<DueDate>2012-07-22</DueDate>
<PriceList />
<Currency />
<ProjectID />
<ProjectCode />
<Remarks />
                <Contact>

                        <ContactCode>1122</ContactCode>
<FullName>Apple Sales International</FullName>
<FirstName />
<MiddleName />
<LastName />
<Gender>Male</Gender>
<CountryCode>NL</CountryCode>
<City>Rotterdam</City>
<Zipcode>1234 AA</Zipcode>
<AddressLine_1>Bergweg 25</AddressLine_1>
<AddressLine_2 />
<Website />
<CoCNumber />
<VATNumber />
<ContactType>Company</ContactType>
<BankAccount />
<PhoneHome />
                        <MobileHome />

                </Contact>
                <ContactPerson>

                        <FirstName>Steve</FirstName>
<LastName>Jobs</LastName>
                        <Gender>Male</Gender>

                        <EmailAddress>steve@apple.com</EmailAddress>
</ContactPerson>
                <InvoiceLines>

                        <InvoiceLine>
<Description>Regel 1</Description>
<Remarks />
<ProductQuantity>2</ProductQuantity>
<Product>
<Description>Product 1</Description>
<Reference>TP-1122</Reference>
<Category xsi:nil="true" />
<SalesPrice>14.88</SalesPrice>
<VATPercentage>6.00</VATPercentage>
<VATIncluded>true</VATIncluded>
<VATType>2</VATType>
<GLAccountCode></GLAccountCode>
<Remarks />
</Product>
</InvoiceLine>
</InvoiceLines>
</SalesInvoice>
</SalesInvoices>


Description fields 

Below you can find a description of the fields. The XML schema also includes a description of the fields as well as which values and datatypes are expected. 


SalesInvoice: Reference

In this field you can record the invoice number. 


  • Invoice has been created, printed and/or sent externally. Consequently the invoice number has been provided externally.
    The field 'Reference' includes the invoice number and the field 'Process' has to have value 'True' so that Yuki is aware that the invoice and its corresponding details can be processed.


  • Invoice has to be processed, printed and/ or sent manually by Yuki. Therefore the invoice number will be provided by Yuki.
    The field 'Reference' has to be left blank and the field 'Process' has to have value 'False'.


SalesInvoice: PaymentMethod

In this field you can record the payment method of the invoice. Possible options: 

  • Unspecified (the payment method of the invoice will be 'Bank transfer' in Yuki)
  • ElectronicTransfer (Bank transfer)
  • DirectCollection (payment method 'Direct debit' has to be enabled first in the sales settings)
  • CreditCard
  • DebitCard 
  • Cash
  • iDeal
  • Online.


SalesInvoice: Process

In this field you indicate whether or not you want the invoices to be processed immediately. To process the invoice, you need to enter the correct invoice number in the field 'Reference'. If the value is 'True', the invoice will be processed without consent in Yuki and sent to the customer (if indicated). If the value is 'False', the invoice will be directed to the list 'Ready to be sent' and the invoice has to be approved before it can be processed.

If the TAG Process is missing, Yuki will assume the value 'False'. 


SalesInvoice: EmailToCustomer

If you choose to process an invoice, you can indicate in this field whether or not you want the invoice to be sent by email directly to the customer. This function needs to be enabled first in the sales settings. 


In case you do not want the invoice to be sent, you leave this field blank of enter the value 'False'. 


SalesInvoice: Lay-out

In this field you can choose the desired invoice lay-out. If you leave this field blank, the default invoice lay-out will be selected. 


SalesInvoice: Date

The invoice date 


SalesInvoice: DueDate

The due date 


SalesInvoice: PriceList

In this field you can choose the desired price list. If you leave this field blank, the default price list will be selected. 


If you offer a combination of prices inclusive and exclusive of VAT, it is useful to select either a price list inclusive or exclusive of VAT. In the event that the price is inclusive of VAT, it will be recorded well on the invoice. However, if the item is saved in a price list exclusive of VAT and you create an invoice with the same item in the Yuki Invoicing module, the price will be considered as exclusive of VAT and will be calculated and recorded accordingly on the invoice. 


PAY ATTENTION

The prices, VAT rates and revenue accounts that are recorded have priority.

SalesInvoice: Currency

The currency of the sales invoice. If you leave this field blank, the default currency 'EUR' will be selected. 


If no price list is recorded, the default price list will be selected. If this list is not set in a foreign currency, you will receive the following notification:  'The pricelist's currency "EUR" does not match with the invoice's'.

If the currency differs from the foreign currency in the price list, you will receive the following notification: 'The pricelist's currency "USD" does not match with the invoice's'.

If you leave the field 'Currency' blank but select a price list in a foreign currency, you will receive the following notification: 'The pricelist's currency "USD" does not match with the invoice's'.

SalesInvoice: ProjectID

In this field you can enter the ID of the project to which you want link the document. Recording this parameter makes the parameter 'ProjectCode' irrelevant. Yuki Project has to be enabled beforehand in the contract. 


SalesInvoice: ProjectCode

In this field you can enter the code of the project to which you want to link the document. This parameter is only relevant if the parameter 'ProjectID' is not given. Yuki Project has to be enabled beforehand in the contract. 


Salesinvoice: Remarks

The entered information will not be recorded on the invoice but saved as a remark and attached to the sales invoice.

Contact: Contact

In the Contact fields the contact/customer of the invoice will be recorded. Yuki will first look for an existing contact in the Address book. Yuki will search for: 

  • Contact code in the field 'ContactCode' (in case one is recorded). 
  • Full name in the field 'FullName' (in case contact code is not found or recorded)


Yuki will create a new contact if an existing contact is not found. 


Contact: found by ContactCode (on the contact card)

  • If a contact code is used, the address details of an existing contact will always be overwritten by the current value in the XML source file. 
  • To avoid a field being overwritten, the element can be removed from the XML source file 
  • In order to do that the element has to be recorded as an empty node  (eg. <CocNumber />). 


Contact: found by FullName (name or company name on the contact card)

  • If a contact is found with the same name, only the fields that are left blank for that contact will be completed with data from the XML source file.
  • For the address details applies the same rule that details will only be completed if they match the existing details.

        Eg. Address 'Dorpstraat 40, Ons Dorp' will be completed with 'Dorpstraat 40, 1234 XX, Ons Dorp' in case the             address and city are the same and the postal code is also recorded in the XML file. 


Contact: EmailAddress

You can only enter one email address. This address will be saved in the contact card of the customer and will be recorded as type 'Invoice'. If this address changes, it can be recorded with a new invoice through the web service. The old address will be set to type 'Other' and the new address will receive the type 'Invoice'. 


Contact: BankAccount

In case a bank account is recorded, this bank account will be saved in the contact card of the customer. The account number will also be used as account number for this invoice. Thus, it is possible that multiple account numbers are recorded for one customer. 


Contact: BIC

In case a BIC code is recorded, this code along with the account number will be saved in the contact card of the customer. The account number and BIC code will also be used as account number for this invoice.

PAY ATTENTION

It is also possible to create foreign bank accounts.

InvoiceLine: Description

The description of the invoice line. If this field is left blank or not shown, the description of the field 'ProductDescription' is used. 


InvoiceLine: Remarks

This is an extra description that can be recorded for each invoice line. The text will be placed as a new line aligned underneath the current invoice line. 


PAY ATTENTION

Een newline is created with the code &#13;


InvoiceLine: ProductQuantity

The quantity of the sales item described in the invoice line.


InvoiceLine: LineAmount

In this field you can enter a line amount. The amount will be calculated with the number of sales items (ProductQuantity) and the price (Product/SalesPrice). If /Product/VATIncluded equals 'True', the amount includes VAT. Otherwise, the amount is exclusive of VAT. 


PAY ATTENTION

We do not recommend to use this field. It differs from the calculation methods of Yuki!


InvoiceLine: LineVATAmount

In this field you can enter a line VAT amount. The amount will be calculated with the line amount and the selected VAT percentage. 


PAY ATTENTION

We do not recommend to use this field. It differs from the calculation methods of Yuki!


Product: Description

The description of a sales item with a maximum length of 60 characters. Longer descriptions will be shortened. This description has to be unique. 

If the sales item cannot be found in Yuki, a new sales item will be created by means of the details found in the XML source file. If the field 'InvoiceLine:Description' is left blank, the field 'Product:Description' will be printed on the invoice.

Product: Reference

The reference of a sales item with a maximum length of 40 characters. Longer references will be shortened. This reference has to be unique. 


Product: Category

This field can be used in the future to allocate categories. Currently only the values 'NULL' and '13' are allowed (13 = category sales items). This field is mandatory. 


Product: SalesPrice

The sales price of a sales item. If the sales items is already created and can be found by means of the description/reference, this field can be left blank or be recorded with a 0-value. 


Yuki will only use the data from the XML file if the fields 'SalesPrice', 'VATType' and 'VATPercentage' are recorded, . Otherwise, the information will be copied from the price list. 


If one of the three elements are missing, the sales item can always be found in the price list. This information is necessary in order to record the item on the invoice. Therefore, a sales item cannot be created in the price list without this information.

Product: VATPercentage

The VAT percentage of a sales item. This field is used in combination with the field 'VATType' in order to calculate the VAT rate. If the VAT rate does not exist, the invoice cannot be created. 


Product: VATIncluded

In this field you indicate whether or not the sales price is inclusive of VAT. This field is used in combination with the fields 'SalesPrice' and 'VATType' in order to calculate the VAT amount and sales price. 


By default, the value will be set to 'False' if this field is left blank in combination with the sales price.
Value 'False' = sales price exclusive of VAT. Value 'True' = sales price inclusive of VAT.

Product: VATType

In this field you can select the VAT type of a sales item. This field is used in combination with the fields 'SalesPrice' and 'VATType' in order to calculate the VAT amount and sales price. Possible combinations of VAT percentage and VAT rates are: 


VAT type                  Percentage          Description

0
0%
Exempted from VAT
1
Variable
VAT high
2
Variable
VAT low
4
0%
VAT 0%
6
0%
Export outside EU
7
0%
Export inside EU
8
Country specific
VAT installation and distance sales inside the EU 
17
0%
VAT reverse charged
19
0%
Export of goods inside EU (purchases 2010)
20
0%
Export of services inside EU (services 2010)    
21
12%
VAT on mid-rate (only in Belgium)



VATDescription: Remarks

This field can be used in combination with 'VATType 8'. This is not mandatory. The VATDescription of each type can be found in the VAT settings of your domain.

Product: GLAccountCode

The code of the ledger accounts in Yuki: 

  • If the sales item is not yet registered in Yuki and this field is left blank or contains an invalid value (inactive ledger account number is also invalid), the default ledger account with code '80000 sales and services rendered' will be used. 
  • If the sales item is already registered in Yuki and this field is left blank, the ledger account that is linked to the sales item in Yuki will be used. 
  •  If the sales item is already registered in Yuki and this field contains a valid value, the ledger account that matches the value of the GLAccountCode will be used. Moreover the ledger account number that is linked to the existing sales item will not be adjusted. 


Product: Remarks

This remark will be added to the sales item in Yuki and will not be shown on the invoice.