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
No related merge requests found
...@@ -384,9 +384,9 @@ class PaySheetTransaction(Invoice): ...@@ -384,9 +384,9 @@ class PaySheetTransaction(Invoice):
# if no calculation script found, use a default method : # if no calculation script found, use a default method :
if not quantity: if not quantity:
if base_application <= model_slice_max: if base_application <= model_slice_max:
quantity = base_application quantity = base_application-model_slice_min
else: else:
quantity = model_slice_max quantity = model_slice_max-model_slice_min
else: else:
localized_calculation_script = getattr(self, script_name, localized_calculation_script = getattr(self, script_name,
None) None)
...@@ -433,10 +433,6 @@ class PaySheetTransaction(Invoice): ...@@ -433,10 +433,6 @@ class PaySheetTransaction(Invoice):
base_amount_table[column[share]][row[base_participation]] = \ base_amount_table[column[share]][row[base_participation]] = \
new_val new_val
# decrease the base_application used for this model line
if cell is not None :
base_application -= quantity
if cell_list: if cell_list:
# create the PaySheetLine # create the PaySheetLine
pay_sheet_line = self.createPaySheetLine( 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