Archive for the ‘apagola’ Category

Inter-Company Documents Module

October 29, 2009 Leave a comment

Does your company perform sales – purchases between internal organizations? Do you need to create matching documents for those flows? The Inter-company Documents module is the solution you are looking for!

What are inter-company documents?

An inter-company document is an order or invoice created within two subsidiaries of one same company. Whenever a document of this type is created, a matching document should be created in the target organization. The Inter-company documents module provides a tool to automate the generation of this matching document.

Let me explain the concept with an example. Let’s assume that certain enterprise is formed of several subsidiaries. For instance organization A and organization B. Each time a sales invoice is completed in organization A for organization B, it is desired that a matching purchase invoice is created in the organization B for organization A.

The module supports the following flows:

  • Inter-company invoices initiated either from purchase invoices or sales invoices
  • Inter-company orders initiated either from purchase orders or sales orders.

It provides a mean to drill from the generated document to the original document and vice versa.

How can I take advantage of this?

The inter-company module is already available in the Openbravo Forge for users on Openbravo ERP 2.50MP4 and up. In order to make the most of this module, some configuration must be done. First of all, each inter-company organization have to be represented by a business partner. This way, the documents will be address to the corresponding business partner. This mapping can be done in the Organization window’s Information tab: General Setup || Enterprise || Organization.
For instance, imagine a company with a main organization, called Main, and two subsidiaries called A and B. Each of them should be mapped to a business partner, for instance orgMain, orgA and orgB business partners.

Additionally, the document types used for inter-company transactions have to be defined. This can be done in Financial Management || Accounting || Setup || Document Type. In order to define a document type as inter-company document type, the inter-company flag needs to be checked. Also, some inter-company relations have to be defined for it in the inter-company relations tab. Here, for each document type, a matching document type, a source organization and a target organization can be set. If no matching document is defined, that is, if the target document field is left blank, no matching document will be created in the target organization. The matching document could be created manually in a later stage.

Once the configuration is done, we are ready to go!

At this moment, it is possible to complete orders or invoices using the newly created inter-company document type. And automatically, following to the configuration done, it will create a matching document in the organization of the selected business partner. This matching document can be easily accessed through the linked items icon. Automatically generated matching documents have an original document field that can be used to navigate to it.

Further information is available in the user manual.

Technical Aspects

This module has being developed using Extension Points core enhancement. The functionality has been developed through database PL procedures named Interco_create_order and Interco_create_invoice. These procedures are executed right after C_Order_Post and C_Invoice_Post procedures. These two core procedures have an Extension Point at the end, so we can easily call the inter-company procedures. Find more information about extension points in this blog post recently published!

We have developed the functionality of this module in the following way: first of all, in the PL procedure, we get the necessary parameters from c_invoice_post or c_order_post to create the desired matching document. The new document will be created based on the data of the original invoice and in the default values of the matching business partner. The matching document’s type will be the one defined in the configuration.

Once the new document is created, it is completed calling to c_invoice_post or c_order_post again. This step will complete the new document and – caution – it will call our PL function again! It is important to check in the beginning of our PL whether it is being called by a manual document or by an automatically created document as we don’t want to have deadlocks in our code!

Right before the end, the message returned to the extension point is updated. This way when the completion process of the original document is finished it is shown the document number of the generated matching document.

Feel free to check out the technical documentation for more details!

Inter-company module is publicly available in the central repository, so we would like to encourage you to install it and use it! Do not hesitate to give use feedback, we are willing to hear from you!

Categories: apagola, Openbravo

Human Capital Management available for Openbravo ERP 2.50MP6!

October 27, 2009 1 comment

Human Capital Management capabilities are now available in Openbravo ERP!

Human Capital Management module is intended to provide solid base employee information management capacity so further human capital management functionality can be developed on top of it. The module adds a Human Capital Management folder to the main menu that contains windows to manage employees, salary categories, positions, teams and contract types.

The management structure of the company is modeled with the concept of Teams, that is, areas, subareas, departments, etc. are called Teams. For each team, a parent team can be specified and this way, the managing tree can be defined. Each team can have a manager in charge determined for certain time period. The system records all the activity related to employment information, so, a historical record of team managers is kept within the application. The different jobs an employee could perform are modeled with the Position concept. Each position can be matched with several Salary Categories.

Let’s now define the employee concept.

Employee Management

Employees are a specific type of business partners. In Openbravo ERP, in the business partner window there is a tab named employee where a business partner can be checked as being an employee. After installing the module, this tab will still be operative, but a new specific window to enter further information of employees will be provided. This window will be located in the Human Capital Management menu. The employees entered though that window will still be business partners and will be available through the regular business partner window.

Employee Header Tab

The new employee window has the following tabs:

  • Header Tab: In the header tab, personal information of the employee can be inserted.
  • Contact Tab: In the contact tab the user can insert as many telephones, e-mail addresses, mobile phones, etc. as needed. There is a flag to check whether those contacts are private or business contacts. It is also possible to select which one is the default contact.
  • Location Tab: In the same way, as many addresses as needed can be inserted in this tab and they could be set as private address or business address.
  • Bank Information Tab: Additionally, as many bank account as necessary can be inserted. One of them can be selected as default bank account.
  • Employment Information Tab: This is the most complex tab. Here, the information related to the employees’ activity in the company is entered: the position, the salary, the contract type, etc. The records in this tab are created in a draft status. Once the information is valid, the complete button must be pressed and the record will be saved. The status of the record will be historic, complete or future depending on the data range. The completed records can not be changed, and this way, historical data regarding the employees’ activity in the company is registered.
  • Family Member Tab: This tab is meant to keep information of relatives or next of kin.
  • Operational Resource Tab: This tab allows the setting of the values available in the employee tab of business partner window.
  • Other Citizenship Tab: This tab allows the insertion of more than one citizenship for an employee if needed.

Don’t hesitate to check the user manual for more information!

Human Capital Management Roles

The module provides three roles ready to be assigned to the users: Human Capital Manager, Manager and Employee. The Human Capital Manager will have complete access to all the functionality of the module, and will be the role in charge of every process related to human resource management. The manager role will have access to a specific window for managers, called employee (manager view). Only the records of the employees reporting to the manager will be available in this window. The information in this window will be read only: if a change is required, it should be done via the human capital manager. Finally, the role employee has access to a window called employee self-service where each employee can access his/her information. Except for the employment data, that will be read only, the rest of the information will be editable by the employee.

Technical Notes

For those of you interested in the insides of the code, here are some comments.

All the windows of this module have been generated by WAD. As for that, some new tables had to be created, and some core tables had some columns and constraints added. For instance, the employee window is based on the core table c_bpartner, which had some new columns added.

Along the different windows and tabs, there are some fields that happen to appear and disappear depending on certain fact. If this fact can be found in the same table, this logic is implemented using display logic functionality, which can be defined in the application dictionary when a field is described. If the reason to hide or display a field does not depend on a value of a field of the window itself, auxiliary input functionality must be used. This was used for instance in the employment information tab, to display the field bonus % depending on the bonus type of the selected salary category.

Additionally, the read only logic functionality, available on the column definition in the application dictionary, was used to make the fields read only or not depending on certain value. This was used in the employment information tab to make most fields read only if the record is not in draft status.

Some of the fields, for instance known as field in employee window header, have a callout associated to them. This callout will calculate the value of the field when some other field is changed. In this case, the known as field is changed whenever a change is done in the name or last name fields. Know as field is the concatenation of the previous fields. A more complex callout is used to reload the values of the drop down field salary category, whenever a change is done in the position field. The salary categories available for the selected position are loaded. All this callouts have been developed using Data Access Layer utility.

Data Access Layer has being used as well to develop every single process in the module. Every button in the module is linked to a process defined in the application dictionary. This processes are java files that implement org.openbravo.scheduling.Process. Using DAL utility database information is retrieved and the required modifications done in the data.

Finally, there is one process which is not executed with a button. It is a background process which can be scheduled through the process scheduling functionality to run periodically. This process updates the employment information records of the employees, setting to historic status the ones whose end date is reached.

For further details please have a look at the technical specifications of this project which can be found at Openbravo Forge.

Extending Human Capital Management Module

This module provides the basic functionality to be able to store and maintain employee information. Further developments, such as reports, can be done on top of this to exploit and expand all this information. Extensions to cover a wider area of Human Capital Management such as vacation management, recruitment etc. are more than welcome. Now, feel free – and we encouraged you– to develop any extension for Human Capital Management!

Categories: apagola, Openbravo