Subversion Repositories SmartDukaan

Rev

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

Rev 12867 Rev 12868
Line 21... Line 21...
21
 
21
 
22
    $('input[name$=quantity]').live('change', function() {
22
    $('input[name$=quantity]').live('change', function() {
23
        var price = $(this).closest('tr').find('input[name$=unitPrice]');
23
        var price = $(this).closest('tr').find('input[name$=unitPrice]');
24
        var quantity    = $(this).val();
24
        var quantity    = $(this).val();
25
        if(quantity==0){
25
        if(quantity==0){
26
        	alert('Quantity entered by is zero for the Item Id  '+ $('input[name$=itemId]') +'. This Item will not be considered in PO');
26
        	alert('Quantity entered by is zero for this Item. It will not be considered in PO');
27
        }
27
        }
28
        $(this).closest('tr').find('#amount').html(quantity * price);
28
        $(this).closest('tr').find('#amount').html(quantity * price);
29
        updateTotalAmount($(this).closest('div.lineitems').attr('supplierId'));
29
        updateTotalAmount($(this).closest('div.lineitems').attr('supplierId'));
30
    });
30
    });
31
 
31