Commit 8841e899 authored by Kevin Deldycke's avatar Kevin Deldycke

Support comments on Pay Sheet Lines (usefull for the accountant to add details...

Support comments on Pay Sheet Lines (usefull for the accountant to add details about why he altered one contribution).

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10848 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 939c7f21
......@@ -68,7 +68,9 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>"""\n
<value> <string encoding="cdata"><![CDATA[
"""\n
This script get lines and cells from the PaySheetTransaction_viewPreview Fast Input and\n
contruct the Pay Sheet Lines object according their own data model.\n
TODO: this script is too complicated and should be refactor a little to reduce is uneeded\n
......@@ -90,7 +92,7 @@ for paysheet_item in context.objectValues(portal_type=[\'Pay Sheet Transaction L
context.manage_delObjects(id_list)\n
\n
# This function register all paysheet informations in paysheet lines and cells\n
def createPaySheetItem(title=\'\', res=\'\', dest_org=\'\', cells=[]):\n
def createPaySheetItem(title=\'\', res=\'\', dest_org=\'\', desc=\'\', cells=[]):\n
# Select good cells only\n
good_cells = []\n
for cell in cells:\n
......@@ -106,9 +108,14 @@ def createPaySheetItem(title=\'\', res=\'\', dest_org=\'\', cells=[]):\n
var_cat_list.append(cell["x"])\n
if cell["y"] not in var_cat_list:\n
var_cat_list.append(cell["y"])\n
# Construct the description\n
description = None\n
if len(desc) > 0:\n
description = \'\\n\'.join(desc)\n
# Add a new Pay Sheet Line\n
payline = context.newContent( portal_type = \'Pay Sheet Line\'\n
, title = title\n
, description = description\n
, source = context.getSourceSection()\n
, resource = res\n
, destination_section = dest_org\n
......@@ -163,6 +170,7 @@ for line in listbox:\n
# Check that the service doesn\'t exist\n
if not paysheet_items.has_key(service_id):\n
paysheet_items[service_id] = { \'title\' : service.getTitleOrId()\n
, \'desc\' : []\n
, \'res\' : service.getRelativeUrl()\n
, \'dest_org\': service.getSource()\n
, \'cells\' : []\n
......@@ -204,6 +212,9 @@ for line in listbox:\n
# Add the cell to the conresponding paysheet item\n
if new_cell != None:\n
paysheet_items[service_id][\'cells\'].append(new_cell)\n
# Save the comment as description\n
if line[\'description\'] not in [\'\', None]:\n
paysheet_items[service_id][\'desc\'].append(line[\'description\'])\n
\n
# Create a paysheet item for each service with user data in it\n
for item in paysheet_items.values():\n
......@@ -211,6 +222,7 @@ for item in paysheet_items.values():\n
createPaySheetItem( title = item[\'title\']\n
, res = item[\'res\']\n
, dest_org = item[\'dest_org\']\n
, desc = item[\'desc\']\n
, cells = item[\'cells\']\n
)\n
\n
......@@ -242,7 +254,9 @@ createPaySheetItem( title = \'Salary\'\n
# Return to pay sheet\n
if not(kw.has_key(\'skip_redirect\') and kw[\'skip_redirect\'] == True):\n
return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'?portal_status_message=Pay+sheet+calculation+done.\')\n
</string> </value>
]]></string> </value>
</item>
<item>
<key> <string>_code</string> </key>
......
......@@ -339,11 +339,15 @@
</tuple>
<tuple>
<string>title</string>
<string>Tax Title</string>
<string>Contribution</string>
</tuple>
<tuple>
<string>description</string>
<string>Comment</string>
</tuple>
<tuple>
<string>resource_title</string>
<string>Social Service</string>
<string>Payroll Service</string>
</tuple>
<tuple>
<string>source_section_title</string>
......@@ -456,6 +460,10 @@
<key> <string>not_viewable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>portal_types</string> </key>
<value>
......
......@@ -105,6 +105,7 @@
<string>listbox_employee_share</string>
<string>listbox_employer_share</string>
<string>listbox_tax_category</string>
<string>listbox_description</string>
</list>
</value>
</item>
......
......@@ -337,6 +337,10 @@
<string>employee_share</string>
<string>Employee Share</string>
</tuple>
<tuple>
<string>description</string>
<string>Comment</string>
</tuple>
<tuple>
<string>service_id</string>
<string>Service ID</string>
......@@ -399,6 +403,10 @@
<string>employee_share</string>
<string>Employee Share</string>
</tuple>
<tuple>
<string>description</string>
<string>Comment</string>
</tuple>
<tuple>
<string>service_id</string>
<string>Service ID</string>
......@@ -466,6 +474,10 @@
<string>employee_share</string>
<string>Employee Share</string>
</tuple>
<tuple>
<string>description</string>
<string>Comment</string>
</tuple>
<tuple>
<string>service_id</string>
<string>Service ID</string>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.StandardFields</string>
<string>TextAreaField</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_description</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>line_too_long</string> </key>
<value> <string>A line was too long.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>You entered too many characters.</string> </value>
</item>
<item>
<key> <string>too_many_lines</string> </key>
<value> <string>You entered too many lines.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_linelength</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_lines</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_linelength</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_lines</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>editable_expression</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable_permission</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>editable_role</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_linelength</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_lines</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>not_viewable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>read_only</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Comment</string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>viewable_expression</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>viewable_permission</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>viewable_role</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>35</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -215,7 +215,7 @@
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
......@@ -231,7 +231,7 @@
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
......
......@@ -215,7 +215,7 @@
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
......@@ -231,7 +231,7 @@
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
......
......@@ -215,7 +215,7 @@
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
......
......@@ -253,7 +253,7 @@
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
......
......@@ -2,6 +2,11 @@
* Change matrix box rendering dynamically depending of the type of the contribution.
* Use LinesField instead of StringField to handle tax_category value, which is a list of categories.
* Do not call initializePreview anylonger. Use data from the listbox instead (much more flexible way to analyze data).
* Add new solidarity_day service.
* Reactivate lodging helps contribution.
* De-activate transportation contibution and add comments about how subtile is it to calculate it.
* Executive contributions (APEC) are due to march only.
* Support comments on Pay Sheet Lines (usefull for the accountant to add details about why he altered one contribution).
2006-10-19 Kevin
* Better dynamic display of PaySheet fast input.
......
38
\ No newline at end of file
42
\ 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