Bug #2742
Autoload Material Type di menu Material Conversion
Description
Ketika user memilih Nama Barang, ingin agar field Material Type-nya otomatis terautoload (mengambil dari Material Type yang sudah diisikan di Material Master Data). Terima kasih.
Menu Path: Logistic & Service > Inventory Document > Material Conversion
Port: http://remote.minovais.com:61138/
DB: MinovaES_KJL_Prod (di 1452)
Files
Subtasks
Related issues
Updated by Kezia Pawitra Yulianti 7 months ago
- Due date set to 05/14/2024
- Status changed from New to Assigned
- Priority changed from Normal to High
Updated by shofwan shiddiq 7 months ago
- File clipboard-202405171030-hrdfv.png clipboard-202405171030-hrdfv.png added
- Status changed from Assigned to QA Test
- Assignee changed from shofwan shiddiq to jihad ....
Dear Jihad, auto load Material Type sudah di tambahkan, silahkan di testing
SDATATABLEFIELD > TableName = PTRMATERIALITEM; FieldName = MaterialID;
SelectFunction:
debugger; var store = Ext.StoreMgr.lookup("storePTRMATERIALITEM");
if (store != undefined) {
var idx = store.getCount() - 1;
var materialID = val.value;
Ext.Ajax.request({
async: false,
method: 'POST',
url: '/UserControl/GetStore',
params: {
tableName: 'PMDMAT0003',
param: 'MaterialID[=]' + materialID
},
success: function (response) {
var results = Ext.decode(response.responseText);
dtgrid = results.data;
}
});
var map;
var unitmasurement;
var material_type;
Ext.Ajax.request({
async: false,
method: 'POST',
url: '/UserControl/GetStore',
params: {
tableName: 'PMDMAT0001',
param: 'MaterialID[=]' + materialID
},
success: function (response) {
var results = Ext.decode(response.responseText);
dtgrid1 = results.data;
}
});
map = dtgrid10.MAP;
unitmasurement = dtgrid10.UnitMeasurement;
material_type = dtgrid10.MaterialType;
store.getAt(idx).set('UnitMeasurement', unitmasurement);
store.getAt(idx).set('MaterialType', material_type);
if (map != undefined) {
store.getAt(idx).set('NetPrice', map);
} else {
store.getAt(idx).set('NetPrice', 0);
};
var max;
for (var i = 0; i < dtgrid.length; i++) {
if (!max || parseInt(dtgrid[i]["SeqID"]) > parseInt(max["SeqID"]))
max = dtgrid[i];
}
if (max != undefined) {
store.getAt(idx).set('PriceAmount', max.PurchasePrice);
store.getAt(idx).set('Discount', max.Discount);
} else {
store.getAt(idx).set('PriceAmount', map);
store.getAt(idx).set('Discount', 0);
}
}