AnsweredAssumed Answered

Working out fines accounting for weekends and holidays

Question asked by Brucey on Mar 1, 2011
Latest reply on Mar 23, 2011 by philmodjunk

Title

Working out fines accounting for weekends and holidays

Post

Have posted before on this topic, but got no replies. Help needed please.

Can anyone solve a problem where I have to work out the number of days late and the resulting fine for an item in a lending library database taking into account weekends and holidays.

I have the fields:

Loan_date

Due_date

Return_date

Days_late

Fine

An item can be on loan for fourteen days.  If the Due_date falls on a falls on a day when closed (eg weekends or holidays) then the Due_date becomes the date the business opens. A fine of £0.50p per day is charged to the borrowers who return items after the due date. If an item is returned more than fourteen days after the Due_date there is an additional £1.00 charge.

Examples

If an item is due back on a Friday and is returned on the following Monday, the fine is £0.50p 

If an item is due back on the Wednesday the week before a one week holiday, and is returned on the Tuesday after the holiday, the fine is £2.00

Apologies for being so prescriptive, but I could do with a solution to this one - so any help appreciated.

Outcomes