Bill overview refactor
Created by: adarsh-murthy
Bills overview component refactored:
- BPFIN code modified to have just one function to be called to project bills that are available in the database(This is reflected in the backend by using just the monthly_bill).
- bills overview model is modified to be able to store null.
- UI- display nothing is a bill is not there as opposed to 0 which was being displayed before. 0 actually means something other than null.
- Backend changes to accommodate the nullable utility charges.
To test:
- Run
python manage.py migrateto apply migrations. - go to
http://127.0.0.1:8000/buildings/<building_id>/financial-inputs/ - You may have bills for utilities uploaded or not. Best to have a couple of utility bills uploaded.
- Test the bills overview component. Hit project bills- It should display the projection for utilities that is present in the database, else blank input fields. Try saving and see that it saves successfully. Try reloading and see if your values are consistent.