small fixes

This commit is contained in:
Qwann 2017-04-04 16:57:17 +02:00
parent de724a2c0d
commit 72615bf400
2 changed files with 2 additions and 3 deletions

View file

@ -833,7 +833,7 @@ $(document).ready(function() {
if (settings['addcost_for']
&& settings['addcost_amount']
&& account_data['trigramme'] != settings['addcost_for']
&& article_data['5'])
&& article_data[5])
amount_euro -= settings['addcost_amount'] * nb;
var reduc_divisor = 1;
if (account_data['is_cof'])

View file

@ -1019,8 +1019,7 @@ def kpsul_perform_operations(request):
operation.is_checkout = False
if operationgroup.on_acc.is_cof:
if is_addcost & operation.article.category.has_addcost:
operation.addcost_amount = operation.addcost_amount \
/ cof_grant_divisor
operation.addcost_amount /= cof_grant_divisor
operation.amount = operation.amount / cof_grant_divisor
to_articles_stocks[operation.article] -= operation.article_nb
else: