Pull from master
This commit is contained in:
@@ -1012,12 +1012,14 @@ $(function() {
|
||||
//calculate subtotal
|
||||
function calculate_sub_total(){
|
||||
var total_price = 0;
|
||||
var total_qty = 0;
|
||||
var taxable_amount = 0;
|
||||
var item_row = $('.summary-items tbody tr');
|
||||
|
||||
$(item_row).each(function(i){
|
||||
var unit_price = parseFloat($(item_row[i]).attr('data-price'));
|
||||
var qty = parseFloat($(item_row[i]).children('#item_qty').text());
|
||||
total_qty += qty;
|
||||
total_price += qty*unit_price;
|
||||
});
|
||||
var fixed_total_price = parseFloat(total_price).toFixed(2);
|
||||
@@ -1026,6 +1028,9 @@ $(function() {
|
||||
$('#sub_total').empty();
|
||||
$('#sub_total').append(fixed_total_price);
|
||||
|
||||
$('#total_qty').empty();
|
||||
$('#total_qty').append(total_qty);
|
||||
|
||||
if (item_row.length > 0) {
|
||||
$('.create').removeAttr("disabled", false);
|
||||
}else{
|
||||
@@ -1432,7 +1437,8 @@ $(function() {
|
||||
}
|
||||
}
|
||||
|
||||
row = '<div class="card custom-card testimonial-card fadeInRight" style="height:100%;background-image:url(../../'+image_path+');background-repeat: no-repeat;">'
|
||||
row = '<div class="col-md-3">'
|
||||
+'<div class="card custom-card testimonial-card fadeInRight" style="height:100%;background-image:url(../../'+image_path+');background-repeat: no-repeat;">'
|
||||
+'<div class="custom-card-head card-head row" style="line-height:14px;margin:0px;" style="">'
|
||||
+'<div class="col-md-10 " style="padding:0px !important;">'+ menu_items[field].name +'</div>'
|
||||
+"<div class='col-md-2 "+menu_item_box+" ' data-item-code='"
|
||||
@@ -1466,7 +1472,8 @@ $(function() {
|
||||
+'<div class="card-footer custom-card-footer" style="opacity:0.7">'
|
||||
+'<span>'+ price +'</span>'
|
||||
+'</div>'
|
||||
+'</div>';
|
||||
+'</div>'
|
||||
+'</div>'; ;
|
||||
$('.menu_items_list').append(row);
|
||||
}
|
||||
//end instances in menu-items alest 1 instance
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
$(document).ready(function() {
|
||||
$(".processitems").click(function(event){
|
||||
event.preventDefault();
|
||||
console.log($(this).data("id"));
|
||||
var item = $(this).data("id");
|
||||
$(this).toggleClass("opi_selected");
|
||||
|
||||
@@ -13,7 +12,6 @@ $(document).ready(function() {
|
||||
console.log($(this).data("id"));
|
||||
var group_id = $(this).data("id");
|
||||
var selector = "#" + group_id + " li div";
|
||||
console.log ($(selector));
|
||||
|
||||
$(selector).removeClass("opi_selected");
|
||||
$(selector).addClass("opi_selected");
|
||||
@@ -25,7 +23,6 @@ $(document).ready(function() {
|
||||
console.log($(this).data("id"));
|
||||
var group_id = $(this).data("id");
|
||||
var selector = "#" + group_id + " li div";
|
||||
console.log ($(selector));
|
||||
|
||||
$(selector).removeClass("opi_selected");
|
||||
});
|
||||
@@ -36,7 +33,6 @@ $(document).ready(function() {
|
||||
var items = new Array();
|
||||
selected_div = $(".opi_selected");
|
||||
$.each( selected_div, function( key, value ) {
|
||||
console.log($(value).attr("data-id"));
|
||||
items.push($(value).attr("data-id"));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user