Bentley Asset Reliability's Enterprise Asset Management business logic, as with most EAMs, expects an Invoice to be entered into the software and be properly processed thus updating the PO status. This ensures that all accounting, approvals, business objects and audit trail are populated accurately. A script as you are requesting would bypass this business logic and therefore we would not provide such a script via Assetwise Support.
If the business logic is broken or should there be a flaw found with the business logic that's a different story and should be reported to support including details of what is believed to be inaccurate business logic.