InvManage.views
Submodules
Package Contents
Classes
Form for basic product information. |
|
Form for product physical details |
|
Form for pricing information of the product. |
|
Form for product purchase entry. |
|
Form for product sales entry. |
|
Form for locating and identifying the product. |
|
Form for storage information. |
|
Form for basic information of the purchase order. |
|
Form for goods receipt note (GRN). |
|
Form for goods receipt note entry (GRNE). |
|
For for product thumbnail image. |
|
Form for basic information on sales order. |
|
For for shipping address. |
|
Form for basic informaion of the vendor. |
|
Form for consumer. |
|
Form for company. |
|
Form for history view. |
|
Form for communication information. |
|
Form for purchase related data. |
|
Form for bank account details. |
|
Model of the product. |
|
Model of the product purchase entry. |
|
Model of the goods receipt note entry (GRNE). |
|
Model of the product sales entry. |
|
Model of the sales order. |
|
Model of the purchase order. |
|
Model of the goods receipt note (GRN). |
|
Model of the consumer. |
|
Model of the vendor. |
|
Model of the company. |
|
Model for the purchase invoice. |
|
Model for the sales order invoice. |
|
Model of the filter state. |
|
Model of the column state. |
|
Model for a generic object. |
|
Model for event card to be displayed in the history view. |
|
Model for event type. |
|
Model associated with an object. |
|
Model of filter state of the history. |
|
Model of the shipping address. |
|
Model of the purchase data. |
|
Model of the communication information. |
|
Model of the bank account details. |
|
Serializer for |
|
Serializer for |
|
Serializer for |
|
Serializer for |
|
Serializer for |
|
Serializer for |
|
Serializer for |
|
Model for the goods receipt note invoice. |
|
Form for basic product information. |
|
Form for product physical details |
|
Form for pricing information of the product. |
|
Form for product purchase entry. |
|
Form for product sales entry. |
|
Form for locating and identifying the product. |
|
Form for storage information. |
|
Form for basic information of the purchase order. |
|
Form for goods receipt note (GRN). |
|
Form for goods receipt note entry (GRNE). |
|
For for product thumbnail image. |
|
Form for basic information on sales order. |
|
For for shipping address. |
|
Form for basic informaion of the vendor. |
|
Form for consumer. |
|
Form for company. |
|
Form for history view. |
|
Form for communication information. |
|
Form for purchase related data. |
|
Form for bank account details. |
|
Model of the product. |
|
Model of the product purchase entry. |
|
Model of the goods receipt note entry (GRNE). |
|
Model of the product sales entry. |
|
Model of the sales order. |
|
Model of the purchase order. |
|
Model of the goods receipt note (GRN). |
|
Model of the consumer. |
|
Model of the vendor. |
|
Model of the company. |
|
Model for the purchase invoice. |
|
Model for the sales order invoice. |
|
Model of the filter state. |
|
Model of the column state. |
|
Model for a generic object. |
|
Model for event card to be displayed in the history view. |
|
Model for event type. |
|
Model associated with an object. |
|
Model of filter state of the history. |
|
Model of the shipping address. |
|
Model of the purchase data. |
|
Model of the communication information. |
|
Model of the bank account details. |
|
Serializer for |
|
Serializer for |
|
Serializer for |
|
Form for basic product information. |
|
Form for product physical details |
|
Form for pricing information of the product. |
|
Form for product purchase entry. |
|
Form for product sales entry. |
|
Form for locating and identifying the product. |
|
Form for storage information. |
|
Form for basic information of the purchase order. |
|
Form for goods receipt note (GRN). |
|
Form for goods receipt note entry (GRNE). |
|
For for product thumbnail image. |
|
Form for basic information on sales order. |
|
For for shipping address. |
|
Form for basic informaion of the vendor. |
|
Form for consumer. |
|
Form for company. |
|
Form for history view. |
|
Form for communication information. |
|
Form for purchase related data. |
|
Form for bank account details. |
|
Model of the product. |
|
Model of the product purchase entry. |
|
Model of the goods receipt note entry (GRNE). |
|
Model of the product sales entry. |
|
Model of the sales order. |
|
Model of the purchase order. |
|
Model of the goods receipt note (GRN). |
|
Model of the consumer. |
|
Model of the vendor. |
|
Model of the company. |
|
Model for the purchase invoice. |
|
Model for the sales order invoice. |
|
Model of the filter state. |
|
Model of the column state. |
|
Model for a generic object. |
|
Model for event card to be displayed in the history view. |
|
Model for event type. |
|
Model associated with an object. |
|
Model of filter state of the history. |
|
Model of the shipping address. |
|
Model of the purchase data. |
|
Model of the communication information. |
|
Model of the bank account details. |
|
Serializer for |
|
Serializer for |
|
Form for basic product information. |
|
Form for product physical details |
|
Form for pricing information of the product. |
|
Form for product purchase entry. |
|
Form for product sales entry. |
|
Form for locating and identifying the product. |
|
Form for storage information. |
|
Form for basic information of the purchase order. |
|
Form for goods receipt note (GRN). |
|
Form for goods receipt note entry (GRNE). |
|
For for product thumbnail image. |
|
Form for basic information on sales order. |
|
For for shipping address. |
|
Form for basic informaion of the vendor. |
|
Form for consumer. |
|
Form for company. |
|
Form for history view. |
|
Form for communication information. |
|
Form for purchase related data. |
|
Form for bank account details. |
|
Model of the product. |
|
Model of the product purchase entry. |
|
Model of the goods receipt note entry (GRNE). |
|
Model of the product sales entry. |
|
Model of the sales order. |
|
Model of the purchase order. |
|
Model of the goods receipt note (GRN). |
|
Model of the consumer. |
|
Model of the vendor. |
|
Model of the company. |
|
Model for the purchase invoice. |
|
Model for the sales order invoice. |
|
Model of the filter state. |
|
Model of the column state. |
|
Model for a generic object. |
|
Model for event card to be displayed in the history view. |
|
Model for event type. |
|
Model associated with an object. |
|
Model of filter state of the history. |
|
Model of the shipping address. |
|
Model of the purchase data. |
|
Model of the communication information. |
|
Model of the bank account details. |
|
Serializer for |
|
Form for basic product information. |
|
Form for product physical details |
|
Form for pricing information of the product. |
|
Form for product purchase entry. |
|
Form for product sales entry. |
|
Form for locating and identifying the product. |
|
Form for storage information. |
|
Form for basic information of the purchase order. |
|
Form for goods receipt note (GRN). |
|
Form for goods receipt note entry (GRNE). |
|
For for product thumbnail image. |
|
Form for basic information on sales order. |
|
For for shipping address. |
|
Form for basic informaion of the vendor. |
|
Form for consumer. |
|
Form for company. |
|
Form for history view. |
|
Form for communication information. |
|
Form for purchase related data. |
|
Form for bank account details. |
|
Model of the product. |
|
Model of the product purchase entry. |
|
Model of the goods receipt note entry (GRNE). |
|
Model of the product sales entry. |
|
Model of the sales order. |
|
Model of the purchase order. |
|
Model of the goods receipt note (GRN). |
|
Model of the consumer. |
|
Model of the vendor. |
|
Model of the company. |
|
Model for the purchase invoice. |
|
Model for the sales order invoice. |
|
Model of the filter state. |
|
Model of the column state. |
|
Model for a generic object. |
|
Model for event card to be displayed in the history view. |
|
Model for event type. |
|
Model associated with an object. |
|
Model of filter state of the history. |
|
Model of the shipping address. |
|
Model of the purchase data. |
|
Model of the communication information. |
|
Model of the bank account details. |
|
Serializer for |
|
Form for basic product information. |
|
Form for product physical details |
|
Form for pricing information of the product. |
|
Form for product purchase entry. |
|
Form for product sales entry. |
|
Form for locating and identifying the product. |
|
Form for storage information. |
|
Form for basic information of the purchase order. |
|
Form for goods receipt note (GRN). |
|
Form for goods receipt note entry (GRNE). |
|
For for product thumbnail image. |
|
Form for basic information on sales order. |
|
For for shipping address. |
|
Form for basic informaion of the vendor. |
|
Form for consumer. |
|
Form for company. |
|
Form for history view. |
|
Form for communication information. |
|
Form for purchase related data. |
|
Form for bank account details. |
|
Model of the product. |
|
Model of the product purchase entry. |
|
Model of the goods receipt note entry (GRNE). |
|
Model of the product sales entry. |
|
Model of the sales order. |
|
Model of the purchase order. |
|
Model of the goods receipt note (GRN). |
|
Model of the consumer. |
|
Model of the vendor. |
|
Model of the company. |
|
Model for the purchase invoice. |
|
Model for the sales order invoice. |
|
Model of the filter state. |
|
Model of the column state. |
|
Model for a generic object. |
|
Model for event card to be displayed in the history view. |
|
Model for event type. |
|
Model associated with an object. |
|
Model of filter state of the history. |
|
Model of the shipping address. |
|
Model of the purchase data. |
|
Model of the communication information. |
|
Model of the bank account details. |
|
Serializer for |
|
Serializer for |
|
Serializer for |
|
Form for basic product information. |
|
Form for product physical details |
|
Form for pricing information of the product. |
|
Form for product purchase entry. |
|
Form for product sales entry. |
|
Form for locating and identifying the product. |
|
Form for storage information. |
|
Form for basic information of the purchase order. |
|
Form for goods receipt note (GRN). |
|
Form for goods receipt note entry (GRNE). |
|
For for product thumbnail image. |
|
Form for basic information on sales order. |
|
For for shipping address. |
|
Form for basic informaion of the vendor. |
|
Form for consumer. |
|
Form for company. |
|
Form for history view. |
|
Form for communication information. |
|
Form for purchase related data. |
|
Form for bank account details. |
|
Model of the product. |
|
Model of the product purchase entry. |
|
Model of the goods receipt note entry (GRNE). |
|
Model of the product sales entry. |
|
Model of the sales order. |
|
Model of the purchase order. |
|
Model of the goods receipt note (GRN). |
|
Model of the consumer. |
|
Model of the vendor. |
|
Model of the company. |
|
Model for the purchase invoice. |
|
Model for the sales order invoice. |
|
Model of the filter state. |
|
Model of the column state. |
|
Model for a generic object. |
|
Model for event card to be displayed in the history view. |
|
Model for event type. |
|
Model associated with an object. |
|
Model of filter state of the history. |
|
Model of the shipping address. |
|
Model of the purchase data. |
|
Model of the communication information. |
|
Model of the bank account details. |
|
Model for event card to be displayed in the history view. |
|
Model of filter state of the history. |
|
Serializer for |
|
Form for history view. |
Functions
|
Creates a product on |
|
Updates a product on |
|
Deletes the product with primary key |
|
Retrieves the list of products on |
|
Imports products into database from a |
|
Gets the columns of the display table. |
|
Sorts and saves the state of the column. |
|
Modifies the column states depending on the request. |
|
Paginates the list of objects. |
|
Creates a goods receipt note (GRN) on |
|
Updates the goods receipt note (GRN) on |
|
Deletes the GRN with primary key |
|
Retrieves the list of GRNs on |
|
Opens the GRN with primary key |
|
Gets the columns of the display table. |
|
Sorts and saves the state of the column. |
|
Modifies the column states depending on the request. |
|
Paginates the list of objects. |
|
Creates a purchase order (PO) on |
|
Updates a purchase order on |
|
Retrieves the list of purchase orders on |
|
Deletes the purchase order with primary key |
|
Opens the purchase order with primary key |
|
Returns the |
|
Gets the columns of the display table. |
|
Sorts and saves the state of the column. |
|
Modifies the column states depending on the request. |
|
Paginates the list of objects. |
|
Creates a company on |
|
Updates a company on |
|
Deletes the company with primary key |
|
Retrieves the list of companies on |
|
Gets the columns of the display table. |
|
Sorts and saves the state of the column. |
|
Modifies the column states depending on the request. |
|
Paginates the list of objects. |
|
Creates a vendor on |
|
Updates a vendor on |
|
Deletes the vendor with primary key |
|
Retrieves the list of vendors on |
|
Returns the |
|
Gets the columns of the display table. |
|
Sorts and saves the state of the column. |
|
Modifies the column states depending on the request. |
|
Paginates the list of objects. |
|
Creates a consumer on |
|
Updates a consuemr on |
|
Deletes the consumer with primary key |
|
Retrieves the list of consumers on |
|
Returns the |
|
Gets the columns of the display table. |
|
Sorts and saves the state of the column. |
|
Modifies the column states depending on the request. |
|
Paginates the list of objects. |
|
Creates a sales order (SO) on |
|
Updates a sales order on |
|
Deletes the sales order with primary key |
|
Retrieves the list of sales orders on |
|
Opens the sales order with primary key |
|
Gets the columns of the display table. |
|
Sorts and saves the state of the column. |
|
Modifies the column states depending on the request. |
|
Paginates the list of objects. |
|
Retrieves the list of events on |
- class InvManage.views.ProductFilter
Bases:
django_filters.FilterSet
- 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 onGET
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
- POST /product
Creates a product.
Example request:
POST /product/ HTTP/1.1 Host: localhost:8000 Content-Type: multipart/form-data;
- Form Parameters
basic-name –
Yamaha FS100C Acoustic Guitar
basic-item_type –
Black Acoustic Guitar
basic-category –
Musical Instrument
basic-description –
Top: Spruce back/sides, Mahogany neck, Nato fret board, Rosewood bridge, Snorkeling frets: 20, Open chrome tuners, Finishes: Black
detailed-length –
1056
detailed-width –
376
detailed-height –
140
detailed-weight –
3.2
storage-barcode –
036000029145
storage-expiry –
2040-09-29
status-quantity –
20
status-identifier –
FS100C
status-location –
BAY004
pricing-price –
9990
pricing-discount –
7
- Response Headers
Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv
- Status Codes
302 Found – Redirects to
/product
.
- InvManage.views.update_product_view(request)
Updates a product on
POST
request and returns the product update form onGET
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
- POST /product/update
Updates the product.
Example request:
POST /product/update HTTP/1.1 Host: localhost:8000 Content-Type: multipart/form-data;
- Form Parameters
pk –
778
basic-name –
Yamaha FS100C Acoustic Guitar
basic-item_type –
Black Acoustic Guitar
basic-category –
Musical Instrument
basic-description –
Top: Spruce back/sides, Mahogany neck, Nato fret board, Rosewood bridge, Snorkeling frets: 20, Open chrome tuners, Finishes: Black
detailed-length –
1056
detailed-width –
376
detailed-height –
140
detailed-weight –
3.2
storage-barcode –
036000029145
storage-expiry –
2040-09-29
status-quantity –
20
status-identifier –
FS100C
status-location –
BAY004
pricing-price –
9990
pricing-discount –
7
- Response Headers
Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv
- Status Codes
302 Found – Redirects to
/product
.
- InvManage.views.delete_product_view(request, pk)
Deletes the product with primary key
product_id
onPOST
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
Content-Type – application/x-www-form-urlencoded
- Status Codes
302 Found – Redirects to
/product
.500 Internal Server Error – Prodcut matching query does not exist.
- 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
- InvManage.views.uploadCSV(request, data)
Imports products into database from a
.csv
file onPOST
request. CSV template columns:name
,category
,item_type
,description
,price
,quantity
,identifier
,location
,length
,width
,height
,weight
,discount
,barcode
,expiry
.
- 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
- 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
- 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.
- 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).
- poRef
List of identifiers of the purchase orders from which the goods receipt note is derived.
- Type
- identifier
Unique identifier of the goods receipt note.
- Type
str
- date
Date of GRN creation.
- Type
DateField
- grnType
Type of GRN (
auto
ormanual
).- 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).
- 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.
- 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
- 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
- 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.
- 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
- 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.
- 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
ormanual
).- 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
- communication
Primary key of the
Communication
instance associated with the vendor.- Type
- backaccount
Primary key of the
BankAccount
instance associated with the vendor.- Type
- purchasedata
Primary key of the
PurchaseData
instance associated with the vendor.- Type
- 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
- 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.
- po
Primary key of the
PurchaseOrder
.- Type
- shippingaddress
Primary key of the
ShippingAddress
.- Type
- communication
Primary key of the
Communication
.- Type
- company
- po
- shippingaddress
- communication
- class InvManage.views.SalesInvoice
Bases:
django.db.models.Model
Model for the sales order invoice.
- so
Primary key of the
SalesOrder
.- Type
- shippingaddress
Primary key of the
ShippingAddress
.- Type
- 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
- 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
- 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 theJSON
serialized data of theGRNEntry
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 theJSON
serialized data of theGRNEntry
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 theJSON
serialized data of theGRNInvoice
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" } }
- company
- grn
- shippingaddress
- communication
- class InvManage.views.GoodsReceiptNoteSerializer
Bases:
rest_framework.serializers.ModelSerializer
Serializer for
GoodsReceiptNote
class instance.The
GoodsReceiptNoteSerializer.data
attribute gives theJSON
serialized data of theGoodsReceiptNote
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 theJSON
serialized data of theProductPurchaseEntry
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 theJSON
serialized data of theProduct
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 theJSON
serialized data of thePurchaseInvoice
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" } }
- company
- po
- shippingaddress
- communication
- class InvManage.views.GRNInvoice
Bases:
django.db.models.Model
Model for the goods receipt note invoice.
- grn
Primary key of the
GoodsReceiptNote
.- Type
- shippingaddress
Primary key of the
ShippingAddress
.- Type
- communication
Primary key of the
Communication
.- Type
- 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 onGET
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
- POST /grn
Creates a GRN. There are two modes: -
auto
: Settinggrn-grnType
toauto
creates a GRN with PO reference. -manual
: Settinggrn-grnType
tomanual
creates a GRN without PO reference. In this casethe
grn-poRef
is not required.Example request:
POST /consumer/ HTTP/1.1 Host: localhost:8000 Content-Type: multipart/form-data;
- Form Parameters
grn-grnType –
auto
grn-vendor –
4
grn-poRef –
182
grn-amendNumber –
546
grn-amendDate –
2021-09-29
grn-identifier –
846
grn-date –
2021-09-29
grn-transporter –
TeraTransport
grn-vehicleNumber –
GH-646358
grn-gateInwardNumber –
864353
grn-preparedBy –
KJL
grn-checkedBy –
KJH
grn-inspectedBy –
GIO
grn-approvedBy –
BHI
form-TOTAL_FORMS –
3
form-INITIAL_FORMS –
0
form-MIN_NUM_FORMS –
form-MAX_NUM_FORMS –
form-0-product –
637
form-0-quantity –
100
form-0-receivedQty –
50
form-0-acceptedQty –
50
form-0-rejectedQty –
0
form-0-remark –
OK
form-0-DELETE –
form-0-grne_id –
-1
form-0-ppe_id –
324
form-1-product –
645
form-1-quantity –
250
form-1-receivedQty –
200
form-1-acceptedQty –
180
form-1-rejectedQty –
20
form-1-remark –
20 pieces faulty
form-1-DELETE –
form-1-grne_id –
-1
form-1-ppe_id –
325
form-2-product –
638
form-2-quantity –
200
form-2-receivedQty –
0
form-2-acceptedQty –
0
form-2-rejectedQty –
0
form-2-remark –
form-2-DELETE –
form-2-grne_id –
-1
form-2-ppe_id –
326
- Response Headers
Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv
- Status Codes
302 Found – Redirects to
/grn
.
- InvManage.views.update_grn_view(request)
Updates the goods receipt note (GRN) on
POST
request, and returns a GRN update form onGET
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
- POST /grn/update
Updates a GRN. There are two modes: -
auto
: Settinggrn-grnType
toauto
creates a GRN with PO reference. -manual
: Settinggrn-grnType
tomanual
creates a GRN without PO reference. In this casethe
grn-poRef
is not required.Example request:
POST /consumer/ HTTP/1.1 Host: localhost:8000 Content-Type: multipart/form-data;
- Form Parameters
grn-grnType –
auto
grn-vendor –
4
grn-poRef –
182
grn-amendNumber –
546
grn-amendDate –
2021-09-29
grn-identifier –
846
grn-date –
2021-09-29
grn-transporter –
TeraTransport
grn-vehicleNumber –
GH-646358
grn-gateInwardNumber –
864353
grn-preparedBy –
KJL
grn-checkedBy –
KJH
grn-inspectedBy –
GIO
grn-approvedBy –
BHI
form-TOTAL_FORMS –
3
form-INITIAL_FORMS –
0
form-MIN_NUM_FORMS –
form-MAX_NUM_FORMS –
form-0-product –
637
form-0-quantity –
100
form-0-receivedQty –
50
form-0-acceptedQty –
50
form-0-rejectedQty –
0
form-0-remark –
OK
form-0-DELETE –
form-0-grne_id –
-1
form-0-ppe_id –
324
form-1-product –
645
form-1-quantity –
250
form-1-receivedQty –
200
form-1-acceptedQty –
180
form-1-rejectedQty –
20
form-1-remark –
20 pieces faulty
form-1-DELETE –
form-1-grne_id –
-1
form-1-ppe_id –
325
form-2-product –
638
form-2-quantity –
200
form-2-receivedQty –
0
form-2-acceptedQty –
0
form-2-rejectedQty –
0
form-2-remark –
form-2-DELETE –
form-2-grne_id –
-1
form-2-ppe_id –
326
- Response Headers
Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv
- Status Codes
302 Found – Redirects to
/grn
.
- InvManage.views.delete_grn_view(request, pk)
Deletes the GRN with primary key
object_id
onPOST
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
Content-Type – application/x-www-form-urlencoded
- Status Codes
302 Found – Redirects to
/grn
.500 Internal Server Error – GRN matching query does not exist.
- 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
- InvManage.views.print_grn_view(request, pk)
Opens the GRN with primary key
grn_id
for printing onGET
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
Content-Type – application/json
- Status Codes
200 OK – GRN print request successful.
500 Internal Server Error – GRN matching query does not exist.
- 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
- 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
- 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.
- 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).
- poRef
List of identifiers of the purchase orders from which the goods receipt note is derived.
- Type
- identifier
Unique identifier of the goods receipt note.
- Type
str
- date
Date of GRN creation.
- Type
DateField
- grnType
Type of GRN (
auto
ormanual
).- 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).
- 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.
- 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
- 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
- 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.
- 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
- 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.
- 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
ormanual
).- 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
- communication
Primary key of the
Communication
instance associated with the vendor.- Type
- backaccount
Primary key of the
BankAccount
instance associated with the vendor.- Type
- purchasedata
Primary key of the
PurchaseData
instance associated with the vendor.- Type
- 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
- 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.
- po
Primary key of the
PurchaseOrder
.- Type
- shippingaddress
Primary key of the
ShippingAddress
.- Type
- communication
Primary key of the
Communication
.- Type
- company
- po
- shippingaddress
- communication
- class InvManage.views.SalesInvoice
Bases:
django.db.models.Model
Model for the sales order invoice.
- so
Primary key of the
SalesOrder
.- Type
- shippingaddress
Primary key of the
ShippingAddress
.- Type
- 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
- 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
- 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 theJSON
serialized data of theProduct
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 theJSON
serialized data of theProductPurchaseEntry
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 theJSON
serialized data of thePurchaseInvoice
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" } }
- 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 onGET
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
- 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-vendor –
4
vend-name –
Girish
vend-identifier –
GJ
po-po –
69
po-date –
2021-09-29
po-tax –
12
po-discount –
8
po-paid –
4500
po-balance –
1200
ship-title –
FingDocks
ship-name –
Harding Gross
ship-phone –
936 651-4847
ship-address –
8798 At, St., 7639
ship-city –
Rome
ship-state –
Lazio
ship-country –
Italy
ship-website –
http://fringdocs.com
ship-post –
300326
po-subtotal –
2595000.00
po-taxtotal –
207600.00
po-ordertotal –
2802600.00
form-TOTAL_FORMS –
2
form-INITIAL_FORMS –
0
form-MIN_NUM_FORMS –
form-MAX_NUM_FORMS –
form-0-product –
649
form-0-quantity –
300
form-0-price –
4500
form-0-discount –
10
form-0-DELETE –
form-0-ppe_id –
-1
form-1-product –
664
form-1-quantity –
250
form-1-price –
6000
form-1-discount –
8
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 forGET
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
- 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
pk –
187
po-vendor –
4
vend-name –
Girish
vend-identifier –
GJ
po-po –
69
po-date –
2021-09-29
po-tax –
12
po-discount –
8.0
po-paid –
4500.0
po-balance –
1200.0
ship-title –
FingDocks
ship-name –
Harding Gross
ship-phone –
936 651-4847
ship-address –
8798 At, St., 7639
ship-city –
Rome
ship-state –
Lazio
ship-country –
Italy
ship-website –
http://fringdocs.com
ship-post –
300326
po-subtotal –
2595000.0
po-taxtotal –
207600.0
po-ordertotal –
2802600.0
form-TOTAL_FORMS –
2
form-INITIAL_FORMS –
2
form-MIN_NUM_FORMS –
form-MAX_NUM_FORMS –
form-0-product –
649
form-0-quantity –
300
form-0-price –
4500
form-0-discount –
10
form-0-DELETE –
form-0-ppe_id –
339
form-1-product –
664
form-1-quantity –
250
form-1-price –
6000
form-1-discount –
8
form-1-DELETE –
form-1-ppe_id –
340
- Response Headers
Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv
- Status Codes
302 Found – Redirects to
/consumer
.
- 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
- InvManage.views.delete_purchase_order_view(request, pk)
Deletes the purchase order with primary key
object_id
onPOST
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
Content-Type – application/x-www-form-urlencoded
- Status Codes
302 Found – Redirects to
/purchase_order
.500 Internal Server Error – Purchase order matching query does not exist.
- InvManage.views.print_purchase_order_view(request, pk)
Opens the purchase order with primary key
po_id
for printing onGET
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
Content-Type – application/json
- Status Codes
200 OK – Purchase order print request successful.
500 Internal Server Error – Purchase order matching query does not exist.
- InvManage.views.get_product_purchase_entries_view(request)
Returns the
JSON
serialized data of product purchase entries onGET
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
- Status Codes
200 OK – List of product purchase entries received successfully.
400 Bad Request – Bad request version
500 Internal Server Error – Product purchase entries matching query does not exist.
- 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
- 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
- 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.
- 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).
- poRef
List of identifiers of the purchase orders from which the goods receipt note is derived.
- Type
- identifier
Unique identifier of the goods receipt note.
- Type
str
- date
Date of GRN creation.
- Type
DateField
- grnType
Type of GRN (
auto
ormanual
).- 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).
- 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.
- 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
- 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
- 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.
- 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
- 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.
- 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
ormanual
).- 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
- communication
Primary key of the
Communication
instance associated with the vendor.- Type
- backaccount
Primary key of the
BankAccount
instance associated with the vendor.- Type
- purchasedata
Primary key of the
PurchaseData
instance associated with the vendor.- Type
- 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
- 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.
- po
Primary key of the
PurchaseOrder
.- Type
- shippingaddress
Primary key of the
ShippingAddress
.- Type
- communication
Primary key of the
Communication
.- Type
- company
- po
- shippingaddress
- communication
- class InvManage.views.SalesInvoice
Bases:
django.db.models.Model
Model for the sales order invoice.
- so
Primary key of the
SalesOrder
.- Type
- shippingaddress
Primary key of the
ShippingAddress
.- Type
- 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
- 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 theJSON
serialized data of theCompany
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 InvManage.views.ShippingAddressSerializer
Bases:
rest_framework.serializers.ModelSerializer
Serializer for
ShippingAddress
class instance.The
ShippingAddressSerializer.data
attribute gives theJSON
serialized data of theShippingAddress
instance:{ "name": "Harding Gross", "address": "8798 At, St., 7639", "city": "Rome", "phone": "936 651-4847", "state": "Lazio", "country": "Italy", "post": "300326" }
- class InvManage.views.CompanyFilter
Bases:
django_filters.FilterSet
- 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 formGET
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
- POST /company
Creates a company.
Example request:
POST /company/ HTTP/1.1 Host: localhost:8000 Content-Type: multipart/form-data;
- Form Parameters
comp-name –
Fringillami
comp-owner –
Ivor Barnett
comp-gstin –
89AAC056465468
comp-phone –
332 220-7026
comp-address –
Ap #849-6241 Euismod Av., 677598, Carinthia, Belgium
comp-email –
est.tempor@fringillami.org
comp-location –
Belgium
ship-title –
FingDocks
ship-name –
Harding Gross
ship-phone –
936 651-4847
ship-address –
8798 At, St., 7639
ship-city –
Rome
ship-state –
Lazio
ship-country –
Italy
ship-website –
fringdocs.com
ship-post –
300326
- Response Headers
Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv
- Status Codes
302 Found – Redirects to
/company
.
- InvManage.views.update_company_view(request)
Updates a company on
POST
request and returns the company update formGET
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
- POST /company/update
Updates a company.
Example request:
POST /company/ HTTP/1.1 Host: localhost:8000 Content-Type: multipart/form-data;
- Form Parameters
pk –
4
comp-name –
Fringillami
comp-owner –
Ivor Barnett
comp-gstin –
89AAC056465468
comp-phone –
332 220-7026
comp-address –
Ap #849-6241 Euismod Av., 677598, Carinthia, Belgium
comp-email –
est.tempor@fringillami.org
comp-location –
Belgium
ship-title –
FingDocks
ship-name –
Harding Gross
ship-phone –
936 651-4847
ship-address –
8798 At, St., 7639
ship-city –
Rome
ship-state –
Lazio
ship-country –
Italy
ship-website –
fringdocs.com
ship-post –
300326
- Response Headers
Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv
- Status Codes
302 Found – Redirects to
/company
.
- InvManage.views.delete_company_view(request, pk)
Deletes the company with primary key
pk
onPOST
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
Content-Type – application/x-www-form-urlencoded
- Status Codes
302 Found – Redirects to
/company
.500 Internal Server Error – Company matching query does not exist.
- 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
- 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
- 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
- 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.
- 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).
- poRef
List of identifiers of the purchase orders from which the goods receipt note is derived.
- Type
- identifier
Unique identifier of the goods receipt note.
- Type
str
- date
Date of GRN creation.
- Type
DateField
- grnType
Type of GRN (
auto
ormanual
).- 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).
- 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.
- 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
- 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
- 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.
- 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
- 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.
- 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
ormanual
).- 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
- communication
Primary key of the
Communication
instance associated with the vendor.- Type
- backaccount
Primary key of the
BankAccount
instance associated with the vendor.- Type
- purchasedata
Primary key of the
PurchaseData
instance associated with the vendor.- Type
- 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
- 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.
- po
Primary key of the
PurchaseOrder
.- Type
- shippingaddress
Primary key of the
ShippingAddress
.- Type
- communication
Primary key of the
Communication
.- Type
- company
- po
- shippingaddress
- communication
- class InvManage.views.SalesInvoice
Bases:
django.db.models.Model
Model for the sales order invoice.
- so
Primary key of the
SalesOrder
.- Type
- shippingaddress
Primary key of the
ShippingAddress
.- Type
- 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
- 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
- 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 theJSON
serialized data of theVendor
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" }
- address
- to_representation(self, instance)
- InvManage.views.create_vendor_view(request)
Creates a vendor on
POST
request, and returns a vendor creation form onGET
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
- POST /vendor
Creates a vendor.
Example request:
POST /vendor/ HTTP/1.1 Host: localhost:8000 Content-Type: multipart/form-data;
- Form Parameters
vend-name –
Lug Vendor
vend-identifier –
TBPN-02692
vend-gstin –
89AAC254254F2
ship-title –
AKATSUKI
ship-name –
Kuame Burns
ship-phone –
679 166-3127
ship-address –
Nonummy Avenue
ship-city –
Chung Cheong
ship-state –
Guanacaste
ship-country –
tellusidnunc.net
ship-website –
Germany.protitor@tellusid.net
ship-post –
8949
pdform-currency –
DEM
pdform-minorder –
2000
pdform-contactperson –
Harding Gross
pdform-refcode –
CUST000124
pdform-transportmode –
Express
com-language –
German
com-phone –
936 651-4817
com-email –
non.sollicitudin@uttincidunt.org
com-fax –
323 555 1234
bank-name –
FIRST FLORIDA INTEGRITY BANK
bank-branch –
Bavaria
bank-region –
Bayem
bank-route –
67016325
bank-number –
42543251393
bank-acctype –
Current
bank-iban –
DE6233542
bank-code –
BA54354354
bank-branchcode –
BA35435823
- Response Headers
Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv
- Status Codes
302 Found – Redirects to
/vendor
.
- InvManage.views.update_vendor_view(request)
Updates a vendor on
POST
request and returns the vendor update form forGET
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
- 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-name –
Lug Vendor
vend-identifier –
TBPN-02692
vend-gstin –
89AAC254254F2
ship-title –
AKATSUKI
ship-name –
Kuame Burns
ship-phone –
679 166-3127
ship-address –
Nonummy Avenue
ship-city –
Chung Cheong
ship-state –
Guanacaste
ship-country –
tellusidnunc.net
ship-website –
Germany.protitor@tellusid.net
ship-post –
8949
pdform-currency –
DEM
pdform-minorder –
1000
pdform-contactperson –
Harding Gross
pdform-refcode –
CUST000124
pdform-transportmode –
Express
com-language –
German
com-phone –
936 651-4817
com-email –
non.sollicitudin@uttincidunt.org
com-fax –
323 555 1234
bank-name –
FIRST FLORIDA INTEGRITY BANK
bank-branch –
Bavaria
bank-region –
Bayem
bank-route –
67016325
bank-number –
42543251393
bank-acctype –
Current
bank-iban –
DE6233542
bank-code –
BA54354354
bank-branchcode –
BA35435823
- Response Headers
Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv
- Status Codes
302 Found – Redirects to
/consumer
.
- InvManage.views.delete_vendor_view(request, pk)
Deletes the vendor with primary key
pk
onPOST
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
Content-Type – application/x-www-form-urlencoded
- Status Codes
302 Found – Redirects to
/vendors
.500 Internal Server Error – Vendor matching query does not exist.
- 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
- InvManage.views.get_vendor(request)
Returns the
JSON
serialized data of the requested vendor onGET
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
Content-Type – application/json
- Status Codes
200 OK – List of vendors received successfully.
400 Bad Request – Bad request version
500 Internal Server Error – Vendor matching query does not exist.
- 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
- 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
- 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.
- 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).
- poRef
List of identifiers of the purchase orders from which the goods receipt note is derived.
- Type
- identifier
Unique identifier of the goods receipt note.
- Type
str
- date
Date of GRN creation.
- Type
DateField
- grnType
Type of GRN (
auto
ormanual
).- 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).
- 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.
- 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
- 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
- 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.
- 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
- 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.
- 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
ormanual
).- 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
- communication
Primary key of the
Communication
instance associated with the vendor.- Type
- backaccount
Primary key of the
BankAccount
instance associated with the vendor.- Type
- purchasedata
Primary key of the
PurchaseData
instance associated with the vendor.- Type
- 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
- 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.
- po
Primary key of the
PurchaseOrder
.- Type
- shippingaddress
Primary key of the
ShippingAddress
.- Type
- communication
Primary key of the
Communication
.- Type
- company
- po
- shippingaddress
- communication
- class InvManage.views.SalesInvoice
Bases:
django.db.models.Model
Model for the sales order invoice.
- so
Primary key of the
SalesOrder
.- Type
- shippingaddress
Primary key of the
ShippingAddress
.- Type
- 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
- 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
- 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 theJSON
serialized data of theConsumer
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 onGET
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
- POST /consumer
Creates a consumer.
Example request:
POST /consumer/ HTTP/1.1 Host: localhost:8000 Content-Type: multipart/form-data;
- Form Parameters
consumer-name –
The Music Store
consumer-identifier –
CONS1256
consumer-gstin –
89ACC654654335
consumer-phone –
+91 6543525422
consumer-address –
Plot no. 958, N-4, Neo Complex, Barh, Wokha, Nagaland, 797111
consumer-email –
johnDoe@themusic.store
consumer-location –
Wokha
- Response Headers
Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv
- Status Codes
302 Found – Redirects to
/consumer
.
- InvManage.views.update_consumer_view(request)
Updates a consuemr on
POST
request and returns the consumer update form forGET
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
- POST /consumer/update
Updates the consumer.
Example request:
POST /company/update HTTP/1.1 Host: localhost:8000 Content-Type: multipart/form-data;
- Form Parameters
pk –
7
consumer-name –
The Music Store
consumer-identifier –
CONS1256
consumer-gstin –
89ACC654654335
consumer-phone –
+91 6543525422
consumer-address –
Plot no. 958, N-4, Neo Complex, Barh, Wokha, Nagaland, 797111
consumer-email –
johnDoe@themusic.store
consumer-location –
Wokha
- Response Headers
Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv
- Status Codes
302 Found – Redirects to
/consumer
.
- InvManage.views.delete_consumer_view(request, pk)
Deletes the consumer with primary key
pk
onPOST
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
Content-Type – application/x-www-form-urlencoded
- Status Codes
302 Found – Redirects to
/consumer
.500 Internal Server Error – Consumer matching query does not exist.
- 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
- InvManage.views.get_consumer(request)
Returns the
JSON
serialized data of the requested consumer onGET
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
Content-Type – application/json
- Status Codes
200 OK – List of consumers received successfully.
400 Bad Request – Bad request version
500 Internal Server Error – Consumer matching query does not exist.
- 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
- 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
- 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.
- 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).
- poRef
List of identifiers of the purchase orders from which the goods receipt note is derived.
- Type
- identifier
Unique identifier of the goods receipt note.
- Type
str
- date
Date of GRN creation.
- Type
DateField
- grnType
Type of GRN (
auto
ormanual
).- 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).
- 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.
- 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
- 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
- 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.
- 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
- 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.
- 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
ormanual
).- 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
- communication
Primary key of the
Communication
instance associated with the vendor.- Type
- backaccount
Primary key of the
BankAccount
instance associated with the vendor.- Type
- purchasedata
Primary key of the
PurchaseData
instance associated with the vendor.- Type
- 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
- 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.
- po
Primary key of the
PurchaseOrder
.- Type
- shippingaddress
Primary key of the
ShippingAddress
.- Type
- communication
Primary key of the
Communication
.- Type
- company
- po
- shippingaddress
- communication
- class InvManage.views.SalesInvoice
Bases:
django.db.models.Model
Model for the sales order invoice.
- so
Primary key of the
SalesOrder
.- Type
- shippingaddress
Primary key of the
ShippingAddress
.- Type
- 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
- 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
- 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 theJSON
serialized data of theProduct
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 theJSON
serialized data of theProductSalesEntry
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 }
- 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 theJSON
serialized data of theSalesInvoice
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" } }
- company
- so
- shippingaddress
- InvManage.views.create_sales_order_view(request)
Creates a sales order (SO) on
POST
request, and returns a SO creation form onGET
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
- 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-consumer –
5
consumer-name –
The Music Store
consumer-identifier –
CONS1256
consumer-gstin –
89ACC654654335
consumer-phone –
+91 8325642358
consumer-address –
Plot no 958, N- 4, Neo Complex, Barh, Wokha, Nagaland, 797111
consumer-email –
JohnDoe@themusic.store
consumer-location –
Wokha
so-so –
465
so-date –
2021-09-30
so-tax –
12
so-discount –
8
so-paid –
4500
so-balance –
1200
ship-title –
FingDocks
ship-name –
Harding Gross
ship-phone –
936 651-4847
ship-address –
8798 At, St., 7639
ship-city –
Rome
ship-state –
Lazio
ship-country –
Italy
ship-website –
http://fringdocs.com
ship-post –
300326
so-subtotal –
94600.00
so-taxtotal –
7568.00
so-ordertotal –
102168.00
form-TOTAL_FORMS –
2
form-INITIAL_FORMS –
0
form-MIN_NUM_FORMS –
form-MAX_NUM_FORMS –
form-0-product –
645
form-0-quantity –
450
form-0-price –
120
form-0-discount –
10
form-0-DELETE –
form-0-pse_id –
-1
form-1-product –
654
form-1-quantity –
500
form-1-price –
100
form-1-discount –
8
form-1-DELETE –
form-1-pse_id –
-1
- Response Headers
Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv
- Status Codes
302 Found – Redirects to
/sales_order
.
- InvManage.views.update_sales_order_view(request)
Updates a sales order on
POST
request and returns the sales order update form forGET
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
- 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
pk –
30
so-consumer –
7
consumer-name –
The Music Store
consumer-identifier –
CONS1256
consumer-gstin –
89AAC4633353643
consumer-phone –
+91 8325642358
consumer-address –
Plot no 958, N- 4, Neo Complex, Barh, Wokha, Nagaland, 797111
consumer-email –
JohnDoe@themusic.store
consumer-location –
Wokha
so-so –
465
so-date –
2021-09-30
so-tax –
10
so-discount –
8.0
so-paid –
4500.0
so-balance –
1200.0
ship-title –
FingDocks
ship-name –
Harding Gross
ship-phone –
936 651-4847
ship-address –
8798 At, St., 7639
ship-city –
Rome
ship-state –
Lazio
ship-country –
Italy
ship-website –
http://fringdocs.com
ship-post –
300326
so-subtotal –
94600.0
so-taxtotal –
7568.0
so-ordertotal –
102168.0
form-TOTAL_FORMS –
2
form-INITIAL_FORMS –
2
form-MIN_NUM_FORMS –
form-MAX_NUM_FORMS –
form-0-product –
645
form-0-quantity –
450
form-0-price –
120
form-0-discount –
10
form-0-DELETE –
form-0-pse_id –
67
form-1-product –
654
form-1-quantity –
500
form-1-price –
100
form-1-discount –
8
form-1-DELETE –
form-1-pse_id –
68
- Response Headers
Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv
- Status Codes
302 Found – Redirects to
/sales_order
.
- InvManage.views.delete_sales_order_view(request, pk)
Deletes the sales order with primary key
object_id
onPOST
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
Content-Type – application/x-www-form-urlencoded
- Status Codes
302 Found – Redirects to
/sales_order
.500 Internal Server Error – Sales order matching query does not exist.
- 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
- InvManage.views.print_sales_order_view(request, pk)
Opens the sales order with primary key
so_id
for printing onGET
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
Content-Type – application/json
- Status Codes
200 OK – Sales order print request successful.
500 Internal Server Error – Sales order matching query does not exist.
- 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
- 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
- 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.
- 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).
- poRef
List of identifiers of the purchase orders from which the goods receipt note is derived.
- Type
- identifier
Unique identifier of the goods receipt note.
- Type
str
- date
Date of GRN creation.
- Type
DateField
- grnType
Type of GRN (
auto
ormanual
).- 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).
- 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.
- 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
- 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
- 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.
- 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
- 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.
- 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
ormanual
).- 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
- communication
Primary key of the
Communication
instance associated with the vendor.- Type
- backaccount
Primary key of the
BankAccount
instance associated with the vendor.- Type
- purchasedata
Primary key of the
PurchaseData
instance associated with the vendor.- Type
- 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
- 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.
- po
Primary key of the
PurchaseOrder
.- Type
- shippingaddress
Primary key of the
ShippingAddress
.- Type
- communication
Primary key of the
Communication
.- Type
- company
- po
- shippingaddress
- communication
- class InvManage.views.SalesInvoice
Bases:
django.db.models.Model
Model for the sales order invoice.
- so
Primary key of the
SalesOrder
.- Type
- shippingaddress
Primary key of the
ShippingAddress
.- Type
- 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
- 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
- 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 theJSON
serialized data of theHistoryFilterState
instance:{ "name": PreRelease20x, "numEntries" : 10, "eventTypes": { "Created", "Updated", "Deleted" }, "objModels": { "Company", "Vendor", "PurchaseOrder", "Product", "Consumer", "SalesOrder", "GoodsReceiptNote" } }
- 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. Thecreate
,update
, anddelete
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