Subversion Repositories SmartDukaan

Rev

Rev 36299 | Rev 36532 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36299 Rev 36520
Line 277... Line 277...
277
        updateTotalValue();
277
        updateTotalValue();
278
    });
278
    });
279
 
279
 
280
    function updateTotalValue() {
280
    function updateTotalValue() {
281
        var grandTotal = 0;
281
        var grandTotal = 0;
-
 
282
        var totalQty = 0;
282
        $('tbody > tr').each(function () {
283
        $('tbody > tr').each(function () {
283
            var rowTotal = parseFloat($(this).find('.totalValue').val());
284
            var rowTotal = parseFloat($(this).find('.totalValue').val());
-
 
285
            var rowQty = parseInt($(this).find('.qty').val());
284
            if (!isNaN(rowTotal)) {
286
            if (!isNaN(rowTotal)) {
285
                grandTotal += rowTotal;
287
                grandTotal += rowTotal;
286
            }
288
            }
-
 
289
            if (!isNaN(rowQty)) {
-
 
290
                totalQty += rowQty;
-
 
291
            }
287
        });
292
        });
-
 
293
        $('#totalQuantity').text(totalQty);
288
        $('#grandTotal').text(grandTotal.toFixed(2));
294
        $('#grandTotal').text(grandTotal.toFixed(2));
289
    }
295
    }
290
 
296
 
291
    function addItem(container, itemId) {
297
    function addItem(container, itemId) {
292
        oldItemId = container.find('.transferPrice').data('itemid');
298
        oldItemId = container.find('.transferPrice').data('itemid');