Skip to main content
Answer

Payments & Applications screen - Planning to create Payment for Order with Pending approval status

  • April 11, 2025
  • 1 reply
  • 51 views

vidyakeerthik
Freshman II
Forum|alt.badge.img

Hello everyone,

As part of customization, we are trying to allow creating a Payment for a Sales order which is in pending approval status.

Standard Acumatica has a restriction here to avoid Payment creation in this case, to remove the restriction for the Pending Approval status, we tried to override the Restrctor attribute as below, which is not helpful, and we don’t see this restriction, anywhere else in the code. 


Tried Modifying  the PXRestrictor attribute  remove SOOrderStatus.pendingApproval , which didn’t help. As a next step, tried with Override the AdjdOrderNbr Selector without PXRestrictor still giving same error, and unable to create the Payment.

 

Steps to verify this:
• Create a Sales Order, and ensure Order status is Pending approval
•  Navigate to Payments and Applications screen, try to create a new Payment with the same customer used in the Sales Order, and then try to add the select the Sales order from the Sales Orders tab
• Tab out here, or saving the record pops out the error, which we are trying to avoid here.

 

Looking for the suggestions to achieve this. Please review let us know if you have any inputs on this.

 

Appreciate your help!!

 

Best answer by Naveen Boga

@vidyakeerthik  Please try with the below code and it should work.

 

public class ARPaymentEntryExt : PXGraphExtension<ARPaymentEntry>
{

[PXMergeAttributes(Method = MergeMethod.Merge)]
[PXRemoveBaseAttribute(typeof(PXRestrictorAttribute))]
[PXRestrictor(typeof(Where<SOOrder.status, NotIn3<SOOrderStatus.cancelled, SOOrderStatus.voided>>),
PX.Objects.SO.Messages.DontApprovedDocumentsCannotBeSelected)]
public virtual void SOAdjust_AdjdOrderNbr_CacheAttached(PXCache cache) { }
}

 

Attached screenshots for your reference.

 

 

1 reply

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • Answer
  • April 11, 2025

@vidyakeerthik  Please try with the below code and it should work.

 

public class ARPaymentEntryExt : PXGraphExtension<ARPaymentEntry>
{

[PXMergeAttributes(Method = MergeMethod.Merge)]
[PXRemoveBaseAttribute(typeof(PXRestrictorAttribute))]
[PXRestrictor(typeof(Where<SOOrder.status, NotIn3<SOOrderStatus.cancelled, SOOrderStatus.voided>>),
PX.Objects.SO.Messages.DontApprovedDocumentsCannotBeSelected)]
public virtual void SOAdjust_AdjdOrderNbr_CacheAttached(PXCache cache) { }
}

 

Attached screenshots for your reference.