Service with part of time

I have a monthly service I resell.
For each customer, when I first buy this, the start date of the service is the day that it is purchased. If I subsequently add quantities to the service for the customer, they are pro-rata back to this date.

How do I represent this in Dolibarr?
Currently I am using the discount on each invoice line to adjust for the pro-rata amount, however this throws off margins as it only adjusts the sell price, not the buy price.

e.g.
Service A - Qty 1 (from 17th Dec to 16th Jan) - £15.00
Service A - Qty 1 (from 2nd Jan to 16th Jan) - £9.45 (0.63 of month)

The second line I add a 37% discount so the price automatically calculates correctly.
(Service is sold at different prices to different customers and the date is always changing, so it would be a lot of work to manually adjust the buy price each time.)

You might want to think about it in a different way. Instead of just a “monthly” service fee, you could create a “daily” service fee which would allow you to accomplish what you are asking for by adjusting the quantity to reflect the number of days the service is provided.

Hi @fcarll Thanks, that’s not a bad suggestion. I was trying to avoid however having to do maths :grinning: The vendor invoice comes in with a percentage of a month and my mental math isn’t good enough to calculate how many part days of the last month plus part days of the current month that is.

It would seem to me that you are making his far more difficult than it needs to be. You just need to prime the pump so to speak for the first partial month providing the service [days of service]. If your client proceeds into second, third months, you would invoice them for one full month from that point forward regardless.