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
19ceedfd
Commit
19ceedfd
authored
Mar 12, 2012
by
Aurel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
overtime is no longer defined in annotation line, update report scripts according to new definition
parent
f18a24d3
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
106 additions
and
20 deletions
+106
-20
bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getMovementQuantityFromCategory.xml
...l/PaySheetTransaction_getMovementQuantityFromCategory.xml
+96
-0
bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateOvertimeHours.xml
...ayroll/PaySheetTransaction_getYearToDateOvertimeHours.xml
+2
-13
bt5/erp5_payroll/bt/revision
bt5/erp5_payroll/bt/revision
+1
-1
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_getOtherInformationsDataDict.xml
...n_fr/PaySheetTransaction_getOtherInformationsDataDict.xml
+6
-5
bt5/erp5_payroll_l10n_fr/bt/revision
bt5/erp5_payroll_l10n_fr/bt/revision
+1
-1
No files found.
bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getMovementQuantityFromCategory.xml
0 → 100644
View file @
19ceedfd
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
\'\'\'\n
return the quantity composed by all quantity of paysheet line wich category of\n
category_list parameter is in variation_category_list of the PaySheet line \n
and wich has a base_contribution in the base_contribution_list\n
\'\'\'\n
if excluded_reference_list is None:\n
excluded_reference_list = []\n
\n
total_quantity = 0\n
movement_list = context.getMovementList(portal_type=(\'Pay Sheet Line\', \'Pay Sheet Cell\'))\n
for movement in movement_list:\n
# Reference must be checked on line\n
if excluded_reference_list:\n
if "Cell" in movement.getPortalType():\n
line = movement.getParentValue()\n
else:\n
line = movement\n
if line.getReference() in excluded_reference_list:\n
continue\n
\n
if base_contribution is not None and movement.isMemberOf(base_contribution) or no_base_contribution:\n
\n
# base_contribution is mandatory, but not contribution_share. If contribution_share is\n
# given, search with it, if not, care only about base_contribution\n
if contribution_share is not None and movement.isMemberOf(contribution_share):\n
total_quantity += movement.getQuantity()\n
elif include_empty_contribution and (contribution_share is None or len(movement.getContributionShareList()) == 0):\n
total_quantity += movement.getQuantity()\n
\n
return total_quantity\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
base_contribution=None, contribution_share=None, no_base_contribution=False, include_empty_contribution=True, excluded_reference_list=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
PaySheetTransaction_getMovementQuantityFromCategory
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getYearToDateOvertimeHours.xml
View file @
19ceedfd
...
...
@@ -68,19 +68,8 @@ paysheet_list = accounting_module.searchFolder( **search_params)\n
\n
nb_heures_supp = 0\n
for paysheet in paysheet_list:\n
small_heures_supp = 0\n
big_heures_supp = 0\n
annotation_line = paysheet.getAnnotationLineFromReference(\\\n
reference=\'overtime_small_rate\')\n
if annotation_line is not None :\n
small_heures_supp = annotation_line.getQuantity()\n
\n
annotation_line = paysheet.getAnnotationLineFromReference(\\\n
reference=\'overtime_big_rate\')\n
if annotation_line is not None :\n
big_heures_supp = annotation_line.getQuantity()\n
\n
nb_heures_supp += (small_heures_supp + big_heures_supp)\n
nb_heures_supp += paysheet.PaySheetTransaction_getMovementQuantityFromCategory(\n
\'base_contribution/base_amount/payroll/report/overtime\')\n
\n
return nb_heures_supp\n
</string>
</value>
...
...
bt5/erp5_payroll/bt/revision
View file @
19ceedfd
592
\ No newline at end of file
591
\ No newline at end of file
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_getOtherInformationsDataDict.xml
View file @
19ceedfd
...
...
@@ -113,6 +113,7 @@ def getPriceCurrencyId(currency):\n
return s\n
\n
getMovementTotalPriceFromCategory = paysheet.PaySheetTransaction_getMovementTotalPriceFromCategory\n
getMovementQuantityFromCategory = paysheet.PaySheetTransaction_getMovementQuantityFromCategory\n
\n
salaire_net_imposable = getMovementTotalPriceFromCategory(\\\n
base_contribution=\'base_contribution/base_amount/payroll/base/income_tax\',\n
...
...
@@ -193,11 +194,11 @@ worked_hour_count = paysheet.getWorkTimeAnnotationLineQuantity(0)\n
year_to_date_worked_hour_count = worked_hour_count + \\\n
paysheet.PaySheetTransaction_getYearToDateWorkTimeSalary() or 0\n
\n
over_time_small_rate = paysheet.getAnnotationLineFromReference(reference=\'overtime_small_rate\')\n
over_time_big_rate = paysheet.getAnnotationLineFromReference(reference=\'overtime_big_rate\')\n
bonus_worked_hour_count =
over_time_small_rate is not None and
\\\n
over_time_big_rate is not None and \\
\n
over_time_small_rate.getQuantity() + over_time_big_rate.getQuantity() or 0
\n
#
over_time_small_rate = paysheet.getAnnotationLineFromReference(reference=\'overtime_small_rate\')\n
#
over_time_big_rate = paysheet.getAnnotationLineFromReference(reference=\'overtime_big_rate\')\n
bonus_worked_hour_count =
getMovementQuantityFromCategory(
\\\n
base_contribution=\'base_contribution/base_amount/payroll/report/overtime\')
\n
\n
year_to_date_bonus_worked_hour_count = bonus_worked_hour_count + \\\n
paysheet.PaySheetTransaction_getYearToDateOvertimeHours() or 0\n
\n
...
...
bt5/erp5_payroll_l10n_fr/bt/revision
View file @
19ceedfd
140
\ No newline at end of file
141
\ No newline at end of file
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