Migrating HR Payroll to iDempiere

The migration of Adempiere modules to iDempiere

Migrating HR Payroll to iDempiere

Postby red1 » Tue Jan 15, 2013 5:18 pm

Pending LCO Migration HR Payroll module which is greatly enhanced by DoubleClick and GlobalQSS under http://code.google.com/p/adempiere-lve-361/

This project source depends on Carlos Ruiz 361 Final edition http://bitbucket.org/CarlosRuiz_globalqss/adempiere361 which is the nearest and stable follower of iDempiere source. Orlando, from the LVE project has told me that this project is based on English as a base language and thus i will ignore the Spanish translation from the README advice.

The challenge will be to review LVE project to divide core plugin from non-core but functional usage plugin and from localisation specific only to a country. Then there is the need to document entirely in English the module features, functions and implementation.

If anyone has different country but core needs which should go into this review and conversion into an iDempiere plugin please define them early on either in this forum or give me a link to their specifications or just email them to me.

We will follow the steps given in the README of the LVE project:

0. Install locating Colombia following the steps in
the following link:

     http://www.adempiere.com/LCO_Instrucciones_Instalacion

1. Place the script in the location and Venezuela LVE_361
run it on your database

     Directory:

          LVE_361/script/Change_language_from_es_CO_to_es_VE.sql

2. Locate the directory LVE_361/es_ve

3. Enter Adempiere with System Administrator role (preferably with
Inglés language as the instructions are the names of
processes in English)

4. Open the "Translation Import / Export"

5. Select the option Language Spanish (Venezuela)

      5.1. Leave fields blank Client and Table

6. Press Import and select the directory where you downloaded
or unzipped xml files of translation es_VE

7. When this process is complete you can close the window

8. Now run the Synchronize Terminology process

10. Locate the directory migration_LVE_361/LVE_361

11. Run the script customization.sql

12. Run Menu -> System Admin -> General Rules ->
Check Sequence.

13. Run the script 1Pre_Packing_deposito.sql

14. Run Menu -> System Admin -> General Rules ->
Check Sequence.

15. Enter System Adempiere with role Adminitrator (Language
Inglés)

16. Open the Window Menu -> Aplication Dictionary -> Aplication
Packaging -> packin.

17. Locate the directory and run migration_LVE_361/package
following packages:

     LVE_DeleteOrCancelInvoice.zip
     LVE_deletePayment.zip
     LVERetenciones.zip
     LVE_Deposit.zip

     Note: after the execution of each package are of importance
run
the process located at: Menu -> System Admin -> General Rules ->
Check Sequence.

18. Run the script 2Post_Packing_Deposito

19. Run Menu -> System Admin -> General Rules ->
Check Sequence.

20. Run the script console:

     LVE_361/script/Migracion LVE_361/LVE_361/LVE_postgresql.sh

    Command Console: <--- Done manually via build.xml

         sudo. / 361 LVE_postgresql.sh commit | psql-U adempiere-d
adempiere> 361.lst

21. Run the process located at: Menu -> System Admin ->
General Rules -> Check Sequence.

22. In the main directory of your application at the same level directories zkpackages packages and reports paste the folder located at:

   LVE_361/script/Migracion LVE_361 /

23. Locate and open the scrip of deductions:

    migration_LVE_361/LVE_361/withholding_LVE361.sql
    
24. Before running the script previously
You must have created the company to which you are going to
apply the settings, once it is created replace
@ @ ID_CLIENT occurrences of the ID that is generated when < --- How to make this dynamic or system? All such cases Not Done.
of the company building.

25. Proceed to script execution withholding_LVE361.sql

26. Locate and open the document translation scrip:

    migration_LVE_361/LVE_361/documentsTraslation_LVE361.sql
    
27. Before running the script previously
You must have created the company to which you are going to
apply the settings, once it is created replace
@ @ ID_CLIENT occurrences of the ID that is generated when
of the company building.

28. Proceed to script execution documentsTraslation_LVE361.sql

29. Locate and open the scrip of 3Deposito_cambios_Organizacion.sql:

    migration_LVE_361/LVE_361/3Deposito_cambios_Organizacion.sql
    
30. Before running the script previously
You must have created the company to which you are going to
apply the settings, once it is created replace
@ @ ID_CLIENT occurrences of the ID that is generated when
of the company building.

31. Proceed to script execution 3Deposito_cambios_Organizacion.sql

32. Locate and open the scrip of controlnumbervalidation.sql:

    migration_LVE_361/LVE_361/controlnumbervalidation.sql

33. Locate and open the scrip of bank_lve361.sql:

    migration_LVE_361/LVE_361/bank_lve361.sql
    
34. Before running the script previously
You must have created the company to which you are going to
apply the settings, once it is created replace
@ @ ID_CLIENT occurrences of the ID that is generated when
of the company building.

35. Proceed to script execution bank_lve361.sql

36. Open the Window Menu -> Aplication Dictionary -> Aplication
Packaging -> packin.

37. Locate the directory and run migration_LVE_361/package/nomina
these packages is that order:

     LVE_TalentoHumanoHigiene_1.zip
     LVE_TalentoHumanoNomina_2.zip
     LVE_TalentoHumanoRRHH_3.zip
     LVE_Empleado_4.zip
     LVE_CatalogoConceptos_5.zip
     LVE_HR_Loan_Type_6.zip

     Note: after the execution of each package are of importance
run
the process located at: Menu -> System Admin -> General Rules ->
Check Sequence.

38. Locate the folder:
     migration_LVE_361/LVE_361/361/nomina

39. Make the changes indicated at the beginning of each script and run.

40. Run the process located at: Menu -> System Admin -> General Rules -> Check Sequence.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating HR Payroll to iDempiere

Postby red1 » Thu Jan 17, 2013 5:15 pm

Result of Pack In of LVE HR steps. Two items 'installing' ended up in fatal errors. Noted above in previous post and logs below.

HRPackIn.gif
HRPackIn.gif (36.01 KiB) Viewed 33510 times


Code: Select all
15:42:43.815 PackIn.startElement: menu LVE_Deposit [29]
-----------> IDFinder.getID: Non Unique ID Lookup found for AD_WF_Node.Name=(DocPrepare) [29]
-----------> IDFinder.getID: Non Unique ID Lookup found for AD_WF_Node.Name=(Start) [29]
-----------> IDFinder.getID: Non Unique ID Lookup found for AD_WF_Node.Name=(DocAuto) [29]
-----------> IDFinder.getID: Non Unique ID Lookup found for AD_WF_Node.Name=(DocComplete) [29]

Sequence Check
===========> DB.getSQLValue: SELECT MAX(HR_Movement_Employee_v_ID) FROM HR_Movement_Employee_v [19]
org.postgresql.util.PSQLException: ERROR: relation "hr_movement_employee_v" does not exist
===========> DB.getSQLValue: SELECT MAX(HR_Movement_Employee_v_ID) FROM HR_Movement_Employee_v [34]
org.postgresql.util.PSQLException: ERROR: column "hr_movement_employee_v_id" does not exist

     LVE_TalentoHumanoRRHH_3.zip 
DB.executeUpdate: INSERT INTO AD_TREENODEMM(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, Parent_ID, SeqNo, AD_Tree_ID, Node_ID)VALUES(0, 0, 0, 0, 53108,6, 10, 53109) [SvrProcess_72e65ebd-c2b4-4212-9b96-5ad5f843a6a1] [29]
org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "ad_treenodemm_pkey"
  Detail: Key (ad_tree_id, node_id)=(10, 53109) already exists.; State=23505; ErrorCode=0

     LVE_Empleado_4.zip
16:31:05.305 PackIn.createColumn: ALTER TABLE C_BPartner MODIFY Name NVARCHAR2(100) [30]
===========> DB.executeUpdate: INSERT INTO t_alter_column values('c_bpartner','Name','VARCHAR(100)',null,null) [SvrProcess_48f73595-94b9-42c6-8769-b5a401ddb01b] [30]
org.postgresql.util.PSQLException: ERROR: Failed to recreate dependent view; State=P0001; ErrorCode=0

===========> MTree.loadNodes: Nodes w/o parent - adding to root - [Payroll Contract, Payroll Department, Payroll Job, Payroll Employee] [11]
16:40:46.254 MRole.get: AD_Role_ID=102,
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating HR Payroll to iDempiere

Postby red1 » Sun Jan 20, 2013 1:42 pm

I am doing an interim approach which is to use Carlos Ruiz's ADempiereLiberoHR as the reference as he does reconcile back improvements from LVE.
A constructor call error occurred and i have to edit the MAcctSchema not as an array:
Code: Select all
diff --git a/extension/eevolution/libero/src/main/java/org/compiere/acct/Doc_HRProcess.java b/extension/eevolution/libero/src/main/java/org/compiere/acct/Doc_HRProcess.java
--- a/extension/eevolution/libero/src/main/java/org/compiere/acct/Doc_HRProcess.java
+++ b/extension/eevolution/libero/src/main/java/org/compiere/acct/Doc_HRProcess.java
@@ -56,7 +56,7 @@
    *    @param rs record
    *    @parem trxName trx
    */
-   public Doc_HRProcess (MAcctSchema[] ass, ResultSet rs, String trxName)
+   public Doc_HRProcess (MAcctSchema ass, ResultSet rs, String trxName) //red1 - was MAcctSchema[]
   {
      super(ass, MHRProcess.class, rs, DOCTYPE_Payroll, trxName);
   }   //   Doc_Payroll
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating HR Payroll to iDempiere

Postby red1 » Tue Jan 22, 2013 7:36 am

Carlos also has his own better maintained http://bitbucket.org/CarlosRuiz_globalq ... mpiere-hr/ which i tried and it does not have the above conflict. So i am going for better maintainability over better features. Later LVE can be a fragment for this HR plugin. It be good to see how fragments work here.

He also told me that HR Payroll menu items are already in the present iDempiere just that they are deactivated. We will reactivate them in the 2Pack with SQL statements that UPDATE <items> SET IsActive = 'Y' ...
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating HR Payroll to iDempiere

Postby red1 » Tue Jan 22, 2013 10:37 am

Just skyped with Orlando from LVE and he passed me his Database dump and i restored to show the following screens. He told me LVE has Leave Management, Medical, Training and Exit management. Sounds like OrangHRM in iDempiere to me. I suggested to him to name this as iVeHR (pronounced Ee-vee-Arr) :)

LVE1.gif
LVE1.gif (21.83 KiB) Viewed 33478 times


LVE2.gif
LVE2.gif (18.46 KiB) Viewed 33478 times
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating HR Payroll to iDempiere

Postby red1 » Fri Jan 25, 2013 8:41 am

There is local MOrder detected. Recommend to use ModelValidator instead. So all localised Model classes are removed. Including LoginPanel, MPayment, Language.
No clear difference detected with them except MPayment has a model event:

Code: Select all
/********************
       * Deposit Control
       * Double Click Sistemas C.A. Ads. Angel Parra - aparra@dcs.net.ve - arpr18@gmail.com
       */
      else if (AD_Table_ID == MLVEDeposit.Table_ID)
      {
         if (docStatus.equals(DocumentEngine.STATUS_Completed))
         {
            options[index++] = DocumentEngine.ACTION_Void;
         }
      }

This seems to set a void option when the status is completed. Maybe this is already present in iDempiere or we see if it can be solved by a model event (TODO later).
This class is also called with

Code: Select all
MPayment.setLVE_DepositLine_ID(line.getLVE_DepositLine_ID());

where 'set<new field>' is unresolved in X class as we are removing such locals. But this is solved by

Code: Select all
MPayment.set_ValueOfColumn("LVE_DepositLine_ID", line.getLVE_DepositLine_ID());

The reason to remove core class modification is that it will fork from core models and require unforeseen future maintenance. Replacing with Model Validators will decouple and allow core classes to evolve by the community and breakages are lesser maintained as it involved only own modifications.

(I have checked in the database and found C_Payment has the LVE_DepositLine_ID intact, which means that the upgrade from 361 to iDempiere seems good).

In LVE_MInvoice: wt.isLVE_IsIVA() change to wt.get_ValueAsString("lve_isiva").equals("Y"), iwh.setNroReten(nroReten) change to iwh.set_ValueOfColumn("nroreten", nroReten)
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating HR Payroll to iDempiere

Postby red1 » Sat Jan 26, 2013 3:29 pm

CLIENT > VENEZUELA > org.doubleclick.model.LVE_CInvoiceModel <<-- this will be converted into an EventHandler under OSGI-INF/component but a filter has to be put in to ensure it is for particular client

CALLOUTS
Table - Column - Callout
HR_Attribute - HR_Concept_ID - org.eevolution.model.CalloutPayroll.ColumnType
HR_Employee - AcctionButton - org.doubleclick.callout.LVE_Customization.generationAttribute
HR_Process_Employee_Filters - ActionBoton - org.doubleclick.callout.LVE_EmployeesPayrollProcess.add_employees
- HR_Department_ID - @script:beanshell:LVE_restart_filters
- HR_Job_ID - @script:beanshell:LVE_restart_filters
LVE_DepositLine - C_BankAccount_ID - org.doubleclick.callout.LVE_CalloutDeposit.cashamt
- C_Payment_ID - org.doubleclick.callout.LVE_CalloutDeposit.paymentamt
- IsCash - org.doubleclick.callout.LVE_CalloutDeposit.clean
LVE_Loan_Employee - AcctionButton - org.doubleclick.callout.LVE_GenerationQuotas.generationQuotas
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating HR Payroll to iDempiere

Postby red1 » Wed Jan 30, 2013 9:24 am

All the event and callouts and modelfactory extensions created. Now a first dry untested draft is made to the P2 site.
Take the LiVE_HR_Installer.sh and run it in your <IDEMPIERE-SERVER-HOME>. You need AssetMaintenance feature plugin to be installed first as we need the Swing feature from there.
You also need to DBRestore from the ExpDatHRExtensions.jar which has the HR menu and models included. Later we will extract out a 2Pack for clean installs.
Try this on a trial idempiere server and NEVER on production.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating HR Payroll to iDempiere

Postby red1 » Mon Feb 04, 2013 8:44 pm

Pack Out of HR Payroll settings is shown in the screenshot below. The use of SQL statements for Functions and View is used by just pasting the exact syntax as sourced from the database editor. The 2Pack is already embedded in the plugin.

HRPackOut.gif
HRPackOut.gif (19.45 KiB) Viewed 33338 times

The database dump that has this settings is uploaded to SourceForge.

Install AssetMaintenance and WithHoldingTax plugin features first (one by one). Then install this feature. In adempiere-client side we have to do things manually and i am giving all the local statements including pre-requisite jars due to the zk ui code dependency mixed into these plugins (in future this has to be taken out):
Code: Select all
install file:/Applications/idempiere-server/plugins/org.adempiere.ui.zk_1.0.0.v20130106-2306
install file:/Applications/idempiere-server/plugins/org.zkoss.zk.library_6.0.0.v20130106-2306.jar
install file:/Applications/idempiere-server/plugins/javax.servlet.jsp_2.2.0.v201103241009.jar
install file:/Applications/idempiere-server/plugins/javax.servlet.jsp.jstl_1.2.0.v201105211821.jar

install file:/Applications/OSGi-WHT/plugins/WithHoldingTax_1.0.0.201301192317.jar
install file:/Applications/OSGi-WHT/plugins/WithHoldingTax.Event_1.0.0.201301301521.jar
install file:/Applications/OSGi-LiVE/plugins/LiVE_HR_1.0.0.201302041735.jar
install file:/Applications/OSGi-LiVE/plugins/LiVE_HR.event_1.0.0.201302041735.jar


The version numbering or markings may change depending on repo.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating HR Payroll to iDempiere

Postby red1 » Thu Feb 07, 2013 4:02 pm

The LiVE-HR module is in good progress with the menu and models exportable via 2Pack, embedded in the plugin feature, with clean separation (no messy extra jars such as above). The model of this HR seems more elaborate as it also covers Employee Loan management, Medical and family info, appraisal, training and termination process.

My recent meeting with Heng Sin informed me that the adempiere-client update issue is now solved and i shall test it in a day or two once i test the use of OSGi component (replacing factory extensions as advised by HengSin of its more generic relevance (Extensions is more Equinox dependent)). I am doing that for all the previous plugins too.

We also have a better management console borrowed from Felix that can aid in add hoc installation and removal or management of plugins.
(Just see viewtopic.php?f=33&t=1739)

I will take about a week to do a user case test with the Venezulean team and then we can start on the 2nd phase:
1. Incorporating new Fitnesse story test in OSGi
2. Writing of English manual guide
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating HR Payroll to iDempiere

Postby red1 » Fri Feb 08, 2013 12:50 pm

1. The update from P2 site of adempiere-client confirmed working. I am able to run WithHoldingTax install for example. Previously it couldn't work. This means it can work for any other P2 updating.
2. The Felix control panel also worked for local instance. It will not work if there is some dependency conflict in your new plugin.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating HR Payroll to iDempiere

Postby red1 » Sat Feb 09, 2013 9:59 am

The ModelFactory via OSGi-INF/<component>.xml works with the previous Equinox Extension removed:

Code: Select all
9:43:07.945 ModelFactory.getClass: WITHHOLDING TAX MODEL FACTORY -- Getting class for table: LCO_WithholdingType [51]

This is called by my code in <plugin> > org.idempiere.component > ModelFactory.java:

Code: Select all
   public Class<?> getClass(String tableName) {
      s_log.info("WITHHOLDING TAX MODEL FACTORY -- Getting class for table: " + tableName);

The ModelFactory is copied exactly from HengSin's org.adempiere.base > DefaultModelFactory

BENEFITS:
1. This is OSGi specific and non-Equinox specific so other OSGi containers should be able to use it.
2. Defining individual extensions is more work when this component factory catches all the Model classes.
3. It is faster as it has caching.
4. It can still call the factory class from another bundle as long you depend on that bundle and export your org.idempiere.component back out.

I am introducing the standard of org.idempiere.component as the package to store all Factories as well as Extensions.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating HR Payroll to iDempiere

Postby SETSOFTWARE » Mon Feb 11, 2013 3:47 am

Hello Red1,

I am trying to install your plugins LCO and HR, but I dont know how to do it.
do you have a guide to do it?

I downloaded WithHoldingTaxInstaller but after I ran it inside my IDempiere folder, nothing change. I can't find a Bat installer for HR.

could you give me some advices?
Javier Pérez Villamizar
SET SOFTWARE
www.setsoftware.net
SETSOFTWARE
Regular
 
Posts: 121
Joined: Wed Apr 27, 2011 11:59 am

Re: Migrating HR Payroll to iDempiere

Postby red1 » Wed Feb 13, 2013 2:31 pm

Thank you Javier for been the first to officially ask me this.
If you refer to the first post above, it gives you the WithHoldingTax link which one of the post there stated:
The script to use for that is WithHoldingTaxInstaller.shell script link/

Execute that link in a terminal box under your <Idemipiere-server HOME> or <adempiere-client HOME>. Client Home must be latest as previously it has update error.

Then when you run ./idempiere-server.sh you can 'ss' within the OSGi console to see your added plugins. Or find them in your <HOME>/feature or <HOME>/plugins. Your sh file should not have any digits after the -console argument.

Within the console you can start the Pack In, by typing <start> <bundle-id>. If you want a more background guide you can read the [url=AssetMaintenance-iDempiere.pdf]AssetMaintenance-iDempiere.pdf[/url]. If you can get the AssetMaintenance module to work, then it is the same for all modules after that.

Pray you get success!

** next step **
After installing the WithHoldingTax feature which is a pre-requisite of HR Payroll which is called LiVE_HR here, you then can run the installer for that: LiVE_HR_Installer.sh. Here is the Spanish Manual to help translate into English.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating HR Payroll to iDempiere

Postby red1 » Wed Feb 13, 2013 5:10 pm

Here i list down in more detail the work committed to my SF/red1. Below is the latest and quite final LiVE project tree:

LiVETree.gif
LiVETree.gif (49.51 KiB) Viewed 33186 times

X and I classes are also generated using the 361 project > GenerateModel. Any error of missing ModelFactory is done like below for the case of MLVEPayrollConceptClosed.

XClasses.gif
XClasses.gif (75.5 KiB) Viewed 33167 times

There are now 1 feature set of 2 server-side plugins and a lone Java client plugin:
1. Main LiVE_HR_base plugin that contains all the models, business logic and OSGi xml component for factories.
2. LiVE_HR_ plugin for the ZK UI.
3. LiVE_HR_client for the Java client which contains only a single form extension: VHRActionNotice.
4. LiVE_HR_feature which packages 1 and 2 for <idempiere-server> installation only. You have to manually install the client separately with install <URI of LiVE_HR_client<version>.jar>.

Note under the org. idempiere.component package is placed all the extensions for Callouts, Models (with main ModelFactory register), DocFactoryHRProcess which is an Accounts posting Doc factory.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating HR Payroll to iDempiere

Postby red1 » Sat Mar 09, 2013 1:29 pm

Now I am in Jakarta of Java island, with Edwin Ang (who had helped Fixed Assets incorporated into iDempiere core), working with him to incorporate present best practice in converting SQL strings to use StringBuilder that is known to cost less overhead during processing. Below is an example of finished conversion we are working on:

Code: Select all
                  StringBuilder sqllca = new StringBuilder();
                  if (wrc.isUseWithholdingCategory() && wrc.isUseProductTaxCategory()) {
                     // base = lines of the withholding category and tax category
                     sqllca.append(
                        "SELECT SUM (LineNetAmt) "
                        ).append( "  FROM C_InvoiceLine il "
                        ).append( " WHERE IsActive='Y' AND C_Invoice_ID = ? "
                        ).append( "   AND (   EXISTS ( "
                        ).append( "              SELECT 1 "
                        ).append( "                FROM M_Product p "
                        ).append( "               WHERE il.M_Product_ID = p.M_Product_ID "
                        ).append( "                 AND p.C_TaxCategory_ID = ? "
                        ).append( "                 AND p.LCO_WithholdingCategory_ID = ?) "
                        ).append( "        OR EXISTS ( "
                        ).append( "              SELECT 1 "
                        ).append( "                FROM C_Charge c "
                        ).append( "               WHERE il.C_Charge_ID = c.C_Charge_ID "
                        ).append( "                 AND c.C_TaxCategory_ID = ? "
                        ).append( "                 AND c.LCO_WithholdingCategory_ID = ?) "
                        ).append( "       ) ");


While preparing for the HR Payroll User Guide, we are preparing a full English termed sample converted from the Venezuelan one by DoubleClick. Below is an example in progress:

HREnglish.gif
HREnglish.gif (143.3 KiB) Viewed 33003 times

This may take a week or so with 4 members of his staff and we intend to extract out the Venezuelan client as a 2Pack or migration script folder for users.

Edwin, who has experience in his previous Oracle Supply Chain consulting, will also assist in getting Manufacturing TOC and the present BOM structure of Light Manufacturing reviewed so we can convert them into iDempiere plugins too.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating HR Payroll to iDempiere

Postby globalqss » Mon Mar 11, 2013 10:59 pm

Thanks Redhuan,

Please note that is recommended that constant String are not moved to StringBuilder/Buffer.

We documented the suggested criteria to apply at:
http://jira.idempiere.com/browse/IDEMPI ... ment-11519

Regards,

Carlos Ruiz
globalqss
Senior
 
Posts: 599
Joined: Thu Dec 29, 2005 4:15 am
Location: Bogotá, Colombia

Re: Migrating HR Payroll to iDempiere

Postby edwinang » Tue Mar 19, 2013 7:33 am

A little update:
Me and Tonny has just met last night and discuss about the design for HR system. Some of the results are:
1. Re-use of Rule Engine
He gave a good argument. Using rule engine surely is coding at meta data. But it allows us to define different scripts for different clients. If we put it into codes then we will have to hardcode AD_Client_ID into the logic.
2. Our priority is HR Foundation module and Payroll module.
3. He also gave me a good long explanation the HR modules. That's the goodness of having an experienced guy with you. Getting all those knowledge will take me years :)

I am hoping to get something to show and test in one week. Will make a new bitbucket repo for this.

Regards,

Edwin Ang
edwinang
 
Posts: 35
Joined: Tue Jul 05, 2011 11:00 pm

Re: Migrating HR Payroll to iDempiere

Postby red1 » Tue Mar 19, 2013 8:20 am

Great, so this strengthen my continuance of LiVE as it is. I am setting to do the LiVE User/Developer Guide this week (has been long delayed due to travel and food tasting activities :) ).

I am working with your fork of LiVE as it makes sense to refactor whenever possible and remove unused code. I will still export the Rules within 2Pack at least as a temporal reference and we can eventually clear them as they are under a specific EntityType and we can define new rules under say 'Applications' entityType.

This use of Rules metadata vs localised plugins can be a good experiment to see which is more elegant and practical.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating HR Payroll to iDempiere

Postby globalqss » Tue Mar 19, 2013 9:07 am

Redhuan / Edwin - now that you're reconsidering this design I want to share with you what happened with LCO magnetic media reports.

Initially I developed the magnetic media reports just to be extended via rules (like payroll) - and it worked fine until I arrived to a customer with lots of data.

The overhead of compiling interpreted languages is prohibitive when you're dealing with many iterations on many records - which is the case of payroll concepts with many employees. Suppose the case of a payroll with 100 rules and 10.000 employees - that means to run the payroll the rule engine must calculate 1.000.000 times.

Then I changed my LCO magnetic media approach to support both - if the user defines a java class then that's used - if the user defines a beanshell: - then rules are used.

Regards,

Carlos Ruiz
globalqss
Senior
 
Posts: 599
Joined: Thu Dec 29, 2005 4:15 am
Location: Bogotá, Colombia

Re: Migrating HR Payroll to iDempiere

Postby red1 » Sun Mar 24, 2013 12:11 am

I have converted LiberoHR as maintainted by Carlos Ruiz under ADempiere 361 for plugin into iDempiere. There is an embedded 2Pack (LiberoHR.zip) that automatically activates the HR Menu and functions inside iDempiere. This can be used instead of the more 'advanced' LiVE plugin.

This LiberoHR plugin is independent of WithholdingTax and has no mixed UI thus can be used in both Client as well as Server-side. Easiest way to use it is to launch your iDempiere
> Go to console:
Code: Select all
install http://downloads.sourceforge.net/project/red1/p2/LiVE_HR/LiberoHR_plugin.jar
start <bundle ID>

>Wait a minute then proceed to Login as GardenWorld and do Role Access Update
>Relogin and use right away.

DEVELOPER'S NOTE
You can download the plugin source as well as the other resources from http://bitbucket.org/red1/liberohr or just refer to http://sourceforge.net/projects/red1/files/p2/LiVE_HR for the finished uploads.

The decision to convert the LiberoHR as such is arrived after some rethinking with Edwin Ang of Jakarta. We ought to have a basic core LiberoHR plugin and the LiVE from Venezuela can be a further plugin to that as it has more elaborate functionals that are peculiar to its own localisation. From there we can then deduce other countries localisations while maintaining a core to do the most common functions. This will bode well in the long term for maintaining it as a community.

Later i will separate the LiberoHR core from LiVE so it remains as a pure add-on. I hope to write a bit about how to do own country localization with the LiVE example while giving a basic user guide to LiberoHR as a core.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating HR Payroll to iDempiere

Postby red1 » Wed Apr 17, 2013 1:32 pm

The testing and release of the core LiberoHR plugin is done now as explained above. You can check again from the links above. I have written and uploaded a fully illustrated guide - LiberoHR.pdf here.
If you have any feedback or wish to collaborate to add your localised plugin on it, which requires this core to improve for universal situations, please tell me here or write to me red1@red1.org. Your cooperation is much appreciated to make iDempiere HRM something like OrangeHRM.
For that, DoubleClick of Venezuela is working closely with me on the LiVE plugin and my constant requirement to them is to make it as generic as possible, separating what is core and universal from what is local to Venezuela. That means for Venezuela it will be 3 plugins = LiberoHR + LiVE + Venezuela Localisation. This is a long tedious process and we just have to do it so that everyone around the world can benefit and this means your own HRM will be sustainable in the long run.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating HR Payroll to iDempiere

Postby red1 » Thu Apr 18, 2013 8:15 am

Carlos Ruiz informed me that he is fixing bugs and making changes to his adempiereHR repository. Thus i am following it and porting back his changes to mine at red1/liberohr. Then i will release the changes into the final repository of https://sourceforge.net/projects/red1/files/p2/LiVE_HR/
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Re: Migrating HR Payroll to iDempiere

Postby jdcs » Wed Apr 24, 2013 2:59 pm

I have been implementing the LiberoHR for a company having 1,200+ employees in 12 branches and 130 sub branches. The module is really flexible enough to address payroll need of a business as it responded to my case which is complex. I have only the following issues to be seen:

Setup

1. Usually people assigned to the same job (level) have similar Employee Attributes – thus it is good to have attributes setup at Job level and have it copied to people assigned to such job by just a click of button and may also made automatic updates to several people of same job like “Account Copy” under product category or business partner group.

2. Under one company of the same locality mostly Payroll Concept has one-to-one relationship but in LiberoHR each employee attributes need to be configured per employee/employment – it is good to have a default rule per concept at Payroll Definition level and make any changes at Job and/or employee level

3. LiberoHR allows Duplicate concept to create employee attribute, i.e. an employee may be assigned more than one basic salary or tax

Execution

1. Support for Back Payment for retrospective salary increments – taxable & subject to pension and other deductions

2. Payment of Payroll in cash or bank deposit:

Here is the scenario

Case – Once payroll processed at least four payables happen: Net Salary, Income Tax, Pension, and Other Third-Party Payables. Income Tax & Pension are paid to their respective parties but Net Salary and Other Third-Party Payables are released by name of the employee

How I dealt with

A. Income Tax & Pension – I used GL Distribution on Payroll posting to automatically transfer the Income Tax & Pension payables to Tax & Pension Agencies thus at the end of period make AP Payment to each party referring charges point to Income Tax & Pension Account Elements.
B. Net Salary and Other Third-Party Payables – the case is a bit complex. Checks are prepared by names of Payroll Cashiers to make the payment within seven days against signature on payroll sheets and deposit the uncollected balance to common bank account. I considered the following options to handle the payment:

a. Use Cash Journal – Cash Journal _A = _ Bank Transfer to Cashier (BP), Cash Journal _B =] Lines 10-N -> [Net Salary and Other Third-Party Payable] Charge, BP=Employee, Amount = -Ve and Last N+10 to Deposit Remaining Balance – Note that I added Business Partner to Cash Journal Line.

b. Create an AP Invoice Document Type _ Write AP Payment to Cashier, Prepare the AP Invoice – Header BP =Cashier & Lines_ [Net Salary and Other Third-Party Payable] Charge, BP=Employee, Amount = +Ve, AR Receipt of Remaining Balance from Cashier and finally Allocation of the three – Note that I added Business Partner to Invoice Line.

C. Both options work but tedious. It is good to have processes to Copy Payroll Movement/Concepts to cash journal lines and/or invoice lines filtered by Payroll Process (Mandatory) / Concept (Mandatory)/Department(optional)/Employee (optional) with restrictions like what is on bank reconciliation/statement to avoid double treatment.

3. Support for Bonus as Payroll which is only subject to Income Tax Concept =] Net Payable = {Base = Salary * Rate} - Income Tax
jdcs
 
Posts: 38
Joined: Sat Aug 06, 2011 11:46 pm

Re: Migrating HR Payroll to iDempiere

Postby red1 » Tue Jun 18, 2013 4:56 am

Thanks for your valuable feedback on your own ADempiere use of Libero Payroll. I am now in Venezuela with the LiVE team under DCS to discuss improvements or add-on to the Libero Payroll. They say that most of your requirements are covered by the proposed LiVE. But we got one question about performance. How long or time in minutes does it take to process your monthly payroll case? You can read above Carlos Ruiz's remark that meta-data rule setting can be slow when running for many employees.
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Next

Return to iDempiere

Who is online

Users browsing this forum: No registered users and 1 guest

cron