Stock Transfer โอนสินค้า
| Type | Value |
|---|---|
| URL | /SMLJavaRESTService/restapi/stocktransfer |
| Method | POST |
| Content-Type | Application/json |
Request Header
| name | description |
|---|---|
| GUID | GUID สำหรับการเชื่อมต่อ (smlx เสมอ) |
| configFIleName | ชื่อไฟล์เก็บ Server Config |
| databaseName | ชื่อฐานข้อมูล |
Example
{
"GUID" : "smlx"
"configFIleName" : "SMLConfigBRSMLST.xml"
"databaseName" : "smlst2016"
}Data Params
| Name | Type | description |
|---|---|---|
| doc_no | [String] | เอกสารเลขที่ |
| doc_format_code | [String] | รหัสเอกสาร |
| doc_date | [String] | เอกสารวันที่ Format=YYYY-MM-DD |
| doc_time | [String] | เวลา Format=hh:mm |
| wh_code_from | [String] | จากคลัง |
| shelf_code_from | [String] | จากที่เก็บ |
| wh_code_to | [String] | ถึงคลัง |
| shelf_code_to | [String] | ถึงที่เก็บ |
| user_code | [String] | รหัสพนักงาน |
| details | [Array] | รายละเอียดสินค้า ดู Item Detail Params |
Item Detail Params
| Name | Type | description |
|---|---|---|
| item_code | [String] | รหัสสินค้า |
| line_number | [Number] | หมายเลขบรรทัด |
| unit_code | [String] | หน่วยนับ |
| wh_code_from | [String] | จากคลังสินค้า |
| shelf_code_from | [String] | จากที่เก็บสินค้า |
| wh_code_to | [String] | ถึงคลังสินค้า |
| shelf_code_to | [String] | ถึงที่เก็บสินค้า |
| qty | [Number] | จำนวน |
| doc_ref | [String] | เลขที่เอกสารอ้างอิง (Optional) |
| doc_ref_date | [String] | วันที่เอกสารอ้างอิง Format=YYYY-MM-DD (Optional) |
Sample Call
{
"doc_no": "RQIM59120091",
"doc_date": "2016-12-01",
"doc_format_code": "RQIM",
"doc_time": "09:00",
"wh_code_from": "CMI01",
"shelf_code_from": "CMI100",
"wh_code_to": "CMI01",
"shelf_code_to": "CMI420",
"doc_type": "",
"user_code": "1314",
"details": [
{
"item_code": "1000030",
"line_number": 0,
"unit_code": "TR",
"wh_code_from": "CMI01",
"shelf_code_from": "CMI100",
"wh_code_to": "CMI01",
"shelf_code_to": "CMI420",
"qty": 100
},
{
"item_code": "1000018",
"line_number": 1,
"unit_code": "TR",
"wh_code_from": "CMI01",
"shelf_code_from": "CMI100",
"wh_code_to": "CMI01",
"shelf_code_to": "CMI420",
"qty": 300
},
{
"item_code": "1000029",
"line_number": 2,
"unit_code": "TR",
"wh_code_from": "CMI01",
"shelf_code_from": "CMI100",
"wh_code_to": "CMI01",
"shelf_code_to": "CMI420",
"qty": 100
}
]
}Response
| Response Success | |
|---|---|
| HTTP Status | 201 |
| Response Body | JSON |
Response Success JSON Message
{
"status" : "success",
"message" : "create success"
}| Response Error | |
|---|---|
| HTTP Status | 400 |
| Response Body | JSON |
Response Success JSON Message
{
"status" : "error",
"message" : "Message Error"
}