Hi All,
I have created a script to throw error when the budget is exceeded from the work order application with the below script using object lp WORKORDER.
from psdi.mbo import MboConstants
def setError(messageKey, messageGroup,arguments):
global errorkey,errorgroup, params
errorkey = messageKey
errorgroup = messageGroup
params = arguments
if (mbo.isModified("ABVBUDGETREMAINING_NP") or mbo.isModified("ACTTOTALCOST") or mbo.isModified("ACTLABCOST")):
budgetAmount=mbo.getDouble("ABBCURRCOMMIT")
balBudgetAmount=mbo.getDouble("ABVBUDGETREMAINING_NP")
if (balBudgetAmount<0):
setError("ABVBUDGETEXCEED","ABVBUDGET",[mbo.getString("ABBENGR"),budgetAmount])
Now my requirement is to show the same error that the project budget is exceeded when i am reporting from the Labor reporting application by choosing Enter by work order.
I am choosing Labor reporting module, then from the common actions i am picking Enter by work order and giving the work order details and creating a new row to chose the Labor. After filling the costs /rate, i am clicking ok and the record is getting saved which is not correct.
Note: The budget remaining is in negative number, also the actual total cost is greater than the budget amount in the work order module.
So could anyone please help to write an automation script to show the same error that the project budget is exceeded when i am reporting from the Labor reporting application by choosing Enter by work order.
Thanks in Advance
------------------------------
Ishwarya Soundarya
Accenture
------------------------------