× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I imagine most people pay their bill by month, and you are dealing with only a very small part of the whole.

I probably would look for the monthly balances, and pay them in full as much as I can, from oldest to newest. If there comes a month where the payment to apply is less than the whole month, then do a sub-routine for the charges within that month.

Something like this:

select

when the payment equals the total due, do the "paid in full" stuff.

when the payment amount is greater than the total amount due then there is a credit balance. Do credit balance stuff.

otherwise,
Do while the amount paid is equal to or greater than the oldest month still due, pay the oldest month due in full and subtract that amount from the amount paid. After that do-cycle, if an amount is still to be applied run a sub-routine that processes the payments in the order desired. That should be pretty straight forward, as the amounts will, by definition, be less than the sum of the service bills for that month.

end your select.




Mike wrote:
I am sure someone has done something similar to what we need.

The monthly bills we send are broken into 4 sections and the money the
customers pay are applied to the sections in a certain order. The money is
also applied to the oldest month first then progresses to the current month.
Normally I would say a multi-dimensional array. However, I see that RPG
doesn't do it the same way as Java or other languages would. I hope I
explained this well enough. Any suggestions? Can anyone point me in a
direction?



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.