merge with r-19
This commit is contained in:
@@ -629,7 +629,7 @@ $(function() {
|
||||
status = "selected-attribute";
|
||||
}
|
||||
if(parseInt(jQuery.inArray(value[i], instance_attributes)) == -1){
|
||||
disabled = "disabled";
|
||||
// disabled = "disabled";
|
||||
}
|
||||
row +="<button id='selected-attribute' data-instances='"+JSON.stringify(instances)+"' data-type='"
|
||||
+type+"' data-value='"+value[i]+"' class='btn btn- waves-effect attribute_btn "
|
||||
@@ -1102,16 +1102,30 @@ $(function() {
|
||||
var total_price = 0;
|
||||
var total_qty = 0;
|
||||
var taxable_amount = 0;
|
||||
var exclusive_total =0;
|
||||
var inclusive_total =0;
|
||||
var inclusive_tax =$('#inclusive_tax').val();
|
||||
var exclusive_tax =$('#exclusive_tax').val();
|
||||
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;
|
||||
});
|
||||
if (inclusive_tax >0){
|
||||
inclusive_total = total_price / inclusive_tax;
|
||||
total_price = total_price;
|
||||
}
|
||||
if (exclusive_tax >0){
|
||||
exclusive_total = total_price * exclusive_tax;
|
||||
total_price = total_price + exclusive_total;
|
||||
}
|
||||
|
||||
var fixed_total_price = parseFloat(total_price).toFixed(2);
|
||||
var fixed_taxable_amount = parseFloat(taxable_amount).toFixed(2);
|
||||
$('#total_tax').empty();
|
||||
$('#total_tax').append(parseInt(exclusive_total) + parseInt(inclusive_total));
|
||||
|
||||
$('#sub_total').empty();
|
||||
$('#sub_total').append(fixed_total_price);
|
||||
|
||||
Reference in New Issue
Block a user