Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the database function to get the daily salary #3458

Conversation

Ganzt90
Copy link
Contributor

@Ganzt90 Ganzt90 commented May 18, 2021

Add the database function to get the daily salary, based on the Employee (Business Partner), the payroll process and the date. The function returns the amount of the daily salary payroll concept that is defined in the employee's contract.

Payroll_Contract

@e-Evolution
Copy link
Contributor

Hi Ganzt90

The field for Daily Salary (Concept) and Monthly Salary (Concept) are ids from Payroll Concept Catalog and it is used to know which concept is used to calculate the Daily Salary and Monthly Salary.

So this is not a value if not the record id, this reason because the field had the (Concept) word.

If for any reason you require the calculated values, I recommend adding a column calculated using the concept to bring the last value calculated from the employee's payroll.

@yamelsenih
Copy link
Member

Hi @e-Evolution this function allows get montly and daily salary based on payroll process historic instead current montly or daily salary.

The Employee salary is nice for know the current salary but if you want add it to payroll process and get on reports about historic is necessary some way for get it more easy.

This function is used for reports like Employee historic on Payroll Report.

Best regards

@marcalwestf
Copy link
Collaborator

if I understand it well, this pull request just adds a function.
The function is called with the parameters Business Partner ID, HR ProcessID, and a date.
The date is actually the date up to which the function should search for any given BP in an HR process.

So it is no big issue to have such a function. In the worst case, is it a function one may not need to use.

I will test it on production data.

@marcalwestf
Copy link
Collaborator

Tested the SQL of the function with operational data:
imagen

It delivers the Amount of a HR_Movement for an employee and a HR_Process.
The Contract's and the HR_Movement's Concepts must match.
The date is to yield only amounts of movements before that date.

In short, this function can be used in certain situations, when a HR_Movement's amount is to be known under certain circumstances. This is not delivered by another function, so it has a legit reason to be put forward.

Copy link
Collaborator

@marcalwestf marcalwestf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XML loaded and applied.
Function tested against productive data.

IMHO this PR is valid.

Test passed.

@marcalwestf
Copy link
Collaborator

Build is not successfull.

@marcalwestf
Copy link
Collaborator

@e-Evolution I think the original description by @Ganzt90 can be misunderstood, as it doesn't convey exactly the semantics of the function.

I think that just analyzing the function and its possibilities, it makes sense to accept this PR.

@marcalwestf
Copy link
Collaborator

@Ganzt90 could you see to get the checks passed? Thank you.

@marcalwestf
Copy link
Collaborator

@Ganzt90 could you please remove the conflicts?
Thanks!

@marcalwestf marcalwestf merged commit 5fb9cb2 into adempiere:develop Jun 29, 2021
@marcalwestf marcalwestf deleted the feature/Function_Daily_Salary_by_HR_Procress branch June 29, 2021 00:18
e-Evolution added a commit to e-Evolution/adempiere that referenced this pull request Jul 1, 2021
* develop: (29 commits)
  Add overwrite values from Smart Browser field
  Allows define system events for validation of Standard Request Type
  Validate client
  Add better approach for validation engine
  Add optional value for source price list
  Add support to data type as mapping from entities (adempiere#3476)
  Adding the Weight and Volume field into Sales Order and Purchase Order  Feature/3473 (adempiere#3474)
  Add the database function to get the daily salary (adempiere#3458)
  Error in calculating quantity ordered or reserved for manufacturing order and distribution order  (adempiere#3472)
  Fixed error with missing parameter for Requisition PO Create (adempiere#3475)
  Fixed error with Dependent Entities for Record Access (adempiere#3480)
  Remove deprecated methods for Order (adempiere#3484)
  Fixed error when a Purchase order is voided (adempiere#3449)
  Update MPPForecastDefinitionLine.java
  adempiere#3469 [Bug Report] In the process Generate an Invoice from the Receipt is not validate if an Invoice was generated adempiere#3469 (adempiere#3470)
  adempiere#3467 [Bug Report] Generate Receipt from Invoice process is not validate if was generate a Material Receipt from a previous execution adempiere#3467 (adempiere#3468)
  adempiere#3462 [Bug Report] Total matched invoice qty adempiere#3462 (adempiere#3464)
  Fixed error with translation value for reference
  fix: BP Group getSQlWhere in Forecast Run Create.
  Fixed error with Crosstab for Smart Browser
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants