<< Click to Display Table of Contents >> Common Pitfalls |
|
As most external software programs want to import data into Octopus, sometimes the difference between an invoice and a booking is not as clear as it should be.
An invoice is an object that contains article information, count , description , unit price , etc.
A booking is an object that contains account information , base amount , vat amount, ..
To insert a invoice, the end user should have the Invoice Module activated in his dossier. Within Octopus he can open , print , .. book through the invoices to accounting.
But as most external programs are kind of ERP systems, the data that needs to be imported is a booking.
To book a credit note using the api, the total amount should be negative, whilst the line amounts that 'contribute to' the credit note have to be positive.
You need to enable session cookies in the webservice. For example in C# you need to add allowCookies="true" in your app.config.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="OctopusWSPortBinding" allowCookies="true" maxReceivedMessageSize="20971520">
<security mode="Transport" />
</binding>
</basicHttpBinding>
</bindings>
<client >
<endpoint address="https://service.inaras.be:443/OctopusService01-16/OctopusWSService"
binding="basicHttpBinding" bindingConfiguration="OctopusWSPortBinding"
contract="OctopusServiceReference.OctopusWS" name="OctopusWSPort" />
</client>
</system.serviceModel>
</configuration>
For other languages there will be probably same features.
In case the session cookie is not kept, strange issues will happen.
Because you can authenticate successfully , but the next call to ConnectToDossier will fail because you are not authenticated.
In Octopus relations have there own id. This id is stored into the relation key of the relation. Most external programs have there own numbering of the relations.
To be able to identify the relation in Octopus, there is an extra field available in the relation, namely the external relation id.
Warning: In case you update relations by external relation id, be careful! Because you can mess up the entire accounting.
In case you want to update a relation, you can have following cases:
• | The relation key and external id are filled in |
In this case the webservice searches for a relation with the internal relation id, if it finds one, it updates this relation and sets its external relation id.
If it can't find a relation with the internal relation id, it follows next case.
• | The relation key is null, the external id is filled in |
In this case the webservice searches for a relation with the external relation id, if it finds one, it updates this relation.
If it can't find a relation, the relation will be inserted.