There are two options in my opinion:
- Interface + Abstract Class + Class
- Interface + Trait + Class
Talking about "types" of bills is a kind of inheritance. But if you want to share (not just inherit) some behavior between classes, PHP Traits could be an option to achieve that, in order to avoid too much inheritance levels.
You say given that there are some little differences between each bill - That is a typical case to apply an abstract class and override in concrete classes.
create a factory - Factory purpose is hide the way to create objects. I am not sure that is the problem that you describe.
with an abstract class or an interface - Design patterns like Factory are useful with interfaces, more than abstract classes.
But I don't know for the moment where to put the logic code (that is the same for each bill type) - Maybe a Trait ?
And to share the datas that have to be used by the calculate() methods - Use object values to share data and inject that or just one method calling to other to get the value.
- Session - Not recommended. Session is for sharing data between requests, not between objects.
- Database - May be, but an application should be capable of work even without data storage implementation.
- Global variable in a parent class - Are you going to inherit objects, just to share values ? Mmm...