forked from DGNum/gestioCOF
Affichage majoration sur les historiques
This commit is contained in:
parent
9a574941f0
commit
44d9e8d8ed
|
@ -66,6 +66,10 @@
|
||||||
padding-left:15px;
|
padding-left:15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#history .ope .addcost {
|
||||||
|
padding-left:20px;
|
||||||
|
}
|
||||||
|
|
||||||
#history .ope .canceled {
|
#history .ope .canceled {
|
||||||
padding-left:20px;
|
padding-left:20px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,6 +68,11 @@
|
||||||
{% if ope.type == "deposit" %}Charge{% else %}Retrait{% endif %}
|
{% if ope.type == "deposit" %}Charge{% else %}Retrait{% endif %}
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if ope.addcost_for %}
|
||||||
|
<span class="addcost">
|
||||||
|
{{ ope.addcost_amount|ukf:ope.group.is_cof }}UKF pour {{ ope.addcost_for.trigramme }}
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
{% if ope.canceled_at %}
|
{% if ope.canceled_at %}
|
||||||
{% if perms.kfet.is_team and ope.canceled_by %}
|
{% if perms.kfet.is_team and ope.canceled_by %}
|
||||||
<span class="canceled">
|
<span class="canceled">
|
||||||
|
|
|
@ -946,7 +946,7 @@ $(document).ready(function() {
|
||||||
|
|
||||||
var history_container = $('#history');
|
var history_container = $('#history');
|
||||||
var history_operationgroup_html = '<div class="opegroup"><span class="time"></span><span class="trigramme"></span><span class="amount"></span><span class="valid_by"></span></div>';
|
var history_operationgroup_html = '<div class="opegroup"><span class="time"></span><span class="trigramme"></span><span class="amount"></span><span class="valid_by"></span></div>';
|
||||||
var history_operation_html = '<div class="ope"><span class="amount"></span><span class="infos1"></span><span class="infos2"></span><span class="canceled"></span></div>';
|
var history_operation_html = '<div class="ope"><span class="amount"></span><span class="infos1"></span><span class="infos2"></span><span class="addcost"></span><span class="canceled"></span></div>';
|
||||||
|
|
||||||
function getOpeHtml(ope, is_cof=false, trigramme='') {
|
function getOpeHtml(ope, is_cof=false, trigramme='') {
|
||||||
var ope_html = $(history_operation_html);
|
var ope_html = $(history_operation_html);
|
||||||
|
@ -974,6 +974,10 @@ $(document).ready(function() {
|
||||||
.find('.infos1').text(infos1).end()
|
.find('.infos1').text(infos1).end()
|
||||||
.find('.infos2').text(infos2).end();
|
.find('.infos2').text(infos2).end();
|
||||||
|
|
||||||
|
if (ope['addcost_for__trigramme']) {
|
||||||
|
ope_html.find('.addcost').text('('+amountToUKF(ope['addcost_amount'],is_cof)+'UKF pour '+ope['addcost_for__trigramme']+')')
|
||||||
|
}
|
||||||
|
|
||||||
if (ope['canceled_at']) {
|
if (ope['canceled_at']) {
|
||||||
ope_html.addClass('canceled');
|
ope_html.addClass('canceled');
|
||||||
if (ope['canceled_by__trigramme']) {
|
if (ope['canceled_by__trigramme']) {
|
||||||
|
|
|
@ -713,7 +713,7 @@ def kpsul_perform_operations(request):
|
||||||
ope_data = {
|
ope_data = {
|
||||||
'id': operation.pk, 'type': operation.type, 'amount': operation.amount,
|
'id': operation.pk, 'type': operation.type, 'amount': operation.amount,
|
||||||
'addcost_amount': operation.addcost_amount,
|
'addcost_amount': operation.addcost_amount,
|
||||||
'addcost_for': is_addcost and addcost_for.trigramme or None,
|
'addcost_for__trigramme': is_addcost and addcost_for.trigramme or None,
|
||||||
'is_checkout': operation.is_checkout,
|
'is_checkout': operation.is_checkout,
|
||||||
'article__name': operation.article and operation.article.name or None,
|
'article__name': operation.article and operation.article.name or None,
|
||||||
'article_nb': operation.article_nb,
|
'article_nb': operation.article_nb,
|
||||||
|
|
Loading…
Reference in a new issue