adapt code to is_checkout removal

This commit is contained in:
Ludovic Stephan 2017-03-24 20:52:49 -03:00
parent cadaf43131
commit d7740e66fe
6 changed files with 105 additions and 40 deletions

View file

@ -31,13 +31,22 @@ function KHistory(options={}) {
if (ope['type'] == 'purchase') {
infos1 = ope['article_nb'];
infos2 = ope['article__name'];
} else if (ope['type'] == 'initial') {
infos1 = parsed_amount.toFixed(2)+'€';
infos2 = 'Initial';
} else {
infos1 = parsed_amount.toFixed(2)+'€';
infos2 = (ope['type'] == 'deposit') ? 'Charge' : 'Retrait';
infos2 = ope['is_checkout'] ? infos2 : 'Édition';
switch (ope['type']) {
case 'initial':
infos2 = 'Initial';
break;
case 'withdraw':
infos2 = 'Retrait';
break;
case 'deposit':
infos2 = 'Charge';
break;
case 'edit':
infos2 = 'Édition';
break;
}
}
$ope_html