Commit b70b5d64 authored by Kevin Deldycke's avatar Kevin Deldycke

Add free text zone (based on description property) to add more detailled info on PaySheets.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11508 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ff124304
......@@ -151,7 +151,7 @@
<stylecmd expr="(\'ALIGNMENT\', (0,0), (5,0), \'CENTER\')"/>\n
<stylecmd expr="(\'ALIGNMENT\', (0,1), (5,1), \'RIGHT\')"/>\n
\n
<stylecmd expr="(\'OUTLINE\', (-1,0), (-1,0), 0.1, (0.4,0.4,0.4))"/>\n
<!--stylecmd expr="(\'OUTLINE\', (-1,0), (-1,0), 0.1, (0.4,0.4,0.4))"/-->\n
</tablestyle>\n
\n
</stylesheet>\n
......@@ -202,7 +202,7 @@
tal:content="python:urssaf.getDefaultAddress().getZipCode() + \' \' + urssaf.getDefaultAddress().getCity()"\n
tal:on-error="string:"/>\n
<infostring z=\'\' color=\'(0.0,0.0,0.0)\' align=\'left\' y=\'21.33283216cm\' x=\'1.27cm\' font=\'Helvetica\' size=\'8\'\n
tal:content="python: \'Convention collective de branche : %s\' % employee.getDefaultCareerCollectiveAgreementTitle()"\n
tal:content="python: \'Convention collective de branche : Syntec\' # % employee.getDefaultCareerCollectiveAgreementTitle()"\n
tal:on-error="string:"/>\n
</tal:block>\n
</tal:block>\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</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 encoding="cdata"><![CDATA[
# Global params\n
\n
MAX_LENGHT = max_len\n
word_sep_list = [" ", "-"]\n
line_sep_list = ["\\n"]\n
\n
\n
# Core\n
lines = []\n
\n
if text in [\'\', None]:\n
return lines\n
\n
# Cut lines by inconditionnal line separators\n
lines = [text]\n
for line_sep in line_sep_list:\n
tmp_lines = []\n
for tmp_line in lines:\n
tmp_lines += text.split(line_sep)\n
lines = tmp_lines\n
\n
# Cut long lines to not excess max_chars\n
final_lines = []\n
for line in lines:\n
line_words = []\n
\n
# Break line in words atoms\n
new_word = \'\'\n
for char in line:\n
new_word += char\n
if char in word_sep_list: \n
line_words.append(new_word) \n
new_word = \'\'\n
line_words.append(new_word)\n
\n
# Assemble words to not excess max_chars\n
new_line = \'\'\n
for word in line_words:\n
if len(new_line) + len(word) <= MAX_LENGHT:\n
new_line += word\n
else:\n
final_lines.append(new_line)\n
new_line = word\n
final_lines.append(new_line)\n
\n
\n
return final_lines\n
]]></string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>text=None, max_len=80</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>text</string>
<string>max_len</string>
<string>MAX_LENGHT</string>
<string>word_sep_list</string>
<string>line_sep_list</string>
<string>lines</string>
<string>None</string>
<string>_getiter_</string>
<string>line_sep</string>
<string>tmp_lines</string>
<string>tmp_line</string>
<string>_getattr_</string>
<string>final_lines</string>
<string>line</string>
<string>line_words</string>
<string>new_word</string>
<string>char</string>
<string>new_line</string>
<string>word</string>
<string>len</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<none/>
<int>80</int>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PaySheetTransaction_textSplitter</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -233,9 +233,10 @@
<tal:block tal:condition="python: here.getDescription() not in [\'\', None]">\n
<!-- This table act as a spacer -->\n
<table rowheight="0.2cm"><tr><td> </td></tr></table>\n
<table style="notes">\n
<tr>\n
<td colwidth="19cm"><tal:block replace="python: \'Notes -- %s\' % here.getDescription()"/> </td>\n
<table style="notes" tal:define="line_list python: here.PaySheetTransaction_textSplitter(here.getDescription(), 160)">\n
<tr><td colwidth="19cm">Notes:</td></tr>\n
<tr tal:repeat="line python: line_list">\n
<td><tal:block replace="line"/> </td>\n
</tr>\n
</table>\n
</tal:block>\n
......@@ -260,7 +261,7 @@
<td colwidth="2cm">Net Imposable</td>\n
<td colwidth="2cm">Addendum</td>\n
<td colwidth="1cm"> </td>\n
<td colwidth="6cm"> <tal:block tal:replace="python: \'Dur\xc3\xa9e des d\xc3\xa9lais de pr\xc3\xa9avis : \' + context.PaySheetTransaction_getResignmentLegalDelay()"/></td>\n
<td colwidth="6cm"><!--tal:block tal:replace="python: \'Dur\xc3\xa9e des d\xc3\xa9lais de pr\xc3\xa9avis : \' + context.PaySheetTransaction_getResignmentLegalDelay()"/--> </td>\n
</tr>\n
<tr>\n
<td><tal:block replace="python: yearly_sums[\'gross_salary\']" condition="python: yearly_sums.has_key(\'gross_salary\')"/> </td>\n
......
2006-11-28 Kevin
* Fix "prevoyance" calculation.
* Add free text zone (based on description property) to add more detailled info on PaySheets.
2006-11-27 Kevin
* Make "prevoyance" payroll service accountable.
......
143
\ No newline at end of file
145
\ No newline at end of file
0.2.15
\ No newline at end of file
0.2.16
\ 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