InvManage.views.purchase_order_views
Module Contents
Functions
|
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 |
- InvManage.views.purchase_order_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.purchase_order_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.purchase_order_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.purchase_order_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.purchase_order_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.purchase_order_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.