From bc4d274dc1c7ddbd8488ad640f2cb02c7123dd5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Tue, 17 Jun 2008 16:01:00 +0000 Subject: [PATCH] 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 --- ...tion_getAmountFromBaseParticipationList.xml | 18 ++++++++++++++++-- bt5/erp5_payroll/bt/revision | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getAmountFromBaseParticipationList.xml b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getAmountFromBaseParticipationList.xml index b2348946f3..594a908c27 100644 --- a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getAmountFromBaseParticipationList.xml +++ b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getAmountFromBaseParticipationList.xml @@ -65,11 +65,17 @@ </item> <item> <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 category_list parameter is in variation_category_list of the PaySheet line \n and wich payroll service has a base_participation in the \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 # test the list parameters\n @@ -100,12 +106,18 @@ for pay_sheet_line in paysheet.contentValues(portal_type=\'Pay Sheet Line\'):\n for category in category_list:\n if category in pay_sheet_line.getVariationCategoryList():\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 amount += total_price\n else:\n for category in category_list:\n if category in pay_sheet_line.getVariationCategoryList():\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 amount += total_price\n \n @@ -114,7 +126,9 @@ for pay_sheet_line in paysheet.contentValues(portal_type=\'Pay Sheet Line\'):\n \n amount = round(amount, precision)\n return amount\n -</string> </value> + + +]]></string> </value> </item> <item> <key> <string>_code</string> </key> diff --git a/bt5/erp5_payroll/bt/revision b/bt5/erp5_payroll/bt/revision index f491e22fc0..f1efb20540 100644 --- a/bt5/erp5_payroll/bt/revision +++ b/bt5/erp5_payroll/bt/revision @@ -1 +1 @@ -299 \ No newline at end of file +300 \ No newline at end of file -- 2.30.9