As a tenant, you can set up companies that can send and receive documents. A tenant could, for example, be the developer of an ERP system, or a company that develops a component for an ERP system. The companies that use the ERP system, or the component, are the companies that the tenant creates. The endpoint is linked to the companies' registration numbers, VAT numbers, GLN numbers, etc. |
To book cost creditors must already have stored the raw document in your database. The voucher itself (which replaces the old paper copy, pdf document or image of a bon) is the UBL document itself. This must therefore be stored in the accounting database. If your accounting system is unable to display the UBL document, Easyubl can deliver different human readable formats that you may save for visual control. To be able to work with posting cost creditors, it is convenient to be able to work dynamically. Therefore, Easyubl expects you to hold the document raw. You then interpret the document by sending it back to Easyubl to get a posting proposal. You can repeat this operation until you are satisfied with the result. What does easyUBL do for you EasyUBL will provide the information to create the creditor if it does not exists. EasyUBL assumes that the creditor's account number is the endpoint ID. You may map this to a local account number. To post cost creditors, you need to translate the UBL document into entries that can be posted. EasyUBL will try to give you a posting proposal and at the same time suggest a template for future postings for this creditor. If you ignore this template, EasyUBL will still try to improve it based on the postings you make the first time. If the cost is to be distributed over several accounts, the posting must be related in some way to the product line. |
Integration with the ERP system |
CreditorDocument myDoc = new(); myDoc.bookingTemplate = get_Easyproposal(LocalProposalID); Byte[] myByte = System.Text.Encoding.UTF8.GetBytes(myXmlDocument); myDoc.base64EncodedDocumentXml = Convert.ToBase64String(myByte); string myJson = JsonConvert.SerializeObject(myDoc); HttpClient myClient = new(); myClient.DefaultRequestHeaders.Add("Authorization", myTenantKey); string myUrl = string.Concat("https://easyubl.net/ api/ CostCreditor/ BookingBroposal/", companyId); var stringContent = new StringContent(myJson, UnicodeEncoding.UTF8, "application/json"); var response = await myClient.PostAsync(myUrl, stringContent); response.EnsureSuccessStatusCode(); var responseContent = await response.Content.ReadAsStringAsync(); CostCreditorVoucher myVoucher = new(); myVoucher = ( CostCreditorVoucher)JsonConvert. DeserializeObject( responseContent); |
In this code, a locally saved template for "bookingTemplate" is retrieved.
The first time a creditor is posted, this will usually be empty. EasyUBL itself will save each creditor's template. You therefore do not need to save it locally, but it provides some opportunities to pre-populate posting proposals based on old postings in the local system.
You send this template together with the UBL document (myXml). The function "api/CostCreditor/BookingProposal" returns the document "myVoucher". MyVoucher contains the following information: Creditor's address information. This can be used to create the creditor in the local system if this does not already exist. A contact person who must be notified and has the option of approving the invoice. A copy is sent to the contact who presents the invoice as a pdf document (this is not the legal document. It is only a partial visualization of the invoice's content). A series of financial transactions. By default, the function creates a template that posts to the creditor's account number, a VAT account and a cost account. This can be expanded by working with the customer's template. In addition, EasyUBL will itself come up with proposals from previous postings across creditors and companies. The creditor's template is returned with the changes EasyUBL itself derives. This can be saved locally. You will mostly not want to change a completed template, as this creates uncertainty about what RasyUBL can come up with. This can be controlled in the local system by, for example, failing to save the proposal that is returned if there is already a proposal. You can then ask for a new proposal from EasyUBL by deleting the local proposal and calling the function again. |
Receive goods in stock This operation assumes that the received goods can be identified with a known item number. |
Receive goods in stock This operation assumes that the received goods can be identified with a known item number. |