InvManage.views.sales_order_views
Module Contents
Functions
|
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 |
- InvManage.views.sales_order_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.sales_order_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.sales_order_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.sales_order_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.sales_order_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.