|
|
@ -39,11 +39,11 @@ odoo.define('booking.main', function (require) { |
|
|
|
}); |
|
|
|
|
|
|
|
$(":checkbox").change(function() { |
|
|
|
|
|
|
|
console.log('start debug price') |
|
|
|
//si coche adhésion alors le statut devient membre
|
|
|
|
if(this.value==$("#membership_product").val() && this.checked) |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
if ($("#status").val()=='not member') {$("#status2").val('member')} |
|
|
|
|
|
|
|
|
|
|
@ -58,7 +58,7 @@ odoo.define('booking.main', function (require) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//recalcul du prix total
|
|
|
|
//recalcul du prix total selon le status
|
|
|
|
if ($("#status2").val()=='not member') |
|
|
|
{ |
|
|
|
|
|
|
@ -96,19 +96,21 @@ odoo.define('booking.main', function (require) { |
|
|
|
|
|
|
|
option_price=$(option_price_str).val() |
|
|
|
if (!option_price) option_price=0 |
|
|
|
//console.log(option_price_str+'='+option_price)
|
|
|
|
console.log(option_price_str+'='+option_price) |
|
|
|
total_price=$("#total_price").val() |
|
|
|
|
|
|
|
if(this.checked) { |
|
|
|
|
|
|
|
$("#total_price").val(parseInt(total_price)+parseInt(option_price)) |
|
|
|
console.log($("#total_price").val()) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
$("#booking_total_price").text($("#total_price").val()+' €'); |
|
|
|
|
|
|
|
console.log( 'total price final='+$("#booking_total_price").text()) |
|
|
|
console.log('end debug price') |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|