Project

General

Profile

Bug #2742

Autoload Material Type di menu Material Conversion

Added by haykal haykal 7 months ago. Updated 7 months ago.

Status:
Closed
Priority:
High
Assignee:
Start date:
05/08/2024
Due date:
05/14/2024
% Done:

0%

Estimated time:
Spent time:

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


Add

Subtasks


Add

Related issues

#1

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

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);
}
}

Updated by jihad .... 7 months ago

  • Status changed from QA Test to Closed

Terima kasih

Also available in: Atom PDF