I need to override a piece of Acumatica’s Approval process that prevents from Apprving a Rejected document. Not sure why Acumatica has put this control in place but it happens many times for us that a documents gets rejected to add some supporting documents and when documentation completed, then this document can be approved. The piece of the code that prevents from approving a rejected document is in EP\Descriptor\Attributes.cs as follows:
public virtual bool Approve(SourceAssign source)
{
EPApproval item = (EPApproval)this._Rejected.SelectSingle(GetSourceNoteID(source));
if (item != null)
throw new PXException(Messages.CannotApproveRejectedItem);
if (UpdateApproval(source, EPApprovalStatus.Approved))
{
RegisterActivity(source, PO.Messages.Approved);
return true;
}
return false;
}