From 1988472152a1cbbc470130f9cad73e1c8f049619 Mon Sep 17 00:00:00 2001
From: Kevin Deldycke <kevin@nexedi.com>
Date: Wed, 18 Oct 2006 13:53:41 +0000
Subject: [PATCH] Do not display base and rate for "forfait" services.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10813 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../PaySheetTransaction_getDetails.xml        |  7 +++++
 ...ansaction_viewPaySheetTransactionAsPDF.xml | 31 +++++++++----------
 bt5/erp5_payroll/bt/change_log                |  1 +
 3 files changed, 23 insertions(+), 16 deletions(-)

diff --git a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getDetails.xml b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getDetails.xml
index 502517aa7e..ef29a26030 100644
--- a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getDetails.xml
+++ b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getDetails.xml
@@ -201,6 +201,13 @@ for pay_sheet_line in object_list:\n
               pay_sheet_dict[\'employer_share_rate\'] = cell_price * 100\n
               if pay_sheet_dict[\'employer_share\'] not in (\'\', None):\n
                 total_employer_share = r_(total_employer_share + r_(pay_sheet_dict[\'employer_share\']))\n
+\n
+        if range.endswith(\'forfait\'):\n
+          pay_sheet_dict[\'base\']                = \'\'\n
+          pay_sheet_dict[\'employer_share_rate\'] = \'\'\n
+          pay_sheet_dict[\'employee_share_rate\'] = \'\'\n
+\n
+\n
     for key in [\'employee_share\',\'employee_share_rate\',\'employer_share\',\'employer_share_rate\']:\n
       if not (pay_sheet_dict.has_key(key)):\n
         pay_sheet_dict[key] = \'\' # so that we can display nothing\n
diff --git a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_viewPaySheetTransactionAsPDF.xml b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_viewPaySheetTransactionAsPDF.xml
index 8701cc08dc..da2b119257 100644
--- a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_viewPaySheetTransactionAsPDF.xml
+++ b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_viewPaySheetTransactionAsPDF.xml
@@ -52,14 +52,13 @@
 \n
 <document filename="report01.pdf"\n
    xmlns:tal="http://xml.zope.org/namespaces/tal"\n
-   tal:define="employee python: here.getDestinationSectionValue();\n
-                  employer python: here.getSourceSectionValue();\n
-                  paysheet_details python: here.PaySheetTransaction_getDetails();\n
-                  paysheet_categories python: paysheet_details[\'paysheet_categories\'];\n
-                  urssaf python: employer.getDestinationSectionValue();\n
-                  start_date python: here.getStartDate();\n
-\n
-                  boldstyle python:\'(\\\'FONT\\\', \\\'Helvetica-Bold\\\', 7)\'">\n
+   tal:define="employee            python: here.getDestinationSectionValue();\n
+               employer            python: here.getSourceSectionValue();\n
+               paysheet_details    python: here.PaySheetTransaction_getDetails();\n
+               paysheet_categories python: paysheet_details[\'paysheet_categories\'];\n
+               urssaf              python: employer.getDestinationSectionValue();\n
+               start_date          python: here.getStartDate();\n
+               boldstyle           python: \'(\\\'FONT\\\', \\\'Helvetica-Bold\\\', 7)\'">\n
 \n
 \n
     <title>Pay Sheet</title>\n
@@ -70,13 +69,13 @@
          <tr>\n
            <td colwidth="4.318cm">Nature</td>\n
            <td colwidth="3.81cm">Assiette</td>\n
-           <td colwidth="1.524cm">Montant</td>\n
+           <td colwidth="1.524cm">Base</td>\n
            <td colwidth="2.77cm">Taux part patronale</td>\n
            <td colwidth="2.288cm">Part patronale</td>\n
            <td colwidth="2.397cm">Taux part salariale</td>\n
            <td colwidth="1.959cm">Part salariale</td>\n
          </tr>\n
-  \n
+\n
          <tr tal:attributes="stylecmd boldstyle"> <!--stylecmd="(\'FONT\', \'Helvetica-Bold\', 7)"> -->\n
             <td>Salaire brut</td>\n
             <td> </td>\n
@@ -86,7 +85,7 @@
             <td> </td>\n
             <td tal:content="python: \'%.2f\' % paysheet_details[\'gross_salary\']" tal:condition="python: paysheet_details[\'gross_salary\'] not in (None, \'\')">???</td>\n
          </tr>\n
-        \n
+\n
          <tal:block tal:condition="python: paysheet_categories.has_key(\'no_cat\')">\n
            <tal:block define="no_cat_lines python: paysheet_categories[\'no_cat\'][\'lines\']">\n
              <tr tal:repeat="line no_cat_lines">\n
@@ -133,7 +132,7 @@
            <td> </td>\n
            <td> <tal:block replace="python: \'%.2f\' % paysheet_details[\'total_employee_share\']" tal:condition="python: paysheet_details[\'total_employee_share\'] not in (\'\', None)"> </tal:block></td>\n
          </tr>\n
-    \n
+\n
          <tr tal:attributes="stylecmd boldstyle">\n
            <td>Salaire Net Imposable</td>\n
            <td> </td>\n
@@ -170,7 +169,7 @@
        </table>\n
 \n
        <table rowheight="0.6cm"><tr><td> </td></tr></table>\n
-       \n
+\n
        <table style="cumul_conges">\n
          <tr>\n
            <td colwidth="11cm"> <tal:block tal:replace="python: \'Cumuls annuels (%s)\' % start_date.year()" tal:condition="python: start_date not in (\'\', None)"/></td>\n
@@ -178,7 +177,7 @@
            <td colwidth="5cm"> <!-- <tal:block tal:replace="python: \'Dur\xc3\xa9e des cong\xc3\xa9s pay\xc3\xa9s : ???\'"/> --> </td>\n
          </tr>\n
        </table>\n
-       \n
+\n
 \n
        <table style="cumul_conges_corps">\n
          <tr>\n
@@ -200,9 +199,9 @@
            <td> </td>\n
          </tr>\n
        </table>\n
-      \n
+\n
     </content>\n
-  \n
+\n
 </document>
 
 ]]></string> </value>
diff --git a/bt5/erp5_payroll/bt/change_log b/bt5/erp5_payroll/bt/change_log
index 770c2d9922..fd0df7b53b 100644
--- a/bt5/erp5_payroll/bt/change_log
+++ b/bt5/erp5_payroll/bt/change_log
@@ -1,5 +1,6 @@
 2006-10-18 Kevin
 * Add new french payroll services.
+* Do not display base and rate for "forfait" services.
 
 2006-10-17 Kevin
 * Add Pay Sheet Transaction as default sub type in Accounting Module.
-- 
2.30.9