Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
erp5
Commits
2a1af9d0
Commit
2a1af9d0
authored
Jun 27, 2013
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
payroll: fix cumulated taxable net salary in reports
parent
574db1a7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
30 deletions
+21
-30
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_getOtherInformationsDataDict.xml
...n_fr/PaySheetTransaction_getOtherInformationsDataDict.xml
+7
-8
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_getYearToDateSlice.xml
...ayroll_l10n_fr/PaySheetTransaction_getYearToDateSlice.xml
+8
-17
bt5/erp5_payroll_l10n_fr/bt/revision
bt5/erp5_payroll_l10n_fr/bt/revision
+1
-1
product/ERP5/tests/testPayroll_l10n_fr.py
product/ERP5/tests/testPayroll_l10n_fr.py
+5
-4
No files found.
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_getOtherInformationsDataDict.xml
View file @
2a1af9d0
...
@@ -182,13 +182,12 @@ def getPaymentConditionText(paysheet):\n
...
@@ -182,13 +182,12 @@ def getPaymentConditionText(paysheet):\n
date)\n
date)\n
return \'\'\n
return \'\'\n
\n
\n
gross_salary = getMovementTotalPriceFromCategory(\\
\n
base_contribution = \'base_contribution/base_amount/payroll/report/salary/gross\'
\n
base_contribution=\'base_contribution/base_amount/payroll/report/salary/gross\'
,\n
gross_salary = getMovementTotalPriceFromCategory(base_contribution
,\n
contribution_share=\'contribution_share/employee\')\n
contribution_share=\'contribution_share/employee\')\n
\n
year_to_date_gross_salary = paysheet.PaySheetTransaction_getYearToDateSlice(base_contribution)\n
year_to_date_gross_salary = paysheet.PaySheetTransaction_getYearToDateSlice()\n
year_to_date_slice_a = paysheet.PaySheetTransaction_getYearToDateSlice(base_contribution, \'salary_range/france/tranche_a\')\n
year_to_date_slice_a = paysheet.PaySheetTransaction_getYearToDateSlice(\'salary_range/france/tranche_a\')\n
year_to_date_slice_b = paysheet.PaySheetTransaction_getYearToDateSlice(base_contribution, \'salary_range/france/tranche_b\')\n
year_to_date_slice_b = paysheet.PaySheetTransaction_getYearToDateSlice(\'salary_range/france/tranche_b\')\n
\n
\n
worked_hour_count = paysheet.getWorkTimeAnnotationLineQuantity(0)\n
worked_hour_count = paysheet.getWorkTimeAnnotationLineQuantity(0)\n
year_to_date_worked_hour_count = worked_hour_count + \\\n
year_to_date_worked_hour_count = worked_hour_count + \\\n
...
@@ -208,8 +207,8 @@ year_to_date_bonus_worked_hour_amount = portal.PaySheetTransaction_getYearToDate
...
@@ -208,8 +207,8 @@ year_to_date_bonus_worked_hour_amount = portal.PaySheetTransaction_getYearToDate
base_contribution=\'base_contribution/base_amount/payroll/report/overtime\', \\\n
base_contribution=\'base_contribution/base_amount/payroll/report/overtime\', \\\n
contribution_share=\'contribution_share/employee\') or 0\n
contribution_share=\'contribution_share/employee\') or 0\n
\n
\n
year_to_date_taxable_net_salary = p
ortal.PaySheetTransaction_getYearToDateBaseContributionTotalPrice(\\
\n
year_to_date_taxable_net_salary = p
aysheet.PaySheetTransaction_getYearToDateSlice(
\n
paysheet=paysheet, base_contribution_list=\'payroll/report/salary/net\') + salaire_net_imposable
\n
\'base_contribution/base_amount/payroll/base/income_tax\')
\n
\n
\n
def unicodeDict(d):\n
def unicodeDict(d):\n
for k, v in d.items():\n
for k, v in d.items():\n
...
...
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_getYearToDateSlice.xml
View file @
2a1af9d0
...
@@ -50,9 +50,7 @@
...
@@ -50,9 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
<value>
<string>
\'\'\'\n
\'\'\'\n
This script get year to date amount for the slice corresponding to slice_path\n
This script get year to date amount for the slice corresponding to slice_path\n
of the model.\n
of the model.\n
\'\'\'\n
\'\'\'\n
...
@@ -73,12 +71,12 @@ paysheet_list = [r.getObject() for r in accounting_module.searchFolder(**search_
...
@@ -73,12 +71,12 @@ paysheet_list = [r.getObject() for r in accounting_module.searchFolder(**search_
paysheet_list.append(context)\n
paysheet_list.append(context)\n
yearly_slice_amount = 0\n
yearly_slice_amount = 0\n
\n
\n
for paysheet in paysheet_list
:\n
for paysheet in paysheet_list:\n
gross_salary=paysheet.PaySheetTransaction_getMovementTotalPriceFromCategory(\\
\n
salary = paysheet.PaySheetTransaction_getMovementTotalPriceFromCategory(
\n
base_contribution=
\'base_contribution/base_amount/payroll/report/salary/gross\'
,\n
base_contribution=
base_contribution
,\n
contribution_share=\'contribution_share/employee\')\n
contribution_share=\'contribution_share/employee\')\n
if slice_path is None:\n
if slice_path is None:\n
yearly_slice_amount +=
gross_
salary\n
yearly_slice_amount += salary\n
continue\n
continue\n
model = paysheet.getSpecialiseValue().getEffectiveModel(\\\n
model = paysheet.getSpecialiseValue().getEffectiveModel(\\\n
start_date=paysheet.getStartDate(),\n
start_date=paysheet.getStartDate(),\n
...
@@ -89,21 +87,14 @@ for paysheet in paysheet_list :\n
...
@@ -89,21 +87,14 @@ for paysheet in paysheet_list :\n
return 0.0\n
return 0.0\n
plafond_max = slice.getQuantityRangeMax()\n
plafond_max = slice.getQuantityRangeMax()\n
plafond_min = slice.getQuantityRangeMin()\n
plafond_min = slice.getQuantityRangeMin()\n
slice_amount = 0\n
yearly_slice_amount += min(salary, plafond_max) - plafond_min\n
if gross_salary < plafond_max:\n
slice_amount = gross_salary - plafond_min\n
else:\n
slice_amount = plafond_max - plafond_min\n
yearly_slice_amount += slice_amount\n
\n
\n
return yearly_slice_amount\n
return yearly_slice_amount\n
</string>
</value>
]]>
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
slice_path=None
</string>
</value>
<value>
<string>
base_contribution,
slice_path=None
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_payroll_l10n_fr/bt/revision
View file @
2a1af9d0
141
142
\ No newline at end of file
\ No newline at end of file
product/ERP5/tests/testPayroll_l10n_fr.py
View file @
2a1af9d0
...
@@ -77,6 +77,7 @@ class TestPayroll_l10n_fr(TestPayrollMixin):
...
@@ -77,6 +77,7 @@ class TestPayroll_l10n_fr(TestPayrollMixin):
paysheet
.
stop
()
paysheet
.
stop
()
self
.
tic
()
self
.
tic
()
base_contribution
=
'base_contribution/base_amount/payroll/report/salary/gross'
# here, check how much is contributed to the slices
# here, check how much is contributed to the slices
# the slices defined for this tax are :
# the slices defined for this tax are :
# - 0 to 200
# - 0 to 200
...
@@ -84,14 +85,14 @@ class TestPayroll_l10n_fr(TestPayrollMixin):
...
@@ -84,14 +85,14 @@ class TestPayroll_l10n_fr(TestPayrollMixin):
# - 400 to 5000
# - 400 to 5000
# the salary is of 3000
# the salary is of 3000
self
.
assertEquals
(
400
,
# 200 from the 1st paysheet + 200 from the 2e
self
.
assertEquals
(
400
,
# 200 from the 1st paysheet + 200 from the 2e
paysheet_list
[
1
].
PaySheetTransaction_getYearToDateSlice
(
\
paysheet_list
[
1
].
PaySheetTransaction_getYearToDateSlice
(
'salary_range/france/slice_0_to_200'
))
base_contribution
,
'salary_range/france/slice_0_to_200'
))
self
.
assertEquals
(
400
,
# 200 from the 1st paysheet + 200 from the 2e
self
.
assertEquals
(
400
,
# 200 from the 1st paysheet + 200 from the 2e
paysheet_list
[
1
].
PaySheetTransaction_getYearToDateSlice
(
\
paysheet_list
[
1
].
PaySheetTransaction_getYearToDateSlice
(
\
'salary_range/france/slice_200_to_400'
))
base_contribution
,
'salary_range/france/slice_200_to_400'
))
self
.
assertEquals
(
5200
,
# (3000 - 400)*2
self
.
assertEquals
(
5200
,
# (3000 - 400)*2
paysheet_list
[
1
].
PaySheetTransaction_getYearToDateSlice
(
\
paysheet_list
[
1
].
PaySheetTransaction_getYearToDateSlice
(
\
'salary_range/france/slice_400_to_5000'
))
base_contribution
,
'salary_range/france/slice_400_to_5000'
))
def
test_01_getYearToDateSlice
(
self
):
def
test_01_getYearToDateSlice
(
self
):
'''Check that is possible to calculate the total amount spend on a slice
'''Check that is possible to calculate the total amount spend on a slice
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment