Skip to main content
Solved

How to display total number of payments made by customer in GI


Forum|alt.badge.img
  • Semi-Pro II
  • 259 replies

Hello all,

I have been looking how can I calculate the number of payments done by the customer in a GI?

Best answer by BenjaminCrisman

@Harry the Count aggregate function will only work if there is a grouping applied to the records, which would be exactly what would be needed here, grouping conditions.

I would group on the customer for the payment and then use a Count() function or Count aggregate function to display the number of payments in the group.
You can quickly get this done by copying the AR Payments and Applications GI into a new one.

Then add a grouping:

Then add the function on the results grid and remove/add any fields you want to use:

Then the results will show you the number of payments for that customer:

 

View original
Did this topic help you find an answer to your question?

5 replies

Forum|alt.badge.img+1
  • Varsity I
  • 20 replies
  • January 19, 2024

Hi @Harry 

If I’m reading your question correctly, you could aggregate using COUNT on the ARPayament RefNbr field...

 

 

 


BenjaminCrisman
Acumatica Employee
Forum|alt.badge.img+4
  • Acumatica Support Team
  • 733 replies
  • Answer
  • January 19, 2024

@Harry the Count aggregate function will only work if there is a grouping applied to the records, which would be exactly what would be needed here, grouping conditions.

I would group on the customer for the payment and then use a Count() function or Count aggregate function to display the number of payments in the group.
You can quickly get this done by copying the AR Payments and Applications GI into a new one.

Then add a grouping:

Then add the function on the results grid and remove/add any fields you want to use:

Then the results will show you the number of payments for that customer:

 


Forum|alt.badge.img
  • Author
  • Semi-Pro II
  • 259 replies
  • January 20, 2024

Hello @BenjaminCrisman,

Thank you for your quick suggestion. How can I apply the condition if I would only want to display the count of payments for the last 12 months?

Thanks in advance.


Laura02
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3132 replies
  • January 20, 2024

Hello, 

Add two parameters to prompt the user for begin/end month. Add condition to select where Post Period (financial period) is between the begin month parameter and the end month parameter.

 

Laura


bryanb39
Pro II
Forum|alt.badge.img+6
  • Pro II
  • 177 replies
  • January 20, 2024

If you want it hard coded to show 12 Months, you can add a condition for the DocDate to be greater than or equal to DateAdd(Today(),'M',-12). This will filter to 12 Months to the day, so mid month if it’s mid month now.  There’s a couple ways to do calendar month if you prefer, let me know if you need to calendar.

To show 12 Months, 3 Months, all time at the same time to show a trend, you can add the formula: =iif([ARPayment.DocDate] >= DateAdd(Today(),'M',-12),1,0) and set the Aggregation to SUM.  

To combine this with @Laura02’s suggestion, you can have it default to a range when Parameter is blank, or filter by Period Parameter if the user fills out the period or date range.  

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings