[
{ // ADDED
"product": {
"id": 1,
"name": "132392 - KitKat",
"uom": "PCS"
},
"unissued_quantity": 2,
"pricing_type": "1", // ADDED
"pricing_type_name": "ขายปลีก", // ADDED
"unit_price": "1200.00", // ADDED
"unit_discount": 10, // ADDED
"unit_discount_type": "percent", // ADDED
"tax": "7.00", // ADDED
"ordered_quantity": 9, // ADDED
"ordered_amount": 12000, // ADDED
"available_storage_bins": [
// NOTE: It contains the storage bin storing the product. Otherwise, this's the blank array.
{
"storage_bin": 1,
"storage_bin_name": "SB1 - Storage bin 01",
"available_quantity": 6
},
{
"storage_bin": 2,
"storage_bin_name": "SB2 - Storage bin 02",
"available_quantity": 5
},
{
"storage_bin": 3,
"storage_bin_name": "SB3 - Storage bin 03",
"available_quantity": 8
},
]
},
{ // ADDED
"product": {
"id": 2,
"name": "132392 - KitKat",
"uom": "PCS"
},
"unissued_quantity": 9,
"pricing_type": "1", // ADDED
"pricing_type_name": "ขายปลีก", // ADDED
// "unit_price": "1200.00", // ADDED, REMOVED
// "unit_discount": 10, // ADDED, REMOVED
"tax": "7.00", // ADDED
"ordered_quantity": 9, // ADDED
"ordered_amount": 12000, // ADDED
"available_storage_bins": [
// NOTE: It contains the storage bin storing the product. Otherwise, this's the blank array.
{
"storage_bin": 1,
"storage_bin_name": "SB1 - Storage bin 01",
"available_quantity": 6
},
{
"storage_bin": 2,
"storage_bin_name": "SB2 - Storage bin 02",
"available_quantity": 5
},
{
"storage_bin": 3,
"storage_bin_name": "SB3 - Storage bin 03",
"available_quantity": 8
},
]
},
]
The Sample API Response
Module name: available products of a document
Sample view: Response
**Request**
URL: "/api/sale-order/<id>/remaining-products/" which the id is the sale order's ID.
Parameters: { type, updateOfDocID } where type represents the sale order's document type and updateOfDoc is the SO document's index to be updated.
Example URL: /api/sale-order/1/remaining-products/?type=19&updateOfDocID=7
Request Method: GET
Module name: available products of a document
Sample view: Response
**Request**
URL: "/api/sale-order/<id>/remaining-products/" which the id is the sale order's ID.
Parameters: { type, updateOfDocID } where type represents the sale order's document type and updateOfDoc is the SO document's index to be updated.
Example URL: /api/sale-order/1/remaining-products/?type=19&updateOfDocID=7
Request Method: GET
3 Responses
ordered_amount -> order_amount
Write a comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.