Commit 7636231a authored by Fabien Morin's avatar Fabien Morin

modify calculation method to be more simple and to permit to handle case with...

modify calculation method to be more simple and to permit to handle case with a first slice with non 0 min value.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17722 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 690e1c4d
......@@ -384,9 +384,9 @@ class PaySheetTransaction(Invoice):
# if no calculation script found, use a default method :
if not quantity:
if base_application <= model_slice_max:
quantity = base_application
else:
quantity = model_slice_max
quantity = base_application-model_slice_min
else:
quantity = model_slice_max-model_slice_min
else:
localized_calculation_script = getattr(self, script_name,
None)
......@@ -433,10 +433,6 @@ class PaySheetTransaction(Invoice):
base_amount_table[column[share]][row[base_participation]] = \
new_val
# decrease the base_application used for this model line
if cell is not None :
base_application -= quantity
if cell_list:
# create the PaySheetLine
pay_sheet_line = self.createPaySheetLine(
......
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