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

Payroll: optimize current payday remainders #906

Conversation

Projects
None yet
2 participants
@sohkai
Copy link
Member

commented Jul 5, 2019

Inlines _updateEmployeeLastPayrollDate() and optimizes a bit of the math / SSTOREs.

@sohkai sohkai requested a review from facuspagnuolo Jul 5, 2019

@facuspagnuolo
Copy link
Contributor

left a comment

Much clearer! Thanks @sohkai :)

if (extraSalary > 0) {
timeDiff.add(1);
employee.accruedSalary = extraSalary;
} else if (accruedSalary > 0) {

This comment has been minimized.

Copy link
@facuspagnuolo

facuspagnuolo Jul 5, 2019

Contributor

I think we already checked that the accrued salary is greater than zero in L651, we can do an else here simply

This comment has been minimized.

Copy link
@sohkai

sohkai Jul 5, 2019

Author Member

Ah yes, this is to avoid touching the storage at all if accuredSalary was 0 from the start.

@facuspagnuolo facuspagnuolo merged commit 5bd0156 into payroll/floor_payday_paid_amount Jul 5, 2019

2 of 5 checks passed

Travis CI - Branch Build Failed
Details
Travis CI - Pull Request Build Failed
Details
License Compliance FOSSA is analyzing this commit
Details
WIP Ready for review
Details
license/cla Contributor License Agreement is signed.
Details

@facuspagnuolo facuspagnuolo deleted the payroll/floor_payday_paid_amount_2 branch Jul 5, 2019

facuspagnuolo added a commit that referenced this pull request Jul 5, 2019

facuspagnuolo added a commit that referenced this pull request Jul 5, 2019

facuspagnuolo added a commit that referenced this pull request Jul 7, 2019

Payroll: Add payroll remainders as accrued salary (#903)
* payroll: add payday remainders as accrued salary

* payroll: optimize current payday remainders (#906)

* payroll: fix payroll maths

facuspagnuolo added a commit that referenced this pull request Jul 7, 2019

Payroll: Add payroll remainders as accrued salary (#907)
* payroll: use PPF rate precision

* payroll: optimize rate calculation

* payroll: add payday remainders as accrued salary

* payroll: optimize current payday remainders (#906)

* payroll: fix payroll maths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.