Commit c15267dd authored by Fabien Morin's avatar Fabien Morin

fix some bugs

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25453 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent be7c83b3
......@@ -78,11 +78,11 @@ else:\n
\n
# get the application amount for this cell\n
for base in cell.getBaseApplicationList():\n
if base_amount_dict.has_key(base):\n
if base_amount_dict.has_key(base) and base_amount_dict[base].has_key(tax_category):\n
base_application += base_amount_dict[base][tax_category]\n
\n
if not len(cell.getBaseApplicationList()):\n
base_application = quantity\n
\n
salary_range_list = cell.getVariationCategoryList(\\\n
base_category_list=\'salary_range\')\n
if len(salary_range_list):\n
......
......@@ -81,10 +81,7 @@ for paysheet_line in paysheet_line_list:\n
translated_base_application_list = [str(translateString(x)) for x in base_application_list]\n
base_application_list = \', \'.join(translated_base_application_list)\n
payroll_service = paysheet_line.getResourceValue(portal_type=\'Payroll Service\')\n
if payroll_service is not None:\n
base_contribution_list = paysheet_line.getBaseContributionList()\n
else:\n
base_contribution_list = []\n
base_contribution_list = paysheet_line.getBaseContributionList()\n
causality = paysheet_line.getCausality()\n
\n
base_list = [str(translateString(base_application)) for base_application in \\\n
......
......@@ -69,17 +69,23 @@ search_params = \\\n
\n
paysheet_list = accounting_module.searchFolder( **search_params)\n
\n
yearly_work_time = 0\n
nb_heures_supp = 0\n
for paysheet in paysheet_list:\n
small_heures_supp = 0\n
big_heures_supp = 0\n
annotation_line = paysheet.getAnnotationLineFromReference(\\\n
reference=\'overtime_small_rate\')\n
nb_heures_supp = annotation_line.getQuantity()\n
if annotation_line is not None :\n
small_heures_supp = annotation_line.getQuantity()\n
\n
annotation_line = paysheet.getAnnotationLineFromReference(\\\n
reference=\'overtime_big_rate\')\n
nb_heures_supp += annotation_line.getQuantity()\n
yearly_work_time += nb_heures_supp \n
if annotation_line is not None :\n
big_heures_supp = annotation_line.getQuantity()\n
\n
nb_heures_supp += (small_heures_supp + big_heures_supp)\n
\n
return yearly_work_time\n
return nb_heures_supp\n
</string> </value>
</item>
<item>
......@@ -126,11 +132,13 @@ return yearly_work_time\n
<string>search_params</string>
<string>_apply_</string>
<string>paysheet_list</string>
<string>yearly_work_time</string>
<string>nb_heures_supp</string>
<string>_getiter_</string>
<string>paysheet</string>
<string>small_heures_supp</string>
<string>big_heures_supp</string>
<string>annotation_line</string>
<string>nb_heures_supp</string>
<string>None</string>
<string>_inplacevar_</string>
</tuple>
</value>
......
349
\ No newline at end of file
352
\ 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