Commit bc4d274d authored by Jérome Perrin's avatar Jérome Perrin

note about base_amount / base_application & base_contribution changes

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21665 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e95df0cf
...@@ -65,11 +65,17 @@ ...@@ -65,11 +65,17 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>\'\'\'\n <value> <string encoding="cdata"><![CDATA[
\'\'\'\n
return the amount composed by all amount of paysheet line wich category of\n return the amount composed by all amount of paysheet line wich category of\n
category_list parameter is in variation_category_list of the PaySheet line \n category_list parameter is in variation_category_list of the PaySheet line \n
and wich payroll service has a base_participation in the \n and wich payroll service has a base_participation in the \n
base_participation_list\n base_participation_list\n
\n
XXX this script needs refactoring, no need to get the base amount on the resource.\n
It is now stored on the movement: see http://svn.erp5.org/?view=rev&revision=21660\n
\n
\'\'\'\n \'\'\'\n
\n \n
# test the list parameters\n # test the list parameters\n
...@@ -100,12 +106,18 @@ for pay_sheet_line in paysheet.contentValues(portal_type=\'Pay Sheet Line\'):\n ...@@ -100,12 +106,18 @@ for pay_sheet_line in paysheet.contentValues(portal_type=\'Pay Sheet Line\'):\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(slice, category)\n cell = pay_sheet_line.getCell(slice, category)\n
if cell is None:\n
context.log((pay_sheet_line, slice, category))\n
continue\n
total_price = cell.getQuantity() * cell.getPrice()\n total_price = cell.getQuantity() * cell.getPrice()\n
amount += total_price\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
if cell is None:\n
context.log((pay_sheet_line, slice, category))\n
continue\n
total_price = cell.getQuantity() * cell.getPrice()\n total_price = cell.getQuantity() * cell.getPrice()\n
amount += total_price\n amount += total_price\n
\n \n
...@@ -114,7 +126,9 @@ for pay_sheet_line in paysheet.contentValues(portal_type=\'Pay Sheet Line\'):\n ...@@ -114,7 +126,9 @@ for pay_sheet_line in paysheet.contentValues(portal_type=\'Pay Sheet Line\'):\n
\n \n
amount = round(amount, precision)\n amount = round(amount, precision)\n
return amount\n return amount\n
</string> </value>
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>_code</string> </key> <key> <string>_code</string> </key>
......
299 300
\ 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