forked from DGNum/gestioCOF
Ajout validé par + Fix annulations
- La personne validant une commande apparaît dans l'historique K-Psul - 2 fix annulation K-Psul
This commit is contained in:
parent
abb4be62aa
commit
170a827e99
2 changed files with 12 additions and 5 deletions
|
@ -4,7 +4,6 @@
|
|||
|
||||
#history span {
|
||||
display:inline-block;
|
||||
height:100%;
|
||||
}
|
||||
|
||||
#history .day {
|
||||
|
@ -40,6 +39,10 @@
|
|||
width:90px;
|
||||
}
|
||||
|
||||
#history .opegroup .valid_by {
|
||||
padding-left:20px
|
||||
}
|
||||
|
||||
#history .ope {
|
||||
position:relative;
|
||||
height:25px;
|
||||
|
|
|
@ -945,7 +945,7 @@ $(document).ready(function() {
|
|||
// -----
|
||||
|
||||
var history_container = $('#history');
|
||||
var history_operationgroup_html = '<div class="opegroup"><span class="time"></span><span class="trigramme"></span><span class="amount"></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></div>';
|
||||
|
||||
function getOpeHtml(ope, is_cof=false, trigramme='') {
|
||||
|
@ -994,12 +994,16 @@ $(document).ready(function() {
|
|||
} else {
|
||||
var amount = amountToUKF(amount, opegroup['is_cof']);
|
||||
}
|
||||
var valid_by = '';
|
||||
if (opegroup['valid_by__trigramme'])
|
||||
valid_by = 'Par '+opegroup['valid_by__trigramme'];
|
||||
|
||||
opegroup_html
|
||||
.attr('data-opegroup', opegroup['id'])
|
||||
.find('.time').text(at_formated).end()
|
||||
.find('.amount').text(amount).end()
|
||||
.find('.trigramme').text(trigramme).end();
|
||||
.find('.trigramme').text(trigramme).end()
|
||||
.find('.valid_by').text(valid_by).end();
|
||||
|
||||
return opegroup_html;
|
||||
}
|
||||
|
@ -1152,9 +1156,9 @@ $(document).ready(function() {
|
|||
});
|
||||
|
||||
function cancelOpeGroup(opegroup) {
|
||||
var opegroup_html = history_container.find('[data-opegroup='+opegroup['id']+']');
|
||||
var opegroup_html = history_container.find('.opegroup[data-opegroup='+opegroup['id']+']');
|
||||
if (opegroup_html.find('.trigramme').text() == 'LIQ') {
|
||||
var amount = (- parseFloat(opegroup['amount']).tofixed(2))+'€';
|
||||
var amount = (- parseFloat(opegroup['amount']).toFixed(2))+'€';
|
||||
} else {
|
||||
var amount = amountToUKF(opegroup['amount'], opegroup['on_acc__is_cof']);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue