InvManage.views

Submodules

Package Contents

Classes

ProductFilter

ProductBasicInfoForm

Form for basic product information.

ProductDetailedInfoForm

Form for product physical details

ProductPricingForm

Form for pricing information of the product.

ProductPurchaseEntryForm

Form for product purchase entry.

ProductSalesEntryForm

Form for product sales entry.

ProductStatusForm

Form for locating and identifying the product.

ProductStorageInfoForm

Form for storage information.

PurchaseOrderBasicInfo

Form for basic information of the purchase order.

GRNInfo

Form for goods receipt note (GRN).

GRNEntryForm

Form for goods receipt note entry (GRNE).

ThumbnailForm

For for product thumbnail image.

SalesOrderBasicInfo

Form for basic information on sales order.

ShippingAddressForm

For for shipping address.

VendorForm

Form for basic informaion of the vendor.

ConsumerForm

Form for consumer.

CompanyForm

Form for company.

HistoryForm

Form for history view.

CommunicationForm

Form for communication information.

PurchaseDataForm

Form for purchase related data.

BankAccountForm

Form for bank account details.

Product

Model of the product.

ProductPurchaseEntry

Model of the product purchase entry.

GRNEntry

Model of the goods receipt note entry (GRNE).

ProductSalesEntry

Model of the product sales entry.

SalesOrder

Model of the sales order.

PurchaseOrder

Model of the purchase order.

GoodsReceiptNote

Model of the goods receipt note (GRN).

Consumer

Model of the consumer.

Vendor

Model of the vendor.

Company

Model of the company.

PurchaseInvoice

Model for the purchase invoice.

SalesInvoice

Model for the sales order invoice.

FilterState

Model of the filter state.

FilterColumn

Model of the column state.

Object

Model for a generic object.

EventCard

Model for event card to be displayed in the history view.

EventType

Model for event type.

ObjectModel

Model associated with an object.

HistoryFilterState

Model of filter state of the history.

ShippingAddress

Model of the shipping address.

PurchaseData

Model of the purchase data.

Communication

Model of the communication information.

BankAccount

Model of the bank account details.

GoodsReceiptNoteFilter

GRNEntrySerializer

Serializer for GRNEntry class instance.

GRNEntryWithPORefSerializer

Serializer for GRNEntry class instance if the GRN references a purchase order.

GRNInvoiceSerializer

Serializer for GRNInvoice class instance.

GoodsReceiptNoteSerializer

Serializer for GoodsReceiptNote class instance.

PPEntrySerializer

Serializer for ProductPurchaseEntry class instance.

ProductSerializer

Serializer for Product class instance.

PurchaseInvoiceSerializer

Serializer for PurchaseInvoice class instance.

GRNInvoice

Model for the goods receipt note invoice.

ProductBasicInfoForm

Form for basic product information.

ProductDetailedInfoForm

Form for product physical details

ProductPricingForm

Form for pricing information of the product.

ProductPurchaseEntryForm

Form for product purchase entry.

ProductSalesEntryForm

Form for product sales entry.

ProductStatusForm

Form for locating and identifying the product.

ProductStorageInfoForm

Form for storage information.

PurchaseOrderBasicInfo

Form for basic information of the purchase order.

GRNInfo

Form for goods receipt note (GRN).

GRNEntryForm

Form for goods receipt note entry (GRNE).

ThumbnailForm

For for product thumbnail image.

SalesOrderBasicInfo

Form for basic information on sales order.

ShippingAddressForm

For for shipping address.

VendorForm

Form for basic informaion of the vendor.

ConsumerForm

Form for consumer.

CompanyForm

Form for company.

HistoryForm

Form for history view.

CommunicationForm

Form for communication information.

PurchaseDataForm

Form for purchase related data.

BankAccountForm

Form for bank account details.

Product

Model of the product.

ProductPurchaseEntry

Model of the product purchase entry.

GRNEntry

Model of the goods receipt note entry (GRNE).

ProductSalesEntry

Model of the product sales entry.

SalesOrder

Model of the sales order.

PurchaseOrder

Model of the purchase order.

GoodsReceiptNote

Model of the goods receipt note (GRN).

Consumer

Model of the consumer.

Vendor

Model of the vendor.

Company

Model of the company.

PurchaseInvoice

Model for the purchase invoice.

SalesInvoice

Model for the sales order invoice.

FilterState

Model of the filter state.

FilterColumn

Model of the column state.

Object

Model for a generic object.

EventCard

Model for event card to be displayed in the history view.

EventType

Model for event type.

ObjectModel

Model associated with an object.

HistoryFilterState

Model of filter state of the history.

ShippingAddress

Model of the shipping address.

PurchaseData

Model of the purchase data.

Communication

Model of the communication information.

BankAccount

Model of the bank account details.

PurchaseOrderFilter

ProductSerializer

Serializer for Product class instance.

PPEntrySerializer

Serializer for ProductPurchaseEntry class instance.

PurchaseInvoiceSerializer

Serializer for PurchaseInvoice class instance.

ProductBasicInfoForm

Form for basic product information.

ProductDetailedInfoForm

Form for product physical details

ProductPricingForm

Form for pricing information of the product.

ProductPurchaseEntryForm

Form for product purchase entry.

ProductSalesEntryForm

Form for product sales entry.

ProductStatusForm

Form for locating and identifying the product.

ProductStorageInfoForm

Form for storage information.

PurchaseOrderBasicInfo

Form for basic information of the purchase order.

GRNInfo

Form for goods receipt note (GRN).

GRNEntryForm

Form for goods receipt note entry (GRNE).

ThumbnailForm

For for product thumbnail image.

SalesOrderBasicInfo

Form for basic information on sales order.

ShippingAddressForm

For for shipping address.

VendorForm

Form for basic informaion of the vendor.

ConsumerForm

Form for consumer.

CompanyForm

Form for company.

HistoryForm

Form for history view.

CommunicationForm

Form for communication information.

PurchaseDataForm

Form for purchase related data.

BankAccountForm

Form for bank account details.

Product

Model of the product.

ProductPurchaseEntry

Model of the product purchase entry.

GRNEntry

Model of the goods receipt note entry (GRNE).

ProductSalesEntry

Model of the product sales entry.

SalesOrder

Model of the sales order.

PurchaseOrder

Model of the purchase order.

GoodsReceiptNote

Model of the goods receipt note (GRN).

Consumer

Model of the consumer.

Vendor

Model of the vendor.

Company

Model of the company.

PurchaseInvoice

Model for the purchase invoice.

SalesInvoice

Model for the sales order invoice.

FilterState

Model of the filter state.

FilterColumn

Model of the column state.

Object

Model for a generic object.

EventCard

Model for event card to be displayed in the history view.

EventType

Model for event type.

ObjectModel

Model associated with an object.

HistoryFilterState

Model of filter state of the history.

ShippingAddress

Model of the shipping address.

PurchaseData

Model of the purchase data.

Communication

Model of the communication information.

BankAccount

Model of the bank account details.

CompanySerializer

Serializer for Company class instance.

ShippingAddressSerializer

Serializer for ShippingAddress class instance.

CompanyFilter

ProductBasicInfoForm

Form for basic product information.

ProductDetailedInfoForm

Form for product physical details

ProductPricingForm

Form for pricing information of the product.

ProductPurchaseEntryForm

Form for product purchase entry.

ProductSalesEntryForm

Form for product sales entry.

ProductStatusForm

Form for locating and identifying the product.

ProductStorageInfoForm

Form for storage information.

PurchaseOrderBasicInfo

Form for basic information of the purchase order.

GRNInfo

Form for goods receipt note (GRN).

GRNEntryForm

Form for goods receipt note entry (GRNE).

ThumbnailForm

For for product thumbnail image.

SalesOrderBasicInfo

Form for basic information on sales order.

ShippingAddressForm

For for shipping address.

VendorForm

Form for basic informaion of the vendor.

ConsumerForm

Form for consumer.

CompanyForm

Form for company.

HistoryForm

Form for history view.

CommunicationForm

Form for communication information.

PurchaseDataForm

Form for purchase related data.

BankAccountForm

Form for bank account details.

Product

Model of the product.

ProductPurchaseEntry

Model of the product purchase entry.

GRNEntry

Model of the goods receipt note entry (GRNE).

ProductSalesEntry

Model of the product sales entry.

SalesOrder

Model of the sales order.

PurchaseOrder

Model of the purchase order.

GoodsReceiptNote

Model of the goods receipt note (GRN).

Consumer

Model of the consumer.

Vendor

Model of the vendor.

Company

Model of the company.

PurchaseInvoice

Model for the purchase invoice.

SalesInvoice

Model for the sales order invoice.

FilterState

Model of the filter state.

FilterColumn

Model of the column state.

Object

Model for a generic object.

EventCard

Model for event card to be displayed in the history view.

EventType

Model for event type.

ObjectModel

Model associated with an object.

HistoryFilterState

Model of filter state of the history.

ShippingAddress

Model of the shipping address.

PurchaseData

Model of the purchase data.

Communication

Model of the communication information.

BankAccount

Model of the bank account details.

VendorFilter

VendorSerializer

Serializer for Vendor class instance.

ProductBasicInfoForm

Form for basic product information.

ProductDetailedInfoForm

Form for product physical details

ProductPricingForm

Form for pricing information of the product.

ProductPurchaseEntryForm

Form for product purchase entry.

ProductSalesEntryForm

Form for product sales entry.

ProductStatusForm

Form for locating and identifying the product.

ProductStorageInfoForm

Form for storage information.

PurchaseOrderBasicInfo

Form for basic information of the purchase order.

GRNInfo

Form for goods receipt note (GRN).

GRNEntryForm

Form for goods receipt note entry (GRNE).

ThumbnailForm

For for product thumbnail image.

SalesOrderBasicInfo

Form for basic information on sales order.

ShippingAddressForm

For for shipping address.

VendorForm

Form for basic informaion of the vendor.

ConsumerForm

Form for consumer.

CompanyForm

Form for company.

HistoryForm

Form for history view.

CommunicationForm

Form for communication information.

PurchaseDataForm

Form for purchase related data.

BankAccountForm

Form for bank account details.

Product

Model of the product.

ProductPurchaseEntry

Model of the product purchase entry.

GRNEntry

Model of the goods receipt note entry (GRNE).

ProductSalesEntry

Model of the product sales entry.

SalesOrder

Model of the sales order.

PurchaseOrder

Model of the purchase order.

GoodsReceiptNote

Model of the goods receipt note (GRN).

Consumer

Model of the consumer.

Vendor

Model of the vendor.

Company

Model of the company.

PurchaseInvoice

Model for the purchase invoice.

SalesInvoice

Model for the sales order invoice.

FilterState

Model of the filter state.

FilterColumn

Model of the column state.

Object

Model for a generic object.

EventCard

Model for event card to be displayed in the history view.

EventType

Model for event type.

ObjectModel

Model associated with an object.

HistoryFilterState

Model of filter state of the history.

ShippingAddress

Model of the shipping address.

PurchaseData

Model of the purchase data.

Communication

Model of the communication information.

BankAccount

Model of the bank account details.

ConsumerFilter

ConsumerSerializer

Serializer for Consumer class instance.

ProductBasicInfoForm

Form for basic product information.

ProductDetailedInfoForm

Form for product physical details

ProductPricingForm

Form for pricing information of the product.

ProductPurchaseEntryForm

Form for product purchase entry.

ProductSalesEntryForm

Form for product sales entry.

ProductStatusForm

Form for locating and identifying the product.

ProductStorageInfoForm

Form for storage information.

PurchaseOrderBasicInfo

Form for basic information of the purchase order.

GRNInfo

Form for goods receipt note (GRN).

GRNEntryForm

Form for goods receipt note entry (GRNE).

ThumbnailForm

For for product thumbnail image.

SalesOrderBasicInfo

Form for basic information on sales order.

ShippingAddressForm

For for shipping address.

VendorForm

Form for basic informaion of the vendor.

ConsumerForm

Form for consumer.

CompanyForm

Form for company.

HistoryForm

Form for history view.

CommunicationForm

Form for communication information.

PurchaseDataForm

Form for purchase related data.

BankAccountForm

Form for bank account details.

Product

Model of the product.

ProductPurchaseEntry

Model of the product purchase entry.

GRNEntry

Model of the goods receipt note entry (GRNE).

ProductSalesEntry

Model of the product sales entry.

SalesOrder

Model of the sales order.

PurchaseOrder

Model of the purchase order.

GoodsReceiptNote

Model of the goods receipt note (GRN).

Consumer

Model of the consumer.

Vendor

Model of the vendor.

Company

Model of the company.

PurchaseInvoice

Model for the purchase invoice.

SalesInvoice

Model for the sales order invoice.

FilterState

Model of the filter state.

FilterColumn

Model of the column state.

Object

Model for a generic object.

EventCard

Model for event card to be displayed in the history view.

EventType

Model for event type.

ObjectModel

Model associated with an object.

HistoryFilterState

Model of filter state of the history.

ShippingAddress

Model of the shipping address.

PurchaseData

Model of the purchase data.

Communication

Model of the communication information.

BankAccount

Model of the bank account details.

SalesOrderFilter

ProductSerializer

Serializer for Product class instance.

PSEntrySerializer

Serializer for ProductSalesEntry class instance.

SalesInvoiceSerializer

Serializer for SalesInvoice class instance.

ProductBasicInfoForm

Form for basic product information.

ProductDetailedInfoForm

Form for product physical details

ProductPricingForm

Form for pricing information of the product.

ProductPurchaseEntryForm

Form for product purchase entry.

ProductSalesEntryForm

Form for product sales entry.

ProductStatusForm

Form for locating and identifying the product.

ProductStorageInfoForm

Form for storage information.

PurchaseOrderBasicInfo

Form for basic information of the purchase order.

GRNInfo

Form for goods receipt note (GRN).

GRNEntryForm

Form for goods receipt note entry (GRNE).

ThumbnailForm

For for product thumbnail image.

SalesOrderBasicInfo

Form for basic information on sales order.

ShippingAddressForm

For for shipping address.

VendorForm

Form for basic informaion of the vendor.

ConsumerForm

Form for consumer.

CompanyForm

Form for company.

HistoryForm

Form for history view.

CommunicationForm

Form for communication information.

PurchaseDataForm

Form for purchase related data.

BankAccountForm

Form for bank account details.

Product

Model of the product.

ProductPurchaseEntry

Model of the product purchase entry.

GRNEntry

Model of the goods receipt note entry (GRNE).

ProductSalesEntry

Model of the product sales entry.

SalesOrder

Model of the sales order.

PurchaseOrder

Model of the purchase order.

GoodsReceiptNote

Model of the goods receipt note (GRN).

Consumer

Model of the consumer.

Vendor

Model of the vendor.

Company

Model of the company.

PurchaseInvoice

Model for the purchase invoice.

SalesInvoice

Model for the sales order invoice.

FilterState

Model of the filter state.

FilterColumn

Model of the column state.

Object

Model for a generic object.

EventCard

Model for event card to be displayed in the history view.

EventType

Model for event type.

ObjectModel

Model associated with an object.

HistoryFilterState

Model of filter state of the history.

ShippingAddress

Model of the shipping address.

PurchaseData

Model of the purchase data.

Communication

Model of the communication information.

BankAccount

Model of the bank account details.

EventCard

Model for event card to be displayed in the history view.

HistoryFilterState

Model of filter state of the history.

EventCardFilter

HistoryFilterStateSerializer

Serializer for HistoryFilterState class instance.

HistoryForm

Form for history view.

Functions

create_product_view(request)

Creates a product on POST request, and returns a product creation form on GET request.

update_product_view(request)

Updates a product on POST request and returns the product update form on GET request.

delete_product_view(request, pk)

Deletes the product with primary key product_id on POST request.

display_products_view(request)

Retrieves the list of products on GET request.

uploadCSV(request, data)

Imports products into database from a .csv file on POST request.

get_columns(state)

Gets the columns of the display table.

sort_ascending_descending(request, model)

Sorts and saves the state of the column.

change_column_position(request, state)

Modifies the column states depending on the request.

paginate(queryset, filter, page_number)

Paginates the list of objects.

create_grn_view(request)

Creates a goods receipt note (GRN) on POST request, and returns a GRN creation form on GET request.

update_grn_view(request)

Updates the goods receipt note (GRN) on POST request, and returns a GRN update form on GET request.

delete_grn_view(request, pk)

Deletes the GRN with primary key object_id on POST request.

display_grns_view(request)

Retrieves the list of GRNs on GET request.

print_grn_view(request, pk)

Opens the GRN with primary key grn_id for printing on GET request.

get_columns(state)

Gets the columns of the display table.

sort_ascending_descending(request, model)

Sorts and saves the state of the column.

change_column_position(request, state)

Modifies the column states depending on the request.

paginate(queryset, filter, page_number)

Paginates the list of objects.

create_purchase_order_view(request)

Creates a purchase order (PO) on POST request, and returns a PO creation form on GET request.

update_purchase_order_view(request)

Updates a purchase order on POST request and returns the purchase order update form for GET request.

display_purchase_orders_view(request)

Retrieves the list of purchase orders on GET request.

delete_purchase_order_view(request, pk)

Deletes the purchase order with primary key object_id on POST request.

print_purchase_order_view(request, pk)

Opens the purchase order with primary key po_id for printing on GET request.

get_product_purchase_entries_view(request)

Returns the JSON serialized data of product purchase entries on GET request.

get_columns(state)

Gets the columns of the display table.

sort_ascending_descending(request, model)

Sorts and saves the state of the column.

change_column_position(request, state)

Modifies the column states depending on the request.

paginate(queryset, filter, page_number)

Paginates the list of objects.

create_company_view(request)

Creates a company on POST request and returns a company creation form GET request.

update_company_view(request)

Updates a company on POST request and returns the company update form GET request.

delete_company_view(request, pk)

Deletes the company with primary key pk on POST request.

display_companies_view(request)

Retrieves the list of companies on GET request.

get_columns(state)

Gets the columns of the display table.

sort_ascending_descending(request, model)

Sorts and saves the state of the column.

change_column_position(request, state)

Modifies the column states depending on the request.

paginate(queryset, filter, page_number)

Paginates the list of objects.

create_vendor_view(request)

Creates a vendor on POST request, and returns a vendor creation form on GET request.

update_vendor_view(request)

Updates a vendor on POST request and returns the vendor update form for GET request.

delete_vendor_view(request, pk)

Deletes the vendor with primary key pk on POST request.

display_vendors_view(request)

Retrieves the list of vendors on GET request.

get_vendor(request)

Returns the JSON serialized data of the requested vendor on GET request.

get_columns(state)

Gets the columns of the display table.

sort_ascending_descending(request, model)

Sorts and saves the state of the column.

change_column_position(request, state)

Modifies the column states depending on the request.

paginate(queryset, filter, page_number)

Paginates the list of objects.

create_consumer_view(request)

Creates a consumer on POST request, and returns a consumer creation form on GET request.

update_consumer_view(request)

Updates a consuemr on POST request and returns the consumer update form for GET request.

delete_consumer_view(request, pk)

Deletes the consumer with primary key pk on POST request.

display_consumers_view(request)

Retrieves the list of consumers on GET request.

get_consumer(request)

Returns the JSON serialized data of the requested consumer on GET request.

get_columns(state)

Gets the columns of the display table.

sort_ascending_descending(request, model)

Sorts and saves the state of the column.

change_column_position(request, state)

Modifies the column states depending on the request.

paginate(queryset, filter, page_number)

Paginates the list of objects.

create_sales_order_view(request)

Creates a sales order (SO) on POST request, and returns a SO creation form on GET request.

update_sales_order_view(request)

Updates a sales order on POST request and returns the sales order update form for GET request.

delete_sales_order_view(request, pk)

Deletes the sales order with primary key object_id on POST request.

display_sales_orders_view(request)

Retrieves the list of sales orders on GET request.

print_sales_order_view(request, pk)

Opens the sales order with primary key so_id for printing on GET request.

get_columns(state)

Gets the columns of the display table.

sort_ascending_descending(request, model)

Sorts and saves the state of the column.

change_column_position(request, state)

Modifies the column states depending on the request.

paginate(queryset, filter, page_number)

Paginates the list of objects.

display_history_view(request)

Retrieves the list of events on GET request. The create, update, and delete events are registered for each model.

class InvManage.views.ProductFilter

Bases: django_filters.FilterSet

class Meta
model
fields
context
name
category
quantity
price
identifier
location
order_by_field = ordering
ordering
InvManage.views.create_product_view(request)

Creates a product on POST request, and returns a product creation form on GET request.

GET /product

Gets the product creation form.

Example request:

GET /product/ HTTP/1.1
Host: localhost:8000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Request Headers
  • Accept – text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Status Codes
  • 200 OK – Product creation form received successfully.

POST /product

Creates a product.

Example request:

POST /product/ HTTP/1.1
Host: localhost:8000
Content-Type: multipart/form-data;
Form Parameters
  • basic-nameYamaha FS100C Acoustic Guitar

  • basic-item_typeBlack Acoustic Guitar

  • basic-categoryMusical Instrument

  • basic-descriptionTop: Spruce back/sides, Mahogany neck, Nato fret board, Rosewood bridge, Snorkeling frets: 20, Open chrome tuners, Finishes: Black

  • detailed-length1056

  • detailed-width376

  • detailed-height140

  • detailed-weight3.2

  • storage-barcode036000029145

  • storage-expiry2040-09-29

  • status-quantity20

  • status-identifierFS100C

  • status-locationBAY004

  • pricing-price9990

  • pricing-discount7

Response Headers
  • Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv

Status Codes
InvManage.views.update_product_view(request)

Updates a product on POST request and returns the product update form on GET request.

GET /product/update

Gets the product update form whose primary key matches the query parameter pk.

Example request:

GET /product/update HTTP/1.1
Host: localhost:8000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Query Parameters
  • pk – The primary key of the product.

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Request Headers
  • Accept – text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Status Codes
  • 200 OK – Product update form received successfully.

POST /product/update

Updates the product.

Example request:

POST /product/update HTTP/1.1
Host: localhost:8000
Content-Type: multipart/form-data;
Form Parameters
  • pk778

  • basic-nameYamaha FS100C Acoustic Guitar

  • basic-item_typeBlack Acoustic Guitar

  • basic-categoryMusical Instrument

  • basic-descriptionTop: Spruce back/sides, Mahogany neck, Nato fret board, Rosewood bridge, Snorkeling frets: 20, Open chrome tuners, Finishes: Black

  • detailed-length1056

  • detailed-width376

  • detailed-height140

  • detailed-weight3.2

  • storage-barcode036000029145

  • storage-expiry2040-09-29

  • status-quantity20

  • status-identifierFS100C

  • status-locationBAY004

  • pricing-price9990

  • pricing-discount7

Response Headers
  • Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv

Status Codes
InvManage.views.delete_product_view(request, pk)

Deletes the product with primary key product_id on POST request.

POST /product/<str:product_id>/delete

Deletes the consumer represented by the primary key product_id.

Example request:

POST /product/778/delete HTTP/1.1
Host: localhost:8000
Content-Type: application/x-www-form-urlencoded
Parameters
  • product_id – Product primary key.

Response Headers
Status Codes
InvManage.views.display_products_view(request)

Retrieves the list of products on GET request.

GET /products/

Gets the list of all products.

Example request:

GET /products/ HTTP/1.1
Host: localhost:8000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Form Parameters
  • page – The page number of the products list.

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Request Headers
  • Accept – text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Status Codes
  • 200 OK – List of products received successfully.

InvManage.views.uploadCSV(request, data)

Imports products into database from a .csv file on POST request. CSV template columns: name, category, item_type, description, price, quantity, identifier, location, length, width, height, weight, discount, barcode, expiry.

POST /upload/<data>/

Imports product data.

Example request:

POST /product/778/delete HTTP/1.1
Host: localhost:8000
Status Codes
class InvManage.views.ProductBasicInfoForm

Bases: django.forms.Form

Form for basic product information.

name

Name of the product.

Type

str

item_type

Type of the product.

Type

str

category

Product category.

Type

str

description

Short description of the product.

Type

str

prefix = basic
context
name
item_type
category
description
class InvManage.views.ProductDetailedInfoForm

Bases: django.forms.Form

Form for product physical details

length

Length of the product.

Type

str

width

Width of the product.

Type

str

height

Height of the product.

Type

str

weight

Weight of the product.

Type

str

prefix = detailed
context
length
width
height
weight
class InvManage.views.ProductPricingForm

Bases: django.forms.Form

Form for pricing information of the product.

price

Price of the product.

Type

float

discount

Default discount percentage on the product.

Type

float

prefix = pricing
context
price
discount
class InvManage.views.ProductPurchaseEntryForm

Bases: django.forms.Form

Form for product purchase entry.

ppe_id

Unique identifier of the product purchase entry.

Type

int

product

Product associated wit the product purchase entry.

Type

Product

quantity

Quantity of the product to be ordered.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product purchase.

Type

float

prefix = form
context
ppe_id
product
quantity
price
discount
class InvManage.views.ProductSalesEntryForm

Bases: django.forms.Form

Form for product sales entry.

pse_id

Unique identifier of the product sales entry.

Type

int

product

Product associated with the product sales entry.

Type

Product

quantity

Quantity of the product.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product.

Type

float

prefix = form
context
pse_id
product
quantity
price
discount
class InvManage.views.ProductStatusForm

Bases: django.forms.Form

Form for locating and identifying the product.

quantity

Stock quantity of the product.

Type

int

identifier

Unique identifier of the product.

Type

str

location

Physical location of the product.

Type

str

context
prefix = status
quantity
identifier
location
class InvManage.views.ProductStorageInfoForm

Bases: django.forms.Form

Form for storage information.

barcode

Barcode of the product.

Type

str

expiry

Expiry date of the product.

Type

DateField

prefix = storage
barcode
context
expiry
class InvManage.views.PurchaseOrderBasicInfo

Bases: django.forms.Form

Form for basic information of the purchase order.

vendor

Vendor associated with the purcahse order.

Type

Vendor

date

Date of the purchase order creation.

Type

DateField

po

Purchase order number.

Type

int

discount

Percentage of overall discount.

Type

float

tax

Percentage of tax.

Type

float

paid

Amount paid to the vendor.

Type

float

balance

Balance amount to be paid to the vendor.

Type

float

subtotal

Total of all the product purchase entries associated with the purchase order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the purchase order including taxtotal.

Type

float

prefix = po
context
product_choices
vendor_choices
vendor
date
po
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
class InvManage.views.GRNInfo

Bases: django.forms.Form

Form for goods receipt note (GRN).

vendor

Vendor associated with the goods receipt note.

Type

Vendor

poRef

List of identifiers of the purchase orders from which the goods receipt note is derived.

Type

PurchaseOrder

identifier

Unique identifier of the goods receipt note.

Type

str

date

Date of GRN creation.

Type

DateField

grnType

Type of GRN (auto or manual).

Type

str

amendNumber

Amendment number of the GRN.

Type

int

amendDate

Amendment date.

Type

DateField

transporter

Name of the transport/shipping service.

Type

str

vehicleNumber

Vehicle number using which the products are shipped.

Type

str

gateInwardNumber

Gate inward number of the vehicle.

Type

str

preparedBy

Name/identifier of the person who created the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who validated the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who inspected the physical products in the goods receipt note.

Type

str

approvedBy

Name/identifier of the authority who approved the goods receipt note.

Type

str

prefix = grn
context
product_choices
vendor_choices
vendor
TYPE_CHOICES = [['manual', 'Blank'], ['auto', 'PO Reference']]
poRef
identifier
date
grnType
amendNumber
amendDate
transporter
vehicleNumber
gateInwardNumber
preparedBy
checkedBy
inspectedBy
approvedBy
class InvManage.views.GRNEntryForm

Bases: django.forms.Form

Form for goods receipt note entry (GRNE).

product

Product associated with the goods receipt note entry.

Type

Product

grne_id

Unique identifier of the GRNE.

Type

int

ppe_id

Unique identifier of the product purchase entry associated with the GRNE.

Type

int

quantity

Ordered quantity of product with reference to product purchase entry.

Type

int

remark

Remarks of the quality engineer or the GRN creator about status of products received.

Type

str

receivedQty

Quantity of product received against the ordered quantity.

Type

str

acceptedQty

Quantity of product accepted as OK.

Type

str

rejectedQty

Quantity of product rejected (not OK, on HOLD, extra delivery, etc.)

Type

str

prefix = form
context
product
grne_id
ppe_id
quantity
remark
receivedQty
acceptedQty
rejectedQty
class InvManage.views.ThumbnailForm

Bases: django.forms.Form

For for product thumbnail image.

image

Image of the product.

Type

ImageField

prefix = thumbnail
image
class InvManage.views.SalesOrderBasicInfo

Bases: django.forms.Form

Form for basic information on sales order.

consumer

Consumer associated with the sales order.

Type

Consumer

date

Date of the sales order creation.

Type

DateField

so

Sales order number.

Type

int

discount

Percentage discount associated with the sales order.

Type

float

tax

Percentage of tax applicable.

Type

float

paid

Amount received from the consumer.

Type

float

balance

Amount balance with the consumer.

Type

float

subtotal

Total of all the product sales entries associated with the sales order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the sales order including taxtotal.

Type

float

prefix = so
context
product_choices
consumer_choices
consumer
date
so
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
class InvManage.views.ShippingAddressForm

Bases: django.forms.Form

For for shipping address.

title

Title of the firm.

Type

str

name

Name of the firm.

Type

str

phone

Contact number of the firm.

Type

str

address

Postal address.

Type

str

city

City.

Type

str

state

State.

Type

str

country

Country.

Type

str

website

Official website of the firm.

Type

URLField

post

Postal code of the firm.

Type

str

prefix = ship
context
title
name
phone
address
city
state
country
website
post
class InvManage.views.VendorForm

Bases: django.forms.Form

Form for basic informaion of the vendor.

name

Name of the vendor.

Type

str

identifier

Unique identifier of the vendor.

Type

str

gstin

GSTIN number of the vendor.

Type

str

prefix = vend
context
name
identifier
gstin
class InvManage.views.ConsumerForm

Bases: django.forms.Form

Form for consumer.

name

Name of the consumer.

Type

str

identifier

Unique identifier of the consumer.

Type

str

gstin

GSTIN number of the consumer.

Type

str

phone

Contact number.

Type

str

address

Address of the consumer.

Type

str

email

E-mail address of the consumer.

Type

str

location

City of the consumer.

Type

str

prefix = consumer
context
name
identifier
gstin
phone
address
email
location
class InvManage.views.CompanyForm

Bases: django.forms.Form

Form for company.

name

Name of the company.

Type

str

owner

Name of the owner of the company.

Type

str

gstin

GSTIN number of the company.

Type

str

phone

Contact number of the company.

Type

str

address

Postal address.

Type

str

email

E-mail address of the contact person.

Type

str

location

City of the company.

Type

str

prefix = comp
context
name
owner
gstin
phone
address
email
location
class InvManage.views.HistoryForm

Bases: django.forms.Form

Form for history view.

qlen

Count of the events visible on the history view.

Type

int

prefix = history
context
qlen
class InvManage.views.CommunicationForm

Bases: django.forms.Form

Form for communication information.

language

Language of communication.

Type

str

phone

Contact number of the firm.

Type

str

email

E-mail of the contact person.

Type

EmailField

fax

Fax number.

Type

str

prefix = com
context
language
phone
email
fax
class InvManage.views.PurchaseDataForm

Bases: django.forms.Form

Form for purchase related data.

currency

Currency of purchase.

Type

str

minorder

Minimum order quantity.

Type

int

contactperson

Name of the contact person.

Type

str

refcode

Reference code.

Type

str

transportmode

Mode of transport of the shipment.

Type

str

prefix = pdform
context
currency
minorder
contactperson
refcode
transportmode
class InvManage.views.BankAccountForm

Bases: django.forms.Form

Form for bank account details.

name

Name of the bank.

Type

str

branch

Branch number of the bank.

Type

str

region

City in which the branch is located.

Type

str

route

Transit number.

Type

str

number

Bank account number.

Type

int

acctype

Type of bank account.

Type

str

iban

IBAN number.

Type

str

code

Bank code.

Type

str

branchcode

Branch code.

Type

str

prefix = bank
context
name
branch
region
route
number
acctype
iban
code
branchcode
class InvManage.views.Product

Bases: django.db.models.Model

Model of the product.

name

Name of the product.

Type

str

category

Product category.

Type

str

item_type

Type of the product.

Type

str

description

Short description of the product.

Type

str

price

Price of the product.

Type

float

quantity

Stock quantity of the product.

Type

int

identifier

Unique identifier of the product.

Type

str

location

Physical location of the product.

Type

str

length

Length of the product.

Type

str

width

Width of the product.

Type

str

height

Height of the product.

Type

str

weight

Weight of the product.

Type

str

discount

Default discount percentage on the product.

Type

float

barcode

Barcode of the product.

Type

str

expiry

Expiry date of the product.

Type

DateField

image

Image of the product.

Type

ImageField

name
category
item_type
description
price
quantity
identifier
location
length
width
height
weight
discount
barcode
expiry
image
__str__(self)
class InvManage.views.ProductPurchaseEntry

Bases: django.db.models.Model

Model of the product purchase entry.

product

Product associated wit the product purchase entry.

Type

ModelChoiceField

quantity

Quantity of the product to be ordered.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product purchase.

Type

float

order

Referenced purchase order.

Type

PurchaseOrder

receivedQty

Quantity of product received against the ordered quantity.

Type

str

acceptedQty

Quantity of product accepted as OK.

Type

str

rejectedQty

Quantity of product rejected (not OK, on HOLD, extra delivery, etc.)

Type

str

is_complete()

Returns the completion status (boolean).

pending_quantity()

Returns the pending quantity against the entry (int).

product
quantity
price
discount
order
receivedQty
acceptedQty
rejectedQty
is_complete(self)
property pending_quantity(self)
class InvManage.views.GRNEntry

Bases: django.db.models.Model

Model of the goods receipt note entry (GRNE).

product

Primary key of the Product instance associated with the goods receipt note entry.

Type

Product

quantity

Ordered quantity of product with reference to product purchase entry.

Type

int

grne

Primary key of the GoodsReceiptNote instance.

Type

int

ppe

Primary key of the ProductPurchaseEntry instance associated with the GRNE.

Type

int

remark

Remarks of the quality engineer or the GRN creator about status of products received.

Type

str

receivedQty

Quantity of product received against the ordered quantity.

Type

str

acceptedQty

Quantity of product accepted as OK.

Type

str

rejectedQty

Quantity of product rejected (not OK, on HOLD, extra delivery, etc.)

Type

str

product
quantity
grn
ppes
remark
receivedQty
acceptedQty
rejectedQty
class InvManage.views.ProductSalesEntry

Bases: django.db.models.Model

Model of the product sales entry.

product

Primary key of the Product associated with the product sales entry.

Type

Product

quantity

Quantity of the product.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product.

Type

float

order

Primary key of the SalesOrder referenced by the entry.

Type

SalesOrder

product
quantity
price
discount
order
class InvManage.views.SalesOrder

Bases: django.db.models.Model

Model of the sales order.

consumer

Consumer associated with the sales order.

Type

ModelChoiceField

date

Date of the sales order creation.

Type

DateField

so

Sales order number.

Type

int

discount

Percentage discount associated with the sales order.

Type

float

tax

Percentage of tax applicable.

Type

float

paid

Amount received from the consumer.

Type

float

balance

Amount balance with the consumer.

Type

float

subtotal

Total of all the product sales entries associated with the sales order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the sales order including taxtotal.

Type

float

consumer
date
so
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
class InvManage.views.PurchaseOrder

Bases: django.db.models.Model

Model of the purchase order.

vendor

Vendor associated with the purchase order.

Type

Vendor

date

Date and time of the purchase order creation.

Type

DateField

po

Purchase order number.

Type

int

discount

Percentage discount.

Type

float

tax

Percentage of tax applicable for the purchase.

Type

float

paid

Amount paid against the PO.

Type

float

balance

Amount balance which remains to be paid.

Type

float

subtotal

Total of all the product purchase entries associated with the purchase order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the purchase order including taxtotal.

Type

float

is_complete()

Returns the completion status (boolean).

pending_ppes()

Returns list of product purchase entries which are not completed.

vendor
date
po
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
is_complete(self)
pending_ppes(self)
class InvManage.views.GoodsReceiptNote

Bases: django.db.models.Model

Model of the goods receipt note (GRN).

vendor

Vendor associated with the goods receipt note.

Type

ModelChoiceField

poRef

List of identifiers of the purchase orders from which the goods receipt note is derived.

Type

MultipleChoiceField

identifier

Unique identifier of the goods receipt note.

Type

str

date

Date of GRN creation.

Type

DateField

grnType

Type of GRN (auto or manual).

Type

ChoiceField

amendNumber

Amendment number of the GRN.

Type

int

amendDate

Amendment date.

Type

DateField

transporter

Name of the transport/shipping service.

Type

str

vehicleNumber

Vehicle number using which the products are shipped.

Type

str

gateInwardNumber

Gate inward number of the vehicle.

Type

str

preparedBy

Name/identifier of the person who created the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who validated the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who inspected the physical products in the goods receipt note.

Type

str

approvedBy

Name/identifier of the authority who approved the goods receipt note.

Type

str

TYPE_CHOICES = [['manual', 'Blank'], ['auto', 'PO Reference']]
vendor
poRef
identifier
date
grnType
amendNumber
amendDate
transporter
vehicleNumber
gateInwardNumber
preparedBy
checkedBy
inspectedBy
approvedBy
class InvManage.views.Consumer

Bases: django.db.models.Model

Model of the consumer.

name

Name of the consumer.

Type

str

identifier

Unique identifier of the consumer.

Type

str

gstin

GSTIN number of the consumer.

Type

str

phone

Contact number.

Type

str

address

Address of the consumer.

Type

str

email

E-mail address of the consumer.

Type

str

location

City of the consumer.

Type

str

Returns

[description]

Return type

[type]

name
identifier
gstin
phone
address
email
location
__str__(self)
class InvManage.views.Vendor

Bases: django.db.models.Model

Model of the vendor.

name

Name of the vendor.

Type

str

identifier

Unique identifier of the vendor.

Type

str

gstin

GSTIN number of the vendor.

Type

str

address

Primary key of the ShippingAddress instance associated with the vendor.

Type

ShippingAddress

communication

Primary key of the Communication instance associated with the vendor.

Type

Communication

backaccount

Primary key of the BankAccount instance associated with the vendor.

Type

BankAccount

purchasedata

Primary key of the PurchaseData instance associated with the vendor.

Type

PurchaseData

Returns

String representation of the vendor name.

Return type

str

name
identifier
gstin
address
communication
bankaccount
purchasedata
__str__(self)
class InvManage.views.Company

Bases: django.db.models.Model

Model of the company.

name

Name of the company.

Type

str

owner

Owner of the company.

Type

str

gstin

GSTIN number of the company.

Type

str

phone

Contact number.

Type

str

address

Postal address.

Type

str

email

E-mail address of the contact person.

Type

str

location

City of the company.

Type

str

image

Photo/logo of the company.

Type

ImageField

shippingaddress

Primary key of the ShippingAddress instance associated with the company.

Type

ShippingAddress

Returns

String representation of the company name.

Return type

str

name
owner
gstin
phone
address
email
location
image
shippingaddress
__str__(self)
class InvManage.views.PurchaseInvoice

Bases: django.db.models.Model

Model for the purchase invoice.

company

Primary key of the Company.

Type

Company

po

Primary key of the PurchaseOrder.

Type

PurchaseOrder

shippingaddress

Primary key of the ShippingAddress.

Type

ShippingAddress

communication

Primary key of the Communication.

Type

Communication

company
po
shippingaddress
communication
class InvManage.views.SalesInvoice

Bases: django.db.models.Model

Model for the sales order invoice.

company

Primary key of the Company.

Type

Company

so

Primary key of the SalesOrder.

Type

SalesOrder

shippingaddress

Primary key of the ShippingAddress.

Type

ShippingAddress

company
so
shippingaddress
class InvManage.views.FilterState

Bases: django.db.models.Model

Model of the filter state.

name

Name of the filter state.

Type

str

name
class InvManage.views.FilterColumn

Bases: django.db.models.Model

Model of the column state.

name

Name of the column.

Type

str

label

Label of the column.

Type

str

visible

Visibility flag.

Type

bool

position

Index of the column.

Type

int

state

Primary key of the FilterState instance being referenced by the column instance.

Type

FilterState

name
label
visible
position
state
class InvManage.views.Object

Bases: django.db.models.Model

Model for a generic object.

identifier

Unique identifier of the object.

Type

str

name

Name of the object.

Type

str

model

Model associated with the object.

Type

str

identifier
name
model
class InvManage.views.EventCard

Bases: django.db.models.Model

Model for event card to be displayed in the history view.

obj

Object associated with the event.

Type

OneToOneField

objId

Unique identifier of the object.

Type

str

objname

Name of the object.

Type

str

objmodel

Model of the object.

Type

str

date

Timestamp of the event.

Type

DateField

operation

Type of event.

Type

str

obj
objId
objname
objmodel
date
operation
class InvManage.views.EventType

Bases: django.db.models.Model

Model for event type.

name

Name of the event being triggered.

Type

str

label

Label associated with the event.

Type

str

Returns

Returns the string representation of the label when the event type is queried.

Return type

Label

name
label
__str__(self)
class InvManage.views.ObjectModel

Bases: django.db.models.Model

Model associated with an object.

name

Name of the object.

Type

str

label

Label string of the object.

Type

str

modName

Name of the model associated with the object.

Type

str

Returns

Returns string representation of the label when object model is queried.

Return type

Label

name
label
modName
__str__(self)
class InvManage.views.HistoryFilterState

Bases: django.db.models.Model

Model of filter state of the history.

params

Paramameters of the configured filters.

Type

str

params
class InvManage.views.ShippingAddress

Bases: django.db.models.Model

Model of the shipping address.

title

Title of the firm.

Type

str

name

Name of the firm.

Type

str

phone

Contact number of the firm.

Type

str

address

Postal address.

Type

str

city

City.

Type

str

state

State.

Type

str

country

Country.

Type

str

website

Official website of the firm.

Type

URLField

post

Postal code of the firm.

Type

str

title
name
phone
address
city
state
country
website
post
class InvManage.views.PurchaseData

Bases: django.db.models.Model

Model of the purchase data.

currency

Currency of purchase.

Type

str

minorder

Minimum order quantity.

Type

int

contactperson

Name of the contact person.

Type

str

refcode

Reference code.

Type

str

transportmode

Mode of transport of the shipment.

Type

str

currency
minorder
contactperson
refcode
transportmode
class InvManage.views.Communication

Bases: django.db.models.Model

Model of the communication information.

language

Language of communication.

Type

str

phone

Contact number of the firm.

Type

str

email

E-mail of the contact person.

Type

EmailField

fax

Fax number.

Type

str

language
phone
email
fax
class InvManage.views.BankAccount

Bases: django.db.models.Model

Model of the bank account details.

name

Name of the bank.

Type

str

branch

Branch number of the bank.

Type

str

region

City in which the branch is located.

Type

str

route

Transit number.

Type

str

number

Bank account number.

Type

int

acctype

Type of bank account.

Type

str

iban

IBAN number.

Type

str

code

Bank code.

Type

str

branchcode

Branch code.

Type

str

name
branch
region
route
number
acctype
iban
code
branchcode
InvManage.views.get_columns(state)

Gets the columns of the display table.

This function takes a filter state and returns an array of column names that are ordered depending on the position attribute of the columns. This order is important as the queryset will be rendered in the display table according to the column order in this returned array.

Parameters

state (FilterState) – Filter state of the columns.

Returns

A list that dictates the order of the columns.

Return type

List

InvManage.views.sort_ascending_descending(request, model)

Sorts and saves the state of the column.

This function takes a request, finds which column needs to be sorted in ascending/descending order, and returns the sorted queryset.

Parameters
  • request (HttpRequest) – GET request received for retreiving the list of model instances.

  • model (Model) – Model of the objects being retrieved.

Returns

List of sorted object instances.

Return type

QuerySet

InvManage.views.change_column_position(request, state)

Modifies the column states depending on the request.

This function:
  • Takes a filter state

  • Extracts the column names into an order array

  • Modifies the column order in the array depending on user input direction (left/right)

  • Saves this modified state of columns into the database

  • Returns the modified column names array

Parameters
  • request (HttpRequest) – GET request for retrieving the state of the columns.

  • state (FilterState) – Filter state of the columns.

Returns

List of sorted columns.

Return type

List

InvManage.views.paginate(queryset, filter, page_number)

Paginates the list of objects.

This function takes the entire queryset and filters out only objects belonging to the request page

Parameters
  • queryset (QuerySet) – QuerySet of the objects retrieved from the database.

  • filter (FilterState) – Filter state of the columns.

  • page_number (int) – Page number requested.

class InvManage.views.GoodsReceiptNoteFilter

Bases: django_filters.FilterSet

class Meta
model
fields
context
identifier
vendor
date
poRef
grnType
amendNumber
amendDate
vehicleNumber
gateInwardNumber
preparedBy
checkedBy
inspectedBy
approvedBy
ordering
class InvManage.views.GRNEntrySerializer

Bases: rest_framework.serializers.ModelSerializer

Serializer for GRNEntry class instance.

The GRNEntrySerializer.data attribute gives the JSON serialized data of the GRNEntry instance:

{
    "grn": 103,
    "grne_id": 117,
    "product": {
        "pk": 637,
        "name": "piano",
        "category": "Ultricies PC",
        "quantity": 23921,
        "identifier": "PROD9",
        "location": "Musselburgh",
        "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ",
        "prod_id": 637
    },
    "quantity": 100,
    "receivedQty": 50,
    "acceptedQty": 50,
    "rejectedQty": 0,
    "remark": "OK"
}
class Meta
model
fields = ['grn', 'grne_id', 'product', 'quantity', 'receivedQty', 'acceptedQty', 'rejectedQty', 'remark']
grne_id
product
grn
to_representation(self, instance)
create(self, validated_data)
update(self, instance, validated_data)
class InvManage.views.GRNEntryWithPORefSerializer

Bases: rest_framework.serializers.ModelSerializer

Serializer for GRNEntry class instance if the GRN references a purchase order.

The GRNEntryWithPORefSerializer.data attribute gives the JSON serialized data of the GRNEntry instance:

{
    "grn": 103,
    "grne_id": 117,
    "ppe_id": 324,
    "po_id": 293,
    "product": {
        "pk": 637,
        "name": "piano",
        "category": "Ultricies PC",
        "quantity": 23921,
        "identifier": "PROD9",
        "location": "Musselburgh",
        "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ",
        "prod_id": 637
    },
    "quantity": 100,
    "receivedQty": 50,
    "acceptedQty": 50,
    "rejectedQty": 0,
    "remark": "OK"
}
class Meta
model
fields = ['grn', 'grne_id', 'ppe_id', 'po_id', 'product', 'quantity', 'receivedQty', 'acceptedQty',...
grne_id
ppe_id
po_id
product
grn
to_representation(self, instance)
create(self, validated_data)
update(self, instance, validated_data)
class InvManage.views.GRNInvoiceSerializer

Bases: rest_framework.serializers.ModelSerializer

Serializer for GRNInvoice class instance.

The GRNInvoiceSerializer.data attribute gives the JSON serialized data of the GRNInvoice instance:

{
    "company": {
        "name": "Fringillami",
        "owner": "Ivor Barnett",
        "gstin": "89AAC056465468",
        "phone": "332 220-7026",
        "address": "Ap #849-6241 Euismod Av., 677598, Carinthia, Belgium",
        "email": "est.tempor@fringillami.org",
        "location": "Belgium",
        "image": "/media/images/logo.png"
    },
    "grn": {
        "grnes": [
            {
                "grn": 103,
                "grne_id": 117,
                "ppe_id": 324,
                "po_id": 293,
                "product": {
                    "pk": 637,
                    "name": "piano",
                    "category": "Ultricies PC",
                    "quantity": 23921,
                    "identifier": "PROD9",
                    "location": "Musselburgh",
                    "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ",
                    "prod_id": 637
                },
                "quantity": 100,
                "receivedQty": 50,
                "acceptedQty": 50,
                "rejectedQty": 0,
                "remark": "OK"
            },
            {
                "grn": 103,
                "grne_id": 118,
                "ppe_id": 325,
                "po_id": 293,
                "product": {
                    "pk": 645,
                    "name": "Tabl",
                    "category": "Sociis Natoque Company",
                    "quantity": 38276,
                    "identifier": "PROD17",
                    "location": "Schagen",
                    "description": "aldgjlakjlkasdj",
                    "prod_id": 645
                },
                "quantity": 250,
                "receivedQty": 200,
                "acceptedQty": 180,
                "rejectedQty": 20,
                "remark": "20 pieces faulty"
            }
        ],
        "date": "29-Sep-2021",
        "vendor": {
            "name": "Girish",
            "identifier": "GJ",
            "gstin": "GSTIN002",
            "address": {
                "name": "alsf",
                "address": "jas;k",
                "city": ";sdalkf",
                "phone": "alsf",
                "state": "kjdflk",
                "country": "ljflkj",
                "post": "54545"
            }
        },
        "poRef": [
            182
        ],
        "identifier": 846,
        "grnType": "auto",
        "amendDate": "2021-09-29T00:00:00Z",
        "transporter": "TeraTransport",
        "vehicleNumber": "GH-646358",
        "gateInwardNumber": "864353",
        "preparedBy": "KJL",
        "checkedBy": "KJH",
        "inspectedBy": "GIO",
        "approvedBy": "BHI"
    },
    "shippingaddress": {
        "name": "Harding Gross",
        "address": "8798 At, St., 7639",
        "city": "Rome",
        "phone": "936 651-4847",
        "state": "Lazio",
        "country": "Italy",
        "post": "300326"
    },
    "communication": {
        "email": "asfs@aflk.com",
        "phone": "6546432"
    }
}
class Meta
model
fields = ['company', 'grn', 'shippingaddress', 'communication']
company
grn
shippingaddress
communication
class InvManage.views.GoodsReceiptNoteSerializer

Bases: rest_framework.serializers.ModelSerializer

Serializer for GoodsReceiptNote class instance.

The GoodsReceiptNoteSerializer.data attribute gives the JSON serialized data of the GoodsReceiptNote instance:

{
    "grnes": [
        {
            "grn": 103,
            "grne_id": 117,
            "ppe_id": 324,
            "po_id": 293,
            "product": {
                "pk": 637,
                "name": "piano",
                "category": "Ultricies PC",
                "quantity": 23921,
                "identifier": "PROD9",
                "location": "Musselburgh",
                "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ",
                "prod_id": 637
            },
            "quantity": 100,
            "receivedQty": 50,
            "acceptedQty": 50,
            "rejectedQty": 0,
            "remark": "OK"
        },
        {
            "grn": 103,
            "grne_id": 118,
            "ppe_id": 325,
            "po_id": 293,
            "product": {
                "pk": 645,
                "name": "Tabl",
                "category": "Sociis Natoque Company",
                "quantity": 38276,
                "identifier": "PROD17",
                "location": "Schagen",
                "description": "aldgjlakjlkasdj",
                "prod_id": 645
            },
            "quantity": 250,
            "receivedQty": 200,
            "acceptedQty": 180,
            "rejectedQty": 20,
            "remark": "20 pieces faulty"
        }
    ],
    "date": "29-Sep-2021",
    "vendor": {
        "name": "Girish",
        "identifier": "GJ",
        "gstin": "GSTIN002",
        "address": {
            "name": "alsf",
            "address": "jas;k",
            "city": ";sdalkf",
            "phone": "alsf",
            "state": "kjdflk",
            "country": "ljflkj",
            "post": "54545"
        }
    },
    "poRef": [
        182
    ],
    "identifier": 846,
    "grnType": "auto",
    "amendDate": "2021-09-29T00:00:00Z",
    "transporter": "TeraTransport",
    "vehicleNumber": "GH-646358",
    "gateInwardNumber": "864353",
    "preparedBy": "KJL",
    "checkedBy": "KJH",
    "inspectedBy": "GIO",
    "approvedBy": "BHI"
}
class Meta
model
fields = ['grnes', 'date', 'vendor', 'poRef', 'identifier', 'grnType', 'amendDate', 'transporter',...
grnes
date
vendor
to_representation(self, instance)
get_grnes(self, instance)
class InvManage.views.PPEntrySerializer

Bases: rest_framework.serializers.ModelSerializer

Serializer for ProductPurchaseEntry class instance.

The PPEntrySerializer.data attribute gives the JSON serialized data of the ProductPurchaseEntry instance:

{
    "ppe_id": 324,
    "product": {
        "pk": 637,
        "name": "Piano",
        "category": "Ultricies PC",
        "quantity": 23921,
        "identifier": "PROD9",
        "location": "Musselburgh",
        "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ",
        "prod_id": 637
    },
    "quantity": 100,
    "price": 10.0,
    "discount": 0.0,
    "order": 182,
    "pendingQty": 50
}
class Meta
model
fields = ['ppe_id', 'product', 'quantity', 'price', 'discount', 'order', 'pendingQty']
ppe_id
product
pendingQty
to_representation(self, instance)
create(self, validated_data)
update(self, instance, validated_data)
class InvManage.views.ProductSerializer

Bases: rest_framework.serializers.ModelSerializer

Serializer for Product class instance.

The ProductSerializer.data attribute gives the JSON serialized data of the Product instance:

{
    "pk": 637,
    "name": "Piano",
    "category": "Ultricies PC",
    "quantity": 23921,
    "identifier": "PROD9",
    "location": "Musselburgh",
    "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ",
    "prod_id": 637
}
class Meta
model
fields = ['pk', 'name', 'category', 'quantity', 'identifier', 'location', 'description', 'prod_id']
prod_id
to_representation(self, instance)
class InvManage.views.PurchaseInvoiceSerializer

Bases: rest_framework.serializers.ModelSerializer

Serializer for PurchaseInvoice class instance.

The PurchaseInvoiceSerializer.data attribute gives the JSON serialized data of the PurchaseInvoice instance:

{
    "company": {
        "name": "Fringillami",
        "owner": "Ivor Barnett",
        "gstin": "89AAC056465468",
        "phone": "332 220-7026",
        "address": "Ap #849-6241 Euismod Av., 677598, Carinthia, Belgium",
        "email": "est.tempor@fringillami.org",
        "location": "Belgium",
        "image": "/media/images/logo.png"
    },
    "po": {
        "vendor": {
            "name": "Girish",
            "identifier": "GJ",
            "gstin": "GSTIN002",
            "address": {
                "name": "alsf",
                "address": "jas;k",
                "city": ";sdalkf",
                "phone": "alsf",
                "state": "kjdflk",
                "country": "ljflkj",
                "post": "54545"
            }
        },
        "date": "25-Sep-2021",
        "po": 293,
        "subtotal": 279975.0,
        "taxtotal": 22398.0,
        "ordertotal": 302373.0,
        "ppes": [
            {
                "ppe_id": 324,
                "product": {
                    "pk": 637,
                    "name": "piano",
                    "category": "Ultricies PC",
                    "quantity": 23921,
                    "identifier": "PROD9",
                    "location": "Musselburgh",
                    "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ",
                    "prod_id": 637
                },
                "quantity": 100,
                "price": 10.0,
                "discount": 0.0,
                "order": 182,
                "pendingQty": 50
            },
            {
                "ppe_id": 325,
                "product": {
                    "pk": 645,
                    "name": "Tabl",
                    "category": "Sociis Natoque Company",
                    "quantity": 38276,
                    "identifier": "PROD17",
                    "location": "Schagen",
                    "description": "aldgjlakjlkasdj",
                    "prod_id": 645
                },
                "quantity": 250,
                "price": 90.0,
                "discount": 8.0,
                "order": 182,
                "pendingQty": 70
            },
            {
                "ppe_id": 326,
                "product": {
                    "pk": 638,
                    "name": "Goblet drum",
                    "category": "Est Congue Consulting",
                    "quantity": 46076,
                    "identifier": "PROD10",
                    "location": "Kaluga",
                    "description": "aldgjlakjlkasdj",
                    "prod_id": 638
                },
                "quantity": 200,
                "price": 150.0,
                "discount": 12.0,
                "order": 182,
                "pendingQty": 200
            },
            {
                "ppe_id": 327,
                "product": {
                    "pk": 643,
                    "name": "quinto",
                    "category": "Enim Suspendisse Associates",
                    "quantity": 51099,
                    "identifier": "PROD15",
                    "location": "Nagpur",
                    "description": "aldgjlakjlkasdj",
                    "prod_id": 643
                },
                "quantity": 350,
                "price": 150.0,
                "discount": 10.0,
                "order": 182,
                "pendingQty": 350
            },
            {
                "ppe_id": 328,
                "product": {
                    "pk": 651,
                    "name": "Igihumurizo",
                    "category": "Curabitur Massa Vestibulum Consulting",
                    "quantity": 48553,
                    "identifier": "PROD23",
                    "location": "Yeovil",
                    "description": "aldgjlakjlkasdj",
                    "prod_id": 651
                },
                "quantity": 500,
                "price": 50.0,
                "discount": 6.0,
                "order": 182,
                "pendingQty": 500
            },
            {
                "ppe_id": 329,
                "product": {
                    "pk": 653,
                    "name": "Balsié",
                    "category": "Eu Foundation",
                    "quantity": 29988,
                    "identifier": "PROD25",
                    "location": "Sudbury",
                    "description": "aldgjlakjlkasdj",
                    "prod_id": 653
                },
                "quantity": 200,
                "price": 500.0,
                "discount": 15.0,
                "order": 182,
                "pendingQty": 200
            },
            {
                "ppe_id": 330,
                "product": {
                    "pk": 656,
                    "name": "Padayani thappu",
                    "category": "Posuere LLP",
                    "quantity": 6358,
                    "identifier": "PROD28",
                    "location": "Ruvo del Monte",
                    "description": "aldgjlakjlkasdj",
                    "prod_id": 656
                },
                "quantity": 350,
                "price": 250.0,
                "discount": 13.0,
                "order": 182,
                "pendingQty": 350
            }
        ]
    },
    "shippingaddress": {
        "name": "Harding Gross",
        "address": "8798 At, St., 7639",
        "city": "Rome",
        "phone": "936 651-4847",
        "state": "Lazio",
        "country": "Italy",
        "post": "300326"
    },
    "communication": {
        "email": "asfs@aflk.com",
        "phone": "6546432"
    }
}
class Meta
model
fields = ['company', 'po', 'shippingaddress', 'communication']
company
po
shippingaddress
communication
class InvManage.views.GRNInvoice

Bases: django.db.models.Model

Model for the goods receipt note invoice.

company

Primary key of the Company.

Type

Company

grn

Primary key of the GoodsReceiptNote.

Type

GoodsReceiptNote

shippingaddress

Primary key of the ShippingAddress.

Type

ShippingAddress

communication

Primary key of the Communication.

Type

Communication

company
grn
shippingaddress
communication
InvManage.views.create_grn_view(request)

Creates a goods receipt note (GRN) on POST request, and returns a GRN creation form on GET request.

GET /grn

Gets the GRN creation form.

Example request:

GET /grn/ HTTP/1.1
Host: localhost:8000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Request Headers
  • Accept – text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Status Codes
  • 200 OK – GRN creation form received successfully.

POST /grn

Creates a GRN. There are two modes: - auto : Setting grn-grnType to auto creates a GRN with PO reference. - manual : Setting grn-grnType to manual creates a GRN without PO reference. In this case

the grn-poRef is not required.

Example request:

POST /consumer/ HTTP/1.1
Host: localhost:8000
Content-Type: multipart/form-data;
Form Parameters
  • grn-grnTypeauto

  • grn-vendor4

  • grn-poRef182

  • grn-amendNumber546

  • grn-amendDate2021-09-29

  • grn-identifier846

  • grn-date2021-09-29

  • grn-transporterTeraTransport

  • grn-vehicleNumberGH-646358

  • grn-gateInwardNumber864353

  • grn-preparedByKJL

  • grn-checkedByKJH

  • grn-inspectedByGIO

  • grn-approvedByBHI

  • form-TOTAL_FORMS3

  • form-INITIAL_FORMS0

  • form-MIN_NUM_FORMS

  • form-MAX_NUM_FORMS

  • form-0-product637

  • form-0-quantity100

  • form-0-receivedQty50

  • form-0-acceptedQty50

  • form-0-rejectedQty0

  • form-0-remarkOK

  • form-0-DELETE

  • form-0-grne_id-1

  • form-0-ppe_id324

  • form-1-product645

  • form-1-quantity250

  • form-1-receivedQty200

  • form-1-acceptedQty180

  • form-1-rejectedQty20

  • form-1-remark20 pieces faulty

  • form-1-DELETE

  • form-1-grne_id-1

  • form-1-ppe_id325

  • form-2-product638

  • form-2-quantity200

  • form-2-receivedQty0

  • form-2-acceptedQty0

  • form-2-rejectedQty0

  • form-2-remark

  • form-2-DELETE

  • form-2-grne_id-1

  • form-2-ppe_id326

Response Headers
  • Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv

Status Codes
InvManage.views.update_grn_view(request)

Updates the goods receipt note (GRN) on POST request, and returns a GRN update form on GET request.

GET /grn/update

Gets the GRN update form.

Example request:

GET /grn/update HTTP/1.1
Host: localhost:8000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Request Headers
  • Accept – text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Status Codes
  • 200 OK – GRN update form received successfully.

POST /grn/update

Updates a GRN. There are two modes: - auto : Setting grn-grnType to auto creates a GRN with PO reference. - manual : Setting grn-grnType to manual creates a GRN without PO reference. In this case

the grn-poRef is not required.

Example request:

POST /consumer/ HTTP/1.1
Host: localhost:8000
Content-Type: multipart/form-data;
Form Parameters
  • grn-grnTypeauto

  • grn-vendor4

  • grn-poRef182

  • grn-amendNumber546

  • grn-amendDate2021-09-29

  • grn-identifier846

  • grn-date2021-09-29

  • grn-transporterTeraTransport

  • grn-vehicleNumberGH-646358

  • grn-gateInwardNumber864353

  • grn-preparedByKJL

  • grn-checkedByKJH

  • grn-inspectedByGIO

  • grn-approvedByBHI

  • form-TOTAL_FORMS3

  • form-INITIAL_FORMS0

  • form-MIN_NUM_FORMS

  • form-MAX_NUM_FORMS

  • form-0-product637

  • form-0-quantity100

  • form-0-receivedQty50

  • form-0-acceptedQty50

  • form-0-rejectedQty0

  • form-0-remarkOK

  • form-0-DELETE

  • form-0-grne_id-1

  • form-0-ppe_id324

  • form-1-product645

  • form-1-quantity250

  • form-1-receivedQty200

  • form-1-acceptedQty180

  • form-1-rejectedQty20

  • form-1-remark20 pieces faulty

  • form-1-DELETE

  • form-1-grne_id-1

  • form-1-ppe_id325

  • form-2-product638

  • form-2-quantity200

  • form-2-receivedQty0

  • form-2-acceptedQty0

  • form-2-rejectedQty0

  • form-2-remark

  • form-2-DELETE

  • form-2-grne_id-1

  • form-2-ppe_id326

Response Headers
  • Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv

Status Codes
InvManage.views.delete_grn_view(request, pk)

Deletes the GRN with primary key object_id on POST request.

POST /grn/<str:object_id>/delete

Deletes the GRN represented by the primary key object_id.

Example request:

POST /grn/104/delete HTTP/1.1
Host: localhost:8000
Content-Type: application/x-www-form-urlencoded
Parameters
  • object_id – GRN primary key.

Response Headers
Status Codes
InvManage.views.display_grns_view(request)

Retrieves the list of GRNs on GET request.

GET /grns/

Gets the list of all GRNs.

Example request:

GET /grns/ HTTP/1.1
Host: localhost:8000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Form Parameters
  • page – The page number of the GRN list.

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Request Headers
  • Accept – text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Status Codes
  • 200 OK – List of GRNs received successfully.

InvManage.views.print_grn_view(request, pk)

Opens the GRN with primary key grn_id for printing on GET request.

POST /grn/<str:grn_id>/print

Opens the GRN represented by the primary key grn_id.

Example request:

POST /grn/103/print HTTP/1.1
Host: localhost:8000
Content-Type: application/x-www-form-urlencoded

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json; charset=utf-8

[
    {
        "company": {
            "name": "Fringillami",
            "owner": "Ivor Barnett",
            "gstin": "89AAC056465468",
            "phone": "332 220-7026",
            "address": "Ap #849-6241 Euismod Av., 677598, Carinthia, Belgium",
            "email": "est.tempor@fringillami.org",
            "location": "Belgium",
            "image": "/media/images/hyperlink-green_x91WW5n.png"
        },
        "grn": {
            "grnes": [
                {
                    "grn": 103,
                    "grne_id": 117,
                    "ppe_id": 324,
                    "po_id": 293,
                    "product": {
                        "pk": 637,
                        "name": "piano",
                        "category": "Ultricies PC",
                        "quantity": 23921,
                        "identifier": "PROD9",
                        "location": "Musselburgh",
                        "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ",
                        "prod_id": 637
                    },
                    "quantity": 100,
                    "receivedQty": 50,
                    "acceptedQty": 50,
                    "rejectedQty": 0,
                    "remark": "OK"
                },
                {
                    "grn": 103,
                    "grne_id": 118,
                    "ppe_id": 325,
                    "po_id": 293,
                    "product": {
                        "pk": 645,
                        "name": "Tabl",
                        "category": "Sociis Natoque Company",
                        "quantity": 38276,
                        "identifier": "PROD17",
                        "location": "Schagen",
                        "description": "aldgjlakjlkasdj",
                        "prod_id": 645
                    },
                    "quantity": 250,
                    "receivedQty": 200,
                    "acceptedQty": 180,
                    "rejectedQty": 20,
                    "remark": "20 pieces faulty"
                }
            ],
            "date": "29-Sep-2021",
            "vendor": {
                "name": "Girish",
                "identifier": "GJ",
                "gstin": "GSTIN002",
                "address": {
                    "name": "alsf",
                    "address": "jas;k",
                    "city": ";sdalkf",
                    "phone": "alsf",
                    "state": "kjdflk",
                    "country": "ljflkj",
                    "post": "54545"
                }
            },
            "poRef": [
                182
            ],
            "identifier": 846,
            "grnType": "auto",
            "amendDate": "2021-09-29T00:00:00Z",
            "transporter": "TeraTransport",
            "vehicleNumber": "GH-646358",
            "gateInwardNumber": "864353",
            "preparedBy": "KJL",
            "checkedBy": "KJH",
            "inspectedBy": "GIO",
            "approvedBy": "BHI"
        },
        "shippingaddress": {
            "name": "Harding Gross",
            "address": "8798 At, St., 7639",
            "city": "Rome",
            "phone": "936 651-4847",
            "state": "Lazio",
            "country": "Italy",
            "post": "300326"
        },
        "communication": {
            "email": "asfs@aflk.com",
            "phone": "6546432"
        }
    }
]
Parameters
  • grn_id – GRN primary key.

Response Headers
Status Codes
class InvManage.views.ProductBasicInfoForm

Bases: django.forms.Form

Form for basic product information.

name

Name of the product.

Type

str

item_type

Type of the product.

Type

str

category

Product category.

Type

str

description

Short description of the product.

Type

str

prefix = basic
context
name
item_type
category
description
class InvManage.views.ProductDetailedInfoForm

Bases: django.forms.Form

Form for product physical details

length

Length of the product.

Type

str

width

Width of the product.

Type

str

height

Height of the product.

Type

str

weight

Weight of the product.

Type

str

prefix = detailed
context
length
width
height
weight
class InvManage.views.ProductPricingForm

Bases: django.forms.Form

Form for pricing information of the product.

price

Price of the product.

Type

float

discount

Default discount percentage on the product.

Type

float

prefix = pricing
context
price
discount
class InvManage.views.ProductPurchaseEntryForm

Bases: django.forms.Form

Form for product purchase entry.

ppe_id

Unique identifier of the product purchase entry.

Type

int

product

Product associated wit the product purchase entry.

Type

Product

quantity

Quantity of the product to be ordered.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product purchase.

Type

float

prefix = form
context
ppe_id
product
quantity
price
discount
class InvManage.views.ProductSalesEntryForm

Bases: django.forms.Form

Form for product sales entry.

pse_id

Unique identifier of the product sales entry.

Type

int

product

Product associated with the product sales entry.

Type

Product

quantity

Quantity of the product.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product.

Type

float

prefix = form
context
pse_id
product
quantity
price
discount
class InvManage.views.ProductStatusForm

Bases: django.forms.Form

Form for locating and identifying the product.

quantity

Stock quantity of the product.

Type

int

identifier

Unique identifier of the product.

Type

str

location

Physical location of the product.

Type

str

context
prefix = status
quantity
identifier
location
class InvManage.views.ProductStorageInfoForm

Bases: django.forms.Form

Form for storage information.

barcode

Barcode of the product.

Type

str

expiry

Expiry date of the product.

Type

DateField

prefix = storage
barcode
context
expiry
class InvManage.views.PurchaseOrderBasicInfo

Bases: django.forms.Form

Form for basic information of the purchase order.

vendor

Vendor associated with the purcahse order.

Type

Vendor

date

Date of the purchase order creation.

Type

DateField

po

Purchase order number.

Type

int

discount

Percentage of overall discount.

Type

float

tax

Percentage of tax.

Type

float

paid

Amount paid to the vendor.

Type

float

balance

Balance amount to be paid to the vendor.

Type

float

subtotal

Total of all the product purchase entries associated with the purchase order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the purchase order including taxtotal.

Type

float

prefix = po
context
product_choices
vendor_choices
vendor
date
po
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
class InvManage.views.GRNInfo

Bases: django.forms.Form

Form for goods receipt note (GRN).

vendor

Vendor associated with the goods receipt note.

Type

Vendor

poRef

List of identifiers of the purchase orders from which the goods receipt note is derived.

Type

PurchaseOrder

identifier

Unique identifier of the goods receipt note.

Type

str

date

Date of GRN creation.

Type

DateField

grnType

Type of GRN (auto or manual).

Type

str

amendNumber

Amendment number of the GRN.

Type

int

amendDate

Amendment date.

Type

DateField

transporter

Name of the transport/shipping service.

Type

str

vehicleNumber

Vehicle number using which the products are shipped.

Type

str

gateInwardNumber

Gate inward number of the vehicle.

Type

str

preparedBy

Name/identifier of the person who created the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who validated the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who inspected the physical products in the goods receipt note.

Type

str

approvedBy

Name/identifier of the authority who approved the goods receipt note.

Type

str

prefix = grn
context
product_choices
vendor_choices
vendor
TYPE_CHOICES = [['manual', 'Blank'], ['auto', 'PO Reference']]
poRef
identifier
date
grnType
amendNumber
amendDate
transporter
vehicleNumber
gateInwardNumber
preparedBy
checkedBy
inspectedBy
approvedBy
class InvManage.views.GRNEntryForm

Bases: django.forms.Form

Form for goods receipt note entry (GRNE).

product

Product associated with the goods receipt note entry.

Type

Product

grne_id

Unique identifier of the GRNE.

Type

int

ppe_id

Unique identifier of the product purchase entry associated with the GRNE.

Type

int

quantity

Ordered quantity of product with reference to product purchase entry.

Type

int

remark

Remarks of the quality engineer or the GRN creator about status of products received.

Type

str

receivedQty

Quantity of product received against the ordered quantity.

Type

str

acceptedQty

Quantity of product accepted as OK.

Type

str

rejectedQty

Quantity of product rejected (not OK, on HOLD, extra delivery, etc.)

Type

str

prefix = form
context
product
grne_id
ppe_id
quantity
remark
receivedQty
acceptedQty
rejectedQty
class InvManage.views.ThumbnailForm

Bases: django.forms.Form

For for product thumbnail image.

image

Image of the product.

Type

ImageField

prefix = thumbnail
image
class InvManage.views.SalesOrderBasicInfo

Bases: django.forms.Form

Form for basic information on sales order.

consumer

Consumer associated with the sales order.

Type

Consumer

date

Date of the sales order creation.

Type

DateField

so

Sales order number.

Type

int

discount

Percentage discount associated with the sales order.

Type

float

tax

Percentage of tax applicable.

Type

float

paid

Amount received from the consumer.

Type

float

balance

Amount balance with the consumer.

Type

float

subtotal

Total of all the product sales entries associated with the sales order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the sales order including taxtotal.

Type

float

prefix = so
context
product_choices
consumer_choices
consumer
date
so
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
class InvManage.views.ShippingAddressForm

Bases: django.forms.Form

For for shipping address.

title

Title of the firm.

Type

str

name

Name of the firm.

Type

str

phone

Contact number of the firm.

Type

str

address

Postal address.

Type

str

city

City.

Type

str

state

State.

Type

str

country

Country.

Type

str

website

Official website of the firm.

Type

URLField

post

Postal code of the firm.

Type

str

prefix = ship
context
title
name
phone
address
city
state
country
website
post
class InvManage.views.VendorForm

Bases: django.forms.Form

Form for basic informaion of the vendor.

name

Name of the vendor.

Type

str

identifier

Unique identifier of the vendor.

Type

str

gstin

GSTIN number of the vendor.

Type

str

prefix = vend
context
name
identifier
gstin
class InvManage.views.ConsumerForm

Bases: django.forms.Form

Form for consumer.

name

Name of the consumer.

Type

str

identifier

Unique identifier of the consumer.

Type

str

gstin

GSTIN number of the consumer.

Type

str

phone

Contact number.

Type

str

address

Address of the consumer.

Type

str

email

E-mail address of the consumer.

Type

str

location

City of the consumer.

Type

str

prefix = consumer
context
name
identifier
gstin
phone
address
email
location
class InvManage.views.CompanyForm

Bases: django.forms.Form

Form for company.

name

Name of the company.

Type

str

owner

Name of the owner of the company.

Type

str

gstin

GSTIN number of the company.

Type

str

phone

Contact number of the company.

Type

str

address

Postal address.

Type

str

email

E-mail address of the contact person.

Type

str

location

City of the company.

Type

str

prefix = comp
context
name
owner
gstin
phone
address
email
location
class InvManage.views.HistoryForm

Bases: django.forms.Form

Form for history view.

qlen

Count of the events visible on the history view.

Type

int

prefix = history
context
qlen
class InvManage.views.CommunicationForm

Bases: django.forms.Form

Form for communication information.

language

Language of communication.

Type

str

phone

Contact number of the firm.

Type

str

email

E-mail of the contact person.

Type

EmailField

fax

Fax number.

Type

str

prefix = com
context
language
phone
email
fax
class InvManage.views.PurchaseDataForm

Bases: django.forms.Form

Form for purchase related data.

currency

Currency of purchase.

Type

str

minorder

Minimum order quantity.

Type

int

contactperson

Name of the contact person.

Type

str

refcode

Reference code.

Type

str

transportmode

Mode of transport of the shipment.

Type

str

prefix = pdform
context
currency
minorder
contactperson
refcode
transportmode
class InvManage.views.BankAccountForm

Bases: django.forms.Form

Form for bank account details.

name

Name of the bank.

Type

str

branch

Branch number of the bank.

Type

str

region

City in which the branch is located.

Type

str

route

Transit number.

Type

str

number

Bank account number.

Type

int

acctype

Type of bank account.

Type

str

iban

IBAN number.

Type

str

code

Bank code.

Type

str

branchcode

Branch code.

Type

str

prefix = bank
context
name
branch
region
route
number
acctype
iban
code
branchcode
class InvManage.views.Product

Bases: django.db.models.Model

Model of the product.

name

Name of the product.

Type

str

category

Product category.

Type

str

item_type

Type of the product.

Type

str

description

Short description of the product.

Type

str

price

Price of the product.

Type

float

quantity

Stock quantity of the product.

Type

int

identifier

Unique identifier of the product.

Type

str

location

Physical location of the product.

Type

str

length

Length of the product.

Type

str

width

Width of the product.

Type

str

height

Height of the product.

Type

str

weight

Weight of the product.

Type

str

discount

Default discount percentage on the product.

Type

float

barcode

Barcode of the product.

Type

str

expiry

Expiry date of the product.

Type

DateField

image

Image of the product.

Type

ImageField

name
category
item_type
description
price
quantity
identifier
location
length
width
height
weight
discount
barcode
expiry
image
__str__(self)
class InvManage.views.ProductPurchaseEntry

Bases: django.db.models.Model

Model of the product purchase entry.

product

Product associated wit the product purchase entry.

Type

ModelChoiceField

quantity

Quantity of the product to be ordered.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product purchase.

Type

float

order

Referenced purchase order.

Type

PurchaseOrder

receivedQty

Quantity of product received against the ordered quantity.

Type

str

acceptedQty

Quantity of product accepted as OK.

Type

str

rejectedQty

Quantity of product rejected (not OK, on HOLD, extra delivery, etc.)

Type

str

is_complete()

Returns the completion status (boolean).

pending_quantity()

Returns the pending quantity against the entry (int).

product
quantity
price
discount
order
receivedQty
acceptedQty
rejectedQty
is_complete(self)
property pending_quantity(self)
class InvManage.views.GRNEntry

Bases: django.db.models.Model

Model of the goods receipt note entry (GRNE).

product

Primary key of the Product instance associated with the goods receipt note entry.

Type

Product

quantity

Ordered quantity of product with reference to product purchase entry.

Type

int

grne

Primary key of the GoodsReceiptNote instance.

Type

int

ppe

Primary key of the ProductPurchaseEntry instance associated with the GRNE.

Type

int

remark

Remarks of the quality engineer or the GRN creator about status of products received.

Type

str

receivedQty

Quantity of product received against the ordered quantity.

Type

str

acceptedQty

Quantity of product accepted as OK.

Type

str

rejectedQty

Quantity of product rejected (not OK, on HOLD, extra delivery, etc.)

Type

str

product
quantity
grn
ppes
remark
receivedQty
acceptedQty
rejectedQty
class InvManage.views.ProductSalesEntry

Bases: django.db.models.Model

Model of the product sales entry.

product

Primary key of the Product associated with the product sales entry.

Type

Product

quantity

Quantity of the product.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product.

Type

float

order

Primary key of the SalesOrder referenced by the entry.

Type

SalesOrder

product
quantity
price
discount
order
class InvManage.views.SalesOrder

Bases: django.db.models.Model

Model of the sales order.

consumer

Consumer associated with the sales order.

Type

ModelChoiceField

date

Date of the sales order creation.

Type

DateField

so

Sales order number.

Type

int

discount

Percentage discount associated with the sales order.

Type

float

tax

Percentage of tax applicable.

Type

float

paid

Amount received from the consumer.

Type

float

balance

Amount balance with the consumer.

Type

float

subtotal

Total of all the product sales entries associated with the sales order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the sales order including taxtotal.

Type

float

consumer
date
so
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
class InvManage.views.PurchaseOrder

Bases: django.db.models.Model

Model of the purchase order.

vendor

Vendor associated with the purchase order.

Type

Vendor

date

Date and time of the purchase order creation.

Type

DateField

po

Purchase order number.

Type

int

discount

Percentage discount.

Type

float

tax

Percentage of tax applicable for the purchase.

Type

float

paid

Amount paid against the PO.

Type

float

balance

Amount balance which remains to be paid.

Type

float

subtotal

Total of all the product purchase entries associated with the purchase order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the purchase order including taxtotal.

Type

float

is_complete()

Returns the completion status (boolean).

pending_ppes()

Returns list of product purchase entries which are not completed.

vendor
date
po
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
is_complete(self)
pending_ppes(self)
class InvManage.views.GoodsReceiptNote

Bases: django.db.models.Model

Model of the goods receipt note (GRN).

vendor

Vendor associated with the goods receipt note.

Type

ModelChoiceField

poRef

List of identifiers of the purchase orders from which the goods receipt note is derived.

Type

MultipleChoiceField

identifier

Unique identifier of the goods receipt note.

Type

str

date

Date of GRN creation.

Type

DateField

grnType

Type of GRN (auto or manual).

Type

ChoiceField

amendNumber

Amendment number of the GRN.

Type

int

amendDate

Amendment date.

Type

DateField

transporter

Name of the transport/shipping service.

Type

str

vehicleNumber

Vehicle number using which the products are shipped.

Type

str

gateInwardNumber

Gate inward number of the vehicle.

Type

str

preparedBy

Name/identifier of the person who created the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who validated the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who inspected the physical products in the goods receipt note.

Type

str

approvedBy

Name/identifier of the authority who approved the goods receipt note.

Type

str

TYPE_CHOICES = [['manual', 'Blank'], ['auto', 'PO Reference']]
vendor
poRef
identifier
date
grnType
amendNumber
amendDate
transporter
vehicleNumber
gateInwardNumber
preparedBy
checkedBy
inspectedBy
approvedBy
class InvManage.views.Consumer

Bases: django.db.models.Model

Model of the consumer.

name

Name of the consumer.

Type

str

identifier

Unique identifier of the consumer.

Type

str

gstin

GSTIN number of the consumer.

Type

str

phone

Contact number.

Type

str

address

Address of the consumer.

Type

str

email

E-mail address of the consumer.

Type

str

location

City of the consumer.

Type

str

Returns

[description]

Return type

[type]

name
identifier
gstin
phone
address
email
location
__str__(self)
class InvManage.views.Vendor

Bases: django.db.models.Model

Model of the vendor.

name

Name of the vendor.

Type

str

identifier

Unique identifier of the vendor.

Type

str

gstin

GSTIN number of the vendor.

Type

str

address

Primary key of the ShippingAddress instance associated with the vendor.

Type

ShippingAddress

communication

Primary key of the Communication instance associated with the vendor.

Type

Communication

backaccount

Primary key of the BankAccount instance associated with the vendor.

Type

BankAccount

purchasedata

Primary key of the PurchaseData instance associated with the vendor.

Type

PurchaseData

Returns

String representation of the vendor name.

Return type

str

name
identifier
gstin
address
communication
bankaccount
purchasedata
__str__(self)
class InvManage.views.Company

Bases: django.db.models.Model

Model of the company.

name

Name of the company.

Type

str

owner

Owner of the company.

Type

str

gstin

GSTIN number of the company.

Type

str

phone

Contact number.

Type

str

address

Postal address.

Type

str

email

E-mail address of the contact person.

Type

str

location

City of the company.

Type

str

image

Photo/logo of the company.

Type

ImageField

shippingaddress

Primary key of the ShippingAddress instance associated with the company.

Type

ShippingAddress

Returns

String representation of the company name.

Return type

str

name
owner
gstin
phone
address
email
location
image
shippingaddress
__str__(self)
class InvManage.views.PurchaseInvoice

Bases: django.db.models.Model

Model for the purchase invoice.

company

Primary key of the Company.

Type

Company

po

Primary key of the PurchaseOrder.

Type

PurchaseOrder

shippingaddress

Primary key of the ShippingAddress.

Type

ShippingAddress

communication

Primary key of the Communication.

Type

Communication

company
po
shippingaddress
communication
class InvManage.views.SalesInvoice

Bases: django.db.models.Model

Model for the sales order invoice.

company

Primary key of the Company.

Type

Company

so

Primary key of the SalesOrder.

Type

SalesOrder

shippingaddress

Primary key of the ShippingAddress.

Type

ShippingAddress

company
so
shippingaddress
class InvManage.views.FilterState

Bases: django.db.models.Model

Model of the filter state.

name

Name of the filter state.

Type

str

name
class InvManage.views.FilterColumn

Bases: django.db.models.Model

Model of the column state.

name

Name of the column.

Type

str

label

Label of the column.

Type

str

visible

Visibility flag.

Type

bool

position

Index of the column.

Type

int

state

Primary key of the FilterState instance being referenced by the column instance.

Type

FilterState

name
label
visible
position
state
class InvManage.views.Object

Bases: django.db.models.Model

Model for a generic object.

identifier

Unique identifier of the object.

Type

str

name

Name of the object.

Type

str

model

Model associated with the object.

Type

str

identifier
name
model
class InvManage.views.EventCard

Bases: django.db.models.Model

Model for event card to be displayed in the history view.

obj

Object associated with the event.

Type

OneToOneField

objId

Unique identifier of the object.

Type

str

objname

Name of the object.

Type

str

objmodel

Model of the object.

Type

str

date

Timestamp of the event.

Type

DateField

operation

Type of event.

Type

str

obj
objId
objname
objmodel
date
operation
class InvManage.views.EventType

Bases: django.db.models.Model

Model for event type.

name

Name of the event being triggered.

Type

str

label

Label associated with the event.

Type

str

Returns

Returns the string representation of the label when the event type is queried.

Return type

Label

name
label
__str__(self)
class InvManage.views.ObjectModel

Bases: django.db.models.Model

Model associated with an object.

name

Name of the object.

Type

str

label

Label string of the object.

Type

str

modName

Name of the model associated with the object.

Type

str

Returns

Returns string representation of the label when object model is queried.

Return type

Label

name
label
modName
__str__(self)
class InvManage.views.HistoryFilterState

Bases: django.db.models.Model

Model of filter state of the history.

params

Paramameters of the configured filters.

Type

str

params
class InvManage.views.ShippingAddress

Bases: django.db.models.Model

Model of the shipping address.

title

Title of the firm.

Type

str

name

Name of the firm.

Type

str

phone

Contact number of the firm.

Type

str

address

Postal address.

Type

str

city

City.

Type

str

state

State.

Type

str

country

Country.

Type

str

website

Official website of the firm.

Type

URLField

post

Postal code of the firm.

Type

str

title
name
phone
address
city
state
country
website
post
class InvManage.views.PurchaseData

Bases: django.db.models.Model

Model of the purchase data.

currency

Currency of purchase.

Type

str

minorder

Minimum order quantity.

Type

int

contactperson

Name of the contact person.

Type

str

refcode

Reference code.

Type

str

transportmode

Mode of transport of the shipment.

Type

str

currency
minorder
contactperson
refcode
transportmode
class InvManage.views.Communication

Bases: django.db.models.Model

Model of the communication information.

language

Language of communication.

Type

str

phone

Contact number of the firm.

Type

str

email

E-mail of the contact person.

Type

EmailField

fax

Fax number.

Type

str

language
phone
email
fax
class InvManage.views.BankAccount

Bases: django.db.models.Model

Model of the bank account details.

name

Name of the bank.

Type

str

branch

Branch number of the bank.

Type

str

region

City in which the branch is located.

Type

str

route

Transit number.

Type

str

number

Bank account number.

Type

int

acctype

Type of bank account.

Type

str

iban

IBAN number.

Type

str

code

Bank code.

Type

str

branchcode

Branch code.

Type

str

name
branch
region
route
number
acctype
iban
code
branchcode
InvManage.views.get_columns(state)

Gets the columns of the display table.

This function takes a filter state and returns an array of column names that are ordered depending on the position attribute of the columns. This order is important as the queryset will be rendered in the display table according to the column order in this returned array.

Parameters

state (FilterState) – Filter state of the columns.

Returns

A list that dictates the order of the columns.

Return type

List

InvManage.views.sort_ascending_descending(request, model)

Sorts and saves the state of the column.

This function takes a request, finds which column needs to be sorted in ascending/descending order, and returns the sorted queryset.

Parameters
  • request (HttpRequest) – GET request received for retreiving the list of model instances.

  • model (Model) – Model of the objects being retrieved.

Returns

List of sorted object instances.

Return type

QuerySet

InvManage.views.change_column_position(request, state)

Modifies the column states depending on the request.

This function:
  • Takes a filter state

  • Extracts the column names into an order array

  • Modifies the column order in the array depending on user input direction (left/right)

  • Saves this modified state of columns into the database

  • Returns the modified column names array

Parameters
  • request (HttpRequest) – GET request for retrieving the state of the columns.

  • state (FilterState) – Filter state of the columns.

Returns

List of sorted columns.

Return type

List

InvManage.views.paginate(queryset, filter, page_number)

Paginates the list of objects.

This function takes the entire queryset and filters out only objects belonging to the request page

Parameters
  • queryset (QuerySet) – QuerySet of the objects retrieved from the database.

  • filter (FilterState) – Filter state of the columns.

  • page_number (int) – Page number requested.

class InvManage.views.PurchaseOrderFilter

Bases: django_filters.FilterSet

class Meta
model
fields
context
vendor
date
po
ordertotal
order_by_field = ordering
ordering
class InvManage.views.ProductSerializer

Bases: rest_framework.serializers.ModelSerializer

Serializer for Product class instance.

The ProductSerializer.data attribute gives the JSON serialized data of the Product instance:

{
    "pk": 637,
    "name": "Piano",
    "category": "Ultricies PC",
    "quantity": 23921,
    "identifier": "PROD9",
    "location": "Musselburgh",
    "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ",
    "prod_id": 637
}
class Meta
model
fields = ['pk', 'name', 'category', 'quantity', 'identifier', 'location', 'description', 'prod_id']
prod_id
to_representation(self, instance)
class InvManage.views.PPEntrySerializer

Bases: rest_framework.serializers.ModelSerializer

Serializer for ProductPurchaseEntry class instance.

The PPEntrySerializer.data attribute gives the JSON serialized data of the ProductPurchaseEntry instance:

{
    "ppe_id": 324,
    "product": {
        "pk": 637,
        "name": "Piano",
        "category": "Ultricies PC",
        "quantity": 23921,
        "identifier": "PROD9",
        "location": "Musselburgh",
        "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ",
        "prod_id": 637
    },
    "quantity": 100,
    "price": 10.0,
    "discount": 0.0,
    "order": 182,
    "pendingQty": 50
}
class Meta
model
fields = ['ppe_id', 'product', 'quantity', 'price', 'discount', 'order', 'pendingQty']
ppe_id
product
pendingQty
to_representation(self, instance)
create(self, validated_data)
update(self, instance, validated_data)
class InvManage.views.PurchaseInvoiceSerializer

Bases: rest_framework.serializers.ModelSerializer

Serializer for PurchaseInvoice class instance.

The PurchaseInvoiceSerializer.data attribute gives the JSON serialized data of the PurchaseInvoice instance:

{
    "company": {
        "name": "Fringillami",
        "owner": "Ivor Barnett",
        "gstin": "89AAC056465468",
        "phone": "332 220-7026",
        "address": "Ap #849-6241 Euismod Av., 677598, Carinthia, Belgium",
        "email": "est.tempor@fringillami.org",
        "location": "Belgium",
        "image": "/media/images/logo.png"
    },
    "po": {
        "vendor": {
            "name": "Girish",
            "identifier": "GJ",
            "gstin": "GSTIN002",
            "address": {
                "name": "alsf",
                "address": "jas;k",
                "city": ";sdalkf",
                "phone": "alsf",
                "state": "kjdflk",
                "country": "ljflkj",
                "post": "54545"
            }
        },
        "date": "25-Sep-2021",
        "po": 293,
        "subtotal": 279975.0,
        "taxtotal": 22398.0,
        "ordertotal": 302373.0,
        "ppes": [
            {
                "ppe_id": 324,
                "product": {
                    "pk": 637,
                    "name": "piano",
                    "category": "Ultricies PC",
                    "quantity": 23921,
                    "identifier": "PROD9",
                    "location": "Musselburgh",
                    "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ",
                    "prod_id": 637
                },
                "quantity": 100,
                "price": 10.0,
                "discount": 0.0,
                "order": 182,
                "pendingQty": 50
            },
            {
                "ppe_id": 325,
                "product": {
                    "pk": 645,
                    "name": "Tabl",
                    "category": "Sociis Natoque Company",
                    "quantity": 38276,
                    "identifier": "PROD17",
                    "location": "Schagen",
                    "description": "aldgjlakjlkasdj",
                    "prod_id": 645
                },
                "quantity": 250,
                "price": 90.0,
                "discount": 8.0,
                "order": 182,
                "pendingQty": 70
            },
            {
                "ppe_id": 326,
                "product": {
                    "pk": 638,
                    "name": "Goblet drum",
                    "category": "Est Congue Consulting",
                    "quantity": 46076,
                    "identifier": "PROD10",
                    "location": "Kaluga",
                    "description": "aldgjlakjlkasdj",
                    "prod_id": 638
                },
                "quantity": 200,
                "price": 150.0,
                "discount": 12.0,
                "order": 182,
                "pendingQty": 200
            },
            {
                "ppe_id": 327,
                "product": {
                    "pk": 643,
                    "name": "quinto",
                    "category": "Enim Suspendisse Associates",
                    "quantity": 51099,
                    "identifier": "PROD15",
                    "location": "Nagpur",
                    "description": "aldgjlakjlkasdj",
                    "prod_id": 643
                },
                "quantity": 350,
                "price": 150.0,
                "discount": 10.0,
                "order": 182,
                "pendingQty": 350
            },
            {
                "ppe_id": 328,
                "product": {
                    "pk": 651,
                    "name": "Igihumurizo",
                    "category": "Curabitur Massa Vestibulum Consulting",
                    "quantity": 48553,
                    "identifier": "PROD23",
                    "location": "Yeovil",
                    "description": "aldgjlakjlkasdj",
                    "prod_id": 651
                },
                "quantity": 500,
                "price": 50.0,
                "discount": 6.0,
                "order": 182,
                "pendingQty": 500
            },
            {
                "ppe_id": 329,
                "product": {
                    "pk": 653,
                    "name": "Balsié",
                    "category": "Eu Foundation",
                    "quantity": 29988,
                    "identifier": "PROD25",
                    "location": "Sudbury",
                    "description": "aldgjlakjlkasdj",
                    "prod_id": 653
                },
                "quantity": 200,
                "price": 500.0,
                "discount": 15.0,
                "order": 182,
                "pendingQty": 200
            },
            {
                "ppe_id": 330,
                "product": {
                    "pk": 656,
                    "name": "Padayani thappu",
                    "category": "Posuere LLP",
                    "quantity": 6358,
                    "identifier": "PROD28",
                    "location": "Ruvo del Monte",
                    "description": "aldgjlakjlkasdj",
                    "prod_id": 656
                },
                "quantity": 350,
                "price": 250.0,
                "discount": 13.0,
                "order": 182,
                "pendingQty": 350
            }
        ]
    },
    "shippingaddress": {
        "name": "Harding Gross",
        "address": "8798 At, St., 7639",
        "city": "Rome",
        "phone": "936 651-4847",
        "state": "Lazio",
        "country": "Italy",
        "post": "300326"
    },
    "communication": {
        "email": "asfs@aflk.com",
        "phone": "6546432"
    }
}
class Meta
model
fields = ['company', 'po', 'shippingaddress', 'communication']
company
po
shippingaddress
communication
InvManage.views.create_purchase_order_view(request)

Creates a purchase order (PO) on POST request, and returns a PO creation form on GET request.

GET /purchase_order

Gets the purchase order creation form.

Example request:

GET /purchase_order/ HTTP/1.1
Host: localhost:8000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Request Headers
  • Accept – text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Status Codes
  • 200 OK – Purchase order creation form received successfully.

POST /purchase_order

Creates a purchase order.

Example request:

POST /purchase_order/ HTTP/1.1
Host: localhost:8000
Content-Type: multipart/form-data;
Form Parameters
  • po-vendor4

  • vend-nameGirish

  • vend-identifierGJ

  • po-po69

  • po-date2021-09-29

  • po-tax12

  • po-discount8

  • po-paid4500

  • po-balance1200

  • ship-titleFingDocks

  • ship-nameHarding Gross

  • ship-phone936 651-4847

  • ship-address8798 At, St., 7639

  • ship-cityRome

  • ship-stateLazio

  • ship-countryItaly

  • ship-websitehttp://fringdocs.com

  • ship-post300326

  • po-subtotal2595000.00

  • po-taxtotal207600.00

  • po-ordertotal2802600.00

  • form-TOTAL_FORMS2

  • form-INITIAL_FORMS0

  • form-MIN_NUM_FORMS

  • form-MAX_NUM_FORMS

  • form-0-product649

  • form-0-quantity300

  • form-0-price4500

  • form-0-discount10

  • form-0-DELETE

  • form-0-ppe_id-1

  • form-1-product664

  • form-1-quantity250

  • form-1-price6000

  • form-1-discount8

  • form-1-DELETE

  • form-1-ppe_id-1

Response Headers
  • Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv

Status Codes
  • 302 Found – Redirects to /purchase_order.

InvManage.views.update_purchase_order_view(request)

Updates a purchase order on POST request and returns the purchase order update form for GET request.

GET /purchaes_order/update

Gets the purchase order update form whose primary key matches the query parameter pk.

Example request:

GET /purchase_order/update HTTP/1.1
Host: localhost:8000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Query Parameters
  • pk – The primary key of the purchase order.

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Request Headers
  • Accept – text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Status Codes
  • 200 OK – Purchase order update form received successfully.

POST /purchase_order/update

Updates the purchase order.

Example request:

POST /purchase_order/update HTTP/1.1
Host: localhost:8000
Content-Type: multipart/form-data;
Form Parameters
  • pk187

  • po-vendor4

  • vend-nameGirish

  • vend-identifierGJ

  • po-po69

  • po-date2021-09-29

  • po-tax12

  • po-discount8.0

  • po-paid4500.0

  • po-balance1200.0

  • ship-titleFingDocks

  • ship-nameHarding Gross

  • ship-phone936 651-4847

  • ship-address8798 At, St., 7639

  • ship-cityRome

  • ship-stateLazio

  • ship-countryItaly

  • ship-websitehttp://fringdocs.com

  • ship-post300326

  • po-subtotal2595000.0

  • po-taxtotal207600.0

  • po-ordertotal2802600.0

  • form-TOTAL_FORMS2

  • form-INITIAL_FORMS2

  • form-MIN_NUM_FORMS

  • form-MAX_NUM_FORMS

  • form-0-product649

  • form-0-quantity300

  • form-0-price4500

  • form-0-discount10

  • form-0-DELETE

  • form-0-ppe_id339

  • form-1-product664

  • form-1-quantity250

  • form-1-price6000

  • form-1-discount8

  • form-1-DELETE

  • form-1-ppe_id340

Response Headers
  • Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv

Status Codes
InvManage.views.display_purchase_orders_view(request)

Retrieves the list of purchase orders on GET request.

GET /purchase_orders/

Gets the list of all purchase orders.

Example request:

GET /purchase_orders/ HTTP/1.1
Host: localhost:8000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Form Parameters
  • page – The page number of the purchase order list.

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Request Headers
  • Accept – text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Status Codes
  • 200 OK – List of purchase orders received successfully.

InvManage.views.delete_purchase_order_view(request, pk)

Deletes the purchase order with primary key object_id on POST request.

POST /purchase_order/<str:object_id>/delete

Deletes the consumer represented by the primary key object_id.

Example request:

POST /purchase_order/187/delete HTTP/1.1
Host: localhost:8000
Content-Type: application/x-www-form-urlencoded
Parameters
  • object_id – Purchase order primary key.

Response Headers
Status Codes
InvManage.views.print_purchase_order_view(request, pk)

Opens the purchase order with primary key po_id for printing on GET request.

POST /purchase_order/<str:po_id>/print

Opens the purchase order represented by the primary key po_id.

Example request:

POST /purchase_order/182/print HTTP/1.1
Host: localhost:8000
Content-Type: application/x-www-form-urlencoded

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json; charset=utf-8

[
    {
        "company": {
            "name": "Fringillami",
            "owner": "Ivor Barnett",
            "gstin": "89AAC056465468",
            "phone": "332 220-7026",
            "address": "Ap #849-6241 Euismod Av., 677598, Carinthia, Belgium",
            "email": "est.tempor@fringillami.org",
            "location": "Belgium",
            "image": "/media/images/hyperlink-green_x91WW5n.png"
        },
        "po": {
            "vendor": {
                "name": "Girish",
                "identifier": "GJ",
                "gstin": "GSTIN002",
                "address": {
                    "name": "alsf",
                    "address": "jas;k",
                    "city": ";sdalkf",
                    "phone": "alsf",
                    "state": "kjdflk",
                    "country": "ljflkj",
                    "post": "54545"
                }
            },
            "date": "25-Sep-2021",
            "po": 293,
            "subtotal": 279975.0,
            "taxtotal": 22398.0,
            "ordertotal": 302373.0,
            "ppes": [
                {
                    "ppe_id": 324,
                    "product": {
                        "pk": 637,
                        "name": "piano",
                        "category": "Ultricies PC",
                        "quantity": 23921,
                        "identifier": "PROD9",
                        "location": "Musselburgh",
                        "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ",
                        "prod_id": 637
                    },
                    "quantity": 100,
                    "price": 10.0,
                    "discount": 0.0,
                    "order": 182,
                    "pendingQty": 50
                },
                {
                    "ppe_id": 325,
                    "product": {
                        "pk": 645,
                        "name": "Tabl",
                        "category": "Sociis Natoque Company",
                        "quantity": 38276,
                        "identifier": "PROD17",
                        "location": "Schagen",
                        "description": "aldgjlakjlkasdj",
                        "prod_id": 645
                    },
                    "quantity": 250,
                    "price": 90.0,
                    "discount": 8.0,
                    "order": 182,
                    "pendingQty": 70
                },
                {
                    "ppe_id": 326,
                    "product": {
                        "pk": 638,
                        "name": "Goblet drum",
                        "category": "Est Congue Consulting",
                        "quantity": 46076,
                        "identifier": "PROD10",
                        "location": "Kaluga",
                        "description": "aldgjlakjlkasdj",
                        "prod_id": 638
                    },
                    "quantity": 200,
                    "price": 150.0,
                    "discount": 12.0,
                    "order": 182,
                    "pendingQty": 200
                },
                {
                    "ppe_id": 327,
                    "product": {
                        "pk": 643,
                        "name": "quinto",
                        "category": "Enim Suspendisse Associates",
                        "quantity": 51099,
                        "identifier": "PROD15",
                        "location": "Nagpur",
                        "description": "aldgjlakjlkasdj",
                        "prod_id": 643
                    },
                    "quantity": 350,
                    "price": 150.0,
                    "discount": 10.0,
                    "order": 182,
                    "pendingQty": 350
                },
                {
                    "ppe_id": 328,
                    "product": {
                        "pk": 651,
                        "name": "Igihumurizo",
                        "category": "Curabitur Massa Vestibulum Consulting",
                        "quantity": 48553,
                        "identifier": "PROD23",
                        "location": "Yeovil",
                        "description": "aldgjlakjlkasdj",
                        "prod_id": 651
                    },
                    "quantity": 500,
                    "price": 50.0,
                    "discount": 6.0,
                    "order": 182,
                    "pendingQty": 500
                },
                {
                    "ppe_id": 329,
                    "product": {
                        "pk": 653,
                        "name": "Balsié",
                        "category": "Eu Foundation",
                        "quantity": 29988,
                        "identifier": "PROD25",
                        "location": "Sudbury",
                        "description": "aldgjlakjlkasdj",
                        "prod_id": 653
                    },
                    "quantity": 200,
                    "price": 500.0,
                    "discount": 15.0,
                    "order": 182,
                    "pendingQty": 200
                },
                {
                    "ppe_id": 330,
                    "product": {
                        "pk": 656,
                        "name": "Padayani thappu",
                        "category": "Posuere LLP",
                        "quantity": 6358,
                        "identifier": "PROD28",
                        "location": "Ruvo del Monte",
                        "description": "aldgjlakjlkasdj",
                        "prod_id": 656
                    },
                    "quantity": 350,
                    "price": 250.0,
                    "discount": 13.0,
                    "order": 182,
                    "pendingQty": 350
                }
            ]
        },
        "shippingaddress": {
            "name": "Harding Gross",
            "address": "8798 At, St., 7639",
            "city": "Rome",
            "phone": "936 651-4847",
            "state": "Lazio",
            "country": "Italy",
            "post": "300326"
        },
        "communication": {
            "email": "asfs@aflk.com",
            "phone": "6546432"
        }
    }
]
Parameters
  • po_id – Purchase order primary key.

Response Headers
Status Codes
InvManage.views.get_product_purchase_entries_view(request)

Returns the JSON serialized data of product purchase entries on GET request.

GET /product_purchase_entries/

Gets the JSON serialized data of the requested product purchase entries.

Example request:

GET /product_purchase_entries/ HTTP/1.1
Host: localhost:8000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json; charset=utf-8

[
    {
        "ppe_id": 324,
        "product": {
            "pk": 637,
            "name": "piano",
            "category": "Ultricies PC",
            "quantity": 23921,
            "identifier": "PROD9",
            "location": "Musselburgh",
            "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ",
            "prod_id": 637
        },
        "quantity": 100,
        "price": 10.0,
        "discount": 0.0,
        "order": 182,
        "pendingQty": 50,
        "po": 293
    },
    {
        "ppe_id": 325,
        "product": {
            "pk": 645,
            "name": "Tabl",
            "category": "Sociis Natoque Company",
            "quantity": 38276,
            "identifier": "PROD17",
            "location": "Schagen",
            "description": "aldgjlakjlkasdj",
            "prod_id": 645
        },
        "quantity": 250,
        "price": 90.0,
        "discount": 8.0,
        "order": 182,
        "pendingQty": 70,
        "po": 293
    },
    {
        "ppe_id": 326,
        "product": {
            "pk": 638,
            "name": "Goblet drum",
            "category": "Est Congue Consulting",
            "quantity": 46076,
            "identifier": "PROD10",
            "location": "Kaluga",
            "description": "aldgjlakjlkasdj",
            "prod_id": 638
        },
        "quantity": 200,
        "price": 150.0,
        "discount": 12.0,
        "order": 182,
        "pendingQty": 200,
        "po": 293
    },
    {
        "ppe_id": 327,
        "product": {
            "pk": 643,
            "name": "quinto",
            "category": "Enim Suspendisse Associates",
            "quantity": 51099,
            "identifier": "PROD15",
            "location": "Nagpur",
            "description": "aldgjlakjlkasdj",
            "prod_id": 643
        },
        "quantity": 350,
        "price": 150.0,
        "discount": 10.0,
        "order": 182,
        "pendingQty": 350,
        "po": 293
    },
    {
        "ppe_id": 328,
        "product": {
            "pk": 651,
            "name": "Igihumurizo",
            "category": "Curabitur Massa Vestibulum Consulting",
            "quantity": 48553,
            "identifier": "PROD23",
            "location": "Yeovil",
            "description": "aldgjlakjlkasdj",
            "prod_id": 651
        },
        "quantity": 500,
        "price": 50.0,
        "discount": 6.0,
        "order": 182,
        "pendingQty": 500,
        "po": 293
    },
    {
        "ppe_id": 329,
        "product": {
            "pk": 653,
            "name": "Balsié",
            "category": "Eu Foundation",
            "quantity": 29988,
            "identifier": "PROD25",
            "location": "Sudbury",
            "description": "aldgjlakjlkasdj",
            "prod_id": 653
        },
        "quantity": 200,
        "price": 500.0,
        "discount": 15.0,
        "order": 182,
        "pendingQty": 200,
        "po": 293
    },
    {
        "ppe_id": 330,
        "product": {
            "pk": 656,
            "name": "Padayani thappu",
            "category": "Posuere LLP",
            "quantity": 6358,
            "identifier": "PROD28",
            "location": "Ruvo del Monte",
            "description": "aldgjlakjlkasdj",
            "prod_id": 656
        },
        "quantity": 350,
        "price": 250.0,
        "discount": 13.0,
        "order": 182,
        "pendingQty": 350,
        "po": 293
    }
]
Request Headers
  • Accept – text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Status Codes
class InvManage.views.ProductBasicInfoForm

Bases: django.forms.Form

Form for basic product information.

name

Name of the product.

Type

str

item_type

Type of the product.

Type

str

category

Product category.

Type

str

description

Short description of the product.

Type

str

prefix = basic
context
name
item_type
category
description
class InvManage.views.ProductDetailedInfoForm

Bases: django.forms.Form

Form for product physical details

length

Length of the product.

Type

str

width

Width of the product.

Type

str

height

Height of the product.

Type

str

weight

Weight of the product.

Type

str

prefix = detailed
context
length
width
height
weight
class InvManage.views.ProductPricingForm

Bases: django.forms.Form

Form for pricing information of the product.

price

Price of the product.

Type

float

discount

Default discount percentage on the product.

Type

float

prefix = pricing
context
price
discount
class InvManage.views.ProductPurchaseEntryForm

Bases: django.forms.Form

Form for product purchase entry.

ppe_id

Unique identifier of the product purchase entry.

Type

int

product

Product associated wit the product purchase entry.

Type

Product

quantity

Quantity of the product to be ordered.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product purchase.

Type

float

prefix = form
context
ppe_id
product
quantity
price
discount
class InvManage.views.ProductSalesEntryForm

Bases: django.forms.Form

Form for product sales entry.

pse_id

Unique identifier of the product sales entry.

Type

int

product

Product associated with the product sales entry.

Type

Product

quantity

Quantity of the product.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product.

Type

float

prefix = form
context
pse_id
product
quantity
price
discount
class InvManage.views.ProductStatusForm

Bases: django.forms.Form

Form for locating and identifying the product.

quantity

Stock quantity of the product.

Type

int

identifier

Unique identifier of the product.

Type

str

location

Physical location of the product.

Type

str

context
prefix = status
quantity
identifier
location
class InvManage.views.ProductStorageInfoForm

Bases: django.forms.Form

Form for storage information.

barcode

Barcode of the product.

Type

str

expiry

Expiry date of the product.

Type

DateField

prefix = storage
barcode
context
expiry
class InvManage.views.PurchaseOrderBasicInfo

Bases: django.forms.Form

Form for basic information of the purchase order.

vendor

Vendor associated with the purcahse order.

Type

Vendor

date

Date of the purchase order creation.

Type

DateField

po

Purchase order number.

Type

int

discount

Percentage of overall discount.

Type

float

tax

Percentage of tax.

Type

float

paid

Amount paid to the vendor.

Type

float

balance

Balance amount to be paid to the vendor.

Type

float

subtotal

Total of all the product purchase entries associated with the purchase order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the purchase order including taxtotal.

Type

float

prefix = po
context
product_choices
vendor_choices
vendor
date
po
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
class InvManage.views.GRNInfo

Bases: django.forms.Form

Form for goods receipt note (GRN).

vendor

Vendor associated with the goods receipt note.

Type

Vendor

poRef

List of identifiers of the purchase orders from which the goods receipt note is derived.

Type

PurchaseOrder

identifier

Unique identifier of the goods receipt note.

Type

str

date

Date of GRN creation.

Type

DateField

grnType

Type of GRN (auto or manual).

Type

str

amendNumber

Amendment number of the GRN.

Type

int

amendDate

Amendment date.

Type

DateField

transporter

Name of the transport/shipping service.

Type

str

vehicleNumber

Vehicle number using which the products are shipped.

Type

str

gateInwardNumber

Gate inward number of the vehicle.

Type

str

preparedBy

Name/identifier of the person who created the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who validated the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who inspected the physical products in the goods receipt note.

Type

str

approvedBy

Name/identifier of the authority who approved the goods receipt note.

Type

str

prefix = grn
context
product_choices
vendor_choices
vendor
TYPE_CHOICES = [['manual', 'Blank'], ['auto', 'PO Reference']]
poRef
identifier
date
grnType
amendNumber
amendDate
transporter
vehicleNumber
gateInwardNumber
preparedBy
checkedBy
inspectedBy
approvedBy
class InvManage.views.GRNEntryForm

Bases: django.forms.Form

Form for goods receipt note entry (GRNE).

product

Product associated with the goods receipt note entry.

Type

Product

grne_id

Unique identifier of the GRNE.

Type

int

ppe_id

Unique identifier of the product purchase entry associated with the GRNE.

Type

int

quantity

Ordered quantity of product with reference to product purchase entry.

Type

int

remark

Remarks of the quality engineer or the GRN creator about status of products received.

Type

str

receivedQty

Quantity of product received against the ordered quantity.

Type

str

acceptedQty

Quantity of product accepted as OK.

Type

str

rejectedQty

Quantity of product rejected (not OK, on HOLD, extra delivery, etc.)

Type

str

prefix = form
context
product
grne_id
ppe_id
quantity
remark
receivedQty
acceptedQty
rejectedQty
class InvManage.views.ThumbnailForm

Bases: django.forms.Form

For for product thumbnail image.

image

Image of the product.

Type

ImageField

prefix = thumbnail
image
class InvManage.views.SalesOrderBasicInfo

Bases: django.forms.Form

Form for basic information on sales order.

consumer

Consumer associated with the sales order.

Type

Consumer

date

Date of the sales order creation.

Type

DateField

so

Sales order number.

Type

int

discount

Percentage discount associated with the sales order.

Type

float

tax

Percentage of tax applicable.

Type

float

paid

Amount received from the consumer.

Type

float

balance

Amount balance with the consumer.

Type

float

subtotal

Total of all the product sales entries associated with the sales order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the sales order including taxtotal.

Type

float

prefix = so
context
product_choices
consumer_choices
consumer
date
so
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
class InvManage.views.ShippingAddressForm

Bases: django.forms.Form

For for shipping address.

title

Title of the firm.

Type

str

name

Name of the firm.

Type

str

phone

Contact number of the firm.

Type

str

address

Postal address.

Type

str

city

City.

Type

str

state

State.

Type

str

country

Country.

Type

str

website

Official website of the firm.

Type

URLField

post

Postal code of the firm.

Type

str

prefix = ship
context
title
name
phone
address
city
state
country
website
post
class InvManage.views.VendorForm

Bases: django.forms.Form

Form for basic informaion of the vendor.

name

Name of the vendor.

Type

str

identifier

Unique identifier of the vendor.

Type

str

gstin

GSTIN number of the vendor.

Type

str

prefix = vend
context
name
identifier
gstin
class InvManage.views.ConsumerForm

Bases: django.forms.Form

Form for consumer.

name

Name of the consumer.

Type

str

identifier

Unique identifier of the consumer.

Type

str

gstin

GSTIN number of the consumer.

Type

str

phone

Contact number.

Type

str

address

Address of the consumer.

Type

str

email

E-mail address of the consumer.

Type

str

location

City of the consumer.

Type

str

prefix = consumer
context
name
identifier
gstin
phone
address
email
location
class InvManage.views.CompanyForm

Bases: django.forms.Form

Form for company.

name

Name of the company.

Type

str

owner

Name of the owner of the company.

Type

str

gstin

GSTIN number of the company.

Type

str

phone

Contact number of the company.

Type

str

address

Postal address.

Type

str

email

E-mail address of the contact person.

Type

str

location

City of the company.

Type

str

prefix = comp
context
name
owner
gstin
phone
address
email
location
class InvManage.views.HistoryForm

Bases: django.forms.Form

Form for history view.

qlen

Count of the events visible on the history view.

Type

int

prefix = history
context
qlen
class InvManage.views.CommunicationForm

Bases: django.forms.Form

Form for communication information.

language

Language of communication.

Type

str

phone

Contact number of the firm.

Type

str

email

E-mail of the contact person.

Type

EmailField

fax

Fax number.

Type

str

prefix = com
context
language
phone
email
fax
class InvManage.views.PurchaseDataForm

Bases: django.forms.Form

Form for purchase related data.

currency

Currency of purchase.

Type

str

minorder

Minimum order quantity.

Type

int

contactperson

Name of the contact person.

Type

str

refcode

Reference code.

Type

str

transportmode

Mode of transport of the shipment.

Type

str

prefix = pdform
context
currency
minorder
contactperson
refcode
transportmode
class InvManage.views.BankAccountForm

Bases: django.forms.Form

Form for bank account details.

name

Name of the bank.

Type

str

branch

Branch number of the bank.

Type

str

region

City in which the branch is located.

Type

str

route

Transit number.

Type

str

number

Bank account number.

Type

int

acctype

Type of bank account.

Type

str

iban

IBAN number.

Type

str

code

Bank code.

Type

str

branchcode

Branch code.

Type

str

prefix = bank
context
name
branch
region
route
number
acctype
iban
code
branchcode
class InvManage.views.Product

Bases: django.db.models.Model

Model of the product.

name

Name of the product.

Type

str

category

Product category.

Type

str

item_type

Type of the product.

Type

str

description

Short description of the product.

Type

str

price

Price of the product.

Type

float

quantity

Stock quantity of the product.

Type

int

identifier

Unique identifier of the product.

Type

str

location

Physical location of the product.

Type

str

length

Length of the product.

Type

str

width

Width of the product.

Type

str

height

Height of the product.

Type

str

weight

Weight of the product.

Type

str

discount

Default discount percentage on the product.

Type

float

barcode

Barcode of the product.

Type

str

expiry

Expiry date of the product.

Type

DateField

image

Image of the product.

Type

ImageField

name
category
item_type
description
price
quantity
identifier
location
length
width
height
weight
discount
barcode
expiry
image
__str__(self)
class InvManage.views.ProductPurchaseEntry

Bases: django.db.models.Model

Model of the product purchase entry.

product

Product associated wit the product purchase entry.

Type

ModelChoiceField

quantity

Quantity of the product to be ordered.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product purchase.

Type

float

order

Referenced purchase order.

Type

PurchaseOrder

receivedQty

Quantity of product received against the ordered quantity.

Type

str

acceptedQty

Quantity of product accepted as OK.

Type

str

rejectedQty

Quantity of product rejected (not OK, on HOLD, extra delivery, etc.)

Type

str

is_complete()

Returns the completion status (boolean).

pending_quantity()

Returns the pending quantity against the entry (int).

product
quantity
price
discount
order
receivedQty
acceptedQty
rejectedQty
is_complete(self)
property pending_quantity(self)
class InvManage.views.GRNEntry

Bases: django.db.models.Model

Model of the goods receipt note entry (GRNE).

product

Primary key of the Product instance associated with the goods receipt note entry.

Type

Product

quantity

Ordered quantity of product with reference to product purchase entry.

Type

int

grne

Primary key of the GoodsReceiptNote instance.

Type

int

ppe

Primary key of the ProductPurchaseEntry instance associated with the GRNE.

Type

int

remark

Remarks of the quality engineer or the GRN creator about status of products received.

Type

str

receivedQty

Quantity of product received against the ordered quantity.

Type

str

acceptedQty

Quantity of product accepted as OK.

Type

str

rejectedQty

Quantity of product rejected (not OK, on HOLD, extra delivery, etc.)

Type

str

product
quantity
grn
ppes
remark
receivedQty
acceptedQty
rejectedQty
class InvManage.views.ProductSalesEntry

Bases: django.db.models.Model

Model of the product sales entry.

product

Primary key of the Product associated with the product sales entry.

Type

Product

quantity

Quantity of the product.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product.

Type

float

order

Primary key of the SalesOrder referenced by the entry.

Type

SalesOrder

product
quantity
price
discount
order
class InvManage.views.SalesOrder

Bases: django.db.models.Model

Model of the sales order.

consumer

Consumer associated with the sales order.

Type

ModelChoiceField

date

Date of the sales order creation.

Type

DateField

so

Sales order number.

Type

int

discount

Percentage discount associated with the sales order.

Type

float

tax

Percentage of tax applicable.

Type

float

paid

Amount received from the consumer.

Type

float

balance

Amount balance with the consumer.

Type

float

subtotal

Total of all the product sales entries associated with the sales order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the sales order including taxtotal.

Type

float

consumer
date
so
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
class InvManage.views.PurchaseOrder

Bases: django.db.models.Model

Model of the purchase order.

vendor

Vendor associated with the purchase order.

Type

Vendor

date

Date and time of the purchase order creation.

Type

DateField

po

Purchase order number.

Type

int

discount

Percentage discount.

Type

float

tax

Percentage of tax applicable for the purchase.

Type

float

paid

Amount paid against the PO.

Type

float

balance

Amount balance which remains to be paid.

Type

float

subtotal

Total of all the product purchase entries associated with the purchase order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the purchase order including taxtotal.

Type

float

is_complete()

Returns the completion status (boolean).

pending_ppes()

Returns list of product purchase entries which are not completed.

vendor
date
po
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
is_complete(self)
pending_ppes(self)
class InvManage.views.GoodsReceiptNote

Bases: django.db.models.Model

Model of the goods receipt note (GRN).

vendor

Vendor associated with the goods receipt note.

Type

ModelChoiceField

poRef

List of identifiers of the purchase orders from which the goods receipt note is derived.

Type

MultipleChoiceField

identifier

Unique identifier of the goods receipt note.

Type

str

date

Date of GRN creation.

Type

DateField

grnType

Type of GRN (auto or manual).

Type

ChoiceField

amendNumber

Amendment number of the GRN.

Type

int

amendDate

Amendment date.

Type

DateField

transporter

Name of the transport/shipping service.

Type

str

vehicleNumber

Vehicle number using which the products are shipped.

Type

str

gateInwardNumber

Gate inward number of the vehicle.

Type

str

preparedBy

Name/identifier of the person who created the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who validated the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who inspected the physical products in the goods receipt note.

Type

str

approvedBy

Name/identifier of the authority who approved the goods receipt note.

Type

str

TYPE_CHOICES = [['manual', 'Blank'], ['auto', 'PO Reference']]
vendor
poRef
identifier
date
grnType
amendNumber
amendDate
transporter
vehicleNumber
gateInwardNumber
preparedBy
checkedBy
inspectedBy
approvedBy
class InvManage.views.Consumer

Bases: django.db.models.Model

Model of the consumer.

name

Name of the consumer.

Type

str

identifier

Unique identifier of the consumer.

Type

str

gstin

GSTIN number of the consumer.

Type

str

phone

Contact number.

Type

str

address

Address of the consumer.

Type

str

email

E-mail address of the consumer.

Type

str

location

City of the consumer.

Type

str

Returns

[description]

Return type

[type]

name
identifier
gstin
phone
address
email
location
__str__(self)
class InvManage.views.Vendor

Bases: django.db.models.Model

Model of the vendor.

name

Name of the vendor.

Type

str

identifier

Unique identifier of the vendor.

Type

str

gstin

GSTIN number of the vendor.

Type

str

address

Primary key of the ShippingAddress instance associated with the vendor.

Type

ShippingAddress

communication

Primary key of the Communication instance associated with the vendor.

Type

Communication

backaccount

Primary key of the BankAccount instance associated with the vendor.

Type

BankAccount

purchasedata

Primary key of the PurchaseData instance associated with the vendor.

Type

PurchaseData

Returns

String representation of the vendor name.

Return type

str

name
identifier
gstin
address
communication
bankaccount
purchasedata
__str__(self)
class InvManage.views.Company

Bases: django.db.models.Model

Model of the company.

name

Name of the company.

Type

str

owner

Owner of the company.

Type

str

gstin

GSTIN number of the company.

Type

str

phone

Contact number.

Type

str

address

Postal address.

Type

str

email

E-mail address of the contact person.

Type

str

location

City of the company.

Type

str

image

Photo/logo of the company.

Type

ImageField

shippingaddress

Primary key of the ShippingAddress instance associated with the company.

Type

ShippingAddress

Returns

String representation of the company name.

Return type

str

name
owner
gstin
phone
address
email
location
image
shippingaddress
__str__(self)
class InvManage.views.PurchaseInvoice

Bases: django.db.models.Model

Model for the purchase invoice.

company

Primary key of the Company.

Type

Company

po

Primary key of the PurchaseOrder.

Type

PurchaseOrder

shippingaddress

Primary key of the ShippingAddress.

Type

ShippingAddress

communication

Primary key of the Communication.

Type

Communication

company
po
shippingaddress
communication
class InvManage.views.SalesInvoice

Bases: django.db.models.Model

Model for the sales order invoice.

company

Primary key of the Company.

Type

Company

so

Primary key of the SalesOrder.

Type

SalesOrder

shippingaddress

Primary key of the ShippingAddress.

Type

ShippingAddress

company
so
shippingaddress
class InvManage.views.FilterState

Bases: django.db.models.Model

Model of the filter state.

name

Name of the filter state.

Type

str

name
class InvManage.views.FilterColumn

Bases: django.db.models.Model

Model of the column state.

name

Name of the column.

Type

str

label

Label of the column.

Type

str

visible

Visibility flag.

Type

bool

position

Index of the column.

Type

int

state

Primary key of the FilterState instance being referenced by the column instance.

Type

FilterState

name
label
visible
position
state
class InvManage.views.Object

Bases: django.db.models.Model

Model for a generic object.

identifier

Unique identifier of the object.

Type

str

name

Name of the object.

Type

str

model

Model associated with the object.

Type

str

identifier
name
model
class InvManage.views.EventCard

Bases: django.db.models.Model

Model for event card to be displayed in the history view.

obj

Object associated with the event.

Type

OneToOneField

objId

Unique identifier of the object.

Type

str

objname

Name of the object.

Type

str

objmodel

Model of the object.

Type

str

date

Timestamp of the event.

Type

DateField

operation

Type of event.

Type

str

obj
objId
objname
objmodel
date
operation
class InvManage.views.EventType

Bases: django.db.models.Model

Model for event type.

name

Name of the event being triggered.

Type

str

label

Label associated with the event.

Type

str

Returns

Returns the string representation of the label when the event type is queried.

Return type

Label

name
label
__str__(self)
class InvManage.views.ObjectModel

Bases: django.db.models.Model

Model associated with an object.

name

Name of the object.

Type

str

label

Label string of the object.

Type

str

modName

Name of the model associated with the object.

Type

str

Returns

Returns string representation of the label when object model is queried.

Return type

Label

name
label
modName
__str__(self)
class InvManage.views.HistoryFilterState

Bases: django.db.models.Model

Model of filter state of the history.

params

Paramameters of the configured filters.

Type

str

params
class InvManage.views.ShippingAddress

Bases: django.db.models.Model

Model of the shipping address.

title

Title of the firm.

Type

str

name

Name of the firm.

Type

str

phone

Contact number of the firm.

Type

str

address

Postal address.

Type

str

city

City.

Type

str

state

State.

Type

str

country

Country.

Type

str

website

Official website of the firm.

Type

URLField

post

Postal code of the firm.

Type

str

title
name
phone
address
city
state
country
website
post
class InvManage.views.PurchaseData

Bases: django.db.models.Model

Model of the purchase data.

currency

Currency of purchase.

Type

str

minorder

Minimum order quantity.

Type

int

contactperson

Name of the contact person.

Type

str

refcode

Reference code.

Type

str

transportmode

Mode of transport of the shipment.

Type

str

currency
minorder
contactperson
refcode
transportmode
class InvManage.views.Communication

Bases: django.db.models.Model

Model of the communication information.

language

Language of communication.

Type

str

phone

Contact number of the firm.

Type

str

email

E-mail of the contact person.

Type

EmailField

fax

Fax number.

Type

str

language
phone
email
fax
class InvManage.views.BankAccount

Bases: django.db.models.Model

Model of the bank account details.

name

Name of the bank.

Type

str

branch

Branch number of the bank.

Type

str

region

City in which the branch is located.

Type

str

route

Transit number.

Type

str

number

Bank account number.

Type

int

acctype

Type of bank account.

Type

str

iban

IBAN number.

Type

str

code

Bank code.

Type

str

branchcode

Branch code.

Type

str

name
branch
region
route
number
acctype
iban
code
branchcode
InvManage.views.get_columns(state)

Gets the columns of the display table.

This function takes a filter state and returns an array of column names that are ordered depending on the position attribute of the columns. This order is important as the queryset will be rendered in the display table according to the column order in this returned array.

Parameters

state (FilterState) – Filter state of the columns.

Returns

A list that dictates the order of the columns.

Return type

List

InvManage.views.sort_ascending_descending(request, model)

Sorts and saves the state of the column.

This function takes a request, finds which column needs to be sorted in ascending/descending order, and returns the sorted queryset.

Parameters
  • request (HttpRequest) – GET request received for retreiving the list of model instances.

  • model (Model) – Model of the objects being retrieved.

Returns

List of sorted object instances.

Return type

QuerySet

InvManage.views.change_column_position(request, state)

Modifies the column states depending on the request.

This function:
  • Takes a filter state

  • Extracts the column names into an order array

  • Modifies the column order in the array depending on user input direction (left/right)

  • Saves this modified state of columns into the database

  • Returns the modified column names array

Parameters
  • request (HttpRequest) – GET request for retrieving the state of the columns.

  • state (FilterState) – Filter state of the columns.

Returns

List of sorted columns.

Return type

List

InvManage.views.paginate(queryset, filter, page_number)

Paginates the list of objects.

This function takes the entire queryset and filters out only objects belonging to the request page

Parameters
  • queryset (QuerySet) – QuerySet of the objects retrieved from the database.

  • filter (FilterState) – Filter state of the columns.

  • page_number (int) – Page number requested.

class InvManage.views.CompanySerializer

Bases: rest_framework.serializers.ModelSerializer

Serializer for Company class instance.

The CompanySerializer.data attribute gives the JSON serialized data of the Company instance:

{
    "name": "Fringillami",
    "owner": "Ivor Barnett",
    "gstin": "89AAC056465468",
    "phone": "332 220-7026",
    "address": "Ap #849-6241 Euismod Av., 677598, Carinthia, Belgium",
    "email": "est.tempor@fringillami.org",
    "location": "Belgium",
    "image": "/media/images/logo.png"
}
class Meta
model
fields = ['name', 'owner', 'gstin', 'phone', 'address', 'email', 'location', 'image']
class InvManage.views.ShippingAddressSerializer

Bases: rest_framework.serializers.ModelSerializer

Serializer for ShippingAddress class instance.

The ShippingAddressSerializer.data attribute gives the JSON serialized data of the ShippingAddress instance:

{
    "name": "Harding Gross",
    "address": "8798 At, St., 7639",
    "city": "Rome",
    "phone": "936 651-4847",
    "state": "Lazio",
    "country": "Italy",
    "post": "300326"
}
class Meta
model
fields = ['name', 'address', 'city', 'phone', 'state', 'country', 'post']
class InvManage.views.CompanyFilter

Bases: django_filters.FilterSet

class Meta
model
fields
context
name
owner
phone
email
location
order_by_field = ordering
ordering
InvManage.views.create_company_view(request)

Creates a company on POST request and returns a company creation form GET request.

GET /company

Gets the company creation form.

Example request:

GET /company/ HTTP/1.1
Host: localhost:8000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Request Headers
  • Accept – text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Status Codes
  • 200 OK – Company creation form received successfully.

POST /company

Creates a company.

Example request:

POST /company/ HTTP/1.1
Host: localhost:8000
Content-Type: multipart/form-data;
Form Parameters
  • comp-nameFringillami

  • comp-ownerIvor Barnett

  • comp-gstin89AAC056465468

  • comp-phone332 220-7026

  • comp-addressAp #849-6241 Euismod Av., 677598, Carinthia, Belgium

  • comp-emailest.tempor@fringillami.org

  • comp-locationBelgium

  • ship-titleFingDocks

  • ship-nameHarding Gross

  • ship-phone936 651-4847

  • ship-address8798 At, St., 7639

  • ship-cityRome

  • ship-stateLazio

  • ship-countryItaly

  • ship-websitefringdocs.com

  • ship-post300326

Response Headers
  • Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv

Status Codes
InvManage.views.update_company_view(request)

Updates a company on POST request and returns the company update form GET request.

GET /company/update

Gets the company update form whose primary key matches the query parameter pk.

Example request:

GET /company/update HTTP/1.1
Host: localhost:8000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Query Parameters
  • pk – The primary key of the company.

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Request Headers
  • Accept – text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Status Codes
  • 200 OK – Company update form received successfully.

POST /company/update

Updates a company.

Example request:

POST /company/ HTTP/1.1
Host: localhost:8000
Content-Type: multipart/form-data;
Form Parameters
  • pk4

  • comp-nameFringillami

  • comp-ownerIvor Barnett

  • comp-gstin89AAC056465468

  • comp-phone332 220-7026

  • comp-addressAp #849-6241 Euismod Av., 677598, Carinthia, Belgium

  • comp-emailest.tempor@fringillami.org

  • comp-locationBelgium

  • ship-titleFingDocks

  • ship-nameHarding Gross

  • ship-phone936 651-4847

  • ship-address8798 At, St., 7639

  • ship-cityRome

  • ship-stateLazio

  • ship-countryItaly

  • ship-websitefringdocs.com

  • ship-post300326

Response Headers
  • Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv

Status Codes
InvManage.views.delete_company_view(request, pk)

Deletes the company with primary key pk on POST request.

POST /company/<str:object_id>/delete

Deletes the company represented by the primary key object_id.

Example request:

POST /company/32/delete HTTP/1.1
Host: localhost:8000
Content-Type: application/x-www-form-urlencoded
Parameters
  • object_id – Company primary key.

Response Headers
Status Codes
InvManage.views.display_companies_view(request)

Retrieves the list of companies on GET request.

GET /companies/

Gets the list of all companies.

Example request:

GET /companies/ HTTP/1.1
Host: localhost:8000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Form Parameters
  • page – The page number of the companies list.

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Request Headers
  • Accept – text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Status Codes
  • 200 OK – List of companies received successfully.

class InvManage.views.ProductBasicInfoForm

Bases: django.forms.Form

Form for basic product information.

name

Name of the product.

Type

str

item_type

Type of the product.

Type

str

category

Product category.

Type

str

description

Short description of the product.

Type

str

prefix = basic
context
name
item_type
category
description
class InvManage.views.ProductDetailedInfoForm

Bases: django.forms.Form

Form for product physical details

length

Length of the product.

Type

str

width

Width of the product.

Type

str

height

Height of the product.

Type

str

weight

Weight of the product.

Type

str

prefix = detailed
context
length
width
height
weight
class InvManage.views.ProductPricingForm

Bases: django.forms.Form

Form for pricing information of the product.

price

Price of the product.

Type

float

discount

Default discount percentage on the product.

Type

float

prefix = pricing
context
price
discount
class InvManage.views.ProductPurchaseEntryForm

Bases: django.forms.Form

Form for product purchase entry.

ppe_id

Unique identifier of the product purchase entry.

Type

int

product

Product associated wit the product purchase entry.

Type

Product

quantity

Quantity of the product to be ordered.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product purchase.

Type

float

prefix = form
context
ppe_id
product
quantity
price
discount
class InvManage.views.ProductSalesEntryForm

Bases: django.forms.Form

Form for product sales entry.

pse_id

Unique identifier of the product sales entry.

Type

int

product

Product associated with the product sales entry.

Type

Product

quantity

Quantity of the product.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product.

Type

float

prefix = form
context
pse_id
product
quantity
price
discount
class InvManage.views.ProductStatusForm

Bases: django.forms.Form

Form for locating and identifying the product.

quantity

Stock quantity of the product.

Type

int

identifier

Unique identifier of the product.

Type

str

location

Physical location of the product.

Type

str

context
prefix = status
quantity
identifier
location
class InvManage.views.ProductStorageInfoForm

Bases: django.forms.Form

Form for storage information.

barcode

Barcode of the product.

Type

str

expiry

Expiry date of the product.

Type

DateField

prefix = storage
barcode
context
expiry
class InvManage.views.PurchaseOrderBasicInfo

Bases: django.forms.Form

Form for basic information of the purchase order.

vendor

Vendor associated with the purcahse order.

Type

Vendor

date

Date of the purchase order creation.

Type

DateField

po

Purchase order number.

Type

int

discount

Percentage of overall discount.

Type

float

tax

Percentage of tax.

Type

float

paid

Amount paid to the vendor.

Type

float

balance

Balance amount to be paid to the vendor.

Type

float

subtotal

Total of all the product purchase entries associated with the purchase order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the purchase order including taxtotal.

Type

float

prefix = po
context
product_choices
vendor_choices
vendor
date
po
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
class InvManage.views.GRNInfo

Bases: django.forms.Form

Form for goods receipt note (GRN).

vendor

Vendor associated with the goods receipt note.

Type

Vendor

poRef

List of identifiers of the purchase orders from which the goods receipt note is derived.

Type

PurchaseOrder

identifier

Unique identifier of the goods receipt note.

Type

str

date

Date of GRN creation.

Type

DateField

grnType

Type of GRN (auto or manual).

Type

str

amendNumber

Amendment number of the GRN.

Type

int

amendDate

Amendment date.

Type

DateField

transporter

Name of the transport/shipping service.

Type

str

vehicleNumber

Vehicle number using which the products are shipped.

Type

str

gateInwardNumber

Gate inward number of the vehicle.

Type

str

preparedBy

Name/identifier of the person who created the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who validated the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who inspected the physical products in the goods receipt note.

Type

str

approvedBy

Name/identifier of the authority who approved the goods receipt note.

Type

str

prefix = grn
context
product_choices
vendor_choices
vendor
TYPE_CHOICES = [['manual', 'Blank'], ['auto', 'PO Reference']]
poRef
identifier
date
grnType
amendNumber
amendDate
transporter
vehicleNumber
gateInwardNumber
preparedBy
checkedBy
inspectedBy
approvedBy
class InvManage.views.GRNEntryForm

Bases: django.forms.Form

Form for goods receipt note entry (GRNE).

product

Product associated with the goods receipt note entry.

Type

Product

grne_id

Unique identifier of the GRNE.

Type

int

ppe_id

Unique identifier of the product purchase entry associated with the GRNE.

Type

int

quantity

Ordered quantity of product with reference to product purchase entry.

Type

int

remark

Remarks of the quality engineer or the GRN creator about status of products received.

Type

str

receivedQty

Quantity of product received against the ordered quantity.

Type

str

acceptedQty

Quantity of product accepted as OK.

Type

str

rejectedQty

Quantity of product rejected (not OK, on HOLD, extra delivery, etc.)

Type

str

prefix = form
context
product
grne_id
ppe_id
quantity
remark
receivedQty
acceptedQty
rejectedQty
class InvManage.views.ThumbnailForm

Bases: django.forms.Form

For for product thumbnail image.

image

Image of the product.

Type

ImageField

prefix = thumbnail
image
class InvManage.views.SalesOrderBasicInfo

Bases: django.forms.Form

Form for basic information on sales order.

consumer

Consumer associated with the sales order.

Type

Consumer

date

Date of the sales order creation.

Type

DateField

so

Sales order number.

Type

int

discount

Percentage discount associated with the sales order.

Type

float

tax

Percentage of tax applicable.

Type

float

paid

Amount received from the consumer.

Type

float

balance

Amount balance with the consumer.

Type

float

subtotal

Total of all the product sales entries associated with the sales order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the sales order including taxtotal.

Type

float

prefix = so
context
product_choices
consumer_choices
consumer
date
so
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
class InvManage.views.ShippingAddressForm

Bases: django.forms.Form

For for shipping address.

title

Title of the firm.

Type

str

name

Name of the firm.

Type

str

phone

Contact number of the firm.

Type

str

address

Postal address.

Type

str

city

City.

Type

str

state

State.

Type

str

country

Country.

Type

str

website

Official website of the firm.

Type

URLField

post

Postal code of the firm.

Type

str

prefix = ship
context
title
name
phone
address
city
state
country
website
post
class InvManage.views.VendorForm

Bases: django.forms.Form

Form for basic informaion of the vendor.

name

Name of the vendor.

Type

str

identifier

Unique identifier of the vendor.

Type

str

gstin

GSTIN number of the vendor.

Type

str

prefix = vend
context
name
identifier
gstin
class InvManage.views.ConsumerForm

Bases: django.forms.Form

Form for consumer.

name

Name of the consumer.

Type

str

identifier

Unique identifier of the consumer.

Type

str

gstin

GSTIN number of the consumer.

Type

str

phone

Contact number.

Type

str

address

Address of the consumer.

Type

str

email

E-mail address of the consumer.

Type

str

location

City of the consumer.

Type

str

prefix = consumer
context
name
identifier
gstin
phone
address
email
location
class InvManage.views.CompanyForm

Bases: django.forms.Form

Form for company.

name

Name of the company.

Type

str

owner

Name of the owner of the company.

Type

str

gstin

GSTIN number of the company.

Type

str

phone

Contact number of the company.

Type

str

address

Postal address.

Type

str

email

E-mail address of the contact person.

Type

str

location

City of the company.

Type

str

prefix = comp
context
name
owner
gstin
phone
address
email
location
class InvManage.views.HistoryForm

Bases: django.forms.Form

Form for history view.

qlen

Count of the events visible on the history view.

Type

int

prefix = history
context
qlen
class InvManage.views.CommunicationForm

Bases: django.forms.Form

Form for communication information.

language

Language of communication.

Type

str

phone

Contact number of the firm.

Type

str

email

E-mail of the contact person.

Type

EmailField

fax

Fax number.

Type

str

prefix = com
context
language
phone
email
fax
class InvManage.views.PurchaseDataForm

Bases: django.forms.Form

Form for purchase related data.

currency

Currency of purchase.

Type

str

minorder

Minimum order quantity.

Type

int

contactperson

Name of the contact person.

Type

str

refcode

Reference code.

Type

str

transportmode

Mode of transport of the shipment.

Type

str

prefix = pdform
context
currency
minorder
contactperson
refcode
transportmode
class InvManage.views.BankAccountForm

Bases: django.forms.Form

Form for bank account details.

name

Name of the bank.

Type

str

branch

Branch number of the bank.

Type

str

region

City in which the branch is located.

Type

str

route

Transit number.

Type

str

number

Bank account number.

Type

int

acctype

Type of bank account.

Type

str

iban

IBAN number.

Type

str

code

Bank code.

Type

str

branchcode

Branch code.

Type

str

prefix = bank
context
name
branch
region
route
number
acctype
iban
code
branchcode
class InvManage.views.Product

Bases: django.db.models.Model

Model of the product.

name

Name of the product.

Type

str

category

Product category.

Type

str

item_type

Type of the product.

Type

str

description

Short description of the product.

Type

str

price

Price of the product.

Type

float

quantity

Stock quantity of the product.

Type

int

identifier

Unique identifier of the product.

Type

str

location

Physical location of the product.

Type

str

length

Length of the product.

Type

str

width

Width of the product.

Type

str

height

Height of the product.

Type

str

weight

Weight of the product.

Type

str

discount

Default discount percentage on the product.

Type

float

barcode

Barcode of the product.

Type

str

expiry

Expiry date of the product.

Type

DateField

image

Image of the product.

Type

ImageField

name
category
item_type
description
price
quantity
identifier
location
length
width
height
weight
discount
barcode
expiry
image
__str__(self)
class InvManage.views.ProductPurchaseEntry

Bases: django.db.models.Model

Model of the product purchase entry.

product

Product associated wit the product purchase entry.

Type

ModelChoiceField

quantity

Quantity of the product to be ordered.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product purchase.

Type

float

order

Referenced purchase order.

Type

PurchaseOrder

receivedQty

Quantity of product received against the ordered quantity.

Type

str

acceptedQty

Quantity of product accepted as OK.

Type

str

rejectedQty

Quantity of product rejected (not OK, on HOLD, extra delivery, etc.)

Type

str

is_complete()

Returns the completion status (boolean).

pending_quantity()

Returns the pending quantity against the entry (int).

product
quantity
price
discount
order
receivedQty
acceptedQty
rejectedQty
is_complete(self)
property pending_quantity(self)
class InvManage.views.GRNEntry

Bases: django.db.models.Model

Model of the goods receipt note entry (GRNE).

product

Primary key of the Product instance associated with the goods receipt note entry.

Type

Product

quantity

Ordered quantity of product with reference to product purchase entry.

Type

int

grne

Primary key of the GoodsReceiptNote instance.

Type

int

ppe

Primary key of the ProductPurchaseEntry instance associated with the GRNE.

Type

int

remark

Remarks of the quality engineer or the GRN creator about status of products received.

Type

str

receivedQty

Quantity of product received against the ordered quantity.

Type

str

acceptedQty

Quantity of product accepted as OK.

Type

str

rejectedQty

Quantity of product rejected (not OK, on HOLD, extra delivery, etc.)

Type

str

product
quantity
grn
ppes
remark
receivedQty
acceptedQty
rejectedQty
class InvManage.views.ProductSalesEntry

Bases: django.db.models.Model

Model of the product sales entry.

product

Primary key of the Product associated with the product sales entry.

Type

Product

quantity

Quantity of the product.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product.

Type

float

order

Primary key of the SalesOrder referenced by the entry.

Type

SalesOrder

product
quantity
price
discount
order
class InvManage.views.SalesOrder

Bases: django.db.models.Model

Model of the sales order.

consumer

Consumer associated with the sales order.

Type

ModelChoiceField

date

Date of the sales order creation.

Type

DateField

so

Sales order number.

Type

int

discount

Percentage discount associated with the sales order.

Type

float

tax

Percentage of tax applicable.

Type

float

paid

Amount received from the consumer.

Type

float

balance

Amount balance with the consumer.

Type

float

subtotal

Total of all the product sales entries associated with the sales order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the sales order including taxtotal.

Type

float

consumer
date
so
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
class InvManage.views.PurchaseOrder

Bases: django.db.models.Model

Model of the purchase order.

vendor

Vendor associated with the purchase order.

Type

Vendor

date

Date and time of the purchase order creation.

Type

DateField

po

Purchase order number.

Type

int

discount

Percentage discount.

Type

float

tax

Percentage of tax applicable for the purchase.

Type

float

paid

Amount paid against the PO.

Type

float

balance

Amount balance which remains to be paid.

Type

float

subtotal

Total of all the product purchase entries associated with the purchase order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the purchase order including taxtotal.

Type

float

is_complete()

Returns the completion status (boolean).

pending_ppes()

Returns list of product purchase entries which are not completed.

vendor
date
po
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
is_complete(self)
pending_ppes(self)
class InvManage.views.GoodsReceiptNote

Bases: django.db.models.Model

Model of the goods receipt note (GRN).

vendor

Vendor associated with the goods receipt note.

Type

ModelChoiceField

poRef

List of identifiers of the purchase orders from which the goods receipt note is derived.

Type

MultipleChoiceField

identifier

Unique identifier of the goods receipt note.

Type

str

date

Date of GRN creation.

Type

DateField

grnType

Type of GRN (auto or manual).

Type

ChoiceField

amendNumber

Amendment number of the GRN.

Type

int

amendDate

Amendment date.

Type

DateField

transporter

Name of the transport/shipping service.

Type

str

vehicleNumber

Vehicle number using which the products are shipped.

Type

str

gateInwardNumber

Gate inward number of the vehicle.

Type

str

preparedBy

Name/identifier of the person who created the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who validated the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who inspected the physical products in the goods receipt note.

Type

str

approvedBy

Name/identifier of the authority who approved the goods receipt note.

Type

str

TYPE_CHOICES = [['manual', 'Blank'], ['auto', 'PO Reference']]
vendor
poRef
identifier
date
grnType
amendNumber
amendDate
transporter
vehicleNumber
gateInwardNumber
preparedBy
checkedBy
inspectedBy
approvedBy
class InvManage.views.Consumer

Bases: django.db.models.Model

Model of the consumer.

name

Name of the consumer.

Type

str

identifier

Unique identifier of the consumer.

Type

str

gstin

GSTIN number of the consumer.

Type

str

phone

Contact number.

Type

str

address

Address of the consumer.

Type

str

email

E-mail address of the consumer.

Type

str

location

City of the consumer.

Type

str

Returns

[description]

Return type

[type]

name
identifier
gstin
phone
address
email
location
__str__(self)
class InvManage.views.Vendor

Bases: django.db.models.Model

Model of the vendor.

name

Name of the vendor.

Type

str

identifier

Unique identifier of the vendor.

Type

str

gstin

GSTIN number of the vendor.

Type

str

address

Primary key of the ShippingAddress instance associated with the vendor.

Type

ShippingAddress

communication

Primary key of the Communication instance associated with the vendor.

Type

Communication

backaccount

Primary key of the BankAccount instance associated with the vendor.

Type

BankAccount

purchasedata

Primary key of the PurchaseData instance associated with the vendor.

Type

PurchaseData

Returns

String representation of the vendor name.

Return type

str

name
identifier
gstin
address
communication
bankaccount
purchasedata
__str__(self)
class InvManage.views.Company

Bases: django.db.models.Model

Model of the company.

name

Name of the company.

Type

str

owner

Owner of the company.

Type

str

gstin

GSTIN number of the company.

Type

str

phone

Contact number.

Type

str

address

Postal address.

Type

str

email

E-mail address of the contact person.

Type

str

location

City of the company.

Type

str

image

Photo/logo of the company.

Type

ImageField

shippingaddress

Primary key of the ShippingAddress instance associated with the company.

Type

ShippingAddress

Returns

String representation of the company name.

Return type

str

name
owner
gstin
phone
address
email
location
image
shippingaddress
__str__(self)
class InvManage.views.PurchaseInvoice

Bases: django.db.models.Model

Model for the purchase invoice.

company

Primary key of the Company.

Type

Company

po

Primary key of the PurchaseOrder.

Type

PurchaseOrder

shippingaddress

Primary key of the ShippingAddress.

Type

ShippingAddress

communication

Primary key of the Communication.

Type

Communication

company
po
shippingaddress
communication
class InvManage.views.SalesInvoice

Bases: django.db.models.Model

Model for the sales order invoice.

company

Primary key of the Company.

Type

Company

so

Primary key of the SalesOrder.

Type

SalesOrder

shippingaddress

Primary key of the ShippingAddress.

Type

ShippingAddress

company
so
shippingaddress
class InvManage.views.FilterState

Bases: django.db.models.Model

Model of the filter state.

name

Name of the filter state.

Type

str

name
class InvManage.views.FilterColumn

Bases: django.db.models.Model

Model of the column state.

name

Name of the column.

Type

str

label

Label of the column.

Type

str

visible

Visibility flag.

Type

bool

position

Index of the column.

Type

int

state

Primary key of the FilterState instance being referenced by the column instance.

Type

FilterState

name
label
visible
position
state
class InvManage.views.Object

Bases: django.db.models.Model

Model for a generic object.

identifier

Unique identifier of the object.

Type

str

name

Name of the object.

Type

str

model

Model associated with the object.

Type

str

identifier
name
model
class InvManage.views.EventCard

Bases: django.db.models.Model

Model for event card to be displayed in the history view.

obj

Object associated with the event.

Type

OneToOneField

objId

Unique identifier of the object.

Type

str

objname

Name of the object.

Type

str

objmodel

Model of the object.

Type

str

date

Timestamp of the event.

Type

DateField

operation

Type of event.

Type

str

obj
objId
objname
objmodel
date
operation
class InvManage.views.EventType

Bases: django.db.models.Model

Model for event type.

name

Name of the event being triggered.

Type

str

label

Label associated with the event.

Type

str

Returns

Returns the string representation of the label when the event type is queried.

Return type

Label

name
label
__str__(self)
class InvManage.views.ObjectModel

Bases: django.db.models.Model

Model associated with an object.

name

Name of the object.

Type

str

label

Label string of the object.

Type

str

modName

Name of the model associated with the object.

Type

str

Returns

Returns string representation of the label when object model is queried.

Return type

Label

name
label
modName
__str__(self)
class InvManage.views.HistoryFilterState

Bases: django.db.models.Model

Model of filter state of the history.

params

Paramameters of the configured filters.

Type

str

params
class InvManage.views.ShippingAddress

Bases: django.db.models.Model

Model of the shipping address.

title

Title of the firm.

Type

str

name

Name of the firm.

Type

str

phone

Contact number of the firm.

Type

str

address

Postal address.

Type

str

city

City.

Type

str

state

State.

Type

str

country

Country.

Type

str

website

Official website of the firm.

Type

URLField

post

Postal code of the firm.

Type

str

title
name
phone
address
city
state
country
website
post
class InvManage.views.PurchaseData

Bases: django.db.models.Model

Model of the purchase data.

currency

Currency of purchase.

Type

str

minorder

Minimum order quantity.

Type

int

contactperson

Name of the contact person.

Type

str

refcode

Reference code.

Type

str

transportmode

Mode of transport of the shipment.

Type

str

currency
minorder
contactperson
refcode
transportmode
class InvManage.views.Communication

Bases: django.db.models.Model

Model of the communication information.

language

Language of communication.

Type

str

phone

Contact number of the firm.

Type

str

email

E-mail of the contact person.

Type

EmailField

fax

Fax number.

Type

str

language
phone
email
fax
class InvManage.views.BankAccount

Bases: django.db.models.Model

Model of the bank account details.

name

Name of the bank.

Type

str

branch

Branch number of the bank.

Type

str

region

City in which the branch is located.

Type

str

route

Transit number.

Type

str

number

Bank account number.

Type

int

acctype

Type of bank account.

Type

str

iban

IBAN number.

Type

str

code

Bank code.

Type

str

branchcode

Branch code.

Type

str

name
branch
region
route
number
acctype
iban
code
branchcode
InvManage.views.get_columns(state)

Gets the columns of the display table.

This function takes a filter state and returns an array of column names that are ordered depending on the position attribute of the columns. This order is important as the queryset will be rendered in the display table according to the column order in this returned array.

Parameters

state (FilterState) – Filter state of the columns.

Returns

A list that dictates the order of the columns.

Return type

List

InvManage.views.sort_ascending_descending(request, model)

Sorts and saves the state of the column.

This function takes a request, finds which column needs to be sorted in ascending/descending order, and returns the sorted queryset.

Parameters
  • request (HttpRequest) – GET request received for retreiving the list of model instances.

  • model (Model) – Model of the objects being retrieved.

Returns

List of sorted object instances.

Return type

QuerySet

InvManage.views.change_column_position(request, state)

Modifies the column states depending on the request.

This function:
  • Takes a filter state

  • Extracts the column names into an order array

  • Modifies the column order in the array depending on user input direction (left/right)

  • Saves this modified state of columns into the database

  • Returns the modified column names array

Parameters
  • request (HttpRequest) – GET request for retrieving the state of the columns.

  • state (FilterState) – Filter state of the columns.

Returns

List of sorted columns.

Return type

List

InvManage.views.paginate(queryset, filter, page_number)

Paginates the list of objects.

This function takes the entire queryset and filters out only objects belonging to the request page

Parameters
  • queryset (QuerySet) – QuerySet of the objects retrieved from the database.

  • filter (FilterState) – Filter state of the columns.

  • page_number (int) – Page number requested.

class InvManage.views.VendorFilter

Bases: django_filters.FilterSet

class Meta
model
fields
context
name
identifier
phone
email
location
order_by_field = ordering
ordering
class InvManage.views.VendorSerializer

Bases: rest_framework.serializers.ModelSerializer

Serializer for Vendor class instance.

The VendorSerializer.data attribute gives the JSON serialized data of the Vendor instance:

{
    "name": "Harding Gross",
    "identifier": "HG",
    "gstin": "89ACC16843543",
    "address": {
        "name": "Harding Gross",
        "address": "8798 At, St., 7639",
        "city": "Rome",
        "phone": "936 651-4847",
        "state": "Lazio",
        "country": "Italy",
        "post": "300326"
}
class Meta
model
fields = ['name', 'identifier', 'gstin', 'address']
phone
email
address
to_representation(self, instance)
InvManage.views.create_vendor_view(request)

Creates a vendor on POST request, and returns a vendor creation form on GET request.

GET /vendor

Gets the vendor creation form.

Example request:

GET /vendor/ HTTP/1.1
Host: localhost:8000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Request Headers
  • Accept – text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Status Codes
  • 200 OK – Vendor creation form received successfully.

POST /vendor

Creates a vendor.

Example request:

POST /vendor/ HTTP/1.1
Host: localhost:8000
Content-Type: multipart/form-data;
Form Parameters
  • vend-nameLug Vendor

  • vend-identifierTBPN-02692

  • vend-gstin89AAC254254F2

  • ship-titleAKATSUKI

  • ship-nameKuame Burns

  • ship-phone679 166-3127

  • ship-addressNonummy Avenue

  • ship-cityChung Cheong

  • ship-stateGuanacaste

  • ship-countrytellusidnunc.net

  • ship-websiteGermany.protitor@tellusid.net

  • ship-post8949

  • pdform-currencyDEM

  • pdform-minorder2000

  • pdform-contactpersonHarding Gross

  • pdform-refcodeCUST000124

  • pdform-transportmodeExpress

  • com-languageGerman

  • com-phone936 651-4817

  • com-emailnon.sollicitudin@uttincidunt.org

  • com-fax323 555 1234

  • bank-nameFIRST FLORIDA INTEGRITY BANK

  • bank-branchBavaria

  • bank-regionBayem

  • bank-route67016325

  • bank-number42543251393

  • bank-acctypeCurrent

  • bank-ibanDE6233542

  • bank-codeBA54354354

  • bank-branchcodeBA35435823

Response Headers
  • Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv

Status Codes
InvManage.views.update_vendor_view(request)

Updates a vendor on POST request and returns the vendor update form for GET request.

GET /vendor/update

Gets the vendor update form whose primary key matches the query parameter pk.

Example request:

GET /vendor/update HTTP/1.1
Host: localhost:8000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Query Parameters
  • pk – The primary key of the vendor.

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Request Headers
  • Accept – text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Status Codes
  • 200 OK – Vendor update form received successfully.

POST /vendor/update

Updates the vendor.

Example request:

POST /vendor/update HTTP/1.1
Host: localhost:8000
Content-Type: multipart/form-data;
Form Parameters
  • vend-nameLug Vendor

  • vend-identifierTBPN-02692

  • vend-gstin89AAC254254F2

  • ship-titleAKATSUKI

  • ship-nameKuame Burns

  • ship-phone679 166-3127

  • ship-addressNonummy Avenue

  • ship-cityChung Cheong

  • ship-stateGuanacaste

  • ship-countrytellusidnunc.net

  • ship-websiteGermany.protitor@tellusid.net

  • ship-post8949

  • pdform-currencyDEM

  • pdform-minorder1000

  • pdform-contactpersonHarding Gross

  • pdform-refcodeCUST000124

  • pdform-transportmodeExpress

  • com-languageGerman

  • com-phone936 651-4817

  • com-emailnon.sollicitudin@uttincidunt.org

  • com-fax323 555 1234

  • bank-nameFIRST FLORIDA INTEGRITY BANK

  • bank-branchBavaria

  • bank-regionBayem

  • bank-route67016325

  • bank-number42543251393

  • bank-acctypeCurrent

  • bank-ibanDE6233542

  • bank-codeBA54354354

  • bank-branchcodeBA35435823

Response Headers
  • Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv

Status Codes
InvManage.views.delete_vendor_view(request, pk)

Deletes the vendor with primary key pk on POST request.

POST /vendor/<str:object_id>/delete

Deletes the vendor represented by the primary key object_id.

Example request:

POST /vendor/5/delete HTTP/1.1
Host: localhost:8000
Content-Type: application/x-www-form-urlencoded
Parameters
  • object_id – Vendor primary key.

Response Headers
Status Codes
InvManage.views.display_vendors_view(request)

Retrieves the list of vendors on GET request.

GET /vendors/

Gets the list of all vendors.

Example request:

GET /vendors/ HTTP/1.1
Host: localhost:8000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Form Parameters
  • page – The page number of the vendors list.

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Request Headers
  • Accept – text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Status Codes
  • 200 OK – List of vendors received successfully.

InvManage.views.get_vendor(request)

Returns the JSON serialized data of the requested vendor on GET request.

GET /get_vendor/

Gets the JSON serialized data of the requested vendor.

Example request:

GET /get_vendor/ HTTP/1.1
Host: localhost:8000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Parameters
  • vendor_id – Vendor primary key.

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json; charset=utf-8

[
    {
        "name": "Lug Vendor",
        "identifier": "TBPN-02692",
        "gstin": "89AAC4683897343",
        "address": {
            "name": "Kuame Burns",
            "address": "Nonummy Avenue",
            "city": "Chung Cheong",
            "phone": "679 166-3127",
            "state": "Guanacaste",
            "country": "tellusidnunc.net",
            "post": "8949"
        }
    }
]
Response Headers
Status Codes
class InvManage.views.ProductBasicInfoForm

Bases: django.forms.Form

Form for basic product information.

name

Name of the product.

Type

str

item_type

Type of the product.

Type

str

category

Product category.

Type

str

description

Short description of the product.

Type

str

prefix = basic
context
name
item_type
category
description
class InvManage.views.ProductDetailedInfoForm

Bases: django.forms.Form

Form for product physical details

length

Length of the product.

Type

str

width

Width of the product.

Type

str

height

Height of the product.

Type

str

weight

Weight of the product.

Type

str

prefix = detailed
context
length
width
height
weight
class InvManage.views.ProductPricingForm

Bases: django.forms.Form

Form for pricing information of the product.

price

Price of the product.

Type

float

discount

Default discount percentage on the product.

Type

float

prefix = pricing
context
price
discount
class InvManage.views.ProductPurchaseEntryForm

Bases: django.forms.Form

Form for product purchase entry.

ppe_id

Unique identifier of the product purchase entry.

Type

int

product

Product associated wit the product purchase entry.

Type

Product

quantity

Quantity of the product to be ordered.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product purchase.

Type

float

prefix = form
context
ppe_id
product
quantity
price
discount
class InvManage.views.ProductSalesEntryForm

Bases: django.forms.Form

Form for product sales entry.

pse_id

Unique identifier of the product sales entry.

Type

int

product

Product associated with the product sales entry.

Type

Product

quantity

Quantity of the product.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product.

Type

float

prefix = form
context
pse_id
product
quantity
price
discount
class InvManage.views.ProductStatusForm

Bases: django.forms.Form

Form for locating and identifying the product.

quantity

Stock quantity of the product.

Type

int

identifier

Unique identifier of the product.

Type

str

location

Physical location of the product.

Type

str

context
prefix = status
quantity
identifier
location
class InvManage.views.ProductStorageInfoForm

Bases: django.forms.Form

Form for storage information.

barcode

Barcode of the product.

Type

str

expiry

Expiry date of the product.

Type

DateField

prefix = storage
barcode
context
expiry
class InvManage.views.PurchaseOrderBasicInfo

Bases: django.forms.Form

Form for basic information of the purchase order.

vendor

Vendor associated with the purcahse order.

Type

Vendor

date

Date of the purchase order creation.

Type

DateField

po

Purchase order number.

Type

int

discount

Percentage of overall discount.

Type

float

tax

Percentage of tax.

Type

float

paid

Amount paid to the vendor.

Type

float

balance

Balance amount to be paid to the vendor.

Type

float

subtotal

Total of all the product purchase entries associated with the purchase order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the purchase order including taxtotal.

Type

float

prefix = po
context
product_choices
vendor_choices
vendor
date
po
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
class InvManage.views.GRNInfo

Bases: django.forms.Form

Form for goods receipt note (GRN).

vendor

Vendor associated with the goods receipt note.

Type

Vendor

poRef

List of identifiers of the purchase orders from which the goods receipt note is derived.

Type

PurchaseOrder

identifier

Unique identifier of the goods receipt note.

Type

str

date

Date of GRN creation.

Type

DateField

grnType

Type of GRN (auto or manual).

Type

str

amendNumber

Amendment number of the GRN.

Type

int

amendDate

Amendment date.

Type

DateField

transporter

Name of the transport/shipping service.

Type

str

vehicleNumber

Vehicle number using which the products are shipped.

Type

str

gateInwardNumber

Gate inward number of the vehicle.

Type

str

preparedBy

Name/identifier of the person who created the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who validated the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who inspected the physical products in the goods receipt note.

Type

str

approvedBy

Name/identifier of the authority who approved the goods receipt note.

Type

str

prefix = grn
context
product_choices
vendor_choices
vendor
TYPE_CHOICES = [['manual', 'Blank'], ['auto', 'PO Reference']]
poRef
identifier
date
grnType
amendNumber
amendDate
transporter
vehicleNumber
gateInwardNumber
preparedBy
checkedBy
inspectedBy
approvedBy
class InvManage.views.GRNEntryForm

Bases: django.forms.Form

Form for goods receipt note entry (GRNE).

product

Product associated with the goods receipt note entry.

Type

Product

grne_id

Unique identifier of the GRNE.

Type

int

ppe_id

Unique identifier of the product purchase entry associated with the GRNE.

Type

int

quantity

Ordered quantity of product with reference to product purchase entry.

Type

int

remark

Remarks of the quality engineer or the GRN creator about status of products received.

Type

str

receivedQty

Quantity of product received against the ordered quantity.

Type

str

acceptedQty

Quantity of product accepted as OK.

Type

str

rejectedQty

Quantity of product rejected (not OK, on HOLD, extra delivery, etc.)

Type

str

prefix = form
context
product
grne_id
ppe_id
quantity
remark
receivedQty
acceptedQty
rejectedQty
class InvManage.views.ThumbnailForm

Bases: django.forms.Form

For for product thumbnail image.

image

Image of the product.

Type

ImageField

prefix = thumbnail
image
class InvManage.views.SalesOrderBasicInfo

Bases: django.forms.Form

Form for basic information on sales order.

consumer

Consumer associated with the sales order.

Type

Consumer

date

Date of the sales order creation.

Type

DateField

so

Sales order number.

Type

int

discount

Percentage discount associated with the sales order.

Type

float

tax

Percentage of tax applicable.

Type

float

paid

Amount received from the consumer.

Type

float

balance

Amount balance with the consumer.

Type

float

subtotal

Total of all the product sales entries associated with the sales order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the sales order including taxtotal.

Type

float

prefix = so
context
product_choices
consumer_choices
consumer
date
so
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
class InvManage.views.ShippingAddressForm

Bases: django.forms.Form

For for shipping address.

title

Title of the firm.

Type

str

name

Name of the firm.

Type

str

phone

Contact number of the firm.

Type

str

address

Postal address.

Type

str

city

City.

Type

str

state

State.

Type

str

country

Country.

Type

str

website

Official website of the firm.

Type

URLField

post

Postal code of the firm.

Type

str

prefix = ship
context
title
name
phone
address
city
state
country
website
post
class InvManage.views.VendorForm

Bases: django.forms.Form

Form for basic informaion of the vendor.

name

Name of the vendor.

Type

str

identifier

Unique identifier of the vendor.

Type

str

gstin

GSTIN number of the vendor.

Type

str

prefix = vend
context
name
identifier
gstin
class InvManage.views.ConsumerForm

Bases: django.forms.Form

Form for consumer.

name

Name of the consumer.

Type

str

identifier

Unique identifier of the consumer.

Type

str

gstin

GSTIN number of the consumer.

Type

str

phone

Contact number.

Type

str

address

Address of the consumer.

Type

str

email

E-mail address of the consumer.

Type

str

location

City of the consumer.

Type

str

prefix = consumer
context
name
identifier
gstin
phone
address
email
location
class InvManage.views.CompanyForm

Bases: django.forms.Form

Form for company.

name

Name of the company.

Type

str

owner

Name of the owner of the company.

Type

str

gstin

GSTIN number of the company.

Type

str

phone

Contact number of the company.

Type

str

address

Postal address.

Type

str

email

E-mail address of the contact person.

Type

str

location

City of the company.

Type

str

prefix = comp
context
name
owner
gstin
phone
address
email
location
class InvManage.views.HistoryForm

Bases: django.forms.Form

Form for history view.

qlen

Count of the events visible on the history view.

Type

int

prefix = history
context
qlen
class InvManage.views.CommunicationForm

Bases: django.forms.Form

Form for communication information.

language

Language of communication.

Type

str

phone

Contact number of the firm.

Type

str

email

E-mail of the contact person.

Type

EmailField

fax

Fax number.

Type

str

prefix = com
context
language
phone
email
fax
class InvManage.views.PurchaseDataForm

Bases: django.forms.Form

Form for purchase related data.

currency

Currency of purchase.

Type

str

minorder

Minimum order quantity.

Type

int

contactperson

Name of the contact person.

Type

str

refcode

Reference code.

Type

str

transportmode

Mode of transport of the shipment.

Type

str

prefix = pdform
context
currency
minorder
contactperson
refcode
transportmode
class InvManage.views.BankAccountForm

Bases: django.forms.Form

Form for bank account details.

name

Name of the bank.

Type

str

branch

Branch number of the bank.

Type

str

region

City in which the branch is located.

Type

str

route

Transit number.

Type

str

number

Bank account number.

Type

int

acctype

Type of bank account.

Type

str

iban

IBAN number.

Type

str

code

Bank code.

Type

str

branchcode

Branch code.

Type

str

prefix = bank
context
name
branch
region
route
number
acctype
iban
code
branchcode
class InvManage.views.Product

Bases: django.db.models.Model

Model of the product.

name

Name of the product.

Type

str

category

Product category.

Type

str

item_type

Type of the product.

Type

str

description

Short description of the product.

Type

str

price

Price of the product.

Type

float

quantity

Stock quantity of the product.

Type

int

identifier

Unique identifier of the product.

Type

str

location

Physical location of the product.

Type

str

length

Length of the product.

Type

str

width

Width of the product.

Type

str

height

Height of the product.

Type

str

weight

Weight of the product.

Type

str

discount

Default discount percentage on the product.

Type

float

barcode

Barcode of the product.

Type

str

expiry

Expiry date of the product.

Type

DateField

image

Image of the product.

Type

ImageField

name
category
item_type
description
price
quantity
identifier
location
length
width
height
weight
discount
barcode
expiry
image
__str__(self)
class InvManage.views.ProductPurchaseEntry

Bases: django.db.models.Model

Model of the product purchase entry.

product

Product associated wit the product purchase entry.

Type

ModelChoiceField

quantity

Quantity of the product to be ordered.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product purchase.

Type

float

order

Referenced purchase order.

Type

PurchaseOrder

receivedQty

Quantity of product received against the ordered quantity.

Type

str

acceptedQty

Quantity of product accepted as OK.

Type

str

rejectedQty

Quantity of product rejected (not OK, on HOLD, extra delivery, etc.)

Type

str

is_complete()

Returns the completion status (boolean).

pending_quantity()

Returns the pending quantity against the entry (int).

product
quantity
price
discount
order
receivedQty
acceptedQty
rejectedQty
is_complete(self)
property pending_quantity(self)
class InvManage.views.GRNEntry

Bases: django.db.models.Model

Model of the goods receipt note entry (GRNE).

product

Primary key of the Product instance associated with the goods receipt note entry.

Type

Product

quantity

Ordered quantity of product with reference to product purchase entry.

Type

int

grne

Primary key of the GoodsReceiptNote instance.

Type

int

ppe

Primary key of the ProductPurchaseEntry instance associated with the GRNE.

Type

int

remark

Remarks of the quality engineer or the GRN creator about status of products received.

Type

str

receivedQty

Quantity of product received against the ordered quantity.

Type

str

acceptedQty

Quantity of product accepted as OK.

Type

str

rejectedQty

Quantity of product rejected (not OK, on HOLD, extra delivery, etc.)

Type

str

product
quantity
grn
ppes
remark
receivedQty
acceptedQty
rejectedQty
class InvManage.views.ProductSalesEntry

Bases: django.db.models.Model

Model of the product sales entry.

product

Primary key of the Product associated with the product sales entry.

Type

Product

quantity

Quantity of the product.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product.

Type

float

order

Primary key of the SalesOrder referenced by the entry.

Type

SalesOrder

product
quantity
price
discount
order
class InvManage.views.SalesOrder

Bases: django.db.models.Model

Model of the sales order.

consumer

Consumer associated with the sales order.

Type

ModelChoiceField

date

Date of the sales order creation.

Type

DateField

so

Sales order number.

Type

int

discount

Percentage discount associated with the sales order.

Type

float

tax

Percentage of tax applicable.

Type

float

paid

Amount received from the consumer.

Type

float

balance

Amount balance with the consumer.

Type

float

subtotal

Total of all the product sales entries associated with the sales order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the sales order including taxtotal.

Type

float

consumer
date
so
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
class InvManage.views.PurchaseOrder

Bases: django.db.models.Model

Model of the purchase order.

vendor

Vendor associated with the purchase order.

Type

Vendor

date

Date and time of the purchase order creation.

Type

DateField

po

Purchase order number.

Type

int

discount

Percentage discount.

Type

float

tax

Percentage of tax applicable for the purchase.

Type

float

paid

Amount paid against the PO.

Type

float

balance

Amount balance which remains to be paid.

Type

float

subtotal

Total of all the product purchase entries associated with the purchase order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the purchase order including taxtotal.

Type

float

is_complete()

Returns the completion status (boolean).

pending_ppes()

Returns list of product purchase entries which are not completed.

vendor
date
po
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
is_complete(self)
pending_ppes(self)
class InvManage.views.GoodsReceiptNote

Bases: django.db.models.Model

Model of the goods receipt note (GRN).

vendor

Vendor associated with the goods receipt note.

Type

ModelChoiceField

poRef

List of identifiers of the purchase orders from which the goods receipt note is derived.

Type

MultipleChoiceField

identifier

Unique identifier of the goods receipt note.

Type

str

date

Date of GRN creation.

Type

DateField

grnType

Type of GRN (auto or manual).

Type

ChoiceField

amendNumber

Amendment number of the GRN.

Type

int

amendDate

Amendment date.

Type

DateField

transporter

Name of the transport/shipping service.

Type

str

vehicleNumber

Vehicle number using which the products are shipped.

Type

str

gateInwardNumber

Gate inward number of the vehicle.

Type

str

preparedBy

Name/identifier of the person who created the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who validated the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who inspected the physical products in the goods receipt note.

Type

str

approvedBy

Name/identifier of the authority who approved the goods receipt note.

Type

str

TYPE_CHOICES = [['manual', 'Blank'], ['auto', 'PO Reference']]
vendor
poRef
identifier
date
grnType
amendNumber
amendDate
transporter
vehicleNumber
gateInwardNumber
preparedBy
checkedBy
inspectedBy
approvedBy
class InvManage.views.Consumer

Bases: django.db.models.Model

Model of the consumer.

name

Name of the consumer.

Type

str

identifier

Unique identifier of the consumer.

Type

str

gstin

GSTIN number of the consumer.

Type

str

phone

Contact number.

Type

str

address

Address of the consumer.

Type

str

email

E-mail address of the consumer.

Type

str

location

City of the consumer.

Type

str

Returns

[description]

Return type

[type]

name
identifier
gstin
phone
address
email
location
__str__(self)
class InvManage.views.Vendor

Bases: django.db.models.Model

Model of the vendor.

name

Name of the vendor.

Type

str

identifier

Unique identifier of the vendor.

Type

str

gstin

GSTIN number of the vendor.

Type

str

address

Primary key of the ShippingAddress instance associated with the vendor.

Type

ShippingAddress

communication

Primary key of the Communication instance associated with the vendor.

Type

Communication

backaccount

Primary key of the BankAccount instance associated with the vendor.

Type

BankAccount

purchasedata

Primary key of the PurchaseData instance associated with the vendor.

Type

PurchaseData

Returns

String representation of the vendor name.

Return type

str

name
identifier
gstin
address
communication
bankaccount
purchasedata
__str__(self)
class InvManage.views.Company

Bases: django.db.models.Model

Model of the company.

name

Name of the company.

Type

str

owner

Owner of the company.

Type

str

gstin

GSTIN number of the company.

Type

str

phone

Contact number.

Type

str

address

Postal address.

Type

str

email

E-mail address of the contact person.

Type

str

location

City of the company.

Type

str

image

Photo/logo of the company.

Type

ImageField

shippingaddress

Primary key of the ShippingAddress instance associated with the company.

Type

ShippingAddress

Returns

String representation of the company name.

Return type

str

name
owner
gstin
phone
address
email
location
image
shippingaddress
__str__(self)
class InvManage.views.PurchaseInvoice

Bases: django.db.models.Model

Model for the purchase invoice.

company

Primary key of the Company.

Type

Company

po

Primary key of the PurchaseOrder.

Type

PurchaseOrder

shippingaddress

Primary key of the ShippingAddress.

Type

ShippingAddress

communication

Primary key of the Communication.

Type

Communication

company
po
shippingaddress
communication
class InvManage.views.SalesInvoice

Bases: django.db.models.Model

Model for the sales order invoice.

company

Primary key of the Company.

Type

Company

so

Primary key of the SalesOrder.

Type

SalesOrder

shippingaddress

Primary key of the ShippingAddress.

Type

ShippingAddress

company
so
shippingaddress
class InvManage.views.FilterState

Bases: django.db.models.Model

Model of the filter state.

name

Name of the filter state.

Type

str

name
class InvManage.views.FilterColumn

Bases: django.db.models.Model

Model of the column state.

name

Name of the column.

Type

str

label

Label of the column.

Type

str

visible

Visibility flag.

Type

bool

position

Index of the column.

Type

int

state

Primary key of the FilterState instance being referenced by the column instance.

Type

FilterState

name
label
visible
position
state
class InvManage.views.Object

Bases: django.db.models.Model

Model for a generic object.

identifier

Unique identifier of the object.

Type

str

name

Name of the object.

Type

str

model

Model associated with the object.

Type

str

identifier
name
model
class InvManage.views.EventCard

Bases: django.db.models.Model

Model for event card to be displayed in the history view.

obj

Object associated with the event.

Type

OneToOneField

objId

Unique identifier of the object.

Type

str

objname

Name of the object.

Type

str

objmodel

Model of the object.

Type

str

date

Timestamp of the event.

Type

DateField

operation

Type of event.

Type

str

obj
objId
objname
objmodel
date
operation
class InvManage.views.EventType

Bases: django.db.models.Model

Model for event type.

name

Name of the event being triggered.

Type

str

label

Label associated with the event.

Type

str

Returns

Returns the string representation of the label when the event type is queried.

Return type

Label

name
label
__str__(self)
class InvManage.views.ObjectModel

Bases: django.db.models.Model

Model associated with an object.

name

Name of the object.

Type

str

label

Label string of the object.

Type

str

modName

Name of the model associated with the object.

Type

str

Returns

Returns string representation of the label when object model is queried.

Return type

Label

name
label
modName
__str__(self)
class InvManage.views.HistoryFilterState

Bases: django.db.models.Model

Model of filter state of the history.

params

Paramameters of the configured filters.

Type

str

params
class InvManage.views.ShippingAddress

Bases: django.db.models.Model

Model of the shipping address.

title

Title of the firm.

Type

str

name

Name of the firm.

Type

str

phone

Contact number of the firm.

Type

str

address

Postal address.

Type

str

city

City.

Type

str

state

State.

Type

str

country

Country.

Type

str

website

Official website of the firm.

Type

URLField

post

Postal code of the firm.

Type

str

title
name
phone
address
city
state
country
website
post
class InvManage.views.PurchaseData

Bases: django.db.models.Model

Model of the purchase data.

currency

Currency of purchase.

Type

str

minorder

Minimum order quantity.

Type

int

contactperson

Name of the contact person.

Type

str

refcode

Reference code.

Type

str

transportmode

Mode of transport of the shipment.

Type

str

currency
minorder
contactperson
refcode
transportmode
class InvManage.views.Communication

Bases: django.db.models.Model

Model of the communication information.

language

Language of communication.

Type

str

phone

Contact number of the firm.

Type

str

email

E-mail of the contact person.

Type

EmailField

fax

Fax number.

Type

str

language
phone
email
fax
class InvManage.views.BankAccount

Bases: django.db.models.Model

Model of the bank account details.

name

Name of the bank.

Type

str

branch

Branch number of the bank.

Type

str

region

City in which the branch is located.

Type

str

route

Transit number.

Type

str

number

Bank account number.

Type

int

acctype

Type of bank account.

Type

str

iban

IBAN number.

Type

str

code

Bank code.

Type

str

branchcode

Branch code.

Type

str

name
branch
region
route
number
acctype
iban
code
branchcode
InvManage.views.get_columns(state)

Gets the columns of the display table.

This function takes a filter state and returns an array of column names that are ordered depending on the position attribute of the columns. This order is important as the queryset will be rendered in the display table according to the column order in this returned array.

Parameters

state (FilterState) – Filter state of the columns.

Returns

A list that dictates the order of the columns.

Return type

List

InvManage.views.sort_ascending_descending(request, model)

Sorts and saves the state of the column.

This function takes a request, finds which column needs to be sorted in ascending/descending order, and returns the sorted queryset.

Parameters
  • request (HttpRequest) – GET request received for retreiving the list of model instances.

  • model (Model) – Model of the objects being retrieved.

Returns

List of sorted object instances.

Return type

QuerySet

InvManage.views.change_column_position(request, state)

Modifies the column states depending on the request.

This function:
  • Takes a filter state

  • Extracts the column names into an order array

  • Modifies the column order in the array depending on user input direction (left/right)

  • Saves this modified state of columns into the database

  • Returns the modified column names array

Parameters
  • request (HttpRequest) – GET request for retrieving the state of the columns.

  • state (FilterState) – Filter state of the columns.

Returns

List of sorted columns.

Return type

List

InvManage.views.paginate(queryset, filter, page_number)

Paginates the list of objects.

This function takes the entire queryset and filters out only objects belonging to the request page

Parameters
  • queryset (QuerySet) – QuerySet of the objects retrieved from the database.

  • filter (FilterState) – Filter state of the columns.

  • page_number (int) – Page number requested.

class InvManage.views.ConsumerFilter

Bases: django_filters.FilterSet

class Meta
model
fields
context
name
identifier
phone
email
location
order_by_field = ordering
ordering
class InvManage.views.ConsumerSerializer

Bases: rest_framework.serializers.ModelSerializer

Serializer for Consumer class instance.

The ConsumerSerializer.data attribute gives the JSON serialized data of the Consumer instance:

{
    "name": "The Music Store",
    "identifier": "CONS1256",
    "gstin": "89AAC4633353643",
    "phone": "+91 8325642358",
    "address": "Plot no 958, N- 4, Neo Complex, Barh, Wokha, Nagaland, 797111",
    "email": "JohnDoe@themusic.store",
    "location": "Wokha"
}
class Meta
model
fields = ['name', 'identifier', 'gstin', 'phone', 'address', 'email', 'location']
to_representation(self, instance)
InvManage.views.create_consumer_view(request)

Creates a consumer on POST request, and returns a consumer creation form on GET request.

GET /consumer

Gets the consumer creation form.

Example request:

GET /consumer/ HTTP/1.1
Host: localhost:8000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Request Headers
  • Accept – text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Status Codes
  • 200 OK – Consumer creation form received successfully.

POST /consumer

Creates a consumer.

Example request:

POST /consumer/ HTTP/1.1
Host: localhost:8000
Content-Type: multipart/form-data;
Form Parameters
  • consumer-nameThe Music Store

  • consumer-identifierCONS1256

  • consumer-gstin89ACC654654335

  • consumer-phone+91 6543525422

  • consumer-addressPlot no. 958, N-4, Neo Complex, Barh, Wokha, Nagaland, 797111

  • consumer-emailjohnDoe@themusic.store

  • consumer-locationWokha

Response Headers
  • Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv

Status Codes
InvManage.views.update_consumer_view(request)

Updates a consuemr on POST request and returns the consumer update form for GET request.

GET /consumer/update

Gets the consumer update form whose primary key matches the query parameter pk.

Example request:

GET /consumer/update HTTP/1.1
Host: localhost:8000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Query Parameters
  • pk – The primary key of the consumer.

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Request Headers
  • Accept – text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Status Codes
  • 200 OK – Consumer update form received successfully.

POST /consumer/update

Updates the consumer.

Example request:

POST /company/update HTTP/1.1
Host: localhost:8000
Content-Type: multipart/form-data;
Form Parameters
  • pk7

  • consumer-nameThe Music Store

  • consumer-identifierCONS1256

  • consumer-gstin89ACC654654335

  • consumer-phone+91 6543525422

  • consumer-addressPlot no. 958, N-4, Neo Complex, Barh, Wokha, Nagaland, 797111

  • consumer-emailjohnDoe@themusic.store

  • consumer-locationWokha

Response Headers
  • Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv

Status Codes
InvManage.views.delete_consumer_view(request, pk)

Deletes the consumer with primary key pk on POST request.

POST /consumer/<str:object_id>/delete

Deletes the consumer represented by the primary key object_id.

Example request:

POST /consumer/5/delete HTTP/1.1
Host: localhost:8000
Content-Type: application/x-www-form-urlencoded
Parameters
  • object_id – Consumer primary key.

Response Headers
Status Codes
InvManage.views.display_consumers_view(request)

Retrieves the list of consumers on GET request.

GET /consumers/

Gets the list of all consumers.

Example request:

GET /companies/ HTTP/1.1
Host: localhost:8000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Form Parameters
  • page – The page number of the consumers list.

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Request Headers
  • Accept – text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Status Codes
  • 200 OK – List of consumers received successfully.

InvManage.views.get_consumer(request)

Returns the JSON serialized data of the requested consumer on GET request.

GET /get_consumer/

Gets the JSON serialized data of the requested consumer.

Example request:

GET /get_consumer/ HTTP/1.1
Host: localhost:8000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json; charset=utf-8

[
    {
        "name": "The Music Store",
        "identifier": "CONS1256",
        "gstin": "89AAC4633353643",
        "phone": "+91 8325642358",
        "address": "Plot no 958, N- 4, Neo Complex, Barh, Wokha, Nagaland, 797111",
        "email": "JohnDoe@themusic.store",
        "location": "Wokha"
    }
]
Response Headers
Status Codes
class InvManage.views.ProductBasicInfoForm

Bases: django.forms.Form

Form for basic product information.

name

Name of the product.

Type

str

item_type

Type of the product.

Type

str

category

Product category.

Type

str

description

Short description of the product.

Type

str

prefix = basic
context
name
item_type
category
description
class InvManage.views.ProductDetailedInfoForm

Bases: django.forms.Form

Form for product physical details

length

Length of the product.

Type

str

width

Width of the product.

Type

str

height

Height of the product.

Type

str

weight

Weight of the product.

Type

str

prefix = detailed
context
length
width
height
weight
class InvManage.views.ProductPricingForm

Bases: django.forms.Form

Form for pricing information of the product.

price

Price of the product.

Type

float

discount

Default discount percentage on the product.

Type

float

prefix = pricing
context
price
discount
class InvManage.views.ProductPurchaseEntryForm

Bases: django.forms.Form

Form for product purchase entry.

ppe_id

Unique identifier of the product purchase entry.

Type

int

product

Product associated wit the product purchase entry.

Type

Product

quantity

Quantity of the product to be ordered.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product purchase.

Type

float

prefix = form
context
ppe_id
product
quantity
price
discount
class InvManage.views.ProductSalesEntryForm

Bases: django.forms.Form

Form for product sales entry.

pse_id

Unique identifier of the product sales entry.

Type

int

product

Product associated with the product sales entry.

Type

Product

quantity

Quantity of the product.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product.

Type

float

prefix = form
context
pse_id
product
quantity
price
discount
class InvManage.views.ProductStatusForm

Bases: django.forms.Form

Form for locating and identifying the product.

quantity

Stock quantity of the product.

Type

int

identifier

Unique identifier of the product.

Type

str

location

Physical location of the product.

Type

str

context
prefix = status
quantity
identifier
location
class InvManage.views.ProductStorageInfoForm

Bases: django.forms.Form

Form for storage information.

barcode

Barcode of the product.

Type

str

expiry

Expiry date of the product.

Type

DateField

prefix = storage
barcode
context
expiry
class InvManage.views.PurchaseOrderBasicInfo

Bases: django.forms.Form

Form for basic information of the purchase order.

vendor

Vendor associated with the purcahse order.

Type

Vendor

date

Date of the purchase order creation.

Type

DateField

po

Purchase order number.

Type

int

discount

Percentage of overall discount.

Type

float

tax

Percentage of tax.

Type

float

paid

Amount paid to the vendor.

Type

float

balance

Balance amount to be paid to the vendor.

Type

float

subtotal

Total of all the product purchase entries associated with the purchase order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the purchase order including taxtotal.

Type

float

prefix = po
context
product_choices
vendor_choices
vendor
date
po
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
class InvManage.views.GRNInfo

Bases: django.forms.Form

Form for goods receipt note (GRN).

vendor

Vendor associated with the goods receipt note.

Type

Vendor

poRef

List of identifiers of the purchase orders from which the goods receipt note is derived.

Type

PurchaseOrder

identifier

Unique identifier of the goods receipt note.

Type

str

date

Date of GRN creation.

Type

DateField

grnType

Type of GRN (auto or manual).

Type

str

amendNumber

Amendment number of the GRN.

Type

int

amendDate

Amendment date.

Type

DateField

transporter

Name of the transport/shipping service.

Type

str

vehicleNumber

Vehicle number using which the products are shipped.

Type

str

gateInwardNumber

Gate inward number of the vehicle.

Type

str

preparedBy

Name/identifier of the person who created the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who validated the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who inspected the physical products in the goods receipt note.

Type

str

approvedBy

Name/identifier of the authority who approved the goods receipt note.

Type

str

prefix = grn
context
product_choices
vendor_choices
vendor
TYPE_CHOICES = [['manual', 'Blank'], ['auto', 'PO Reference']]
poRef
identifier
date
grnType
amendNumber
amendDate
transporter
vehicleNumber
gateInwardNumber
preparedBy
checkedBy
inspectedBy
approvedBy
class InvManage.views.GRNEntryForm

Bases: django.forms.Form

Form for goods receipt note entry (GRNE).

product

Product associated with the goods receipt note entry.

Type

Product

grne_id

Unique identifier of the GRNE.

Type

int

ppe_id

Unique identifier of the product purchase entry associated with the GRNE.

Type

int

quantity

Ordered quantity of product with reference to product purchase entry.

Type

int

remark

Remarks of the quality engineer or the GRN creator about status of products received.

Type

str

receivedQty

Quantity of product received against the ordered quantity.

Type

str

acceptedQty

Quantity of product accepted as OK.

Type

str

rejectedQty

Quantity of product rejected (not OK, on HOLD, extra delivery, etc.)

Type

str

prefix = form
context
product
grne_id
ppe_id
quantity
remark
receivedQty
acceptedQty
rejectedQty
class InvManage.views.ThumbnailForm

Bases: django.forms.Form

For for product thumbnail image.

image

Image of the product.

Type

ImageField

prefix = thumbnail
image
class InvManage.views.SalesOrderBasicInfo

Bases: django.forms.Form

Form for basic information on sales order.

consumer

Consumer associated with the sales order.

Type

Consumer

date

Date of the sales order creation.

Type

DateField

so

Sales order number.

Type

int

discount

Percentage discount associated with the sales order.

Type

float

tax

Percentage of tax applicable.

Type

float

paid

Amount received from the consumer.

Type

float

balance

Amount balance with the consumer.

Type

float

subtotal

Total of all the product sales entries associated with the sales order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the sales order including taxtotal.

Type

float

prefix = so
context
product_choices
consumer_choices
consumer
date
so
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
class InvManage.views.ShippingAddressForm

Bases: django.forms.Form

For for shipping address.

title

Title of the firm.

Type

str

name

Name of the firm.

Type

str

phone

Contact number of the firm.

Type

str

address

Postal address.

Type

str

city

City.

Type

str

state

State.

Type

str

country

Country.

Type

str

website

Official website of the firm.

Type

URLField

post

Postal code of the firm.

Type

str

prefix = ship
context
title
name
phone
address
city
state
country
website
post
class InvManage.views.VendorForm

Bases: django.forms.Form

Form for basic informaion of the vendor.

name

Name of the vendor.

Type

str

identifier

Unique identifier of the vendor.

Type

str

gstin

GSTIN number of the vendor.

Type

str

prefix = vend
context
name
identifier
gstin
class InvManage.views.ConsumerForm

Bases: django.forms.Form

Form for consumer.

name

Name of the consumer.

Type

str

identifier

Unique identifier of the consumer.

Type

str

gstin

GSTIN number of the consumer.

Type

str

phone

Contact number.

Type

str

address

Address of the consumer.

Type

str

email

E-mail address of the consumer.

Type

str

location

City of the consumer.

Type

str

prefix = consumer
context
name
identifier
gstin
phone
address
email
location
class InvManage.views.CompanyForm

Bases: django.forms.Form

Form for company.

name

Name of the company.

Type

str

owner

Name of the owner of the company.

Type

str

gstin

GSTIN number of the company.

Type

str

phone

Contact number of the company.

Type

str

address

Postal address.

Type

str

email

E-mail address of the contact person.

Type

str

location

City of the company.

Type

str

prefix = comp
context
name
owner
gstin
phone
address
email
location
class InvManage.views.HistoryForm

Bases: django.forms.Form

Form for history view.

qlen

Count of the events visible on the history view.

Type

int

prefix = history
context
qlen
class InvManage.views.CommunicationForm

Bases: django.forms.Form

Form for communication information.

language

Language of communication.

Type

str

phone

Contact number of the firm.

Type

str

email

E-mail of the contact person.

Type

EmailField

fax

Fax number.

Type

str

prefix = com
context
language
phone
email
fax
class InvManage.views.PurchaseDataForm

Bases: django.forms.Form

Form for purchase related data.

currency

Currency of purchase.

Type

str

minorder

Minimum order quantity.

Type

int

contactperson

Name of the contact person.

Type

str

refcode

Reference code.

Type

str

transportmode

Mode of transport of the shipment.

Type

str

prefix = pdform
context
currency
minorder
contactperson
refcode
transportmode
class InvManage.views.BankAccountForm

Bases: django.forms.Form

Form for bank account details.

name

Name of the bank.

Type

str

branch

Branch number of the bank.

Type

str

region

City in which the branch is located.

Type

str

route

Transit number.

Type

str

number

Bank account number.

Type

int

acctype

Type of bank account.

Type

str

iban

IBAN number.

Type

str

code

Bank code.

Type

str

branchcode

Branch code.

Type

str

prefix = bank
context
name
branch
region
route
number
acctype
iban
code
branchcode
class InvManage.views.Product

Bases: django.db.models.Model

Model of the product.

name

Name of the product.

Type

str

category

Product category.

Type

str

item_type

Type of the product.

Type

str

description

Short description of the product.

Type

str

price

Price of the product.

Type

float

quantity

Stock quantity of the product.

Type

int

identifier

Unique identifier of the product.

Type

str

location

Physical location of the product.

Type

str

length

Length of the product.

Type

str

width

Width of the product.

Type

str

height

Height of the product.

Type

str

weight

Weight of the product.

Type

str

discount

Default discount percentage on the product.

Type

float

barcode

Barcode of the product.

Type

str

expiry

Expiry date of the product.

Type

DateField

image

Image of the product.

Type

ImageField

name
category
item_type
description
price
quantity
identifier
location
length
width
height
weight
discount
barcode
expiry
image
__str__(self)
class InvManage.views.ProductPurchaseEntry

Bases: django.db.models.Model

Model of the product purchase entry.

product

Product associated wit the product purchase entry.

Type

ModelChoiceField

quantity

Quantity of the product to be ordered.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product purchase.

Type

float

order

Referenced purchase order.

Type

PurchaseOrder

receivedQty

Quantity of product received against the ordered quantity.

Type

str

acceptedQty

Quantity of product accepted as OK.

Type

str

rejectedQty

Quantity of product rejected (not OK, on HOLD, extra delivery, etc.)

Type

str

is_complete()

Returns the completion status (boolean).

pending_quantity()

Returns the pending quantity against the entry (int).

product
quantity
price
discount
order
receivedQty
acceptedQty
rejectedQty
is_complete(self)
property pending_quantity(self)
class InvManage.views.GRNEntry

Bases: django.db.models.Model

Model of the goods receipt note entry (GRNE).

product

Primary key of the Product instance associated with the goods receipt note entry.

Type

Product

quantity

Ordered quantity of product with reference to product purchase entry.

Type

int

grne

Primary key of the GoodsReceiptNote instance.

Type

int

ppe

Primary key of the ProductPurchaseEntry instance associated with the GRNE.

Type

int

remark

Remarks of the quality engineer or the GRN creator about status of products received.

Type

str

receivedQty

Quantity of product received against the ordered quantity.

Type

str

acceptedQty

Quantity of product accepted as OK.

Type

str

rejectedQty

Quantity of product rejected (not OK, on HOLD, extra delivery, etc.)

Type

str

product
quantity
grn
ppes
remark
receivedQty
acceptedQty
rejectedQty
class InvManage.views.ProductSalesEntry

Bases: django.db.models.Model

Model of the product sales entry.

product

Primary key of the Product associated with the product sales entry.

Type

Product

quantity

Quantity of the product.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product.

Type

float

order

Primary key of the SalesOrder referenced by the entry.

Type

SalesOrder

product
quantity
price
discount
order
class InvManage.views.SalesOrder

Bases: django.db.models.Model

Model of the sales order.

consumer

Consumer associated with the sales order.

Type

ModelChoiceField

date

Date of the sales order creation.

Type

DateField

so

Sales order number.

Type

int

discount

Percentage discount associated with the sales order.

Type

float

tax

Percentage of tax applicable.

Type

float

paid

Amount received from the consumer.

Type

float

balance

Amount balance with the consumer.

Type

float

subtotal

Total of all the product sales entries associated with the sales order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the sales order including taxtotal.

Type

float

consumer
date
so
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
class InvManage.views.PurchaseOrder

Bases: django.db.models.Model

Model of the purchase order.

vendor

Vendor associated with the purchase order.

Type

Vendor

date

Date and time of the purchase order creation.

Type

DateField

po

Purchase order number.

Type

int

discount

Percentage discount.

Type

float

tax

Percentage of tax applicable for the purchase.

Type

float

paid

Amount paid against the PO.

Type

float

balance

Amount balance which remains to be paid.

Type

float

subtotal

Total of all the product purchase entries associated with the purchase order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the purchase order including taxtotal.

Type

float

is_complete()

Returns the completion status (boolean).

pending_ppes()

Returns list of product purchase entries which are not completed.

vendor
date
po
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
is_complete(self)
pending_ppes(self)
class InvManage.views.GoodsReceiptNote

Bases: django.db.models.Model

Model of the goods receipt note (GRN).

vendor

Vendor associated with the goods receipt note.

Type

ModelChoiceField

poRef

List of identifiers of the purchase orders from which the goods receipt note is derived.

Type

MultipleChoiceField

identifier

Unique identifier of the goods receipt note.

Type

str

date

Date of GRN creation.

Type

DateField

grnType

Type of GRN (auto or manual).

Type

ChoiceField

amendNumber

Amendment number of the GRN.

Type

int

amendDate

Amendment date.

Type

DateField

transporter

Name of the transport/shipping service.

Type

str

vehicleNumber

Vehicle number using which the products are shipped.

Type

str

gateInwardNumber

Gate inward number of the vehicle.

Type

str

preparedBy

Name/identifier of the person who created the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who validated the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who inspected the physical products in the goods receipt note.

Type

str

approvedBy

Name/identifier of the authority who approved the goods receipt note.

Type

str

TYPE_CHOICES = [['manual', 'Blank'], ['auto', 'PO Reference']]
vendor
poRef
identifier
date
grnType
amendNumber
amendDate
transporter
vehicleNumber
gateInwardNumber
preparedBy
checkedBy
inspectedBy
approvedBy
class InvManage.views.Consumer

Bases: django.db.models.Model

Model of the consumer.

name

Name of the consumer.

Type

str

identifier

Unique identifier of the consumer.

Type

str

gstin

GSTIN number of the consumer.

Type

str

phone

Contact number.

Type

str

address

Address of the consumer.

Type

str

email

E-mail address of the consumer.

Type

str

location

City of the consumer.

Type

str

Returns

[description]

Return type

[type]

name
identifier
gstin
phone
address
email
location
__str__(self)
class InvManage.views.Vendor

Bases: django.db.models.Model

Model of the vendor.

name

Name of the vendor.

Type

str

identifier

Unique identifier of the vendor.

Type

str

gstin

GSTIN number of the vendor.

Type

str

address

Primary key of the ShippingAddress instance associated with the vendor.

Type

ShippingAddress

communication

Primary key of the Communication instance associated with the vendor.

Type

Communication

backaccount

Primary key of the BankAccount instance associated with the vendor.

Type

BankAccount

purchasedata

Primary key of the PurchaseData instance associated with the vendor.

Type

PurchaseData

Returns

String representation of the vendor name.

Return type

str

name
identifier
gstin
address
communication
bankaccount
purchasedata
__str__(self)
class InvManage.views.Company

Bases: django.db.models.Model

Model of the company.

name

Name of the company.

Type

str

owner

Owner of the company.

Type

str

gstin

GSTIN number of the company.

Type

str

phone

Contact number.

Type

str

address

Postal address.

Type

str

email

E-mail address of the contact person.

Type

str

location

City of the company.

Type

str

image

Photo/logo of the company.

Type

ImageField

shippingaddress

Primary key of the ShippingAddress instance associated with the company.

Type

ShippingAddress

Returns

String representation of the company name.

Return type

str

name
owner
gstin
phone
address
email
location
image
shippingaddress
__str__(self)
class InvManage.views.PurchaseInvoice

Bases: django.db.models.Model

Model for the purchase invoice.

company

Primary key of the Company.

Type

Company

po

Primary key of the PurchaseOrder.

Type

PurchaseOrder

shippingaddress

Primary key of the ShippingAddress.

Type

ShippingAddress

communication

Primary key of the Communication.

Type

Communication

company
po
shippingaddress
communication
class InvManage.views.SalesInvoice

Bases: django.db.models.Model

Model for the sales order invoice.

company

Primary key of the Company.

Type

Company

so

Primary key of the SalesOrder.

Type

SalesOrder

shippingaddress

Primary key of the ShippingAddress.

Type

ShippingAddress

company
so
shippingaddress
class InvManage.views.FilterState

Bases: django.db.models.Model

Model of the filter state.

name

Name of the filter state.

Type

str

name
class InvManage.views.FilterColumn

Bases: django.db.models.Model

Model of the column state.

name

Name of the column.

Type

str

label

Label of the column.

Type

str

visible

Visibility flag.

Type

bool

position

Index of the column.

Type

int

state

Primary key of the FilterState instance being referenced by the column instance.

Type

FilterState

name
label
visible
position
state
class InvManage.views.Object

Bases: django.db.models.Model

Model for a generic object.

identifier

Unique identifier of the object.

Type

str

name

Name of the object.

Type

str

model

Model associated with the object.

Type

str

identifier
name
model
class InvManage.views.EventCard

Bases: django.db.models.Model

Model for event card to be displayed in the history view.

obj

Object associated with the event.

Type

OneToOneField

objId

Unique identifier of the object.

Type

str

objname

Name of the object.

Type

str

objmodel

Model of the object.

Type

str

date

Timestamp of the event.

Type

DateField

operation

Type of event.

Type

str

obj
objId
objname
objmodel
date
operation
class InvManage.views.EventType

Bases: django.db.models.Model

Model for event type.

name

Name of the event being triggered.

Type

str

label

Label associated with the event.

Type

str

Returns

Returns the string representation of the label when the event type is queried.

Return type

Label

name
label
__str__(self)
class InvManage.views.ObjectModel

Bases: django.db.models.Model

Model associated with an object.

name

Name of the object.

Type

str

label

Label string of the object.

Type

str

modName

Name of the model associated with the object.

Type

str

Returns

Returns string representation of the label when object model is queried.

Return type

Label

name
label
modName
__str__(self)
class InvManage.views.HistoryFilterState

Bases: django.db.models.Model

Model of filter state of the history.

params

Paramameters of the configured filters.

Type

str

params
class InvManage.views.ShippingAddress

Bases: django.db.models.Model

Model of the shipping address.

title

Title of the firm.

Type

str

name

Name of the firm.

Type

str

phone

Contact number of the firm.

Type

str

address

Postal address.

Type

str

city

City.

Type

str

state

State.

Type

str

country

Country.

Type

str

website

Official website of the firm.

Type

URLField

post

Postal code of the firm.

Type

str

title
name
phone
address
city
state
country
website
post
class InvManage.views.PurchaseData

Bases: django.db.models.Model

Model of the purchase data.

currency

Currency of purchase.

Type

str

minorder

Minimum order quantity.

Type

int

contactperson

Name of the contact person.

Type

str

refcode

Reference code.

Type

str

transportmode

Mode of transport of the shipment.

Type

str

currency
minorder
contactperson
refcode
transportmode
class InvManage.views.Communication

Bases: django.db.models.Model

Model of the communication information.

language

Language of communication.

Type

str

phone

Contact number of the firm.

Type

str

email

E-mail of the contact person.

Type

EmailField

fax

Fax number.

Type

str

language
phone
email
fax
class InvManage.views.BankAccount

Bases: django.db.models.Model

Model of the bank account details.

name

Name of the bank.

Type

str

branch

Branch number of the bank.

Type

str

region

City in which the branch is located.

Type

str

route

Transit number.

Type

str

number

Bank account number.

Type

int

acctype

Type of bank account.

Type

str

iban

IBAN number.

Type

str

code

Bank code.

Type

str

branchcode

Branch code.

Type

str

name
branch
region
route
number
acctype
iban
code
branchcode
InvManage.views.get_columns(state)

Gets the columns of the display table.

This function takes a filter state and returns an array of column names that are ordered depending on the position attribute of the columns. This order is important as the queryset will be rendered in the display table according to the column order in this returned array.

Parameters

state (FilterState) – Filter state of the columns.

Returns

A list that dictates the order of the columns.

Return type

List

InvManage.views.sort_ascending_descending(request, model)

Sorts and saves the state of the column.

This function takes a request, finds which column needs to be sorted in ascending/descending order, and returns the sorted queryset.

Parameters
  • request (HttpRequest) – GET request received for retreiving the list of model instances.

  • model (Model) – Model of the objects being retrieved.

Returns

List of sorted object instances.

Return type

QuerySet

InvManage.views.change_column_position(request, state)

Modifies the column states depending on the request.

This function:
  • Takes a filter state

  • Extracts the column names into an order array

  • Modifies the column order in the array depending on user input direction (left/right)

  • Saves this modified state of columns into the database

  • Returns the modified column names array

Parameters
  • request (HttpRequest) – GET request for retrieving the state of the columns.

  • state (FilterState) – Filter state of the columns.

Returns

List of sorted columns.

Return type

List

InvManage.views.paginate(queryset, filter, page_number)

Paginates the list of objects.

This function takes the entire queryset and filters out only objects belonging to the request page

Parameters
  • queryset (QuerySet) – QuerySet of the objects retrieved from the database.

  • filter (FilterState) – Filter state of the columns.

  • page_number (int) – Page number requested.

class InvManage.views.SalesOrderFilter

Bases: django_filters.FilterSet

class Meta
model
fields
context
consumer
date
so
ordertotal
order_by_field = ordering
ordering
class InvManage.views.ProductSerializer

Bases: rest_framework.serializers.ModelSerializer

Serializer for Product class instance.

The ProductSerializer.data attribute gives the JSON serialized data of the Product instance:

{
    "pk": 637,
    "name": "Piano",
    "category": "Ultricies PC",
    "quantity": 23921,
    "identifier": "PROD9",
    "location": "Musselburgh",
    "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ",
    "prod_id": 637
}
class Meta
model
fields = ['pk', 'name', 'category', 'quantity', 'identifier', 'location', 'description', 'prod_id']
prod_id
to_representation(self, instance)
class InvManage.views.PSEntrySerializer

Bases: rest_framework.serializers.ModelSerializer

Serializer for ProductSalesEntry class instance.

The PSEntrySerializer.data attribute gives the JSON serialized data of the ProductSalesEntry instance:

{
    "pse_id": 64,
    "product": {
        "pk": 637,
        "name": "Piano",
        "category": "Ultricies PC",
        "quantity": 23921,
        "identifier": "PROD9",
        "location": "Musselburgh",
        "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ",
        "prod_id": 637
    },
    "quantity": 50,
    "price": 9900.0,
    "discount": 10.0,
    "order": 29
}
class Meta
model
fields = ['pse_id', 'product', 'quantity', 'price', 'discount', 'order']
pse_id
product
to_representation(self, instance)
create(self, validated_data)
update(self, instance, validated_data)
class InvManage.views.SalesInvoiceSerializer

Bases: rest_framework.serializers.ModelSerializer

Serializer for SalesInvoice class instance.

The SalesInvoiceSerializer.data attribute gives the JSON serialized data of the SalesInvoice instance:

{
    "company": {
        "name": "Fringillami",
        "owner": "Ivor Barnett",
        "gstin": "89AAC056465468",
        "phone": "332 220-7026",
        "address": "Ap #849-6241 Euismod Av., 677598, Carinthia, Belgium",
        "email": "est.tempor@fringillami.org",
        "location": "Belgium",
        "image": "/media/images/hyperlink-green_x91WW5n.png"
    },
    "so": {
        "consumer": {
            "name": "The Music Store",
            "identifier": "CONS1256",
            "gstin": "89AAC4633353643",
            "phone": "+91 8325642358",
            "address": "Plot no 958, N- 4, Neo Complex, Barh, Wokha, Nagaland, 797111",
            "email": "JohnDoe@themusic.store",
            "location": "Wokha"
        },
        "date": "2021-09-25T00:00:00Z",
        "so": 89,
        "subtotal": 744900.0,
        "taxtotal": 59592.0,
        "ordertotal": 804492.0,
        "pses": [
            {
                "pse_id": 64,
                "product": {
                    "pk": 637,
                    "name": "piano",
                    "category": "Ultricies PC",
                    "quantity": 23921,
                    "identifier": "PROD9",
                    "location": "Musselburgh",
                    "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ",
                    "prod_id": 637
                },
                "quantity": 50,
                "price": 9900.0,
                "discount": 10.0,
                "order": 29
            },
            {
                "pse_id": 65,
                "product": {
                    "pk": 649,
                    "name": "Sabar",
                    "category": "Amet Consulting",
                    "quantity": 3903,
                    "identifier": "PROD21",
                    "location": "Serang",
                    "description": "High Sierra Sabar, Travel bag, Blue, Grey, Zipper, 36.5 L, 51.5 cm, 26 cm ",
                    "prod_id": 649
                },
                "quantity": 25,
                "price": 4800.0,
                "discount": 8.0,
                "order": 29
            },
            {
                "pse_id": 66,
                "product": {
                    "pk": 654,
                    "name": "Parai",
                    "category": "Aliquet Lobortis Ltd",
                    "quantity": 8534,
                    "identifier": "PROD26",
                    "location": "Burhaniye",
                    "description": "Kannan musical instruments Parai 15" inch (Baffallow skin) Daf Instrument",
                    "prod_id": 654
                },
                "quantity": 35,
                "price": 6000.0,
                "discount": 10.0,
                "order": 29
            }
        ]
    },
    "shippingaddress": {
        "name": "Harding Gross",
        "address": "8798 At, St., 7639",
        "city": "Rome",
        "phone": "936 651-4847",
        "state": "Lazio",
        "country": "Italy",
        "post": "300326"
    }
}
class Meta
model
fields = ['company', 'so', 'shippingaddress']
company
so
shippingaddress
InvManage.views.create_sales_order_view(request)

Creates a sales order (SO) on POST request, and returns a SO creation form on GET request.

GET /sales_order

Gets the sales order creation form.

Example request:

GET /sales_order/ HTTP/1.1
Host: localhost:8000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Request Headers
  • Accept – text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Status Codes
  • 200 OK – Sales order creation form received successfully.

POST /sales_order

Creates a sales order.

Example request:

POST /sales_order/ HTTP/1.1
Host: localhost:8000
Content-Type: multipart/form-data;
Form Parameters
  • so-consumer5

  • consumer-nameThe Music Store

  • consumer-identifierCONS1256

  • consumer-gstin89ACC654654335

  • consumer-phone+91 8325642358

  • consumer-addressPlot no 958, N- 4, Neo Complex, Barh, Wokha, Nagaland, 797111

  • consumer-emailJohnDoe@themusic.store

  • consumer-locationWokha

  • so-so465

  • so-date2021-09-30

  • so-tax12

  • so-discount8

  • so-paid4500

  • so-balance1200

  • ship-titleFingDocks

  • ship-nameHarding Gross

  • ship-phone936 651-4847

  • ship-address8798 At, St., 7639

  • ship-cityRome

  • ship-stateLazio

  • ship-countryItaly

  • ship-websitehttp://fringdocs.com

  • ship-post300326

  • so-subtotal94600.00

  • so-taxtotal7568.00

  • so-ordertotal102168.00

  • form-TOTAL_FORMS2

  • form-INITIAL_FORMS0

  • form-MIN_NUM_FORMS

  • form-MAX_NUM_FORMS

  • form-0-product645

  • form-0-quantity450

  • form-0-price120

  • form-0-discount10

  • form-0-DELETE

  • form-0-pse_id-1

  • form-1-product654

  • form-1-quantity500

  • form-1-price100

  • form-1-discount8

  • form-1-DELETE

  • form-1-pse_id-1

Response Headers
  • Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv

Status Codes
InvManage.views.update_sales_order_view(request)

Updates a sales order on POST request and returns the sales order update form for GET request.

GET /sales_order/update

Gets the sales order update form whose primary key matches the query parameter pk.

Example request:

GET /sales_order/update HTTP/1.1
Host: localhost:8000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Query Parameters
  • pk – The primary key of the sales order.

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Request Headers
  • Accept – text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Status Codes
  • 200 OK – Sales order update form received successfully.

POST /sales_order/update

Updates the sales order.

Example request:

POST /sales_order/update HTTP/1.1
Host: localhost:8000
Content-Type: multipart/form-data;
Form Parameters
  • pk30

  • so-consumer7

  • consumer-nameThe Music Store

  • consumer-identifierCONS1256

  • consumer-gstin89AAC4633353643

  • consumer-phone+91 8325642358

  • consumer-addressPlot no 958, N- 4, Neo Complex, Barh, Wokha, Nagaland, 797111

  • consumer-emailJohnDoe@themusic.store

  • consumer-locationWokha

  • so-so465

  • so-date2021-09-30

  • so-tax10

  • so-discount8.0

  • so-paid4500.0

  • so-balance1200.0

  • ship-titleFingDocks

  • ship-nameHarding Gross

  • ship-phone936 651-4847

  • ship-address8798 At, St., 7639

  • ship-cityRome

  • ship-stateLazio

  • ship-countryItaly

  • ship-websitehttp://fringdocs.com

  • ship-post300326

  • so-subtotal94600.0

  • so-taxtotal7568.0

  • so-ordertotal102168.0

  • form-TOTAL_FORMS2

  • form-INITIAL_FORMS2

  • form-MIN_NUM_FORMS

  • form-MAX_NUM_FORMS

  • form-0-product645

  • form-0-quantity450

  • form-0-price120

  • form-0-discount10

  • form-0-DELETE

  • form-0-pse_id67

  • form-1-product654

  • form-1-quantity500

  • form-1-price100

  • form-1-discount8

  • form-1-DELETE

  • form-1-pse_id68

Response Headers
  • Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv

Status Codes
InvManage.views.delete_sales_order_view(request, pk)

Deletes the sales order with primary key object_id on POST request.

POST /sales_order/<str:object_id>/delete

Deletes the sales order represented by the primary key object_id.

Example request:

POST /sales_order/30/delete HTTP/1.1
Host: localhost:8000
Content-Type: application/x-www-form-urlencoded
Parameters
  • object_id – Sales order primary key.

Response Headers
Status Codes
InvManage.views.display_sales_orders_view(request)

Retrieves the list of sales orders on GET request.

GET /sales_orders/

Gets the list of all sales orders.

Example request:

GET /sales_orders/ HTTP/1.1
Host: localhost:8000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Form Parameters
  • page – The page number of the sales order list.

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Request Headers
  • Accept – text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Status Codes
  • 200 OK – List of sales orders received successfully.

InvManage.views.print_sales_order_view(request, pk)

Opens the sales order with primary key so_id for printing on GET request.

POST /purchase_order/<str:so_id>/print

Opens the sales order represented by the primary key so_id.

Example request:

POST /sales_order/182/print HTTP/1.1
Host: localhost:8000
Content-Type: application/x-www-form-urlencoded

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json; charset=utf-8

[
    {
        "company": {
            "name": "Fringillami",
            "owner": "Ivor Barnett",
            "gstin": "89AAC056465468",
            "phone": "332 220-7026",
            "address": "Ap #849-6241 Euismod Av., 677598, Carinthia, Belgium",
            "email": "est.tempor@fringillami.org",
            "location": "Belgium",
            "image": "/media/images/hyperlink-green_x91WW5n.png"
        },
        "so": {
            "consumer": {
                "name": "The Music Store",
                "identifier": "CONS1256",
                "gstin": "89AAC4633353643",
                "phone": "+91 8325642358",
                "address": "Plot no 958, N- 4, Neo Complex, Barh, Wokha, Nagaland, 797111",
                "email": "JohnDoe@themusic.store",
                "location": "Wokha"
            },
            "date": "2021-09-25T00:00:00Z",
            "so": 89,
            "subtotal": 744900.0,
            "taxtotal": 59592.0,
            "ordertotal": 804492.0,
            "pses": [
                {
                    "pse_id": 64,
                    "product": {
                        "pk": 637,
                        "name": "piano",
                        "category": "Ultricies PC",
                        "quantity": 23921,
                        "identifier": "PROD9",
                        "location": "Musselburgh",
                        "description": "88-key, Tri-sensor Scaled Hammer Action Keyboard II, Simulated ebony and ivory keys ",
                        "prod_id": 637
                    },
                    "quantity": 50,
                    "price": 9900.0,
                    "discount": 10.0,
                    "order": 29
                },
                {
                    "pse_id": 65,
                    "product": {
                        "pk": 649,
                        "name": "Sabar",
                        "category": "Amet Consulting",
                        "quantity": 3903,
                        "identifier": "PROD21",
                        "location": "Serang",
                        "description": "High Sierra Sabar, Travel bag, Blue, Grey, Zipper, 36.5 L, 51.5 cm, 26 cm ",
                        "prod_id": 649
                    },
                    "quantity": 25,
                    "price": 4800.0,
                    "discount": 8.0,
                    "order": 29
                },
                {
                    "pse_id": 66,
                    "product": {
                        "pk": 654,
                        "name": "Parai",
                        "category": "Aliquet Lobortis Ltd",
                        "quantity": 8534,
                        "identifier": "PROD26",
                        "location": "Burhaniye",
                        "description": "Kannan musical instruments Parai 15" inch (Baffallow skin) Daf Instrument",
                        "prod_id": 654
                    },
                    "quantity": 35,
                    "price": 6000.0,
                    "discount": 10.0,
                    "order": 29
                }
            ]
        },
        "shippingaddress": {
            "name": "Harding Gross",
            "address": "8798 At, St., 7639",
            "city": "Rome",
            "phone": "936 651-4847",
            "state": "Lazio",
            "country": "Italy",
            "post": "300326"
        }
    }
]
Parameters
  • so_id – Sales order primary key.

Response Headers
Status Codes
class InvManage.views.ProductBasicInfoForm

Bases: django.forms.Form

Form for basic product information.

name

Name of the product.

Type

str

item_type

Type of the product.

Type

str

category

Product category.

Type

str

description

Short description of the product.

Type

str

prefix = basic
context
name
item_type
category
description
class InvManage.views.ProductDetailedInfoForm

Bases: django.forms.Form

Form for product physical details

length

Length of the product.

Type

str

width

Width of the product.

Type

str

height

Height of the product.

Type

str

weight

Weight of the product.

Type

str

prefix = detailed
context
length
width
height
weight
class InvManage.views.ProductPricingForm

Bases: django.forms.Form

Form for pricing information of the product.

price

Price of the product.

Type

float

discount

Default discount percentage on the product.

Type

float

prefix = pricing
context
price
discount
class InvManage.views.ProductPurchaseEntryForm

Bases: django.forms.Form

Form for product purchase entry.

ppe_id

Unique identifier of the product purchase entry.

Type

int

product

Product associated wit the product purchase entry.

Type

Product

quantity

Quantity of the product to be ordered.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product purchase.

Type

float

prefix = form
context
ppe_id
product
quantity
price
discount
class InvManage.views.ProductSalesEntryForm

Bases: django.forms.Form

Form for product sales entry.

pse_id

Unique identifier of the product sales entry.

Type

int

product

Product associated with the product sales entry.

Type

Product

quantity

Quantity of the product.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product.

Type

float

prefix = form
context
pse_id
product
quantity
price
discount
class InvManage.views.ProductStatusForm

Bases: django.forms.Form

Form for locating and identifying the product.

quantity

Stock quantity of the product.

Type

int

identifier

Unique identifier of the product.

Type

str

location

Physical location of the product.

Type

str

context
prefix = status
quantity
identifier
location
class InvManage.views.ProductStorageInfoForm

Bases: django.forms.Form

Form for storage information.

barcode

Barcode of the product.

Type

str

expiry

Expiry date of the product.

Type

DateField

prefix = storage
barcode
context
expiry
class InvManage.views.PurchaseOrderBasicInfo

Bases: django.forms.Form

Form for basic information of the purchase order.

vendor

Vendor associated with the purcahse order.

Type

Vendor

date

Date of the purchase order creation.

Type

DateField

po

Purchase order number.

Type

int

discount

Percentage of overall discount.

Type

float

tax

Percentage of tax.

Type

float

paid

Amount paid to the vendor.

Type

float

balance

Balance amount to be paid to the vendor.

Type

float

subtotal

Total of all the product purchase entries associated with the purchase order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the purchase order including taxtotal.

Type

float

prefix = po
context
product_choices
vendor_choices
vendor
date
po
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
class InvManage.views.GRNInfo

Bases: django.forms.Form

Form for goods receipt note (GRN).

vendor

Vendor associated with the goods receipt note.

Type

Vendor

poRef

List of identifiers of the purchase orders from which the goods receipt note is derived.

Type

PurchaseOrder

identifier

Unique identifier of the goods receipt note.

Type

str

date

Date of GRN creation.

Type

DateField

grnType

Type of GRN (auto or manual).

Type

str

amendNumber

Amendment number of the GRN.

Type

int

amendDate

Amendment date.

Type

DateField

transporter

Name of the transport/shipping service.

Type

str

vehicleNumber

Vehicle number using which the products are shipped.

Type

str

gateInwardNumber

Gate inward number of the vehicle.

Type

str

preparedBy

Name/identifier of the person who created the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who validated the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who inspected the physical products in the goods receipt note.

Type

str

approvedBy

Name/identifier of the authority who approved the goods receipt note.

Type

str

prefix = grn
context
product_choices
vendor_choices
vendor
TYPE_CHOICES = [['manual', 'Blank'], ['auto', 'PO Reference']]
poRef
identifier
date
grnType
amendNumber
amendDate
transporter
vehicleNumber
gateInwardNumber
preparedBy
checkedBy
inspectedBy
approvedBy
class InvManage.views.GRNEntryForm

Bases: django.forms.Form

Form for goods receipt note entry (GRNE).

product

Product associated with the goods receipt note entry.

Type

Product

grne_id

Unique identifier of the GRNE.

Type

int

ppe_id

Unique identifier of the product purchase entry associated with the GRNE.

Type

int

quantity

Ordered quantity of product with reference to product purchase entry.

Type

int

remark

Remarks of the quality engineer or the GRN creator about status of products received.

Type

str

receivedQty

Quantity of product received against the ordered quantity.

Type

str

acceptedQty

Quantity of product accepted as OK.

Type

str

rejectedQty

Quantity of product rejected (not OK, on HOLD, extra delivery, etc.)

Type

str

prefix = form
context
product
grne_id
ppe_id
quantity
remark
receivedQty
acceptedQty
rejectedQty
class InvManage.views.ThumbnailForm

Bases: django.forms.Form

For for product thumbnail image.

image

Image of the product.

Type

ImageField

prefix = thumbnail
image
class InvManage.views.SalesOrderBasicInfo

Bases: django.forms.Form

Form for basic information on sales order.

consumer

Consumer associated with the sales order.

Type

Consumer

date

Date of the sales order creation.

Type

DateField

so

Sales order number.

Type

int

discount

Percentage discount associated with the sales order.

Type

float

tax

Percentage of tax applicable.

Type

float

paid

Amount received from the consumer.

Type

float

balance

Amount balance with the consumer.

Type

float

subtotal

Total of all the product sales entries associated with the sales order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the sales order including taxtotal.

Type

float

prefix = so
context
product_choices
consumer_choices
consumer
date
so
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
class InvManage.views.ShippingAddressForm

Bases: django.forms.Form

For for shipping address.

title

Title of the firm.

Type

str

name

Name of the firm.

Type

str

phone

Contact number of the firm.

Type

str

address

Postal address.

Type

str

city

City.

Type

str

state

State.

Type

str

country

Country.

Type

str

website

Official website of the firm.

Type

URLField

post

Postal code of the firm.

Type

str

prefix = ship
context
title
name
phone
address
city
state
country
website
post
class InvManage.views.VendorForm

Bases: django.forms.Form

Form for basic informaion of the vendor.

name

Name of the vendor.

Type

str

identifier

Unique identifier of the vendor.

Type

str

gstin

GSTIN number of the vendor.

Type

str

prefix = vend
context
name
identifier
gstin
class InvManage.views.ConsumerForm

Bases: django.forms.Form

Form for consumer.

name

Name of the consumer.

Type

str

identifier

Unique identifier of the consumer.

Type

str

gstin

GSTIN number of the consumer.

Type

str

phone

Contact number.

Type

str

address

Address of the consumer.

Type

str

email

E-mail address of the consumer.

Type

str

location

City of the consumer.

Type

str

prefix = consumer
context
name
identifier
gstin
phone
address
email
location
class InvManage.views.CompanyForm

Bases: django.forms.Form

Form for company.

name

Name of the company.

Type

str

owner

Name of the owner of the company.

Type

str

gstin

GSTIN number of the company.

Type

str

phone

Contact number of the company.

Type

str

address

Postal address.

Type

str

email

E-mail address of the contact person.

Type

str

location

City of the company.

Type

str

prefix = comp
context
name
owner
gstin
phone
address
email
location
class InvManage.views.HistoryForm

Bases: django.forms.Form

Form for history view.

qlen

Count of the events visible on the history view.

Type

int

prefix = history
context
qlen
class InvManage.views.CommunicationForm

Bases: django.forms.Form

Form for communication information.

language

Language of communication.

Type

str

phone

Contact number of the firm.

Type

str

email

E-mail of the contact person.

Type

EmailField

fax

Fax number.

Type

str

prefix = com
context
language
phone
email
fax
class InvManage.views.PurchaseDataForm

Bases: django.forms.Form

Form for purchase related data.

currency

Currency of purchase.

Type

str

minorder

Minimum order quantity.

Type

int

contactperson

Name of the contact person.

Type

str

refcode

Reference code.

Type

str

transportmode

Mode of transport of the shipment.

Type

str

prefix = pdform
context
currency
minorder
contactperson
refcode
transportmode
class InvManage.views.BankAccountForm

Bases: django.forms.Form

Form for bank account details.

name

Name of the bank.

Type

str

branch

Branch number of the bank.

Type

str

region

City in which the branch is located.

Type

str

route

Transit number.

Type

str

number

Bank account number.

Type

int

acctype

Type of bank account.

Type

str

iban

IBAN number.

Type

str

code

Bank code.

Type

str

branchcode

Branch code.

Type

str

prefix = bank
context
name
branch
region
route
number
acctype
iban
code
branchcode
class InvManage.views.Product

Bases: django.db.models.Model

Model of the product.

name

Name of the product.

Type

str

category

Product category.

Type

str

item_type

Type of the product.

Type

str

description

Short description of the product.

Type

str

price

Price of the product.

Type

float

quantity

Stock quantity of the product.

Type

int

identifier

Unique identifier of the product.

Type

str

location

Physical location of the product.

Type

str

length

Length of the product.

Type

str

width

Width of the product.

Type

str

height

Height of the product.

Type

str

weight

Weight of the product.

Type

str

discount

Default discount percentage on the product.

Type

float

barcode

Barcode of the product.

Type

str

expiry

Expiry date of the product.

Type

DateField

image

Image of the product.

Type

ImageField

name
category
item_type
description
price
quantity
identifier
location
length
width
height
weight
discount
barcode
expiry
image
__str__(self)
class InvManage.views.ProductPurchaseEntry

Bases: django.db.models.Model

Model of the product purchase entry.

product

Product associated wit the product purchase entry.

Type

ModelChoiceField

quantity

Quantity of the product to be ordered.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product purchase.

Type

float

order

Referenced purchase order.

Type

PurchaseOrder

receivedQty

Quantity of product received against the ordered quantity.

Type

str

acceptedQty

Quantity of product accepted as OK.

Type

str

rejectedQty

Quantity of product rejected (not OK, on HOLD, extra delivery, etc.)

Type

str

is_complete()

Returns the completion status (boolean).

pending_quantity()

Returns the pending quantity against the entry (int).

product
quantity
price
discount
order
receivedQty
acceptedQty
rejectedQty
is_complete(self)
property pending_quantity(self)
class InvManage.views.GRNEntry

Bases: django.db.models.Model

Model of the goods receipt note entry (GRNE).

product

Primary key of the Product instance associated with the goods receipt note entry.

Type

Product

quantity

Ordered quantity of product with reference to product purchase entry.

Type

int

grne

Primary key of the GoodsReceiptNote instance.

Type

int

ppe

Primary key of the ProductPurchaseEntry instance associated with the GRNE.

Type

int

remark

Remarks of the quality engineer or the GRN creator about status of products received.

Type

str

receivedQty

Quantity of product received against the ordered quantity.

Type

str

acceptedQty

Quantity of product accepted as OK.

Type

str

rejectedQty

Quantity of product rejected (not OK, on HOLD, extra delivery, etc.)

Type

str

product
quantity
grn
ppes
remark
receivedQty
acceptedQty
rejectedQty
class InvManage.views.ProductSalesEntry

Bases: django.db.models.Model

Model of the product sales entry.

product

Primary key of the Product associated with the product sales entry.

Type

Product

quantity

Quantity of the product.

Type

int

price

Price of the product.

Type

float

discount

Percentage discount on the product.

Type

float

order

Primary key of the SalesOrder referenced by the entry.

Type

SalesOrder

product
quantity
price
discount
order
class InvManage.views.SalesOrder

Bases: django.db.models.Model

Model of the sales order.

consumer

Consumer associated with the sales order.

Type

ModelChoiceField

date

Date of the sales order creation.

Type

DateField

so

Sales order number.

Type

int

discount

Percentage discount associated with the sales order.

Type

float

tax

Percentage of tax applicable.

Type

float

paid

Amount received from the consumer.

Type

float

balance

Amount balance with the consumer.

Type

float

subtotal

Total of all the product sales entries associated with the sales order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the sales order including taxtotal.

Type

float

consumer
date
so
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
class InvManage.views.PurchaseOrder

Bases: django.db.models.Model

Model of the purchase order.

vendor

Vendor associated with the purchase order.

Type

Vendor

date

Date and time of the purchase order creation.

Type

DateField

po

Purchase order number.

Type

int

discount

Percentage discount.

Type

float

tax

Percentage of tax applicable for the purchase.

Type

float

paid

Amount paid against the PO.

Type

float

balance

Amount balance which remains to be paid.

Type

float

subtotal

Total of all the product purchase entries associated with the purchase order.

Type

float

taxtotal

Total tax applicable on the subtotal.

Type

float

ordertotal

Total price of the purchase order including taxtotal.

Type

float

is_complete()

Returns the completion status (boolean).

pending_ppes()

Returns list of product purchase entries which are not completed.

vendor
date
po
discount
tax
paid
balance
subtotal
taxtotal
ordertotal
is_complete(self)
pending_ppes(self)
class InvManage.views.GoodsReceiptNote

Bases: django.db.models.Model

Model of the goods receipt note (GRN).

vendor

Vendor associated with the goods receipt note.

Type

ModelChoiceField

poRef

List of identifiers of the purchase orders from which the goods receipt note is derived.

Type

MultipleChoiceField

identifier

Unique identifier of the goods receipt note.

Type

str

date

Date of GRN creation.

Type

DateField

grnType

Type of GRN (auto or manual).

Type

ChoiceField

amendNumber

Amendment number of the GRN.

Type

int

amendDate

Amendment date.

Type

DateField

transporter

Name of the transport/shipping service.

Type

str

vehicleNumber

Vehicle number using which the products are shipped.

Type

str

gateInwardNumber

Gate inward number of the vehicle.

Type

str

preparedBy

Name/identifier of the person who created the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who validated the goods receipt note.

Type

str

checkedBy

Name/identifier of the person who inspected the physical products in the goods receipt note.

Type

str

approvedBy

Name/identifier of the authority who approved the goods receipt note.

Type

str

TYPE_CHOICES = [['manual', 'Blank'], ['auto', 'PO Reference']]
vendor
poRef
identifier
date
grnType
amendNumber
amendDate
transporter
vehicleNumber
gateInwardNumber
preparedBy
checkedBy
inspectedBy
approvedBy
class InvManage.views.Consumer

Bases: django.db.models.Model

Model of the consumer.

name

Name of the consumer.

Type

str

identifier

Unique identifier of the consumer.

Type

str

gstin

GSTIN number of the consumer.

Type

str

phone

Contact number.

Type

str

address

Address of the consumer.

Type

str

email

E-mail address of the consumer.

Type

str

location

City of the consumer.

Type

str

Returns

[description]

Return type

[type]

name
identifier
gstin
phone
address
email
location
__str__(self)
class InvManage.views.Vendor

Bases: django.db.models.Model

Model of the vendor.

name

Name of the vendor.

Type

str

identifier

Unique identifier of the vendor.

Type

str

gstin

GSTIN number of the vendor.

Type

str

address

Primary key of the ShippingAddress instance associated with the vendor.

Type

ShippingAddress

communication

Primary key of the Communication instance associated with the vendor.

Type

Communication

backaccount

Primary key of the BankAccount instance associated with the vendor.

Type

BankAccount

purchasedata

Primary key of the PurchaseData instance associated with the vendor.

Type

PurchaseData

Returns

String representation of the vendor name.

Return type

str

name
identifier
gstin
address
communication
bankaccount
purchasedata
__str__(self)
class InvManage.views.Company

Bases: django.db.models.Model

Model of the company.

name

Name of the company.

Type

str

owner

Owner of the company.

Type

str

gstin

GSTIN number of the company.

Type

str

phone

Contact number.

Type

str

address

Postal address.

Type

str

email

E-mail address of the contact person.

Type

str

location

City of the company.

Type

str

image

Photo/logo of the company.

Type

ImageField

shippingaddress

Primary key of the ShippingAddress instance associated with the company.

Type

ShippingAddress

Returns

String representation of the company name.

Return type

str

name
owner
gstin
phone
address
email
location
image
shippingaddress
__str__(self)
class InvManage.views.PurchaseInvoice

Bases: django.db.models.Model

Model for the purchase invoice.

company

Primary key of the Company.

Type

Company

po

Primary key of the PurchaseOrder.

Type

PurchaseOrder

shippingaddress

Primary key of the ShippingAddress.

Type

ShippingAddress

communication

Primary key of the Communication.

Type

Communication

company
po
shippingaddress
communication
class InvManage.views.SalesInvoice

Bases: django.db.models.Model

Model for the sales order invoice.

company

Primary key of the Company.

Type

Company

so

Primary key of the SalesOrder.

Type

SalesOrder

shippingaddress

Primary key of the ShippingAddress.

Type

ShippingAddress

company
so
shippingaddress
class InvManage.views.FilterState

Bases: django.db.models.Model

Model of the filter state.

name

Name of the filter state.

Type

str

name
class InvManage.views.FilterColumn

Bases: django.db.models.Model

Model of the column state.

name

Name of the column.

Type

str

label

Label of the column.

Type

str

visible

Visibility flag.

Type

bool

position

Index of the column.

Type

int

state

Primary key of the FilterState instance being referenced by the column instance.

Type

FilterState

name
label
visible
position
state
class InvManage.views.Object

Bases: django.db.models.Model

Model for a generic object.

identifier

Unique identifier of the object.

Type

str

name

Name of the object.

Type

str

model

Model associated with the object.

Type

str

identifier
name
model
class InvManage.views.EventCard

Bases: django.db.models.Model

Model for event card to be displayed in the history view.

obj

Object associated with the event.

Type

OneToOneField

objId

Unique identifier of the object.

Type

str

objname

Name of the object.

Type

str

objmodel

Model of the object.

Type

str

date

Timestamp of the event.

Type

DateField

operation

Type of event.

Type

str

obj
objId
objname
objmodel
date
operation
class InvManage.views.EventType

Bases: django.db.models.Model

Model for event type.

name

Name of the event being triggered.

Type

str

label

Label associated with the event.

Type

str

Returns

Returns the string representation of the label when the event type is queried.

Return type

Label

name
label
__str__(self)
class InvManage.views.ObjectModel

Bases: django.db.models.Model

Model associated with an object.

name

Name of the object.

Type

str

label

Label string of the object.

Type

str

modName

Name of the model associated with the object.

Type

str

Returns

Returns string representation of the label when object model is queried.

Return type

Label

name
label
modName
__str__(self)
class InvManage.views.HistoryFilterState

Bases: django.db.models.Model

Model of filter state of the history.

params

Paramameters of the configured filters.

Type

str

params
class InvManage.views.ShippingAddress

Bases: django.db.models.Model

Model of the shipping address.

title

Title of the firm.

Type

str

name

Name of the firm.

Type

str

phone

Contact number of the firm.

Type

str

address

Postal address.

Type

str

city

City.

Type

str

state

State.

Type

str

country

Country.

Type

str

website

Official website of the firm.

Type

URLField

post

Postal code of the firm.

Type

str

title
name
phone
address
city
state
country
website
post
class InvManage.views.PurchaseData

Bases: django.db.models.Model

Model of the purchase data.

currency

Currency of purchase.

Type

str

minorder

Minimum order quantity.

Type

int

contactperson

Name of the contact person.

Type

str

refcode

Reference code.

Type

str

transportmode

Mode of transport of the shipment.

Type

str

currency
minorder
contactperson
refcode
transportmode
class InvManage.views.Communication

Bases: django.db.models.Model

Model of the communication information.

language

Language of communication.

Type

str

phone

Contact number of the firm.

Type

str

email

E-mail of the contact person.

Type

EmailField

fax

Fax number.

Type

str

language
phone
email
fax
class InvManage.views.BankAccount

Bases: django.db.models.Model

Model of the bank account details.

name

Name of the bank.

Type

str

branch

Branch number of the bank.

Type

str

region

City in which the branch is located.

Type

str

route

Transit number.

Type

str

number

Bank account number.

Type

int

acctype

Type of bank account.

Type

str

iban

IBAN number.

Type

str

code

Bank code.

Type

str

branchcode

Branch code.

Type

str

name
branch
region
route
number
acctype
iban
code
branchcode
InvManage.views.get_columns(state)

Gets the columns of the display table.

This function takes a filter state and returns an array of column names that are ordered depending on the position attribute of the columns. This order is important as the queryset will be rendered in the display table according to the column order in this returned array.

Parameters

state (FilterState) – Filter state of the columns.

Returns

A list that dictates the order of the columns.

Return type

List

InvManage.views.sort_ascending_descending(request, model)

Sorts and saves the state of the column.

This function takes a request, finds which column needs to be sorted in ascending/descending order, and returns the sorted queryset.

Parameters
  • request (HttpRequest) – GET request received for retreiving the list of model instances.

  • model (Model) – Model of the objects being retrieved.

Returns

List of sorted object instances.

Return type

QuerySet

InvManage.views.change_column_position(request, state)

Modifies the column states depending on the request.

This function:
  • Takes a filter state

  • Extracts the column names into an order array

  • Modifies the column order in the array depending on user input direction (left/right)

  • Saves this modified state of columns into the database

  • Returns the modified column names array

Parameters
  • request (HttpRequest) – GET request for retrieving the state of the columns.

  • state (FilterState) – Filter state of the columns.

Returns

List of sorted columns.

Return type

List

InvManage.views.paginate(queryset, filter, page_number)

Paginates the list of objects.

This function takes the entire queryset and filters out only objects belonging to the request page

Parameters
  • queryset (QuerySet) – QuerySet of the objects retrieved from the database.

  • filter (FilterState) – Filter state of the columns.

  • page_number (int) – Page number requested.

class InvManage.views.EventCard

Bases: django.db.models.Model

Model for event card to be displayed in the history view.

obj

Object associated with the event.

Type

OneToOneField

objId

Unique identifier of the object.

Type

str

objname

Name of the object.

Type

str

objmodel

Model of the object.

Type

str

date

Timestamp of the event.

Type

DateField

operation

Type of event.

Type

str

obj
objId
objname
objmodel
date
operation
class InvManage.views.HistoryFilterState

Bases: django.db.models.Model

Model of filter state of the history.

params

Paramameters of the configured filters.

Type

str

params
class InvManage.views.EventCardFilter

Bases: django_filters.FilterSet

class Meta
model
fields
context
MODEL_CHOICES = [['Company', 'Company'], ['Vendor', 'Vendor'], ['PurchaseOrder', 'Purchase Order'], ['Product',...
OPERATION_CHOICES = [['Created', 'Created'], ['Updated', 'Updated'], ['Deleted', 'Deleted']]
objname
objmodel
date__gt
date__lt
operation
class InvManage.views.HistoryFilterStateSerializer

Bases: rest_framework.serializers.ModelSerializer

Serializer for HistoryFilterState class instance.

The HistoryFilterStateSerializer.data attribute gives the JSON serialized data of the HistoryFilterState instance:

{
    "name": PreRelease20x,
    "numEntries" : 10,
    "eventTypes": {
        "Created",
        "Updated",
        "Deleted"
    },
    "objModels": {
        "Company",
        "Vendor",
        "PurchaseOrder",
        "Product",
        "Consumer",
        "SalesOrder",
        "GoodsReceiptNote"
    }
}
class Meta
model
fields = ['name', 'numEntries', 'eventTypes', 'objModels']
events
objModels
update(self, instance, validated_data)
class InvManage.views.HistoryForm

Bases: django.forms.Form

Form for history view.

qlen

Count of the events visible on the history view.

Type

int

prefix = history
context
qlen
InvManage.views.display_history_view(request)

Retrieves the list of events on GET request. The create, update, and delete events are registered for each model.

GET /history/

Gets the list of all history items.

Example request:

GET /history/ HTTP/1.1
Host: localhost:8000
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

[
    {
        "objname": {
            ""
        },
        "operation": {
            "Created",
            "Updated",
            "Deleted"
        },
        "objmodel": {
            "Company",
            "Vendor",
            "PurchaseOrder",
            "Product",
            "Consumer",
            "SalesOrder",
            "GoodsReceiptNote"
        },
        "history-qlen": {
            "10"
        },
        "date__gt": {
            "11/01/2020"
        },
        "date__lt": {
            "09/26/2021"
        }
    }
]

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/html; charset=utf-8
Request Headers
  • Accept – text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

Status Codes
  • 200 OK – List of filtered history events received successfully.