Subversion Repositories SmartDukaan

Rev

Rev 34329 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 34329 Rev 35922
Line 88... Line 88...
88
                    .map(option => parseInt(option.value));
88
                    .map(option => parseInt(option.value));
89
            } else {
89
            } else {
90
                jsonData[key] = value;
90
                jsonData[key] = value;
91
            }
91
            }
92
        });
92
        });
-
 
93
 
-
 
94
        // Handle internalWarehouseId separately (may be disabled so not in FormData)
-
 
95
        const internalWarehouseSelect = form.find('#internalWarehouseId');
-
 
96
        const internalWarehouseValue = internalWarehouseSelect.val();
-
 
97
        if (internalWarehouseValue && internalWarehouseValue !== '') {
-
 
98
            jsonData['internalWarehouseId'] = parseInt(internalWarehouseValue);
-
 
99
        } else {
-
 
100
            jsonData['internalWarehouseId'] = null;
-
 
101
        }
-
 
102
 
93
        doPostAjaxRequestWithJsonHandler(
103
        doPostAjaxRequestWithJsonHandler(
94
            `${context}/supplier/update/${supplierId}`,
104
            `${context}/supplier/update/${supplierId}`,
95
            JSON.stringify(jsonData),
105
            JSON.stringify(jsonData),
96
            function (response) {
106
            function (response) {
97
                alert("Supplier updated successfully");
107
                alert("Supplier updated successfully");