Le panier prend en compte la majoration

This commit is contained in:
Aurélien Delobelle 2016-08-22 16:42:03 +02:00
parent 44ea94520b
commit abb4be62aa
2 changed files with 5 additions and 2 deletions

View file

@ -1,6 +1,5 @@
$(document).ready(function() {
$(window).scroll(function() {
console.log($(this).scrollTop());
if ($(window).width() >= 768 && $(this).scrollTop() > 72.6) {
$('.col-content-left').css({'position':'fixed', 'top':'50px'});
$('.col-content-right').addClass('col-sm-offset-4 col-md-offset-3');

View file

@ -687,14 +687,18 @@ $(document).ready(function() {
var i = 0;
while (i<articlesList.length && id != articlesList[i][1]) i++;
article_data = articlesList[i];
var amount_euro = - article_data[3] * nb ;
if (settings['addcost_for'] && settings['addcost_amount'] && account_data['trigramme'] != settings['addcost_for'])
amount_euro -= settings['addcost_amount'] * nb;
var reduc_divisor = 1;
if (account_data['is_cof'])
reduc_divisor = 1 + settings['subvention_cof'] / 100;
return - article_data[3] * nb / reduc_divisor;
return amount_euro / reduc_divisor;
}
function addPurchase(id, nb) {
var amount_euro = amountEuroPurchase(id, nb).toFixed(2);
console.log(amount_euro);
var index = addPurchaseToFormset(article_data[1], nb, amount_euro);
article_basket_html = $(item_basket_default_html);
article_basket_html