Total: '+amount.toFixed(2)+' €';
+ if (amount < 5)
+ basketrel_html += 'Sur 5€: '+ (5-amount).toFixed(2) +' €
';
+ if (amount < 10)
+ basketrel_html += 'Sur 10€: '+ (10-amount).toFixed(2) +' €
';
+ if (amount < 20)
+ basketrel_html += 'Sur 20€: '+ (20-amount).toFixed(2) +' €
';
+ } else if (account_data['trigramme'] != '' && !isBasketEmpty()) {
+ var amount = getAmountBasket();
+ var amountUKF = amountToUKF(amount, account_data['is_cof']);
+ var newBalance = account_data['balance'] + amount;
+ var newBalanceUKF = amountToUKF(newBalance, account_data['is_cof']);
+ basketrel_html += 'Total: '+amountUKF+'
';
+ basketrel_html += 'Nouveau solde: '+newBalanceUKF+'
';
+ if (newBalance < 0)
+ basketrel_html += 'Manque: '+ (-newBalance).toFixed(2) +' €
';
}
basketrel_container.html(basketrel_html);
- }*/
+ }
function deleteFromBasket(opeindex) {
basket_container.find('[data-opeindex='+opeindex+']').remove();
deleteFromFormset(opeindex);
+ updateBasketRel();
}
function resetBasket() {