Project

General

Profile

Bug #1878

[ESS-TRAVEL] travel cost tidak mengisi nilai amount nya pada status dokumen settlement

Added by Muhammad Bintar almost 2 years ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Start date:
12/15/2022
Due date:
12/21/2022
% Done:

0%

Estimated time:
Spent time:

Description

dear tim developer mohon supportnya untuk perbaikan pada fungsi autoload di travel cost karena jika pada saat employee mengajukan travel dengan status documen settlement, maka travel amount nya akan mengisi di amount settlement.

remote.minovais.com, 31122

database sql server 2019
remote.minovais.com, 1458


Files

clipboard-202212151634-jveeq.png (79.8 KB) clipboard-202212151634-jveeq.png Muhammad Bintar, 12/15/2022 04:34 PM
#1

Updated by Kezia Pawitra Yulianti almost 2 years ago

  • Status changed from New to Assigned
#2

Updated by M Azid Wahyudi almost 2 years ago

  • Status changed from Assigned to QA Test
  • Assignee changed from M Azid Wahyudi to Muhammad Bintar

dear masbin udah bisa di test ya

update :

function updateCalculate() {
console.log('updateCalculate >>');
var me = this;
var taskId = MinovaUtil.WORKFLOW.getTaskId();
var empId = MinovaUtil.WORKFLOW.getEmpId();
var body = MinovaUtil.WORKFLOW.getViewBodyWorkflow();
var cbCostType = body.down('[id=PDSWFTRAVELCOSTCostCostType]');
var gridCost = body.down('[name=PDSWFTRAVELCOST]');
var gridCostStore = Ext.StoreManager.lookup('storePDSWFTRAVELCOST');
var costAmountPlan = 0;
var totalCostAmountPlan = 0;
var CostAmountSettlement = 0;
var totalCostAmountSettlement = 0;
var HeaderTravelStatus = body.down('[name=HeaderTravelStatus]').getValue();
Ext.each(gridCostStore.getRange(), function (rec) {
costAmountPlan = parseInt(rec.get('CostRate')) * parseInt(rec.get('CostNumber'));
if (HeaderTravelStatus == '01') {
if (!Ext.isEmpty(parseInt(rec.get('CostAmountPlan')))) {
MinovaUtil.ExecuteParamQuery({
ID: "WFTVAMOUNT",
empId: empId,
stDate: rec.get('CostStartDate'),
costType: rec.get('CostCostType'),
costAmount: rec.get('CostAmountPlan'),
langId: MinovaUtil.GetLangID()
}, function (s) {
var result = Ext.decode(s.responseText);
var dt = Ext.decode(Ext.decode(result.data));
if (dt0.WarningType === '1') {
MinovaMessageError("Error", dt0.WarningId, "");
rec.set('CostAmountPlan', '');
rec.set('CostRate', '');
}
}, function (f) {});
}
rec.set('CostAmountPlan', costAmountPlan);
totalCostAmountPlan += costAmountPlan;
} else {
if (!Ext.isEmpty(parseInt(rec.get('CostAmountSettlement')))) {
MinovaUtil.ExecuteParamQuery({
ID: "WFTVAMOUNT",
empId: empId,
stDate: rec.get('CostStartDate'),
costType: rec.get('CostCostType'),
costAmount: rec.get('CostAmountSettlement'),
langId: MinovaUtil.GetLangID()
}, function (s) {
var result = Ext.decode(s.responseText);
var dt = Ext.decode(Ext.decode(result.data));
if (dt0.WarningType === '1') {
MinovaMessageError("Error", dt0.WarningId, "");
rec.set('CostAmountSettlement', '');
rec.set('CostRate', '');
}
}, function (f) {});
}
rec.set('CostAmountSettlement', costAmountPlan);
totalCostAmountSettlement += CostAmountSettlement;
}

});
}

function calcratetv() {
var body = MinovaUtil.WORKFLOW.getViewBodyWorkflow();
var TrvStats = body.down('[name=HeaderTravelStatus]').getValue();
var hsl = '0';
var rate = Ext.ComponentQuery.query('[id=PDSWFTRAVELCOSTCostRate]')[0].getValue();
var num = Ext.ComponentQuery.query('[id=PDSWFTRAVELCOSTCostNumber]')[0].getValue();
var rt = parseFloat(rate);
var nm = parseFloat(num);
if (TrvStats == '01') {
hsl = rt * nm;
Ext.ComponentQuery.query('[id=PDSWFTRAVELCOSTCostAmountPlan]')[0].setValue(hsl);
} else {
hsl = rt * nm;
Ext.ComponentQuery.query('[id=PDSWFTRAVELCOSTCostAmountSettlement]')[0].setValue(hsl);
}
}

Package :
- bizproc : 'Travel' (onmethod)

makasih

#3

Updated by M Azid Wahyudi almost 2 years ago

note update : di onmethod update 2 function di atas

#4

Updated by Muhammad Bintar about 1 month ago

  • Status changed from QA Test to Closed

Also available in: Atom PDF