git ci fixed #507
This commit is contained in:
parent
9479723459
commit
eef2ef9c48
@ -801,7 +801,7 @@ App.cart = {
|
|||||||
|
|
||||||
if (App.restaurant.meetDeliveryMin() && App.order.delivery_type == 'delivery') {
|
if (App.restaurant.meetDeliveryMin() && App.order.delivery_type == 'delivery') {
|
||||||
$('.delivery-minimum-error').show();
|
$('.delivery-minimum-error').show();
|
||||||
$('.delivery-min-diff').html(parseFloat(App.restaurant.delivery_min - App.cart.total()).toFixed(2));
|
$('.delivery-min-diff').html(App.restaurant.deliveryDiff());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$('.delivery-minimum-error').hide();
|
$('.delivery-minimum-error').hide();
|
||||||
|
|||||||
@ -33,6 +33,13 @@ var Restaurant = function(id) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.deliveryDiff = function() {
|
||||||
|
var total = self.delivery_min_amt == 'subtotal' ? App.cart.subtotal() : App.cart.total();
|
||||||
|
var diff = parseFloat(App.restaurant.delivery_min - total).toFixed(2);
|
||||||
|
/* console.log(App.cart.subtotal(), App.cart.total(),self.delivery_min_amt, total, diff); */
|
||||||
|
return diff;
|
||||||
|
}
|
||||||
|
|
||||||
self.meetDeliveryMin = function() {
|
self.meetDeliveryMin = function() {
|
||||||
var total = self.delivery_min_amt == 'subtotal' ? App.cart.subtotal() : App.cart.total();
|
var total = self.delivery_min_amt == 'subtotal' ? App.cart.subtotal() : App.cart.total();
|
||||||
return total < parseFloat(self.delivery_min) ? true : false;
|
return total < parseFloat(self.delivery_min) ? true : false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user