So in terms of gameplay, this basically gives you the vehicle for free on the condition of increased running costs? Then this is something which - in principle - can be implemented using newgrfs alone.
Concerning your coding style: watch out that OpenTTD uses tabs for indentation, not spaces; you do that consistently wrong.
Also you have a number of occurances of
- v->value = value.GetCost();
+ v->value = e->GetCost();
I propose to either keep the lines or make this its own coding style patch.
Conceptually I'd boil down this patch a little and not
introduce four new variables for each vehicle as it uses quite a bit of memory for things usually not needed:
+ bool leased;
+ Money leased_for;
+ Money current_lease;
+ Money monthly_lease;
+ Date leased_until;
It'd most probably suffice to introduce the 'leased' flag and have a global (per company) variable which gives the lifetime of the lease contracts. Then vehicles can be leased for that time over which their usual purchase price plus an additional lease fee are payed off. Purchase price and date are know, everything else can thus be calculated without introducing extra variables. The lease fee might be a certain percentage of the usual purchase price, either a separate setting or even maybe coupled to the inflation rate.