Commit 04f24cfc authored by Fabien Morin's avatar Fabien Morin

remove some round that are not requiered and distorts results

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18266 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 37788837
...@@ -370,11 +370,8 @@ ...@@ -370,11 +370,8 @@
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="TALESMethod" module="Products.Formulator.TALESField"/>
<string>Products.Formulator.TALESField</string> <tuple/>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -389,11 +386,8 @@ ...@@ -389,11 +386,8 @@
<record id="3" aka="AAAAAAAAAAM="> <record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="TALESMethod" module="Products.Formulator.TALESField"/>
<string>Products.Formulator.TALESField</string> <tuple/>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -408,11 +402,8 @@ ...@@ -408,11 +402,8 @@
<record id="4" aka="AAAAAAAAAAQ="> <record id="4" aka="AAAAAAAAAAQ=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="TALESMethod" module="Products.Formulator.TALESField"/>
<string>Products.Formulator.TALESField</string> <tuple/>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
......
...@@ -101,17 +101,18 @@ for pay_sheet_line in paysheet.contentValues(portal_type=\'Pay Sheet Line\'):\n ...@@ -101,17 +101,18 @@ for pay_sheet_line in paysheet.contentValues(portal_type=\'Pay Sheet Line\'):\n
if category in pay_sheet_line.getVariationCategoryList():\n if category in pay_sheet_line.getVariationCategoryList():\n
cell = pay_sheet_line.getCell(slice, category)\n cell = pay_sheet_line.getCell(slice, category)\n
total_price = cell.getQuantity() * cell.getPrice()\n total_price = cell.getQuantity() * cell.getPrice()\n
amount += round(total_price, precision)\n amount += total_price\n
else:\n else:\n
for category in category_list:\n for category in category_list:\n
if category in pay_sheet_line.getVariationCategoryList():\n if category in pay_sheet_line.getVariationCategoryList():\n
cell = pay_sheet_line.getCell(category)\n cell = pay_sheet_line.getCell(category)\n
total_price = cell.getQuantity() * cell.getPrice()\n total_price = cell.getQuantity() * cell.getPrice()\n
amount += round(total_price, precision)\n amount += total_price\n
\n \n
break # this permit to add only one time the amount even \n break # this permit to add only one time the amount even \n
# if many base_amount are in base_participation_list\n # if many base_amount are in base_participation_list\n
\n \n
amount = round(amount, precision)\n
return amount\n return amount\n
</string> </value> </string> </value>
</item> </item>
......
...@@ -95,8 +95,6 @@ for line in line_list: \n ...@@ -95,8 +95,6 @@ for line in line_list: \n
line_dict[\'base_name\'] = getattr(line, \'base_name\', None)\n line_dict[\'base_name\'] = getattr(line, \'base_name\', None)\n
\n \n
line_dict[\'base\'] = getattr(line, \'base\', None)\n line_dict[\'base\'] = getattr(line, \'base\', None)\n
if line_dict[\'base\'] != None:\n
line_dict[\'base\'] = round(line_dict[\'base\'], precision)\n
\n \n
line_dict[\'employer_share_rate\'] = getattr(line, \'employer_share_rate\', None)\n line_dict[\'employer_share_rate\'] = getattr(line, \'employer_share_rate\', None)\n
if line_dict[\'employer_share_rate\'] != None:\n if line_dict[\'employer_share_rate\'] != None:\n
...@@ -105,9 +103,6 @@ for line in line_list: \n ...@@ -105,9 +103,6 @@ for line in line_list: \n
line_dict[\'employer_share_amount\'] = getattr(line, \'employer_share_amount\', \n line_dict[\'employer_share_amount\'] = getattr(line, \'employer_share_amount\', \n
None)\n None)\n
\n \n
if line_dict[\'employer_share_amount\'] != None:\n
line_dict[\'employer_share_amount\'] = \\\n
round(line_dict[\'employer_share_amount\'], precision)\n
line_dict[\'employee_share_rate\'] = getattr(line, \'employee_share_rate\', None)\n line_dict[\'employee_share_rate\'] = getattr(line, \'employee_share_rate\', None)\n
\n \n
if line_dict[\'employee_share_rate\'] != None:\n if line_dict[\'employee_share_rate\'] != None:\n
...@@ -115,10 +110,6 @@ for line in line_list: \n ...@@ -115,10 +110,6 @@ for line in line_list: \n
str(line_dict[\'employee_share_rate\']*100)+\'%\'\n str(line_dict[\'employee_share_rate\']*100)+\'%\'\n
line_dict[\'employee_share_amount\'] = getattr(line, \'employee_share_amount\', \n line_dict[\'employee_share_amount\'] = getattr(line, \'employee_share_amount\', \n
None)\n None)\n
\n
if line_dict[\'employee_share_amount\'] != None:\n
line_dict[\'employee_share_amount\'] = \\\n
round(line_dict[\'employee_share_amount\'], precision)\n
\n \n
line_dict_list.append(line_dict)\n line_dict_list.append(line_dict)\n
\n \n
...@@ -179,7 +170,6 @@ return line_dict_list\n ...@@ -179,7 +170,6 @@ return line_dict_list\n
<string>line_dict</string> <string>line_dict</string>
<string>_write_</string> <string>_write_</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>round</string>
<string>str</string> <string>str</string>
</tuple> </tuple>
</value> </value>
......
184 186
\ 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