Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A calulation Code Needed < Help!!!!

Status
Not open for further replies.

gator9

Technical User
May 17, 2002
162
US
Here is a good one that has been driving me crazy for some time now. I have a system that calculates the percentage of an account and when the debtor is under contract and when he is not under contract. The way I do this is percentages and it works great. My client, myself, and my attorney’s get a percentage of every payment made by a debtor. I have a formula in place that is accurate up to 1 cent. My problem is I want to be able to add the attorney’s fee’s to a debtors account even if he has been making payments on the account then stops paying causing us to have to turn it over to our attorneys. Now the problem I am running into is that if I don’t close out the account and then reopen a new one it adds the attorneys fee’s to the principle amount of the debt which is not accurate due to it should only add the attorneys fee’s to the principle amount minus the money paid to the client and that is only if we have added our fee’s to the top of the debt. Now if we have not added our fee’s to the top it would be the principle amount minus money paid to the client and us.

Here is how it works if you have a debt of $500.00 and you add our 30% fee it increases the debt to $650.00 now in order for our clint to receive all there money and the in of a payment arrangement the will get 76.92% and we will get 23.08% of every payment and at the in everyone has all there money but when you add the attorney’s in the equation that percentage changes. What I would like to try is to have a formula that goes something like this.

Attorney’s Field: Currency < there 35% fees are always added to the top.
Client Field: Currency
Our Field: Currency
Under Contract Check Box: yes/no

Amount of debt: $500.00

Now I want the formula to be able to determand if the debtor is under contract and calculate the amount of every payment so that each party above gets the proper amount of money at the in of a payment arrangement. Like if the debt is $500.00 and we add our fee to the top it becomes 650.00 now some times the debtor will not be under contract so we will pull a 23.08% fee from the $500.00 rather than adding it to the top of the debt.

I hope you understand what I want and is there anyone that even knows where to began writing a code for this.


Sincerely,

Charles
 
Hi Gator9,

I'm trying to understand this, but the more I try and work through it, the more confused I get.

You have a Principal Amount ($500.00). This doesn't change.

You have a Client Amount. This shows 76.92% of all payments made, regardless of the under contract flag.

You have Your Amount. This shows 23.08% of all payments made, regardless of the under contract flag.

Now you involve the attorneys and you want to calculate their percentage (35%) of the outstanding principal. Isn't this just the Amount of Debt minus the Client Field, in all circumstances?

It seems to me that the only difference between you being under contract and not, is in the total amount payable by the debtor, not in the value of any fields you show.

Obviously I am misunderstanding something, but I'm not sure what.

Enjoy,
Tony

------------------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading FAQ222-2244 before you ask a question.
 
I did find a work around for this first off, and I do thank you for your response because I still would like to figure out a formula for it.

With that said:

You have a Principal Amount ($500.00). This doesn't change.
>>Yes the principal never changes example $500.00. Now when you add our fee of 30% $500.00 debt plus our fee = $650.00. Ok now in order to get our $150.00 fee and our client to get there $500.00 principal amount back we take 23.08 percent of every payment and they take 76.92%. Now the percenage rate is accually 10digets but I want even go there. Now if whe can't add our fee to the top we still only take 23.08 percent of each payment. Now when you add an attorney's fee to it the percentage of each payment amount changes again in order to insure every one gets all money's owed. Now the attorney's fee well be added to the principal - the amount paid to client if the debter is under contract or - the amount paid to client and to us if the debtor is not.

That is it ;-) Now if a debtor has never made a payment then adding attorney's fee is just a click, but if they have made a payment I have to charge off the account open up a new account with there old balance and label it as a resubmit and then click and the add attorneys fee. Now this works good and I have revised the code and it take just one click to duplicate the record and its done. I would however love to be able to do this without having to open or start a new record if the debtor has made a payment. It would take a complicated set of events to make it happen. Now the code I have now is accurate up to a 999,999.00 payment. So don’t stress over it because what I have works and is very stable I just would like to be able to do it without doing a resubmit. One more thing the reason its hard is doing it with out resubmitting the debt means the principle changes as payments are made is the reason it want work. See now the attorney’s fee is added to the principle amount and the only thing that changes is rather our fee is added. But if you have to add the fee to a debt that has payments on it the total debt may be lower that the original principal. I THINK WE ARE JUST GOING TO HAVE TO DO A RESUBMIT ON THE ONES THAT HAVE TO BE TURNED OVER TO THE ATTORNEY’S AND THAT HAVE HAD PAYMENTS MADE BE FOR THEY WHERE TURNED OVER.

;-)


Sincerely,

Charles
 
I am right in assuming then:

Principle 500
Your Fee 150
Total 650

Client pays 2 * 100 and then you call in the attorneys - which is nice

Balance 450
Attorney 0.35*(450/1.3)
Total 571

Client continues to pay 100
Principle 60.6
Fee 18.2
Attorney 21.2

Is that right???

If at first you don't succeed, try for the answer.
 
Are the numbers explained OK. The essence of what I am trying to say is that at any point in time the debt (balance of principle and your fee) divided by 1.3 will give the outstanding principle this can be multiplied by 35% to get the attorney fee.

Turn attorney flag on:

Let debt = X

Balance = 0.35*(X/1.3) + X
= 0.35X/1.3 + X
= 0.26923X + X
= 1.26923X

I am sure you can create the update query to change the accounts

If at first you don't succeed, try for the answer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top