Subversion Repositories SmartDukaan

Rev

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

Rev 33271 Rev 33277
Line 66... Line 66...
66
            }
66
            }
67
        });
67
        });
68
    });
68
    });
69
 
69
 
70
 
70
 
71
 
-
 
72
 
-
 
73
    $(document).on('click', ".order_accepted", function () {
71
    $(document).on('click', ".order_accepted", function () {
74
        var transactionId = $("#selectedTransactionId").text();
72
        var transactionId = $("#selectedTransactionId").text();
75
        var warehouseId = $("#selectedWarehouseId").val();
73
        var warehouseId = $("#selectedWarehouseId").val();
76
        var orderBillingModels = []; // Array to store OrderBillingModel objects
74
        var orderBillingModels = []; // Array to store OrderBillingModel objects
77
        $("#wareHouseTransactionTable > tbody > tr").each(function (rowIndex) {
75
        $("#wareHouseTransactionTable > tbody > tr").each(function (rowIndex) {
Line 117... Line 115...
117
        // Perform further actions with the requestBody, such as sending it in an AJAX request
115
        // Perform further actions with the requestBody, such as sending it in an AJAX request
118
        console.log('Request Body:', requestBody);
116
        console.log('Request Body:', requestBody);
119
 
117
 
120
        doPostAjaxRequestWithJsonHandler(`${context}/om/addBillingDetailsForGrouppedOrders/?warehouseId=${warehouseId}&transactionId=${transactionId}`, requestBody, function (invoiceNumber) {
118
        doPostAjaxRequestWithJsonHandler(`${context}/om/addBillingDetailsForGrouppedOrders/?warehouseId=${warehouseId}&transactionId=${transactionId}`, requestBody, function (invoiceNumber) {
121
            if (invoiceNumber) {
119
            if (invoiceNumber) {
122
                window.open(`${context}/om/downloadInvoice/${invoiceNumber}`, "_blank");
-
 
123
                alert("bill generated successfully");
120
                alert("bill generated successfully");
-
 
121
                setTimeout(3000, function () {
-
 
122
                    window.open(`${context}/om/downloadInvoice/${invoiceNumber}`, "_blank");
-
 
123
                });
124
                loadAllTransaction(warehouseId, "main-content");
124
                loadAllTransaction(warehouseId, "main-content");
125
            } else {
125
            } else {
126
                alert("something went wrong");
126
                alert("something went wrong");
127
            }
127
            }
128
        });
128
        });