Commit f5a38d4a authored by Kevin Deldycke's avatar Kevin Deldycke

Show pay sheet line comments on PDF

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10961 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 356d5956
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.ActionInformation</string>
<string>ActionInformation</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_print</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>print_pdf</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>10.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Print</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Base_printPdf</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -218,7 +218,7 @@ for psl in context.objectValues(portal_type=\'Pay Sheet Line\'):\n
, \'employee_rate\' : None # Employee Share Rate, if any (Taux part salariale)\n
, \'employee_share\' : None # Employee Share (Part salariale)\n
, \'taxable\' : taxable\n
# , \'description\' : None # Comment\n
, \'description\' : None\n
# , \'service_id\' : None # Service ID\n
# , \'salary_range\' : None # Salary Range\n
# , \'tax_category\' : None # Tax Category\n
......@@ -242,6 +242,7 @@ r_ = lambda x: context.Base_getRoundValue(x, currency_precision)\n
\n
# Scan each pay sheet line and save it in the right place in the data structure\n
for psl in context.objectValues(portal_type=\'Pay Sheet Line\'):\n
line_description = psl.getDescription()\n
# Add each cell to the data structure\n
for cell in psl.objectValues(portal_type=\'Pay Sheet Cell\'):\n
# There is no getSalaryRangeList() accessor on cells, so sort categories manually\n
......@@ -264,6 +265,17 @@ for psl in context.objectValues(portal_type=\'Pay Sheet Line\'):\n
range_type = \'/\'.join(salary_range_path.split(\'/\')[2:]) # \'fixed\', \'fixed/gross\', \'variable\'...\n
share_type = tax_category_path.split(\'/\')[-1] # \'employee_share\' or \'employer_share\'\n
share_type = share_type.split(\'_\')[0] # \'employee\' or \'employer\'\n
\n
# Update description\n
if line_description != None:\n
# Transform description as one line string\n
line_description = line_description.replace(\'\\n\', \' \').strip().capitalize()\n
if len(line_description) > 0:\n
updateSubLine( group_id = cell_group_id\n
, subline_id = cell_subline_id\n
, property = \'description\'\n
, value = \'(%s)\' % line_description\n
)\n
\n
### Gross salary group handling\n
if range_type.startswith("fixed/gross"):\n
......@@ -497,6 +509,7 @@ return details\n
<string>old_group</string>
<string>currency_precision</string>
<string>r_</string>
<string>line_description</string>
<string>cell</string>
<string>tax_category_path</string>
<string>c</string>
......@@ -504,6 +517,7 @@ return details\n
<string>cell_subline_id</string>
<string>range_type</string>
<string>share_type</string>
<string>len</string>
<string>cell_value</string>
<string>cell_rate</string>
<string>cell_base</string>
......
......@@ -61,6 +61,40 @@
<title>Pay Sheet</title>\n
<author>Nexedi ERP5</author>\n
<subject>Pay Sheet</subject>\n
\n
\n
<tal:block tal:replace="nothing"><!--\n
This macro render a line\n
--></tal:block>\n
<tal:block metal:define-macro="renderLine">\n
<tal:block define="line line | nothing" condition="line">\n
<tr stylecmd="(\'LEFTPADDING\',8)">\n
<td><tal:block content="python: (\' \' * 3) + line[\'service_title\']"/> </td>\n
<td><tal:block content="python: line[\'salary_range_title\']"/> </td>\n
<td><tal:block content="python: line[\'base\']"\n
condition="python: line[\'base\'] != None"/> </td>\n
<td><tal:block content="python: line[\'employer_rate\']"\n
condition="python: line[\'employer_rate\'] != None"/> </td>\n
<td><tal:block content="python: line[\'employer_share\']"\n
condition="python: line[\'employer_share\'] != None"/> </td>\n
<td><tal:block content="python: line[\'employee_rate\']"\n
condition="python: line[\'employee_rate\'] != None"/> </td>\n
<td><tal:block content="python: line[\'employee_share\']"\n
condition="python: line[\'employee_share\'] != None"/> </td>\n
</tr>\n
<tr tal:condition="python: line[\'description\'] != None" stylecmd="(\'LEFTPADDING\',8)">\n
<td><tal:block content="python: (\' \' * 6) + line[\'description\']"/> </td>\n
<td> </td>\n
<td> </td>\n
<td> </td>\n
<td> </td>\n
<td> </td>\n
<td> </td>\n
</tr>\n
</tal:block>\n
</tal:block>\n
\n
\n
<content>\n
<table splitbyrow="1" rowheight=\'0.4cm\' repeatrows="1" repeatcols="0" style="decompte">\n
<tr>\n
......@@ -84,20 +118,9 @@
<td> </td>\n
<td> </td>\n
</tr>\n
<tr tal:repeat="line python: group[\'sublines\']" stylecmd="(\'LEFTPADDING\',8)">\n
<td><tal:block content="python: \' \' + line[\'service_title\']"/> </td>\n
<td><tal:block content="python: line[\'salary_range_title\']"/> </td>\n
<td><tal:block content="python: line[\'base\']"\n
condition="python: line[\'base\'] != None"/> </td>\n
<td><tal:block content="python: line[\'employer_rate\']"\n
condition="python: line[\'employer_rate\'] != None"/> </td>\n
<td><tal:block content="python: line[\'employer_share\']"\n
condition="python: line[\'employer_share\'] != None"/> </td>\n
<td><tal:block content="python: line[\'employee_rate\']"\n
condition="python: line[\'employee_rate\'] != None"/> </td>\n
<td><tal:block content="python: line[\'employee_share\']"\n
condition="python: line[\'employee_share\'] != None"/> </td>\n
</tr>\n
<tal:block tal:repeat="line python: group[\'sublines\']">\n
<tal:block metal:use-macro="here/PaySheetTransaction_viewPaySheetTransactionAsPDF/macros/renderLine"/>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
\n
......@@ -123,20 +146,9 @@
<td> </td>\n
<td> </td>\n
</tr>\n
<tr tal:repeat="line python: group[\'sublines\']" stylecmd="(\'LEFTPADDING\',8)">\n
<td><tal:block content="python: \' \' + line[\'service_title\']"/> </td>\n
<td><tal:block content="python: line[\'salary_range_title\']"/> </td>\n
<td><tal:block content="python: line[\'base\']"\n
condition="python: line[\'base\'] != None"/> </td>\n
<td><tal:block content="python: line[\'employer_rate\']"\n
condition="python: line[\'employer_rate\'] != None"/> </td>\n
<td><tal:block content="python: line[\'employer_share\']"\n
condition="python: line[\'employer_share\'] != None"/> </td>\n
<td><tal:block content="python: line[\'employee_rate\']"\n
condition="python: line[\'employee_rate\'] != None"/> </td>\n
<td><tal:block content="python: line[\'employee_share\']"\n
condition="python: line[\'employee_share\'] != None"/> </td>\n
</tr>\n
<tal:block tal:repeat="line python: group[\'sublines\']">\n
<tal:block metal:use-macro="here/PaySheetTransaction_viewPaySheetTransactionAsPDF/macros/renderLine"/>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
\n
......@@ -165,20 +177,9 @@
<tal:block repeat="group python: details[\'groups\']">\n
<tal:block condition="python: group[\'id\'] not in [GROSS_SALARY_GROUP_ID, ADDENDUM_GROUP_ID]"\n
repeat="line python: group[\'sublines\']">\n
<tr tal:condition="python: line[\'taxable\'] == True" stylecmd="(\'LEFTPADDING\',8)">\n
<td><tal:block content="python: \' \' + line[\'service_title\']"/> </td>\n
<td><tal:block content="python: line[\'salary_range_title\']"/> </td>\n
<td><tal:block content="python: line[\'base\']"\n
condition="python: line[\'base\'] != None"/> </td>\n
<td><tal:block content="python: line[\'employer_rate\']"\n
condition="python: line[\'employer_rate\'] != None"/> </td>\n
<td><tal:block content="python: line[\'employer_share\']"\n
condition="python: line[\'employer_share\'] != None"/> </td>\n
<td><tal:block content="python: line[\'employee_rate\']"\n
condition="python: line[\'employee_rate\'] != None"/> </td>\n
<td><tal:block content="python: line[\'employee_share\']"\n
condition="python: line[\'employee_share\'] != None"/> </td>\n
</tr>\n
<tal:block tal:condition="python: line[\'taxable\'] == True">\n
<tal:block metal:use-macro="here/PaySheetTransaction_viewPaySheetTransactionAsPDF/macros/renderLine"/>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
\n
......@@ -196,8 +197,6 @@
\n
<!-- This table act as a spacer -->\n
<table rowheight="0.6cm"><tr><td> </td></tr></table>\n
\n
<h1>Payment</h1>\n
\n
<tal:block repeat="group python: details[\'groups\']">\n
<table splitbyrow="1" rowheight=\'0.4cm\' repeatrows="1" repeatcols="0" style="decompte"\n
......@@ -211,6 +210,7 @@
<td colwidth="2.397cm"> </td>\n
<td colwidth="1.959cm">Montant</td>\n
</tr>\n
\n
<tr tal:attributes="stylecmd boldstyle">\n
<td>Salaire Net</td>\n
<td> </td>\n
......@@ -221,6 +221,7 @@
<td><tal:block replace="python: details[\'totals\'][\'net_salary\']"\n
condition="python: details[\'totals\'].has_key(\'net_salary\')"/> </td>\n
</tr>\n
\n
<tr tal:attributes="stylecmd boldstyle">\n
<td tal:content="python: group[\'title\']"> </td>\n
<td> </td>\n
......@@ -230,20 +231,10 @@
<td> </td>\n
<td> </td>\n
</tr>\n
<tr tal:repeat="line python: group[\'sublines\']" stylecmd="(\'LEFTPADDING\',8)">\n
<td><tal:block content="python: \' \' + line[\'service_title\']"/> </td>\n
<td><tal:block content="python: line[\'salary_range_title\']"/> </td>\n
<td><tal:block content="python: line[\'base\']"\n
condition="python: line[\'base\'] != None"/> </td>\n
<td><tal:block content="python: line[\'employer_rate\']"\n
condition="python: line[\'employer_rate\'] != None"/> </td>\n
<td><tal:block content="python: line[\'employer_share\']"\n
condition="python: line[\'employer_share\'] != None"/> </td>\n
<td><tal:block content="python: line[\'employee_rate\']"\n
condition="python: line[\'employee_rate\'] != None"/> </td>\n
<td><tal:block content="python: line[\'employee_share\']"\n
condition="python: line[\'employee_share\'] != None"/> </td>\n
</tr>\n
<tal:block repeat="line python: group[\'sublines\']">\n
<tal:block metal:use-macro="here/PaySheetTransaction_viewPaySheetTransactionAsPDF/macros/renderLine"/>\n
</tal:block>\n
\n
<tr tal:attributes="stylecmd boldstyle">\n
<td>Total Addendum</td>\n
<td> </td>\n
......
2006-10-26 Kevin
* Show pay sheet line comments on PDF.
* Calculate taxable grand total on printing.
* Fix french employer rate.
* Fix some UI and fields name.
......
117
\ No newline at end of file
122
\ No newline at end of file
......@@ -5,7 +5,6 @@ Pay Sheet Cell | print_pdf
Pay Sheet Cell | view
Pay Sheet Line | history
Pay Sheet Line | metadata
Pay Sheet Line | print_pdf
Pay Sheet Line | quantity
Pay Sheet Line | view
Pay Sheet Transaction Line | history
......
0.2.8
\ No newline at end of file
0.2.9
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment