Commit ff124304 authored by Kevin Deldycke's avatar Kevin Deldycke

Fix "prevoyance" calculation.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11507 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 925df123
......@@ -92,7 +92,9 @@
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>fallback_base_category</string> </key>
......
......@@ -42,6 +42,12 @@
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>syntec_insurance</string> </value>
......@@ -52,7 +58,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Mutuelle Convention Syntec</string> </value>
<value> <string>Mutuelle</string> </value>
</item>
<item>
<key> <string>uid</string> </key>
......
......@@ -88,6 +88,7 @@
<stylecmd expr="(\'BACKGROUND\', (0,1), (-1,-1), (0.95, 0.95, 0.95))"/>\n
<stylecmd expr="(\'TEXTCOLOR\', (0,1), (-1,-1), colors.black)"/>\n
<stylecmd expr="(\'ALIGNMENT\', (-5,1), (-1,-1), \'RIGHT\')"/>\n
<stylecmd expr="(\'FONT\', (0,1), (-1,-1), \'Helvetica\', 7)"/>\n
\n
<!-- Pied de tableau -->\n
<stylecmd expr="(\'BACKGROUND\', (-1,1), (-1,-2), (0.85,0.85,0.85))"/>\n
......@@ -95,9 +96,40 @@
<stylecmd expr="(\'BACKGROUND\', (-1,-1), (-1,-1), (0.75,0.75,0.75))"/>\n
<stylecmd expr="(\'LINEABOVE\', (0,-1), (-1,-1), 0.1, (0.4,0.4,0.4))"/>\n
</tablestyle>\n
\n
<tablestyle name="addendum">\n
<!-- Corps -->\n
<stylecmd expr="(\'FONT\', (0,0), (-1,-1), \'Helvetica\', 7)"/>\n
<stylecmd expr="(\'OUTLINE\', (0,0), (-1,-1), 0.7, (0.4,0.4,0.4))"/>\n
<stylecmd expr="(\'LINEAFTER\', (0,0), (-1,-1), 0.1, (0.4,0.4,0.4))"/>\n
<stylecmd expr="(\'LEFTPADDING\', (0,0), (-1,-1), 4)"/>\n
<stylecmd expr="(\'TOPPADDING\', (0,0), (-1,-1), 2)"/>\n
<stylecmd expr="(\'BOTTOMPADDING\', (0,0), (-1,-1), 2)"/>\n
<stylecmd expr="(\'BACKGROUND\', (0,0), (-1,-1), (0.95, 0.95, 0.95))"/>\n
<stylecmd expr="(\'TEXTCOLOR\', (0,0), (-1,-1), colors.black)"/>\n
<stylecmd expr="(\'ALIGNMENT\', (-5,0), (-1,-1), \'RIGHT\')"/>\n
\n
<!-- Pied de tableau -->\n
<stylecmd expr="(\'BACKGROUND\', (-1,0), (-1,-2), (0.85,0.85,0.85))"/>\n
<stylecmd expr="(\'BACKGROUND\', (0,-1), (-2,-1), (0.85,0.85,0.85))"/>\n
<stylecmd expr="(\'BACKGROUND\', (-1,-1), (-1,-1), (0.75,0.75,0.75))"/>\n
<stylecmd expr="(\'LINEABOVE\', (0,-1), (-1,-1), 0.1, (0.4,0.4,0.4))"/>\n
</tablestyle>\n
\n
<tablestyle name="notes">\n
<!-- Corps -->\n
<stylecmd expr="(\'FONT\', (0,0), (-1,-1), \'Helvetica\', 7)"/>\n
<stylecmd expr="(\'OUTLINE\', (0,0), (-1,-1), 0.7, (0.4,0.4,0.4))"/>\n
<stylecmd expr="(\'LINEAFTER\', (0,0), (-1,-1), 0.1, (0.4,0.4,0.4))"/>\n
<stylecmd expr="(\'LEFTPADDING\', (0,0), (-1,-1), 4)"/>\n
<stylecmd expr="(\'TOPPADDING\', (0,0), (-1,-1), 2)"/>\n
<stylecmd expr="(\'BOTTOMPADDING\', (0,0), (-1,-1), 2)"/>\n
<stylecmd expr="(\'BACKGROUND\', (0,0), (-1,-1), (0.95, 0.95, 0.95))"/>\n
<stylecmd expr="(\'TEXTCOLOR\', (0,0), (-1,-1), colors.black)"/>\n
</tablestyle>\n
\n
<tablestyle name="cumul_conges">\n
<stylecmd expr="(\'FONTSIZE\', (0,0), (-1,-1), 7)"/>\n
<stylecmd expr="(\'FONT\', (0,0), (-1,-1), \'Helvetica\', 7)"/>\n
<stylecmd expr="(\'LEFTPADDING\', (0,0), (-1,-1), 4)"/>\n
\n
<!-- Entete gauche -->\n
......@@ -108,16 +140,10 @@
<stylecmd expr="(\'BOTTOMPADDING\', (0,0), (0,0), 0)"/>\n
<stylecmd expr="(\'ALIGNMENT\', (0,0), (0,0), \'CENTER\')"/>\n
<stylecmd expr="(\'VALIGN\', (0,0), (0,0), \'MIDDLE\')"/>\n
\n
<!-- Premiere ligne de droite\n
<stylecmd expr="(\'LINEABOVE\', (-1,0), (-1,0), 0.1, (0.4,0.4,0.4))"/>\n
<stylecmd expr="(\'LINEBEFORE\', (-1,0), (-1,0), 0.1, (0.4,0.4,0.4))"/>\n
<stylecmd expr="(\'LINEAFTER\', (-1,0), (-1,0), 0.1, (0.4,0.4,0.4))"/>\n
-->\n
</tablestyle>\n
\n
<tablestyle name="cumul_conges_corps">\n
<stylecmd expr="(\'FONTSIZE\', (0,0), (-1,-1), 7)"/>\n
<stylecmd expr="(\'FONT\', (0,0), (-1,-1), \'Helvetica\', 7)"/>\n
<stylecmd expr="(\'LEFTPADDING\', (0,0), (-1,-1), 4)"/>\n
\n
<!--Tableau de gauche -->\n
......@@ -125,11 +151,6 @@
<stylecmd expr="(\'ALIGNMENT\', (0,0), (5,0), \'CENTER\')"/>\n
<stylecmd expr="(\'ALIGNMENT\', (0,1), (5,1), \'RIGHT\')"/>\n
\n
<!-- Deuxieme ligne de droite -->\n
<!-- <stylecmd expr="(\'LINEBELOW\', (-1,0), (-1,0), 0.1, (0.4,0.4,0.4))"/>\n
<stylecmd expr="(\'LINEBEFORE\', (-1,0), (-1,0), 0.1, (0.4,0.4,0.4))"/>\n
<stylecmd expr="(\'LINEAFTER\', (-1,0), (-1,0), 0.1, (0.4,0.4,0.4))"/>\n
-->\n
<stylecmd expr="(\'OUTLINE\', (-1,0), (-1,0), 0.1, (0.4,0.4,0.4))"/>\n
</tablestyle>\n
\n
......
......@@ -466,8 +466,8 @@ csg_base_salary = gross_salary\n
# calculation which depend of the employment contract between the employee and the\n
# employer.\n
col_agr = employee.getCareerCollectiveAgreementTitle()\n
insurrances_base = 0.0\n
if col_agr not in (None, \'\') and \'syntec\' in col_agr.lower():\n
insurrances_base = 0.0\n
# Add "mutuelle" and "prevoyance" employer share to csg_base_salary when required\n
# Set the syntec rate according to the employee marital status\n
syntec_rate = 0.96\n
......@@ -479,26 +479,29 @@ if col_agr not in (None, \'\') and \'syntec\' in col_agr.lower():\n
, \'base\' : ceiling_salary\n
}\n
insurrances_base += r_(ceiling_salary * (syntec_rate / 100.0))\n
# Prevoyance insurance (part of SYNTEC requirements)\n
if salary_slices.has_key(\'A\'):\n
RATE = 0.70\n
BASE = salary_slices[\'A\']\n
kw[\'prevoyance/tranche_a\'] = \\\n
{ \'employer_share\': RATE\n
, \'employee_share\': None\n
, \'base\' : BASE\n
}\n
insurrances_base += r_(BASE * (RATE / 100.0))\n
if salary_slices.has_key(\'B\'):\n
RATE = 0.54\n
BASE = salary_slices[\'B\']\n
kw[\'prevoyance/tranche_b\'] = \\\n
{ \'employer_share\': RATE\n
, \'employee_share\': RATE\n
, \'base\' : BASE\n
}\n
insurrances_base += r_(BASE * (RATE / 100.0))\n
# Final tax on the contribution (!)\n
\n
# Prevoyance insurance\n
if salary_slices.has_key(\'A\'):\n
RATE = 0.70\n
BASE = salary_slices[\'A\']\n
kw[\'prevoyance/tranche_a\'] = \\\n
{ \'employer_share\': RATE\n
, \'employee_share\': None\n
, \'base\' : BASE\n
}\n
insurrances_base += r_(BASE * (RATE / 100.0))\n
if salary_slices.has_key(\'B\'):\n
RATE = 0.54\n
BASE = salary_slices[\'B\']\n
kw[\'prevoyance/tranche_b\'] = \\\n
{ \'employer_share\': RATE\n
, \'employee_share\': RATE\n
, \'base\' : BASE\n
}\n
insurrances_base += r_(BASE * (RATE / 100.0))\n
\n
# Final tax on "Prevoyance"\n
if insurrances_base > 0.0:\n
kw[\'taxe_prevoyance/variable\'] = \\\n
{ \'employer_share\': 8.0\n
, \'employee_share\': None\n
......@@ -506,6 +509,7 @@ if col_agr not in (None, \'\') and \'syntec\' in col_agr.lower():\n
}\n
csg_base_salary += insurrances_base\n
\n
\n
# CSG\n
kw[\'csg_deductible/salaire_brut_csg\'] = \\\n
{ \'employer_share\': None\n
......
......@@ -78,7 +78,7 @@
<td><tal:block content="python: line[\'employee_rate\']" condition="python: line[\'employee_rate\'] != None"/> </td>\n
<td><tal:block content="python: line[\'employee_share\']" condition="python: line[\'employee_share\'] != None"/> </td>\n
</tr>\n
<tr tal:condition="python: line[\'description\'] != None" stylecmd="(\'LEFTPADDING\',8)">\n
<tr tal:condition="python: line[\'description\'] != None" stylecmd="(\'LEFTPADDING\',16)">\n
<td><tal:block content="python: (\' \' * 6) + line[\'description\']"/> </td>\n
<td> </td>\n
<td> </td>\n
......@@ -190,42 +190,18 @@
condition="python: details[\'totals\'].has_key(\'net_salary\')"/> </td>\n
</tr>\n
</table>\n
\n
<!-- This table act as a spacer -->\n
<table rowheight="0.6cm"><tr><td> </td></tr></table>\n
\n
<tal:block repeat="group python: details[\'groups\']">\n
<table splitbyrow="1" rowheight=\'0.4cm\' repeatrows="1" repeatcols="0" style="decompte"\n
<table splitbyrow="1" rowheight=\'0.4cm\' repeatrows="1" repeatcols="0" style="addendum"\n
tal:condition="python: group[\'id\'] == ADDENDUM_GROUP_ID">\n
<tr>\n
<td colwidth="4.318cm">Nature</td>\n
<td colwidth="3.81cm">Base</td>\n
<tr tal:attributes="stylecmd boldstyle">\n
<td colwidth="4.318cm" tal:content="python: group[\'title\']"> </td>\n
<td colwidth="3.81cm"> </td>\n
<td colwidth="1.524cm"> </td>\n
<td colwidth="2.77cm"> </td>\n
<td colwidth="2.77cm"> </td>\n
<td colwidth="2.288cm"> </td>\n
<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
<td> </td>\n
<td> </td>\n
<td> </td>\n
<td> </td>\n
<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
<td> </td>\n
<td> </td>\n
<td> </td>\n
<td> </td>\n
<td> </td>\n
<td colwidth="1.959cm"> </td>\n
</tr>\n
<tal:block repeat="line python: group[\'sublines\']">\n
<tal:block metal:use-macro="here/PaySheetTransaction_viewPaySheetTransactionAsPDF/macros/renderLine"/>\n
......@@ -239,7 +215,7 @@
<td> </td>\n
<td> </td>\n
<td><tal:block replace="python: details[\'totals\'][\'total_addendum\']"\n
condition="python: details[\'totals\'].has_key(\'total_addendum\')"/> </td>\n
condition="python: details[\'totals\'].has_key(\'total_addendum\')"/> </td>\n
</tr>\n
<tr tal:attributes="stylecmd boldstyle">\n
<td>Paiement Final</td>\n
......@@ -249,19 +225,29 @@
<td> </td>\n
<td> </td>\n
<td><tal:block replace="python: details[\'totals\'][\'total_employee_payment\']"\n
condition="python: details[\'totals\'].has_key(\'total_employee_payment\')"/> </td>\n
condition="python: details[\'totals\'].has_key(\'total_employee_payment\')"/> </td>\n
</tr>\n
</table>\n
</tal:block>\n
\n
<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
</tr>\n
</table>\n
</tal:block>\n
\n
<!-- This table act as a spacer -->\n
<table rowheight="0.6cm"><tr><td> </td></tr></table>\n
<table rowheight="0.2cm"><tr><td> </td></tr></table>\n
\n
<table style="cumul_conges">\n
<tr>\n
<td colwidth="12cm"><tal:block replace="python: \'Cumuls Annuels (%s au %s)\' % (yearly_sums[\'start_date\'], yearly_sums[\'stop_date\'])"/> </td>\n
<td colwidth="2cm"> </td>\n
<td colwidth="5cm"> </td>\n
<td colwidth="1cm"> </td>\n
<td colwidth="6cm"> </td>\n
</tr>\n
</table>\n
\n
......@@ -273,16 +259,16 @@
<td colwidth="2cm">Salaire Net</td>\n
<td colwidth="2cm">Net Imposable</td>\n
<td colwidth="2cm">Addendum</td>\n
<td colwidth="2cm"> </td>\n
<td colwidth="5cm"> <tal:block tal:replace="python: \'Dur\xc3\xa9e des d\xc3\xa9lais de pr\xc3\xa9avis : \' + context.PaySheetTransaction_getResignmentLegalDelay()"/></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
</tr>\n
<tr>\n
<td><tal:block replace="python: yearly_sums[\'gross_salary\']" condition="python: yearly_sums.has_key(\'gross_salary\')"/> </td>\n
<td><tal:block replace="python: yearly_sums[\'gross_salary\']" condition="python: yearly_sums.has_key(\'gross_salary\')"/> </td>\n
<td><tal:block replace="python: yearly_sums[\'total_employer_share\']" condition="python: yearly_sums.has_key(\'total_employer_share\')"/> </td>\n
<td><tal:block replace="python: yearly_sums[\'total_employee_share\']" condition="python: yearly_sums.has_key(\'total_employee_share\')"/> </td>\n
<td><tal:block replace="python: yearly_sums[\'net_salary\']" condition="python: yearly_sums.has_key(\'net_salary\')"/> </td>\n
<td><tal:block replace="python: yearly_sums[\'taxable_net_salary\']" condition="python: yearly_sums.has_key(\'taxable_net_salary\')"/> </td>\n
<td><tal:block replace="python: yearly_sums[\'total_addendum\']" condition="python: yearly_sums.has_key(\'total_addendum\')"/> </td>\n
<td><tal:block replace="python: yearly_sums[\'net_salary\']" condition="python: yearly_sums.has_key(\'net_salary\')"/> </td>\n
<td><tal:block replace="python: yearly_sums[\'taxable_net_salary\']" condition="python: yearly_sums.has_key(\'taxable_net_salary\')"/> </td>\n
<td><tal:block replace="python: yearly_sums[\'total_addendum\']" condition="python: yearly_sums.has_key(\'total_addendum\')"/> </td>\n
<td> </td>\n
<td><!--tal:block replace="python: \'Dur\xc3\xa9e des cong\xc3\xa9s pay\xc3\xa9s : ???\'"/--> </td>\n
</tr>\n
......
2006-11-28 Kevin
* Fix "prevoyance" calculation.
2006-11-27 Kevin
* Make "prevoyance" payroll service accountable.
* Add working duration property on pay sheets.
......
141
\ No newline at end of file
143
\ No newline at end of file
0.2.14
\ No newline at end of file
0.2.15
\ 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