Commit 24fc40f8 authored by Julien Muchembled's avatar Julien Muchembled

Add support for dynamic amount generator lines/cells

parent eee1621b
...@@ -229,6 +229,7 @@ class AmountGeneratorMixin: ...@@ -229,6 +229,7 @@ class AmountGeneratorMixin:
return return
if not self.test(delivery_amount): if not self.test(delivery_amount):
return return
self = self.asPredicate()
reference = self.getReference() reference = self.getReference()
if reference: if reference:
if reference in reference_set: if reference in reference_set:
...@@ -244,8 +245,10 @@ class AmountGeneratorMixin: ...@@ -244,8 +245,10 @@ class AmountGeneratorMixin:
base_application_list = self.getBaseApplicationList() base_application_list = self.getBaseApplicationList()
base_contribution_list = self.getBaseContributionList() base_contribution_list = self.getBaseContributionList()
for cell in amount_generator_cell_list: for cell in amount_generator_cell_list:
if not (cell is self or cell.test(delivery_amount)): if cell is not self:
if not cell.test(delivery_amount):
continue continue
cell = cell.asPredicate()
key = cell.getCellAggregateKey() key = cell.getCellAggregateKey()
try: try:
property_dict = cell_aggregate[key] property_dict = cell_aggregate[key]
......
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