Subversion Repositories SmartDukaan

Rev

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

Rev 37770 Rev 37786
Line 266... Line 266...
266
 
266
 
267
    $(document).on('click', ".addRowInPurchaseOrder", function () {
267
    $(document).on('click', ".addRowInPurchaseOrder", function () {
268
        var totalQty = 0;
268
        var totalQty = 0;
269
        var totalValue = 0;
269
        var totalValue = 0;
270
 
270
 
271
        $("table > tbody > tr").each(function () {
271
        $("#purchase-order-table > tbody > tr").each(function () {
272
            var itemId = $(this).find(".transferPrice").data('itemid');
272
            var itemId = $(this).find(".transferPrice").data('itemid');
273
            var qty = $(this).find(".qty").val();
273
            var qty = $(this).find(".qty").val();
274
            var transferPrice = $(this).find(".transferPrice").val();
274
            var transferPrice = $(this).find(".transferPrice").val();
275
 
275
 
276
            if (qty !== undefined && qty !== "") {
276
            if (qty !== undefined && qty !== "") {
Line 903... Line 903...
903
 
903
 
904
    var poDate = $('#poDate').val();
904
    var poDate = $('#poDate').val();
905
 
905
 
906
 
906
 
907
    var items = []
907
    var items = []
908
    $("table > tbody > tr").each(function () {
908
    $("#purchase-order-table > tbody > tr").each(function () {
909
        var purchaseOrderJson = {};
909
        var purchaseOrderJson = {};
910
 
910
 
911
        var itemId = $(this).find(".transferPrice").data('itemid');
911
        var itemId = $(this).find(".transferPrice").data('itemid');
912
        var qty = $(this).find(".qty").val();
912
        var qty = $(this).find(".qty").val();
913
        var transferPrice = $(this).find(".transferPrice").val();
913
        var transferPrice = $(this).find(".transferPrice").val();
Line 963... Line 963...
963
 
963
 
964
    }
964
    }
965
 
965
 
966
    // Rows typed by hand and rows filled from a bulk upload are checked alike: the screen is where the order is made.
966
    // Rows typed by hand and rows filled from a bulk upload are checked alike: the screen is where the order is made.
967
    var overCap = [];
967
    var overCap = [];
968
    $("table > tbody > tr").each(function () {
968
    $("#purchase-order-table > tbody > tr").each(function () {
969
        if ($(this).find('.qty').hasClass('mv-over')) {
969
        if ($(this).find('.qty').hasClass('mv-over')) {
970
            overCap.push($(this).find('.typeaheaditem').val() + ': ' + $(this).find('.mv-qty-warn').text());
970
            overCap.push($(this).find('.typeaheaditem').val() + ': ' + $(this).find('.mv-qty-warn').text());
971
        }
971
        }
972
    });
972
    });
973
    if (overCap.length > 0) {
973
    if (overCap.length > 0) {