update addorder
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(fixed_total_price);
|
||||
|
||||
if (item_row.length > 0) {
|
||||
$('.create').removeAttr("disabled", false);
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user