This document contains the functional specification of the mass invoicing module.
The mass invoicing function allows a user to create multiple sales invoices in one step for multiple business partners. The generated invoices are based on an invoice template. The invoice template defines default and pre-set information which is to be used in the generation of the invoices.
The menu options for the mass invoicing functions can be found in the following locations
- Sales Management > Transactions menu > Mass Invoicing Wizard
- Sales Management > Setup > Invoice Template maintenance function
Relation to other modules
This module is related to (but not dependent on) the inter-company invoicing module. The invoices generated by mass invoicing can be used as input for the inter company invoicing process.
This module makes use of and is dependent on the multi-business-partner selector module. The business partner delivered by that module is used in the generation wizard.
Setting up the module: Invoice Templates
The mass invoicing function makes use of Invoice Templates. The invoice template defines which products are used as the basis for the generated invoice. Before the mass invoicing function can be used one or more invoice templates should be defined.
An invoice template consists of a header and one or more lines. On invoice header level the following information is defined:
- pricelist (non-mandatory)
- payment rule (non-mandatory)
- payment term (non-mandatory)
On invoice line level the following information is set:
- quantity (can be overridden in the wizard)
- price (not mandatory, can be overridden in the wizard)
- tax (non-mandatory)
If the non-mandatory information is not set then it is computed when the invoice generation takes place.
The following screenshots show examples of the maintenance windows for the invoice templates.
The main end user function of the mass invoicing module is the mass invoicing wizard.
The wizard consists of several steps:
- select business partners, organization, invoice template and select which products will be in each invoice and their default price and quantity
- set a price quantity per business partner-invoice line combination and generate the invoices
- show the result of the generation step (invoices created)
Step 1: Select Organization, business partner and products
This step allows the user to:
- select an organization
- select one or more business partners (see here for the user manual of the multiple business partner selector).
- set the invoice date
- select which invoice template to use
- set for the chosen invoice template which lines should be used and the price/quantity per line
Some other aspects of the first wizard step:
The invoice template listbox will only show invoice templates which are active and which have at least one active line.
The product list in the bottom is refreshed when the user selects another invoice template.
When the user selects an invoice template then all product lines are initially selected.
The product list will only show active lines. The user can (de-)select all invoice template lines by checking the 'global' checkbox in the product list.
The price and quantity fields are only enabled if their corresponding line-checkbox is checked.
The price field is not mandatory, if it not set then the system will automatically use the price from the price list. This price is shown in step 2 of the wizard.
The business partner selector is implemented by the business partner selector module. It allows filtering business partners and to select one or more business partners.
The following validations are done in step 1 of the wizard:
- at least one business partner should be selected (client-side)
- the business partners should belong to the accessible organizations for the selected organization in the window.
- the business partners should have access to the price-list defined in the selected invoice template.
- the business partners should all have an invoicing address (at least active c_bpartner_location with billto=='Y').
- invoice date should be set and have the right format (client-side)
- an invoice template should be selected (client-side)
- at least one line should be selected (client-side)
- the quantity of the selected lines should be set and have the correct format (client-side)
The validations marked with client-side are performed directly when the user enters information and tabs through the fields. The remaining validations are done when the user presses next. If a validation fails the same window is displayed with all the information as entered and a message box explaining the validation failure. The validation message shows detailed information, for example the list of business partners for which a check fails.
When the user is satisfied the user can select the next button to go to step 2. The information entered in step 1 is stored and the user can return back from step 2 to change the information.
Step 2: Set price/quantity per business partner/invoice line
The second step uses the information from the first step to show a product list by business partner. All the lines of the selected invoice template are shown. Only the ones which have been selected in the first step are also selected in step 2 of the wizard. Also the price and quantity from step 1 are used, for the non-selected lines the price and quantity from the invoice template line is used.
When for a line in the first step no price was set, then the price is read from the price list and shown in this step 2. The price list is either taken from the invoice template or if not set there from the business partner.
Step 2 allows the user to change price/quantity on a business partner-invoice line level. If the price field is cleared/not set then the price from the price list is used in the invoice generation.
When the user presses generate the system validates the inputs and asks for confirmation. If the user confirms then system generates invoices. The generation of invoices performs the following steps:
- For each business partner which has at least one selected product an invoice header is created.
- For each checked line an invoice line is created which is linked to its invoice header.
- The created invoice is posted.
- The resulting identifier and totals are displayed on the result page.
If the generation fails then the step 2 window is re-shown with a detailed error message in a red message box.
Step 3: The result
In step 3 the result for of the generation step is shown. The following information is shown: a table with a list of invoices with for each invoice:
- invoice identifier
- business partner
- total amount
- grand total (incl. taxes)
The invoice identifier is a link to the invoice itself. The user can see the details of the generated invoice and the invoice lines. The user can return using the Openbravo application back button.
In addition the sum of the total amount and grand total are displayed.