Question

How can I modify or override the filter Capture Payments (AR511500)

  • 24 November 2021
  • 7 replies
  • 27 views

Userlevel 3
Badge

We have a situation where duplicate payment captures are appearing in the detail rows of the Capture Payments screen (AR511500). If I leave the standard process alone and run the capture process the first row of the three that I have highlighted will be captured and then the following two will generate an error message because the Payment has already been captured. So then the user will hit Process All and have to wade through a number of errors that are not really errors at all and I would like to avoid that.

I’d like to be able to adjust the filter or override the filter logic so that any records with a Reference Nbr value that were already included in the list are left off of the list.

Alternatively, if I can pre-select the unique Reference Nbr values, that would work, too.  I need the solution to be able to run through a schedule.

Or if I can get the Process routine to check the status of the Payment entry before it tries to initiate the credit card capture, that would be fine, too.

I decided to try pre-selecting the records that I wanted to process so I created a graph extension of the ARPaymentsAutoProcessing graph and tried to re-write the ardocumentlist. That shows an error on the foreach line: “Unable to cast object of type 'PX.Objects.AR.ARPaymentInfo' to type 'PX.Data.PXResult`1[PX.Objects.AR.ARPaymentInfo]'.”

In addition, (if I debug the process) res contains the entire list of ARRegister records instead of the two that would normally appear on the screen. So it seems like the filter isn’t being respected.

public class ARPaymentsAutoProcessing_Extension : PXGraphExtension<ARPaymentsAutoProcessing>
{
public static bool IsActive()
{ return true; }

protected virtual IEnumerable ardocumentlist()
{
PXView sel = new PXView(Base, true, Base.ARDocumentList.View.BqlSelect);

int totalRow = 0;
int startRow = PXView.StartRow;

List<object> res = sel.Select(PXView.Currents, PXView.Parameters,
PXView.Searches, PXView.SortColumns, PXView.Descendings,
PXView.Filters, ref startRow, PXView.MaximumRows, ref totalRow);

var refNbrList = new List<string>();

foreach (PXResult<ARPaymentInfo> row in res) //ERROR HERE
{
ARPaymentInfo paymentInfo = (ARPaymentInfo)row;
if ( !refNbrList.Contains(paymentInfo.RefNbr))
{
paymentInfo.Selected = true;
Base.ARDocumentList.Cache.Update(paymentInfo);
refNbrList.Add(paymentInfo.RefNbr);
}
}

return res;
}
}

 


7 replies

Userlevel 5
Badge +4

Hi @ddunn This looks like an issue with the “Capture Payments” screen out of the box in the screen. Will review and revert to you shortly.

Thanks

Userlevel 3
Badge

Hi @ChandrasekharM - I agree, I think there’s a bug with the payment capture process but I haven’t been able to convince Acumatica of this yet.  I documented my findings as an Idea as per supports request.  I’m eager to hear of your findings.

 

Userlevel 5
Badge +4

Hi @ddunn Thanks for the update.

Initially when the payment is created by selecting pre-loaded documents in “Documents to Apply” then this issue seems to occur. I noticed that the number of repetitive records shown in “Capture Payments” is equal to the lines in the “Documents to Apply” tab. Reviewing, and will keep posted on further observations and possible solution ..

 

Below screenshots with steps to replicate:

 

 

Userlevel 5
Badge +4

Hi @ddunn  Just trying to get to the root of the Issue here. Thanks for your patience.

On further investigation, when remove the Documents that we originally selected(those automatically loaded and selected by user), the Capture Payments just shows 1 records, as expected. Does this workaround help you?

 

 

 

Userlevel 5
Badge +4

Screenshot showing the expected result when the documents in the Payments and Applications → “Documents to Apply” are removed and applied back:

 

Userlevel 3
Badge

Thank you for digging into that @ChandrasekharM 

While that work around does allow the Capture Payments screen to function properly, it shifts the burden of the correct creation of the Payment transactions back on the end user. Thank you for working through that - I’ll add that to my support case.

I’m thinking that there is an incorrect join in the BQL filter for that screen but I’m having a hard time finding where the BQL is declared to try and override it.

Userlevel 5
Badge +4

Hi @ddunn 

You are welcome!!

Thanks

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2020  Acumatica, Inc. All rights reserved