Commit 0052b8ae authored by Fabien Morin's avatar Fabien Morin

the slice amount will not be used on PaySheet who don't have any model in the...

the slice amount will not be used on PaySheet who don't have any model in the YearToDateSlice script.
This case must not appear very often. Just on the old PaySheet (before or during the Upgrade). During the upgrade, a default model is set on the Pay Sheets.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18613 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f12245ae
...@@ -84,7 +84,7 @@ search_params = \\\n ...@@ -84,7 +84,7 @@ search_params = \\\n
\'portal_type\' : \'Pay Sheet Transaction\',\n \'portal_type\' : \'Pay Sheet Transaction\',\n
\'delivery.start_date\' : {\'range\': "minmax", \'query\': (from_date, to_date)},\n \'delivery.start_date\' : {\'range\': "minmax", \'query\': (from_date, to_date)},\n
\'delivery.source_section_uid\' : context.getSourceSectionUid(),\n \'delivery.source_section_uid\' : context.getSourceSectionUid(),\n
# \'simulation_state\' : [\'confirmed\', \'stopped\', \'delivered\'],\n \'simulation_state\' : [\'confirmed\', \'stopped\', \'delivered\'],\n
}\n }\n
\n \n
paysheet_list = accounting_module.searchFolder(**search_params)\n paysheet_list = accounting_module.searchFolder(**search_params)\n
...@@ -107,6 +107,7 @@ yearly_slice_amount += slice_amount\n ...@@ -107,6 +107,7 @@ yearly_slice_amount += slice_amount\n
\n \n
for paysheet in paysheet_list :\n for paysheet in paysheet_list :\n
model = paysheet.getSpecialiseValue()\n model = paysheet.getSpecialiseValue()\n
if model is not None:\n
slice = model.getCell(slice_path)\n slice = model.getCell(slice_path)\n
plafond = slice.getQuantityRangeMax()\n plafond = slice.getQuantityRangeMax()\n
gross_salary=paysheet.PaySheetTransaction_getAmountFromBaseParticipationList(\\\n gross_salary=paysheet.PaySheetTransaction_getAmountFromBaseParticipationList(\\\n
...@@ -184,6 +185,7 @@ return yearly_slice_amount\n ...@@ -184,6 +185,7 @@ return yearly_slice_amount\n
<string>_inplacevar_</string> <string>_inplacevar_</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>paysheet</string> <string>paysheet</string>
<string>None</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
57 59
\ 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