User guide version 2.x

Invoice Capture is a web application to manage invoices - usually PDF documents - in OpenKM. It helps in sending and reception of invoices related to a company and eventually, catalog automatically. 

Currently are available English and Spanish translations, but can be easily translated to other languages.

Metadata used by catalog

Application use metadata in combination with Automation to automatically catalog invoices.

Can create different types of documents - invoices, delivery notes, etc - by creating different groups of metadata that are dynamically loaded in the entry data form.

Some of the metadata fields by default are:

  • Company CIF (required)
  • Company name (required)
  • Company internal code (not required)
  • Invoice number (not required)
  • Invoice status ( possible values: sent, received, etc )
  • Date (required)
  • User
  • VAT
  • Total cost

The invoices are cataloged into OpenKM by default with the following folder structure: /okm:root/{root.destination.folder}/{CIF}/{year}/{month} where {CIF}{year} and {month} corresponds with metadata field values.

The root.destination.folder is set in the file named invoice-capture.properties

Configuration preliminaries

The roles used by the application are :

  • ROLE_ADMIN
  • ROLE_STANDARD
  • ROLE_ADVANCED

Create missing roles

Go to the OpenKM Administration > Authentication > Roles

  • ROLE_STANDARD
  • ROLE_ADVANCED

Use a user with ROLE_ADMIN to:

  • Create companies.
  • Create users.
  • Assign users to the companies

A company can have multiple users, but a user only belongs to one company.

Create automation

Go to the OpenKM Administration > Automation and register automation for cataloging documents.

You have to create 5 automation in post mode:

 

Automation createAutomation definition

Go to OpenKM administration, select the option automation and new rule, fill the name "Invoice catalog standard add", select the event "Add metadata group", and check the box "Active".

  • Add validation: Select PathContains option, activate, and select the "standard.import.node" folder defined in the invoice-capture properties.
  • Add action: Select InvoiceCatalog option and active.

Go to OpenKM administration, select the option automation and new rule, fill with name "Invoice catalog advanced add", select the event "Add metadata group" and check the box "Active".

  • Add validation: Select PathContains option, activate, and select the "advanced.import.node" folder defined in the invoice-capture properties.
  • Add action: Select InvoiceCatalog option and active.

Go to OpenKM administration, select the option automation and new rule, fill the name "Invoice catalog standard set", select the event "Set metadata group", check the box "Active" and select post.

  • Add validation: Select PathContains option, activate, and select the "standard.import.node" folder defined in the invoice-capture properties.
  • Add action: Select InvoiceCatalog option and active.

Go to OpenKM administration, select the option automation and new rule, fill with name "Invoice catalog advanced set", select the event "Set metadata group" and check the box "Active".

  • Add validation: Select PathContains option, activate, and select the "advanced.import.node" folder defined in the invoice-capture properties.
  • Add action: Select InvoiceCatalog option and active.

Go to OpenKM administration, select the option automation and new rule, fill with the name "Invoice upload", select the event "Document create" and check the box "Active".

  • Add validation: Select PathContains option, activate, and select the "standard.import.node" folder defined in the invoice-capture properties.
  • Add action: Select InvoiceUpload option and active.

In the file invoice-capture.properties (found in Tomcat's folder) you define the uuids for both folders created in OpenKM:

standard.import.node = bb381ac2-f3f6-42b4-8df6-fbd0e87054ce
advanced.import.node = 76d1c3c7-d085-47ec-a153-c146e63ee9d9

The value of the UUID of the nodes depend on your OpenKM instance.

Register metadata

Go to the OpenKM Administration > Metadata and register the below metadata definition

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups 3.4//EN"
    "http://www.openkm.com/dtd/property-groups-3.4.dtd">
<property-groups>

<property-group label="Document type" name="okg:invoice_doc_type">
    <select label="Type" name="okp:invoice_doc_type.type" type="simple" optionsQuery="select DTP_METADATA_GROUP, DTP_TYPE from INV_DOCUMENT_TYPE order by DTP_TYPE desc"/>
</property-group>

</property-groups>

Create a table

Go to the OpenKM Administration > Tools > Database query and execute the script below:

CREATE TABLE INV_DOCUMENT_TYPE(DTP_ID INT NOT NULL, DTP_TYPE VARCHAR(100) NOT NULL, DTP_METADATA_GROUP VARCHAR(100) NOT NULL);

Standard mode

User works in standard mode when is a member of ROLE_STANDARD

A user with this role is assigned TO one company, and he is able to catalog invoices just for this company.

In the Standard mode, users are able to catalog invoices and search for invoices by year and month on its company assigned.

Catalog invoices with metadata

1. Click on STEP 1 option located at the top left menu

2. Add invoices from your local disk by clicking on Add files button, and upload them by clicking on the Upload button for each one (or clicking on the Upload all button).

3. Once you have uploaded the invoices, click on the STEP 2 option at the top left menu.

4. Set invoice metadata for each uploaded invoice in the previous step. To confirm the changes click on the Add button. This button will be enabled when the form is fully completed.

In the metadata form, the field Company name is the company assigned to this user.

Search for invoices

1. Click on the SEARCH option on the top-right menu

2. Fill in the year and month fields then click on the Search button.

3. A list of invoices filtered by the year and month for the company of the user will be shown.

A row in a table with fields TypeNameSizeAuthorDate, Tax number, VAT, and Total is shown for each invoice.

In each row, you can see a Download button to download the invoice.

Advanced mode

User works in advanced mode when is member of ROLE_ADVANCED

A user with this role can catalog invoices for the company assigned to the user.

In the advanced mode, users are able to catalog invoices and search for invoices by year and month and companies ( providers ).

Catalog invoices with metadata

Same as explained above for Standard mode.

In the metadata form, the field Company name is a list of companies created by an admin user.

Search for invoices

Same as explained above for Standard mode.

Admin mode

User works in admin mode when is member of ROLE_ADMIN.

By default, the app contains an admin user named admin.

In the Admin mode users are able to catalog invoices, manage companies, manage users, and search for invoices by year and month.

Companies management

1. Click on the COMPANY option on the top-right menu.

2. Fill in the required fields: CIF and Name,  and optionally Internal code to create a new company and finally click on Add button.

3. In the list of companies you can edit or delete companies, by clicking on the Edit button or Delete button respectively.

Users management

1. Click on the USERS option on the top-right menu.

2. Fill in the required fields: Id, Password, and Name, assign a role, and optionally assign a company to create a new user and finally click on Add button.

3. In the list of users you can edit or delete users, by clicking on the Edit button or Delete button respectively.