Commit 687a0bd9 authored by Jérome Perrin's avatar Jérome Perrin

2008-03-06 jerome

* API change: PaySheetTransaction_getMovementList was returning the total price as "xxx_quantity" on brains. It now returns quantity, price and total_price respectivly.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19735 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c4f1fa8c
......@@ -92,7 +92,7 @@ else:\n
for model_line in context.contentValues(portal_type=\'Pay Sheet Line\'):\n
for tax_category in model_line.getTaxCategoryValueList():\n
price = (tax_category.getId()+\'_price\', tax_category.getTitle()+\' Rate\')\n
quantity = (tax_category.getId()+\'_quantity\', \n
quantity = (tax_category.getId()+\'_total_price\', \n
tax_category.getTitle()+\' Amount\')\n
if price not in column_list:\n
column_list.append(price)\n
......
......@@ -93,8 +93,11 @@ for paysheet_line in paysheet_line_list:\n
base_application_list = paysheet_line.getBaseAmountTitleList()\n
translated_base_application_list = [str(N_(x)) for x in base_application_list]\n
base_application_list = \', \'.join(translated_base_application_list)\n
payroll_service = paysheet_line.getResourceValue()\n
base_participation_list = payroll_service.getBaseAmountList()\n
payroll_service = paysheet_line.getResourceValue(portal_type=\'Payroll Service\')\n
if payroll_service is not None:\n
base_participation_list = payroll_service.getBaseAmountList()\n
else:\n
base_participation_list = []\n
causality = paysheet_line.getCausality()\n
\n
base_list = [str(N_(base_application)) for base_application in \\\n
......@@ -112,6 +115,10 @@ for paysheet_line in paysheet_line_list:\n
indice = 0\n
\n
object_dict = {}\n
if cartesian_product == [[]] or cartesian_product == []:\n
line_list.append(paysheet_line)\n
continue\n
\n
for tuple in cartesian_product:\n
indice += 1\n
share_dict = {}\n
......@@ -122,10 +129,10 @@ for paysheet_line in paysheet_line_list:\n
quantity = cell.getQuantity()\n
base = quantity\n
\n
price = cell.getPrice()\n
share_dict[cell.getTaxCategory()+\'_price\'] = price\n
share_dict[cell.getTaxCategory()+\'_quantity\'] = round(quantity*price,\n
precision)\n
share_dict[cell.getTaxCategory()+\'_price\'] = cell.getPrice()\n
share_dict[cell.getTaxCategory()+\'_quantity\'] = cell.getQuantity()\n
share_dict[cell.getTaxCategory()+\'_total_price\'] = \\\n
round(cell.getTotalPrice(), precision)\n
\n
tuple_dict = {}\n
for item in tuple:\n
......@@ -163,10 +170,8 @@ for paysheet_line in paysheet_line_list:\n
line_list.append(paysheet_line.asContext(**object_dict[\'no_slice\']))\n
\n
\n
#return printed\n
\n
# sort results\n
\n
def sortByTitleAscending(x, y):\n
return cmp(x.getTitle(), y.getTitle())\n
\n
......@@ -264,6 +269,7 @@ return line_list\n
<string>str</string>
<string>translated_base_application_list</string>
<string>payroll_service</string>
<string>None</string>
<string>base_participation_list</string>
<string>causality</string>
<string>base_application</string>
......@@ -273,7 +279,6 @@ return line_list\n
<string>base_category</string>
<string>list</string>
<string>cartesian_product</string>
<string>None</string>
<string>previous_share</string>
<string>indice</string>
<string>object_dict</string>
......@@ -284,7 +289,6 @@ return line_list\n
<string>cell</string>
<string>quantity</string>
<string>base</string>
<string>price</string>
<string>_write_</string>
<string>round</string>
<string>tuple_dict</string>
......
......@@ -63,17 +63,17 @@
<value>
<dictionary>
<item>
<key> <string>all_columns</string> </key>
<key> <string>all_columns</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>columns</string> </key>
<key> <string>columns</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>editable_columns</string> </key>
<key> <string>editable_columns</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
......@@ -87,19 +87,19 @@
<value> <string></string> </value>
</item>
<item>
<key> <string>list_method</string> </key>
<key> <string>list_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>portal_types</string> </key>
<key> <string>portal_types</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>selection_name</string> </key>
<key> <string>selection_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>sort</string> </key>
<key> <string>sort</string> </key>
<value> <string></string> </value>
</item>
<item>
......@@ -107,7 +107,7 @@
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
......
......@@ -19,7 +19,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_employee_share_quantity</string> </value>
<value> <string>listbox_employee_share_total_price</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -19,7 +19,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_employer_share_quantity</string> </value>
<value> <string>listbox_employer_share_total_price</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
2008-03-06 jerome
* API change: PaySheetTransaction_getMovementList was returning the total price as "xxx_quantity" on brains. It now returns quantity, price and total_price respectivly.
2008-02-14 fabien
* correct some script : context was used instead paysheet, so results were wrong
......
212
\ No newline at end of file
218
\ 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