forked from DGNum/gestioCOF
Fix calcul majoration
La subvention COF s'applique correctement à une majoration
This commit is contained in:
parent
44d9e8d8ed
commit
4e6f12bb6d
1 changed files with 4 additions and 0 deletions
|
@ -621,6 +621,8 @@ def kpsul_perform_operations(request):
|
|||
if operationgroup.on_acc.is_cash:
|
||||
to_checkout_balance += -operation.amount
|
||||
if operationgroup.on_acc.is_cof:
|
||||
if is_addcost:
|
||||
operation.addcost_amount = operation.addcost_amount / cof_grant_divisor
|
||||
operation.amount = operation.amount / cof_grant_divisor
|
||||
to_articles_stocks[operation.article] -= operation.article_nb
|
||||
else:
|
||||
|
@ -630,6 +632,8 @@ def kpsul_perform_operations(request):
|
|||
operationgroup.amount += operation.amount
|
||||
if operation.type == Operation.DEPOSIT:
|
||||
required_perms.add('kfet.perform_deposit')
|
||||
if operationgroup.on_acc.is_cof:
|
||||
to_addcost_for_balance = to_addcost_for_balance / cof_grant_divisor
|
||||
|
||||
(perms, stop) = operationgroup.on_acc.perms_to_perform_operation(
|
||||
amount = operationgroup.amount)
|
||||
|
|
Loading…
Reference in a new issue