Hide service price in modal views if equal to zero.

This commit is contained in:
Yannis Rammos 2019-10-27 19:04:32 +02:00
parent 14bbd793bf
commit ecfd5e830f

View file

@ -498,11 +498,11 @@ window.FrontendBook = window.FrontendBook || {};
} }
var selServiceId = $('#select-service').val(); var selServiceId = $('#select-service').val();
var servicePrice; var servicePrice = '';
var serviceCurrency; var serviceCurrency = '';
$.each(GlobalVariables.availableServices, function (index, service) { $.each(GlobalVariables.availableServices, function (index, service) {
if (service.id == selServiceId) { if (service.id == selServiceId && service.price != '' && service.price != null && service.price != '0.00' && service.price != '0,00') {
servicePrice = '<br>' + service.price; servicePrice = '<br>' + service.price;
serviceCurrency = service.currency; serviceCurrency = service.currency;
return false; // break loop return false; // break loop
@ -677,7 +677,7 @@ window.FrontendBook = window.FrontendBook || {};
html += '[' + EALang.duration + ' ' + service.duration + ' ' + EALang.minutes + ']'; html += '[' + EALang.duration + ' ' + service.duration + ' ' + EALang.minutes + ']';
} }
if (service.price != '' && service.price != null) { if (service.price != '' && service.price != null && service.price != '0.00' && service.price != '0,00') {
html += '[' + EALang.price + ' ' + service.price + ' ' + service.currency + ']'; html += '[' + EALang.price + ' ' + service.price + ' ' + service.currency + ']';
} }