Commit b64ee894 authored by Fabien Morin's avatar Fabien Morin

lot of changes, incuding :

- rename base_amount_current_value_dict in base_amount_dict
- change this previous dict to stock values of all tax_category
- now, Pay Sheet Model Line could use only tax_category (without any slice)
- add a comment in PaySheetTransaction_getMovementList
- add uses of cartesian_product witch is more efficient and more evolutive
- enhance PaySheetTransaction_getYearToDateNetPay script (over_time is not take
into account in french payroll)
- add PaySheetTransaction_getYearToDateBaseSalary script
- add PaySheetTransaction_getYearToDateOvertimeAmount script
- rename PaySheetTransaction_getYearToDateOverTimeHours in
PaySheetTransaction_getYearToDateOvertimeHours.xml
- remove all reverse() : before this commit, there were some reverse() to have  the Matrixbox displayed with slice on the left column and the tax_category on
the head line. Now it's in the default order, and it's less confused.
- typo

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18100 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f590b2c1
...@@ -67,22 +67,31 @@ ...@@ -67,22 +67,31 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
precision = context.getPriceCurrencyValue().getQuantityPrecision()\n
base_application = 0\n base_application = 0\n
if base_amount_current_value_dict:\n tax_category_list = cell.getVariationCategoryList(base_category_list= \\\n
\'tax_category\')\n
if tax_category_list != []:\n
tax_category = tax_category_list[0]\n
else:\n
tax_category = None\n
\n
if base_amount_dict:\n
# get the application amount for this cell\n # get the application amount for this cell\n
model_line = cell.getParentValue()\n model_line = cell.getParentValue()\n
for base in model_line.getBaseAmountList(base=1):\n for base in model_line.getBaseAmountList(base=1):\n
if base_amount_current_value_dict.has_key(base):\n if base_amount_dict.has_key(base):\n
base_application += base_amount_current_value_dict[base]\n base_application += base_amount_dict[base][tax_category]\n
\n
quantity = cell.getQuantity() or 0\n quantity = cell.getQuantity() or 0\n
price = cell.getPrice() or 0\n price = cell.getPrice() or 0\n
\n \n
if not quantity and base_application-model_slice_min>0:\n if not quantity and base_application-model_slice_min>0:\n
if base_application <= model_slice_max:\n if base_application <= model_slice_max:\n
quantity = base_application-model_slice_min\n quantity = base_application-model_slice_min\n
else:\n elif model_slice_max:\n
quantity = model_slice_max-model_slice_min\n quantity = model_slice_max-model_slice_min\n
else:\n
quantity = base_application\n
\n \n
return {\'quantity\':quantity, \'price\':price}\n return {\'quantity\':quantity, \'price\':price}\n
...@@ -109,7 +118,7 @@ return {\'quantity\':quantity, \'price\':price}\n ...@@ -109,7 +118,7 @@ return {\'quantity\':quantity, \'price\':price}\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>base_amount_current_value_dict, model_slice_min, model_slice_max, cell</string> </value> <value> <string>base_amount_dict, model_slice_min, model_slice_max, cell</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -135,17 +144,22 @@ return {\'quantity\':quantity, \'price\':price}\n ...@@ -135,17 +144,22 @@ return {\'quantity\':quantity, \'price\':price}\n
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>base_amount_current_value_dict</string> <string>base_amount_dict</string>
<string>model_slice_min</string> <string>model_slice_min</string>
<string>model_slice_max</string> <string>model_slice_max</string>
<string>cell</string> <string>cell</string>
<string>base_application</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string>
<string>precision</string>
<string>base_application</string>
<string>tax_category_list</string>
<string>_getitem_</string>
<string>tax_category</string>
<string>None</string>
<string>model_line</string> <string>model_line</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>base</string> <string>base</string>
<string>_inplacevar_</string> <string>_inplacevar_</string>
<string>_getitem_</string>
<string>quantity</string> <string>quantity</string>
<string>price</string> <string>price</string>
</tuple> </tuple>
......
...@@ -95,12 +95,20 @@ for pay_sheet_line in paysheet.contentValues(portal_type=\'Pay Sheet Line\'):\n ...@@ -95,12 +95,20 @@ for pay_sheet_line in paysheet.contentValues(portal_type=\'Pay Sheet Line\'):\n
for base_participation in base_participation_list:\n for base_participation in base_participation_list:\n
base_amount_list = pay_sheet_line.getResourceValue().getBaseAmountList()\n base_amount_list = pay_sheet_line.getResourceValue().getBaseAmountList()\n
if base_participation in base_amount_list:\n if base_participation in base_amount_list:\n
if pay_sheet_line.getSalaryRangeList(base=1) != []:\n
for slice in pay_sheet_line.getSalaryRangeList(base=1):\n for slice in pay_sheet_line.getSalaryRangeList(base=1):\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, slice)\n cell = pay_sheet_line.getCell(category, slice)\n
total_price = cell.getQuantity() * cell.getPrice()\n total_price = cell.getQuantity() * cell.getPrice()\n
amount += round(total_price, precision)\n amount += round(total_price, precision)\n
else:\n
for category in category_list:\n
if category in pay_sheet_line.getVariationCategoryList():\n
cell = pay_sheet_line.getCell(category)\n
total_price = cell.getQuantity() * cell.getPrice()\n
amount += round(total_price, precision)\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
......
...@@ -87,9 +87,6 @@ model_line_list = model.contentValues(portal_type=\'Pay Sheet Model Line\')\n ...@@ -87,9 +87,6 @@ model_line_list = model.contentValues(portal_type=\'Pay Sheet Model Line\')\n
model_line_editable_list = [x.getObject() for x in model_line_list \\\n model_line_editable_list = [x.getObject() for x in model_line_list \\\n
if x.getObject().isEditable()]\n if x.getObject().isEditable()]\n
\n \n
\n
\n
\n
line_list = []\n line_list = []\n
for model_line in model_line_editable_list:\n for model_line in model_line_editable_list:\n
\n \n
...@@ -103,7 +100,6 @@ for model_line in model_line_editable_list:\n ...@@ -103,7 +100,6 @@ for model_line in model_line_editable_list:\n
service = model_line.getResourceValue()\n service = model_line.getResourceValue()\n
\n \n
for tuple in cartesian_product:\n for tuple in cartesian_product:\n
tuple.reverse() #XXX understand why it is necesary\n
cell = model_line.getCell(*tuple)\n cell = model_line.getCell(*tuple)\n
if cell is None:\n if cell is None:\n
continue\n continue\n
...@@ -128,13 +124,9 @@ for model_line in model_line_editable_list:\n ...@@ -128,13 +124,9 @@ for model_line in model_line_editable_list:\n
\n \n
params.update(tuple_dict)\n params.update(tuple_dict)\n
\n \n
#line_list.append(model_line.asContext(**params))\n
line_list.append(cell.asContext(**params))\n line_list.append(cell.asContext(**params))\n
\n \n
return line_list\n return line_list\n
\n
#return context.PaySheetTransaction_getTempObjectListFromModelLineList(\\\n
# model_line_list = model_line_editable_list)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
...@@ -65,50 +65,94 @@ ...@@ -65,50 +65,94 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from Products.PythonScripts.standard import Object\n <value> <string>\'\'\'\n
import pprint\n This script return a Pay Sheet Line list with some new parameters on\n
each Pay Sheet Line (like base, base_name, base_participation_list,\n
payroll_service,...)\n
It\'s used in the PaySheetTransaction_view to display PaySheetLines\n
\'\'\'\n
\n \n
paysheet_line_list = context.contentValues(portal_type=\'Pay Sheet Line\')\n \n
from Products.ERP5Type.Utils import cartesianProduct\n
import pprint\n
from Products.ERP5Type.Message import Message\n from Products.ERP5Type.Message import Message\n
N_ = lambda msg, **kw: Message(\'erp5_ui\', msg, **kw)\n N_ = lambda msg, **kw: Message(\'erp5_ui\', msg, **kw)\n
\n
\n
paysheet_line_list = context.contentValues(portal_type=\'Pay Sheet Line\')\n
if context.getPriceCurrencyValue():\n if context.getPriceCurrencyValue():\n
precision = context.getPriceCurrencyValue().getQuantityPrecision()\n precision = context.getPriceCurrencyValue().getQuantityPrecision()\n
else:\n else:\n
precision = 2\n precision = 2\n
\n \n
\n
line_list = []\n line_list = []\n
\n \n
for paysheet_line in paysheet_line_list:\n for paysheet_line in paysheet_line_list:\n
slice_list = paysheet_line.getSalaryRangeValueList()\n base_category_list = paysheet_line.getVariationBaseCategoryList()\n
tax_category_list = paysheet_line.getVariationCategoryList(\\\n list_of_list = []\n
base_category_list=\'tax_category\')\n for base_category in base_category_list:\n
\n list = paysheet_line.getVariationCategoryList(base_category_list=\\\n
for slice in slice_list:\n base_category)\n
share_dict={}\n list_of_list.append(list)\n
quantity=0\n cartesian_product = cartesianProduct(list_of_list)\n
for tax_category in tax_category_list:\n \n
cell = paysheet_line.getCell(tax_category, slice.getRelativeUrl())\n previous_share = None\n
quantity = cell.getQuantity()\n indice = 0\n
price = cell.getPrice()\n \n
share_dict[cell.getTaxCategory()+\'_rate\'] = price\n object_dict = {}\n
share_dict[cell.getTaxCategory()+\'_amount\'] = round(quantity*price,\n for tuple in cartesian_product:\n
precision)\n indice += 1\n
share_dict = {}\n
cell = paysheet_line.getCell(*tuple)\n
if cell is None:\n
continue\n
\n \n
# In theory, the base is the same for all share, but changes with the slice\n quantity = cell.getQuantity()\n
base = quantity\n base = quantity\n
\n \n
base_list = [str(N_(base_application)) for base_application in \\\n base_list = [str(N_(base_application)) for base_application in \\\n
paysheet_line.getBaseAmountTitleList()]\n paysheet_line.getBaseAmountTitleList()]\n
base_name = \'+\'.join(base_list)\n base_name = \'+\'.join(base_list)\n
\n
payroll_service = paysheet_line.getResourceValue()\n payroll_service = paysheet_line.getResourceValue()\n
base_participation_list = payroll_service.getBaseAmountList()\n base_participation_list = payroll_service.getBaseAmountList()\n
line_list.append(paysheet_line.asContext(\n \n
slice=slice.getTitle(),\n price = cell.getPrice()\n
base_name=base_name,\n share_dict[cell.getTaxCategory()+\'_rate\'] = price\n
base=base,\n share_dict[cell.getTaxCategory()+\'_amount\'] = round(quantity*price,\n
base_participation_list=base_participation_list,\n precision)\n
payroll_service=payroll_service.getId(),\n \n
**share_dict))\n tuple_dict = {}\n
for item in tuple:\n
# the dict key is the base category and value is the category path\n
tuple_dict[item.split(\'/\')[0]]=context.portal_categories.restrictedTraverse(item).getTitle()\n
tuple_dict[item.split(\'/\')[0]+\'_relative_url\']=item\n
\n
# we want to display as lines as a paysheet line as slices\n
# this is esay to read\n
slice = cell.getSalaryRange()\n
if slice is None:\n
slice = \'no_slice\'\n
if not object_dict.has_key(slice):\n
slice_title = None\n
if tuple_dict.has_key(\'salary_range\'):\n
slice_title=tuple_dict[\'salary_range\']\n
object_dict[slice]={\n
\'slice\':slice_title,\n
\'base_name\':base_name,\n
\'base\':base,\n
\'base_participation_list\':base_participation_list,\n
\'payroll_service\':payroll_service.getId()}\n
object_dict[slice].update(share_dict)\n
else:\n
object_dict[slice].update(**share_dict)\n
\n
\n
for object_key in paysheet_line.getSalaryRangeList():\n
line_list.append(paysheet_line.asContext(**object_dict[object_key]))\n
if object_dict.has_key(\'no_slice\'):\n
line_list.append(paysheet_line.asContext(**object_dict[\'no_slice\']))\n
\n \n
if kw.has_key(\'sort_on\'):\n if kw.has_key(\'sort_on\'):\n
list = kw[\'sort_on\']\n list = kw[\'sort_on\']\n
...@@ -166,29 +210,34 @@ return line_list\n ...@@ -166,29 +210,34 @@ return line_list\n
<value> <value>
<tuple> <tuple>
<string>kw</string> <string>kw</string>
<string>Products.PythonScripts.standard</string> <string>Products.ERP5Type.Utils</string>
<string>Object</string> <string>cartesianProduct</string>
<string>pprint</string> <string>pprint</string>
<string>_getattr_</string>
<string>context</string>
<string>paysheet_line_list</string>
<string>Products.ERP5Type.Message</string> <string>Products.ERP5Type.Message</string>
<string>Message</string> <string>Message</string>
<string>N_</string> <string>N_</string>
<string>_getattr_</string>
<string>context</string>
<string>paysheet_line_list</string>
<string>precision</string> <string>precision</string>
<string>line_list</string> <string>line_list</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>paysheet_line</string> <string>paysheet_line</string>
<string>slice_list</string> <string>base_category_list</string>
<string>tax_category_list</string> <string>list_of_list</string>
<string>slice</string> <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>
<string>tuple</string>
<string>_inplacevar_</string>
<string>share_dict</string> <string>share_dict</string>
<string>quantity</string> <string>_apply_</string>
<string>tax_category</string>
<string>cell</string> <string>cell</string>
<string>price</string> <string>quantity</string>
<string>_write_</string>
<string>round</string>
<string>base</string> <string>base</string>
<string>append</string> <string>append</string>
<string>$append0</string> <string>$append0</string>
...@@ -198,9 +247,15 @@ return line_list\n ...@@ -198,9 +247,15 @@ return line_list\n
<string>base_name</string> <string>base_name</string>
<string>payroll_service</string> <string>payroll_service</string>
<string>base_participation_list</string> <string>base_participation_list</string>
<string>_apply_</string> <string>price</string>
<string>_write_</string>
<string>round</string>
<string>tuple_dict</string>
<string>item</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>list</string> <string>slice</string>
<string>slice_title</string>
<string>object_key</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>if paysheet is None:\n
paysheet = context\n
\n
portal_simulation = context.getPortalObject().portal_simulation\n
\n
params = {\n
\'node_uid\' : paysheet.getSourceSectionUid(),\n
\'mirror_section_uid\' : paysheet.getSourceSectionUid(),\n
\'section_uid\' : paysheet.getDestinationSectionUid(),\n
\'tax_category_uid\' :\\\n
context.portal_categories.tax_category.employee_share.getUid(),\n
\'to_date\' : paysheet.getStartDate(),\n
\'from_date\' : DateTime(paysheet.getStartDate().year(), 1, 1),\n
#\'simulation_state\' : [\'confirmed\', \'stopped\', \'delivered\'],\n
\'precision\' : paysheet.getPriceCurrencyValue().getQuantityPrecision(),\n
\'resource_category\' : [\'base_amount/base_salary\',]\n
#\'src__\' : 1\n
}\n
\n
return portal_simulation.getInventoryAssetPrice(**params)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>paysheet=None</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>paysheet</string>
<string>None</string>
<string>context</string>
<string>_getattr_</string>
<string>portal_simulation</string>
<string>DateTime</string>
<string>params</string>
<string>_apply_</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<none/>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PaySheetTransaction_getYearToDateBaseSalary</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -84,8 +84,8 @@ params = {\n ...@@ -84,8 +84,8 @@ params = {\n
}\n }\n
\n \n
deductible_tax = portal_simulation.getInventoryAssetPrice(**params)\n deductible_tax = portal_simulation.getInventoryAssetPrice(**params)\n
\n over_time = context.PaySheetTransaction_getYearToDateOvertimeAmount()\n
return context.PaySheetTransaction_getYearToDateGrossSalary() - deductible_tax\n return context.PaySheetTransaction_getYearToDateGrossSalary() - over_time - deductible_tax\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -137,6 +137,7 @@ return context.PaySheetTransaction_getYearToDateGrossSalary() - deductible_tax\n ...@@ -137,6 +137,7 @@ return context.PaySheetTransaction_getYearToDateGrossSalary() - deductible_tax\n
<string>params</string> <string>params</string>
<string>_apply_</string> <string>_apply_</string>
<string>deductible_tax</string> <string>deductible_tax</string>
<string>over_time</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>if paysheet is None:\n
paysheet = context\n
\n
portal_simulation = context.getPortalObject().portal_simulation\n
\n
params = {\n
\'node_uid\' : paysheet.getSourceSectionUid(),\n
\'mirror_section_uid\' : paysheet.getSourceSectionUid(),\n
\'section_uid\' : paysheet.getDestinationSectionUid(),\n
\'tax_category_uid\' :\\\n
context.portal_categories.tax_category.employee_share.getUid(),\n
\'to_date\' : paysheet.getStartDate(),\n
\'from_date\' : DateTime(paysheet.getStartDate().year(), 1, 1),\n
#\'simulation_state\' : [\'confirmed\', \'stopped\', \'delivered\'],\n
\'precision\' : paysheet.getPriceCurrencyValue().getQuantityPrecision(),\n
\'resource_category\' : [\'base_amount/over_time\',]\n
#\'src__\' : 1\n
}\n
\n
return portal_simulation.getInventoryAssetPrice(**params)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>paysheet=None</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>paysheet</string>
<string>None</string>
<string>context</string>
<string>_getattr_</string>
<string>portal_simulation</string>
<string>DateTime</string>
<string>params</string>
<string>_apply_</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<none/>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PaySheetTransaction_getYearToDateOvertimeAmount</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -158,7 +158,7 @@ return yearly_work_time\n ...@@ -158,7 +158,7 @@ return yearly_work_time\n
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>PaySheetTransaction_getYearToDateOverTimeHours</string> </value> <value> <string>PaySheetTransaction_getYearToDateOvertimeHours</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
......
...@@ -85,8 +85,10 @@ params = {\n ...@@ -85,8 +85,10 @@ params = {\n
\n \n
\n \n
deductible_tax = portal_simulation.getInventoryAssetPrice(**params)\n deductible_tax = portal_simulation.getInventoryAssetPrice(**params)\n
over_time = context.PaySheetTransaction_getYearToDateOvertimeAmount()\n
gross_salary = context.PaySheetTransaction_getYearToDateGrossSalary()\n
\n \n
return context.PaySheetTransaction_getYearToDateGrossSalary() - deductible_tax\n return gross_salary - over_time - deductible_tax\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -138,6 +140,8 @@ return context.PaySheetTransaction_getYearToDateGrossSalary() - deductible_tax\n ...@@ -138,6 +140,8 @@ return context.PaySheetTransaction_getYearToDateGrossSalary() - deductible_tax\n
<string>params</string> <string>params</string>
<string>_apply_</string> <string>_apply_</string>
<string>deductible_tax</string> <string>deductible_tax</string>
<string>over_time</string>
<string>gross_salary</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -91,7 +91,6 @@ tax_category_title = N_(\'(Amount or Percent)\')\n ...@@ -91,7 +91,6 @@ tax_category_title = N_(\'(Amount or Percent)\')\n
if matrixbox :\n if matrixbox :\n
if resource is not None:\n if resource is not None:\n
base_category_list = resource.getVariationBaseCategoryList()\n base_category_list = resource.getVariationBaseCategoryList()\n
base_category_list.reverse()\n
for base_category in base_category_list:\n for base_category in base_category_list:\n
category_cell_range = []\n category_cell_range = []\n
category_item_list = context.getVariationCategoryItemList(base_category_list = (base_category,))\n category_item_list = context.getVariationCategoryItemList(base_category_list = (base_category,))\n
...@@ -113,7 +112,6 @@ if matrixbox :\n ...@@ -113,7 +112,6 @@ if matrixbox :\n
else:\n else:\n
list_of_category_list = []\n list_of_category_list = []\n
variation_base_category_list = context.getVariationBaseCategoryList()\n variation_base_category_list = context.getVariationBaseCategoryList()\n
variation_base_category_list.reverse()\n
for base_category in variation_base_category_list:\n for base_category in variation_base_category_list:\n
list_of_category_list.append(\\\n list_of_category_list.append(\\\n
context.getVariationCategoryList(base_category_list=base_category))\n context.getVariationCategoryList(base_category_list=base_category))\n
......
...@@ -259,6 +259,14 @@ ...@@ -259,6 +259,14 @@
<string>price</string> <string>price</string>
<string>Share</string> <string>Share</string>
</tuple> </tuple>
<tuple>
<string>variation_category_list</string>
<string>variation_category_list</string>
</tuple>
<tuple>
<string>predicate_category_list</string>
<string>predicate_category_list</string>
</tuple>
</list> </list>
</value> </value>
</item> </item>
...@@ -282,14 +290,6 @@ ...@@ -282,14 +290,6 @@
<string>mapped_value_property_list</string> <string>mapped_value_property_list</string>
<string>mapped_value_property_list</string> <string>mapped_value_property_list</string>
</tuple> </tuple>
<tuple>
<string>variation_category_list</string>
<string>variation_category_list</string>
</tuple>
<tuple>
<string>predicate_category_list</string>
<string>predicate_category_list</string>
</tuple>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -285,7 +285,7 @@ ...@@ -285,7 +285,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: cell.getProperty(\'price\')</string> </value> <value> <string>python:cell.getProperty(\'price\')</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="RelationStringField" module="Products.ERP5Form.RelationField"/>
<string>Products.ERP5Form.RelationField</string> <tuple/>
<string>RelationStringField</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -142,6 +139,14 @@ ...@@ -142,6 +139,14 @@
<key> <string>tales</string> </key> <key> <string>tales</string> </key>
<value> <value>
<dictionary> <dictionary>
<item>
<key> <string>allow_creation</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>allow_jump</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>alternate_name</string> </key> <key> <string>alternate_name</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -154,6 +159,14 @@ ...@@ -154,6 +159,14 @@
<key> <string>catalog_index</string> </key> <key> <string>catalog_index</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>columns</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>container_getter_id</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>css_class</string> </key> <key> <string>css_class</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -194,18 +207,46 @@ ...@@ -194,18 +207,46 @@
<key> <string>extra</string> </key> <key> <string>extra</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>extra_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>first_item</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>items</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>jump_method</string> </key> <key> <string>jump_method</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>list_method</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>max_length</string> </key> <key> <string>max_length</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>max_linelength</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_lines</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>parameter_list</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>portal_type</string> </key> <key> <string>portal_type</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -218,6 +259,14 @@ ...@@ -218,6 +259,14 @@
<key> <string>required</string> </key> <key> <string>required</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>size</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>sort</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
......
179 184
\ 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