System must calculate Total Price of all Supplier records to Summary Price of Oder Request Item.
Procedure
1. From ONEWEB workspace, create java file name "com.manual.doc.order.ajax.CalculateOrderRequestItemSummaryPrice" in MasterWeb and override method "processManual()" with coding below.
1.1. Go to App Designer and open entity "Doc Order Request Item - Back Office" then click edit at module "Supplier" and find module id at property name "Module ID"
1.2. Replace "MD8321225761_session" with module id from step 1.1 (concate module id with "_session")
2. From ONEWEB workspace, open java file name "/MasterWeb/WebContent/manual/js/doc/order/order_request_item_back_office_update_mode.js" and add new function with coding below.
function MD8321225761manualJS(){
var dataString = '';
var uri = "/MasterWeb/ManualServlet?className=com.manual.doc.order.ajax.CalculateOrderRequestItemSummaryPrice";
jQuery.ajax({
type : "POST",
url : uri,
data : dataString,
async : false,
success : function(data) {
var obj = JSON.parse(data);
console.log('#####MD5801448545manualJS Ajax Success obj#####', obj);
$('#MD9443222701_SUMMARY_PRICE_InputField [name="SUMMARY_PRICE"]').val(moneyFormat(obj.SUM_PRICE));
}
});
}
2.1. Replace "MD8321225761" at function name with module id from step 1.1
2.2. Go to App Designer and open entity "Doc Order Request Item - Back Office" then click edit at module "Order Item" and find module id at property name "Module ID"
2.3. Replace "MD9443222701" with module id from step 2.2
3. From ONEWEB workspace, export EafMasterEar.ear and deploy update to server. The class name "com.manual.doc.order.ajax.CalculateOrderRequestItemSummaryPrice" and java script file name "/MasterWeb/WebContent/manual/js/doc/order/order_request_item_back_office_update_mode.js" will update to server.
4. Test by log in to FrontWeb.
4.1. Login with Back Office user.
4.2. Go to To Do List and claim job.
4.3. Click edit Order Item.
4.4. Click edit Supplier and save.
4.5. The system must calculate summary to Summary Price.