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