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>
......
......@@ -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