-
Notifications
You must be signed in to change notification settings - Fork 0
Implement OTP for multiple subunits #463
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
base: master
Are you sure you want to change the base?
Conversation
9f2309f to
4e569a2
Compare
4e569a2 to
ad753e0
Compare
| virksomhet_otp_amounts[virksomhet_id] = 0; | ||
| } | ||
|
|
||
| function refreshSelectedWorkRelations() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of looping though all, pass an element and affect the object that keeps track of what is selected and call the function to render current subunits' OTP, same for salaries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| } | ||
|
|
||
| function generateOTPInputsFromSelectedSalaries() { | ||
| refreshSelectedSalaries(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be removed after the above change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| var used_virksomhets = []; | ||
| for(var salary_id in salary_virksomhet_array) { | ||
| virksomhet_id = salary_virksomhet_array[salary_id]; | ||
| if (salary_selected[salary_id]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update based on looping though selected salaries to set its subunit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| } | ||
| for(var work_relation_id in work_relation_virksomhet_array) { | ||
| virksomhet_id = work_relation_virksomhet_array[work_relation_id]; | ||
| if (work_relations_selected[work_relation_id]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as for salaries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| } | ||
| } | ||
|
|
||
| $(document).ready(function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| $query_altinn = "select * from $db_table order by AltinnReport1ID"; | ||
| $result = $_lib['db']->db_query($query_altinn); | ||
|
|
||
| $salary_workrelation_array = array(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to move all js related stuff to one file and unify the php vars needed for it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
51af370 to
25b7794
Compare
25b7794 to
8fe94e8
Compare
| } | ||
| foreach($this->pension as $zone_tax) { | ||
| $sumArbeidsgiveravgift += $zone_tax['avgiftsgrunnlagBeloep'] * $zone_tax['prosentsatsForAvgiftsberegning']/100.0; | ||
| if (!empty($this->pension[$key_subcompany])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check this part of the code
|
Fixed AGA calculation and tested it |
02655ad to
b22795b
Compare
|
Closes #350