Closed vectorien closed 8 years ago
Hi,
I've finally had the chance to merge your work. I've changed some things:
end_date
as a non-inclusive boundary for rent revisions (and added documentation on the subject)float
to Decimal
, because rents are stored with django DecimalField
, which is backed by a Decimal
Thanks for you help !
Hi I just deployed you code into my django installation, and noticed that you didnt merge the partial month rent logic from this pr as in https://github.com/oadam/proprio/blob/26a6d8ceb4b53a6afd83ac9cca86787038689600/main/models.py#L297
I now had to create my own independent repo to serve my specific needs . It is at https://github.com/vectorien/proprio_vec
Hi I implemented a simpler version of the partial rent calculation. Plus a test for it.
Things changed in tests:
-To calculate the rent for a full single month, the rentrevision should have first day of the month as start date and last day of the month (before it was first day of next month) as end date
-The datatype of rent amounts i the tests must be float not int, because divisions of int values can lead to very funny results in python:
Have a nice weekend!