Merge pull request #660 from yrammos/hide-zero-price

Hide service price in modal views if equal to zero.
This commit is contained in:
Alex Tselegidis 2020-03-10 21:13:17 +01:00 committed by GitHub
commit 2e9d8c963e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -501,11 +501,11 @@ window.FrontendBook = window.FrontendBook || {};
}
var selServiceId = $('#select-service').val();
var servicePrice;
var serviceCurrency;
var servicePrice = '';
var serviceCurrency = '';
$.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;
serviceCurrency = service.currency;
return false; // break loop
@ -680,7 +680,7 @@ window.FrontendBook = window.FrontendBook || {};
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 + ']';
}