Skip to main content
insightsoftware Documentation insightsoftware Documentation
{%article.title%}
Published:
Was this article helpful?
0 out of 0 found this helpful

XML Invoice

This topic describes how to create and design XML invoice.

This topic contains the following sections:

XML Invoice to PDF

It is now possible to create a template to display XML invoices in Bizview. You should use Excel to create a template and name it xmlinvoice.xlsx. The Excel workbook must be saved directly in the root folder of the Bizview application, i.e. C:\inetpub\wwwroot\Bizview\xmlinvoice.xlsx. This behavior may be changed in the future.

In addition, to configuring the XML workbook, the designer also need to create a procedure that retrieves the actual XML files from the customer location. To read more about the procedure, and where it should be defined in the template, go toDOCUMENT_PROC

When designing the XML template the designer can use tags to insert values from the XML document. It is important to Name the tags as they are named in the XML document.

Name Tags in the Template

When you design a template and want a value from the XML file, you need to know the name of the value in the xml document. Therefore, it's preferable that you have a XML invoice in front of you when designing the template.

XMLInvoiceID

For example, if you want to insert the invoice ID into a cell in the template, type #Invoice.ID in the cell you want the invoice ID to appear in.

XMLInvoiceIDtemplate

Below is a visualized invoice example:

XMLInvoiceVisualised

Namespaces

You can enter namespaces in the template that makes it easier for you to enter the tags. For example, you can enter #namespace#Invoice in the beginning of the template (cell A1). If you do that the word Invoice will be added in the beginning of all tags. To get the invoice ID, you can enter #ID instead of #Invoice.ID

XMLInvoiceIDNamespace

Namespaces can be entered everywhere in the template. Just remember to switch back to the root namespace when youve changed a namespace. Keep in mind that Bizview will read the template row by row when you enter #namespace in the template.

Repetitive Tags

When a tag is repetitive, like invoice lines, mark those tags with the keyword #repeat followed by the tag name. For example, an invoice line could look like this:

XMLInvoiceReptags

To insert an invoice line in the template you enter the following:

#repeat#InvoiceLine

To design the actual invoice line you preferably add a new worksheet in the template and design the row in that sheet. It could look like this:

XMLInvoiceLine

The invoice line can consist of many rows in the template. It is important that you add a named range for the area, with the same name as the tag. In this case, InvoiceLine.

In the example above the row includes another repeat (marked in red), which is okay to have. You just have to do another named range with the name invoiceLine.text and put your template in the area, for example like this:

XMLrepeatInvoiceLine

When you design your template for repetitive tags the value, numberformat and the format for the cell is copied to the invoice template. The column width is ignored but font, borders, colors etc. is copied.

To make it easier to know in which column you should enter your tags it's preferable that you start your repetitive tags in the same column as the tag in the template. If #repeat#InvoiceLine, in the example above, is entered in column B in the template you should also start your named range in column B so it will be easier to put your tags in the right column. This is not a rule, you can put the named range in which column you like.

Xml Namespaces

In some xml files you may see xml namespaces in front of every tag. They are stated before every tag and are separated with a colon. For example:

XMLInvoiceNamespaces

These namespaces should not be entered in the template. Just enter the actual tag name. i.e #BuyerParty.Party.PartyName.Name

In some xml files, there can be two Name tags. You could write #repeat#Buyerparty.Party.PartyName.Name in the template and make a named range for that as was explained earlier. But if you just want to enter the first Name tag (QVK Catering) you can enter following in the template:

#BuyerParty.Party.PartyName.Name [0]

This will take the first occurrence of the Name tag. [1] will take the second and so on.

Using Excel Functions

When you design your invoice, you are free to use Excel functions to make the invoice as you want it. For example, you may add two nodes into one cell with a formula. You can store tags in cells with the same color as the background color (so they are invisible) and use them in a formula.

You cannot hide rows or columns in a repetitive named area but in the actual invoice template you are free to hide columns and rows.

Formatting

If you want the numbers to be formatted according to the culture you have in Bizview, you must format the cell in the template (i.e as number, percent, or currency).

Note: In the XML Invoice Viewer in which you can test your templates the number will be shown according to the regional settings on your local computer.

Testing Your Template

When creating the template in Excel you can use the program XMLInvoiceCreator.exe that is installed in the Program Files directory (in folder NCG Group) on the web server. The program asks for a XML file and a XLSX file.

XMLInvoicePreview

Once you choose an XML file and a template, select the Load button to preview the invoice. First, you will see a print preview of the invoice. When this window is closed you will see the template with updated values. If any tags you entered are missing in the xml file, it will be marked with red font.

Published:

XML Invoice

This topic describes how to create and design XML invoice.

This topic contains the following sections:

XML Invoice to PDF

It is now possible to create a template to display XML invoices in Bizview. You should use Excel to create a template and name it xmlinvoice.xlsx. The Excel workbook must be saved directly in the root folder of the Bizview application, i.e. C:\inetpub\wwwroot\Bizview\xmlinvoice.xlsx. This behavior may be changed in the future.

In addition, to configuring the XML workbook, the designer also need to create a procedure that retrieves the actual XML files from the customer location. To read more about the procedure, and where it should be defined in the template, go toDOCUMENT_PROC

When designing the XML template the designer can use tags to insert values from the XML document. It is important to Name the tags as they are named in the XML document.

Name Tags in the Template

When you design a template and want a value from the XML file, you need to know the name of the value in the xml document. Therefore, it's preferable that you have a XML invoice in front of you when designing the template.

XMLInvoiceID

For example, if you want to insert the invoice ID into a cell in the template, type #Invoice.ID in the cell you want the invoice ID to appear in.

XMLInvoiceIDtemplate

Below is a visualized invoice example:

XMLInvoiceVisualised

Namespaces

You can enter namespaces in the template that makes it easier for you to enter the tags. For example, you can enter #namespace#Invoice in the beginning of the template (cell A1). If you do that the word Invoice will be added in the beginning of all tags. To get the invoice ID, you can enter #ID instead of #Invoice.ID

XMLInvoiceIDNamespace

Namespaces can be entered everywhere in the template. Just remember to switch back to the root namespace when youve changed a namespace. Keep in mind that Bizview will read the template row by row when you enter #namespace in the template.

Repetitive Tags

When a tag is repetitive, like invoice lines, mark those tags with the keyword #repeat followed by the tag name. For example, an invoice line could look like this:

XMLInvoiceReptags

To insert an invoice line in the template you enter the following:

#repeat#InvoiceLine

To design the actual invoice line you preferably add a new worksheet in the template and design the row in that sheet. It could look like this:

XMLInvoiceLine

The invoice line can consist of many rows in the template. It is important that you add a named range for the area, with the same name as the tag. In this case, InvoiceLine.

In the example above the row includes another repeat (marked in red), which is okay to have. You just have to do another named range with the name invoiceLine.text and put your template in the area, for example like this:

XMLrepeatInvoiceLine

When you design your template for repetitive tags the value, numberformat and the format for the cell is copied to the invoice template. The column width is ignored but font, borders, colors etc. is copied.

To make it easier to know in which column you should enter your tags it's preferable that you start your repetitive tags in the same column as the tag in the template. If #repeat#InvoiceLine, in the example above, is entered in column B in the template you should also start your named range in column B so it will be easier to put your tags in the right column. This is not a rule, you can put the named range in which column you like.

Xml Namespaces

In some xml files you may see xml namespaces in front of every tag. They are stated before every tag and are separated with a colon. For example:

XMLInvoiceNamespaces

These namespaces should not be entered in the template. Just enter the actual tag name. i.e #BuyerParty.Party.PartyName.Name

In some xml files, there can be two Name tags. You could write #repeat#Buyerparty.Party.PartyName.Name in the template and make a named range for that as was explained earlier. But if you just want to enter the first Name tag (QVK Catering) you can enter following in the template:

#BuyerParty.Party.PartyName.Name [0]

This will take the first occurrence of the Name tag. [1] will take the second and so on.

Using Excel Functions

When you design your invoice, you are free to use Excel functions to make the invoice as you want it. For example, you may add two nodes into one cell with a formula. You can store tags in cells with the same color as the background color (so they are invisible) and use them in a formula.

You cannot hide rows or columns in a repetitive named area but in the actual invoice template you are free to hide columns and rows.

Formatting

If you want the numbers to be formatted according to the culture you have in Bizview, you must format the cell in the template (i.e as number, percent, or currency).

Note: In the XML Invoice Viewer in which you can test your templates the number will be shown according to the regional settings on your local computer.

Testing Your Template

When creating the template in Excel you can use the program XMLInvoiceCreator.exe that is installed in the Program Files directory (in folder NCG Group) on the web server. The program asks for a XML file and a XLSX file.

XMLInvoicePreview

Once you choose an XML file and a template, select the Load button to preview the invoice. First, you will see a print preview of the invoice. When this window is closed you will see the template with updated values. If any tags you entered are missing in the xml file, it will be marked with red font.

For an optimal Community experience, Please view on Desktop
Powered by Zendesk