How to calculate the value in amount field based on receipt quantity*unit price, at the same instant without navigating to the next page.
I am trying to calculate Amount based on (Receipt Quantity *unit price) in iProcurement module in EBS. I have currently written the code for its calculation in ProcessformRequest, but it works only when I press on the Next button and come back to see the amount.
OAApplicationModule am = (OAApplicationModule)pageContext.getRootApplicationModule();
OAViewObject vo = (OAViewObject)am.findViewObject("ReceiveMyItemsVO");
for (XxuaReceiveMyItemsVORowImpl voRow = (XxuaReceiveMyItemsVORowImpl)vo.first(); voRow != null; voRow = (XxuaReceiveMyItemsVORowImpl)vo.next()) {
// get info from current line
oracle.jbo.domain.Number xup = voRow.getXxuaUnitPrice();
oracle.jbo.domain.Number rq = voRow.getReceiptQuantity();
oracle.jbo.domain.Number xa = null;
xa = xup.multiply (rq);
}
Now my requirement is, as soon as I give the receipt quantity and press on tab , the amount should be calculated without going to next page. Is there any change event that we can use to perform this.
Can you have a button next to 'Receipt Qty', which you may call 'Calculate Amount'. In your processformRequest method, check if the acling action is that new button, then perform that calculation and have a statement like below: .setAttribute('',);
So the user will be supposed to explicitly click on new button to have calculated value displayed.