Commit e9a5ef30 authored by Fabien Morin's avatar Fabien Morin

correct some problems :

* if there is no base_application category so the base_application is the quantity defined in the cell
* round the total_price using currency precision

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25363 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0c70cfeb
......@@ -76,12 +76,12 @@ if tax_category_list != []:\n
else:\n
tax_category = None\n
\n
if base_amount_dict:\n
# get the application amount for this cell\n
for base in cell.getBaseApplicationList():\n
if base_amount_dict.has_key(base):\n
base_application += base_amount_dict[base][tax_category]\n
\n
# get the application amount for this cell\n
for base in cell.getBaseApplicationList():\n
if base_amount_dict.has_key(base):\n
base_application += base_amount_dict[base][tax_category]\n
if not len(cell.getBaseApplicationList()):\n
base_application = quantity\n
\n
salary_range_list = cell.getVariationCategoryList(\\\n
base_category_list=\'salary_range\')\n
......@@ -170,8 +170,8 @@ return {\'quantity\':quantity, \'price\':price}\n
<string>_getiter_</string>
<string>base</string>
<string>_inplacevar_</string>
<string>salary_range_list</string>
<string>len</string>
<string>salary_range_list</string>
<string>salary_range</string>
<string>model_slice_min</string>
<string>model_slice_max</string>
......
......@@ -75,10 +75,8 @@ property_list = [ \'slice\',\n
\'base\',\n
\'employer_share_price\',\n
\'employer_share_quantity\',\n
\'employer_share_total_price\',\n
\'employee_share_price\',\n
\'employee_share_quantity\',\n
\'employee_share_total_price\',\n
\'causality\',\n
]\n
for line in line_list: \n
......@@ -88,7 +86,9 @@ for line in line_list: \n
\'group\' : line.getSourceSectionTitle(),\n
\'source_section_title\': line.getSourceSectionTitle(),\n
\'title\' : line.getTitle(),\n
\'payroll_service\' : getattr(line, \'payroll_service\', None)\n
\'payroll_service\' : getattr(line, \'payroll_service\', None),\n
\'employer_share_total_price\' : round(getattr(line, \'employer_share_total_price\', 0), precision) or None,\n
\'employee_share_total_price\' : round(getattr(line, \'employee_share_total_price\', 0), precision) or None\n
}\n
\n
addProperties(line=line, line_dict=line_dict, property_list=property_list)\n
......@@ -145,6 +145,7 @@ return line_dict_list\n
<string>line</string>
<string>getattr</string>
<string>None</string>
<string>round</string>
<string>line_dict</string>
</tuple>
</value>
......
344
\ No newline at end of file
345
\ 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