Here's fun!
I'm helping a friend who is trying to work out how much to charge for house calls. He has lots of data. The average house call lasts about 15 minutes, but some as low a 5 mins, some as high as two hours.
We're trying to work out if he should have a minimum billiing period, and how to charge the minutes after that.
We've got these variables:
The "positive leeway" is in there because if a house call takes eg 38 minutes, there's the minimum biling period of 20 mins, then another chunk of 15 mins, and then another 3 minutes unbilled. It seems unfair to charge another 15 minutes for a 3 minute block, so we've added leeway in there to say if it's less than 30% in to another chunk, don't bill it.
(An obvious answer to this would be to bill in 5 minute increments, which we might do, too; we're just testing the scenarios)
So in words, it works out like this:
IF DURATION < MIN BILL PERIOD THEN PRICE = MIN BILL * PER MIN BEFORE
ELSE IF DUR > MIN BILL PERIOD THEN PRICE = ((how many billing chunks more than the min.billing.price, rounded DOWN if less than LEEWAY over, else rounded up) * price per min after)
Eg if duration = 8, then 8 is less than 20, so price = 20 * 1 = 20
Eg if duration = 38, then price is the (MINBILLPERIOD * price before) + (one BillingChunk * price after), since the second billing chunk is less than 30% over
I got as far as creating an If statement for the minimum billing but then realised I was going to have to ask a pro!
Can anyone give me some pointers?
Thank you!
I'm helping a friend who is trying to work out how much to charge for house calls. He has lots of data. The average house call lasts about 15 minutes, but some as low a 5 mins, some as high as two hours.
We're trying to work out if he should have a minimum billiing period, and how to charge the minutes after that.
We've got these variables:
Code:
Min billing period (m) 20
Billing chunks (m) 15
Positive Leeway 30%
Price per min before 1
Price per min after 1.5
The "positive leeway" is in there because if a house call takes eg 38 minutes, there's the minimum biling period of 20 mins, then another chunk of 15 mins, and then another 3 minutes unbilled. It seems unfair to charge another 15 minutes for a 3 minute block, so we've added leeway in there to say if it's less than 30% in to another chunk, don't bill it.
(An obvious answer to this would be to bill in 5 minute increments, which we might do, too; we're just testing the scenarios)
So in words, it works out like this:
IF DURATION < MIN BILL PERIOD THEN PRICE = MIN BILL * PER MIN BEFORE
ELSE IF DUR > MIN BILL PERIOD THEN PRICE = ((how many billing chunks more than the min.billing.price, rounded DOWN if less than LEEWAY over, else rounded up) * price per min after)
Eg if duration = 8, then 8 is less than 20, so price = 20 * 1 = 20
Eg if duration = 38, then price is the (MINBILLPERIOD * price before) + (one BillingChunk * price after), since the second billing chunk is less than 30% over
I got as far as creating an If statement for the minimum billing but then realised I was going to have to ask a pro!
Can anyone give me some pointers?
Thank you!