Skip to content

(backend) Record keeping and management app for flat maintenance fee collection with django-rest-framework

Notifications You must be signed in to change notification settings

aryajayadevkm/MaintenanceApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MaintenanceApp

Maintenance App backend. This is flat-admin-only use. No permissions set.

APIs:

  1. api/users/ - register flat admin
  2. api/flats/ - add and retrive flats
  3. api/residents/ - add and retrieve residents
  4. api/invoices/ - Fetches list of flats, their maintenance charge and amount paid for that month (creates empty records for every new month)
  5. api/payments/ - Get flat-wise dues Post payment
  6. api/match-bills/ - Match bills

Instructions:

  1. pip install -r requirement.txt

  2. python manage.py createsuperuser

  3. python manage.py makemigrations

  4. python manage.py migrate

  5. python manage.py createsuperuser

  6. Go to django-admin interface and add a building

  7. Try the dummy data to register at api/users/ end point on postman:

     {
         "user":{
             "username":"yourname",
             "email":"[email protected]", 
             "password": "yourname1234"
         }
     }
    
  8. To login at api/users/login/ end point on postman:

     {
         "user":{
             "email":"[email protected]", 
             "password": "yourname1234"
         }
     }
    
  9. To add residents with POST request at api/residents/ end point on postman:

     {
        "name":"resident",
        "mobile_no": "9876543210",
        "email": "[email protected]"
     }
    

    GET request at the same endpoint gives list of all residents, and PATCH request at api/residents/1/ lets you update details of resident whose id is 1.

  10. To add flats at api/flats/ end point on postman:

    {
       "building":"1",
       "flat_no": "G3",
       "owner": "1",
       "maintenance_charge":"2500"
    }
    

    GET request at the same endpoint gives list of all flats, and PATCH request at api/flats/1/ lets you update details of flat whose id is 1.

Try out some features

This app lets you schedule bill generation and keeps record of all bills and payments,

  1. Generate bills automatically/manually
  2. Show overdues
  3. Record monthly/advance payment
  4. Match bills and payments
  5. Manage fine

To try these, add some flats (maintenance charge should not be left blank). Now go to api/collections/ end point and make a get request. You'll find the dues and the months overdue. (Note: Flat upon registration sets maintenance charge due for that month and payment records get appended automatically every month.

Make a PATCH request at api/collections/1/ with dummy data (here 1 is flat id):

{
    "amount_paid": "1500",
    "months": [
        "2020-09-17"
    ]
}

If there's any extra amount it can be applied to bills any time. If amount paid is insufficient, bills are partially filled and dues get updated accordingly.

About

(backend) Record keeping and management app for flat maintenance fee collection with django-rest-framework

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages