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.