Jump to content

Transaction fee calculation


This topic is 1901 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Looking to do a calculation of a transaction fee that is based on a fixed percent plus $0.11.  This is determined by the date the transaction comes through one.  So registrants are paying $325 initially which gets broken up in the database as $75 registration fee and  $250 tuition, both on the same date.  I can easily add those together and calculate one transaction fee, but there will be separate payments coming in the future that are on a different date and need to get assesses the transaction fee separately.   Right now there is a transaction table and a student table that are joined by an ID.  Any thoughts about how best to proceed?

 

Thanks,

Dan

Link to comment
Share on other sites

This is a bit difficult to understand. Do you mean that if there are multiple transactions on the same day, the fee should be added only to one of them? That would be possible, but not simple.

Could there be another way to distinguish between them, for example by type? Apart from the first two (registration fee and  tuition), will there really be multiple transactions on the same day? If yes, will there be anything common to these transactions that ties them together?

Link to comment
Share on other sites

Thanks for the questions,  this is a new interface so haven't worked through all of the particulars for the future but I think I have a sense how this will be working:

On the initial registration day a person pays a lump sum of $325 and agrees to pay an installment payment on April 1st that is the balance due.  The initial lump sum is actually a combo of a $75 registration fee and a $250 tuition balance, but that combo is what gets assessed the 2.1% plus $.11

So in the end the transactions might look like the following and what I need to do is to do a calculation of (grouped_transaction*.021)+.11 but do that calc by coming up with a grouped/summed transaction based on the date.  Hope that makes more sense

1/13/19     $75

1/13/19   $250

4/1/19     $1000

Link to comment
Share on other sites

Yes, that is more or less what I understood. But my suggestion was to look at the problem from a different perspective - if possible.

For example, you could not add the $0.11 fee when the type of the transaction is registration fee. That would make the fee depend solely on the data in the same record - thus save you the complications of testing for the existence of other records for the same person on the same date.

Link to comment
Share on other sites

This topic is 1901 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.