Skip to content

Rudraksh88/InvoiceApp

Repository files navigation

InvoiceApp

An app that creates printable invoices made using Django with APIs powered by Django REST Framework

Here are some screenshots:

Dashboard

This is where you can see all the generated invoices. Click on the INVOICE ID or CUSTOMER NAME to see its details

invoiceapp-heroku herokuapp com_

Invoice Details

Displays details of a particular invoice. The Print Invoice button opens up the browser's print dialog.

invoiceapp-heroku herokuapp com_invoice_a8aeb5a8-5498-40fd-9b4f-bb09a7057c71

Screenshot 2022-05-06 101031

Django Admin

Manage and create new Invoices using this interface

Default Admin credentials:
Username: admin
Password: admin@123

Screenshot 2022-05-06 101803

invoiceapp-heroku herokuapp com_admin_invoiceapp_invoice_e733148d-1ab9-40ca-b836-a27e6d7dad83_change_

Create new Invoice form

Currently new invoices can only be generated via the Django Admin panel or via the API.
invoice_id and invoice_date are generated automatically when an invoice is created.

invoiceapp-heroku herokuapp com_admin_invoiceapp_invoice_add_

API Guide

API Endpoints

  • /api/ GETs list of all invoices
  • /api/get-invoice/{invoice_id}/ GETs details of a specific invoice
  • /api/update/{invoice_id}/{item_name}/ Updates details of a specific item of a specific invoice
  • /api/create/ Creates a new invoice

List of all invoices

/api/

invoiceapp-heroku herokuapp com_api_

Invoice Details

Example: To get the invoice details of invoice_id a8aeb5a8-5498-40fd-9b4f-bb09a7057c71/

/api/get-invoice/a8aeb5a8-5498-40fd-9b4f-bb09a7057c71/

invoiceapp-heroku herokuapp com_api_get-invoice_a8aeb5a8-5498-40fd-9b4f-bb09a7057c71_

Update Invoice

Example: To update the item "PC Cabinet" of the invoice_id a8aeb5a8-5498-40fd-9b4f-bb09a7057c71/

/api/update/a8aeb5a8-5498-40fd-9b4f-bb09a7057c71/PC Cabinet

Format of the PUT request body:

{
  "item_name": "PC Cabinet",
  "item_quantity": 1,
  "item_price": 200
}

invoiceapp-heroku herokuapp com_api_update_a8aeb5a8-5498-40fd-9b4f-bb09a7057c71_PC%20Cabinet_

Create Invoice

Example: Format for the POST request body to create invoice

/api/create/

{
    "customer_name": "John Doe",
    "customer_phone": 111666,
    "customer_address": "Palo Alto, California",
    "items": [
        {
            "item_name": "PC Cabinet",
            "item_quantity": 1,
            "item_price": 200
        },
        {
            "item_name": "Motherboard",
            "item_quantity": 1,
            "item_price": 1000
        },
        {
            "item_name": "PSU",
            "item_quantity": 1,
            "item_price": 300
        }
    ]
}

invoiceapp-heroku herokuapp com_api_create_

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published