Maximo Open Forum

 View Only

 Invoice SiteID must match PO SiteID before Invoice Approval

Jump to  Best Answer
  • Administration
  • Customizations
  • End User
  • Everything Maximo
  • Infrastructure
glenda creech's profile image
glenda creech posted 06-20-2023 23:29

Hello, I'm relatively new as a Maximo Admin. We are using Maximo 7.6.1.   I've been asked to put a "check" into the Invoice application so that the invoice cannot be put in APPR status if the invoice site id does not match the associated PO site id.  In our business, Site 1 can only pay for POs for Site 1.  Site 2 can only pay for Site 2's PO, etc.  It is my understanding that OOB functionality lets any site create an invoice for any other site's POs.  Has anyone had any situation like this and if so, how did you prevent Maximo from approving an Invoice with a mismatched PO Site ID?

My thought process so far is that when the user changes the status of the invoice from Entered to Approve, Maximo will check the Invoice Site ID and the PO Site ID.  If they do not match, then Maximo would pop up an error message alerting the user of the mismatch.  I have created a custom error message, and I have also created a conditional expression of ":invc_po.siteid = :siteid".  I've tried a few things, but I can't seem to get it to all work together.  

Any guidance is greatly appreciated!

Prashant Sharma's profile image
Prashant Sharma  Best Answer

You can go to Automation Script > Create Attribute Launch Point automation script > Run Action event.

invSite=mbo.getString("SITEID")

poSite=mbo.getString("POSITEID")

if (InvSite <> poSite):

    errorkey= C_INVOICE

    errorgroup = INVOICE

After saving automation script, Go to DB Config and create new message from Message select action for INVOICE, C_INVOICE. Give error message.