Appearance
Take In Item (รับสินค้า)
Type | Value |
---|---|
URL | /SMLJavaRESTService/restapi/takeinitem |
Method | POST |
Content-Type | Application/json |
Header Request
Field | Value |
---|---|
GUID | GUID สำหรับการเชื่อมต่อ (smlx เสมอ) |
configFIleName | ชื่อไฟล์เก็บ Server Config |
databaseName | ชื่อฐานข้อมูล |
Header Example
{
"GUID" : "smlx"
"configFIleName" : "SMLConfigBRSMLST.xml"
"databaseName" : "smlst2016"
}
Data Params Request Params
Name | Type | Description | Example |
---|---|---|---|
doc_no | String | เอกสารเลขที่ | |
doc_format_code | String | รหัสเอกสาร | |
doc_date | String | เอกสารวันที่ | Format=YYYY-MM-DD |
doc_time | String | เวลา Format=hh:mm | |
wh_code | String | คลังสินค้า | |
shelf_code | String | ที่เก็บสินค้า | |
inquiry_type | Number | 0=รับปรกติ, 1=รับจากลูกค้า/ลูกหนี้, 2=รับจากเจ้าหนี้ | |
total_amount | Number | มูลค่าสุทธิ | |
details : Array | |||
item_code | String | รหัสสินค้า | |
line_number | Number | หมายเลขบรรทัด | |
unit_code | String | หน่วยนับ | |
wh_code | String | คลังสินค้า | |
shelf_code | String | ที่เก็บสินค้า | |
qty | Number | จำนวน | |
price | Number | ราคา | |
sum_amount | Number | รวมมูลค่า | |
Serials | Array optional | ||
Serial | หมายเลข Serial |
Optional Params
Name | Type | Description | Example |
---|---|---|---|
cust_code | String | ลูกหนี้/เจ้าหนี้ | |
remark | String | หมายเหตุ | |
doc_ref_date | String | วันที่เอกสารอ้างอิง | Format =YYYY-MM-DD |
doc_ref | String | เอกสารอ้างอิง |
Response
Response Code | Description |
---|---|
201 | Create Success |
400 | Failed |
Response Success JSON :
{
"status" : "success",
"message" : "create success"
}
Response Failed JSON :
{
"status": "error",
"message": "Message Error"
}
Sample Call
{
"doc_no": "FG59120001",
"doc_date": "2016-12-01",
"doc_format_code": "FG",
"total_amount": 506220.21,
"doc_time": "09:00",
"wh_code": "CMI01",
"shelf_code": "CMI420",
"details": [
{
"item_code": "1000030",
"line_number": 0,
"unit_code": "TR",
"wh_code": "CMI01",
"shelf_code": "CMI420",
"qty": 100,
"price": 697.89,
"sum_amount": 69789.0
},
{
"item_code": "1000018",
"line_number": 1,
"unit_code": "TR",
"wh_code": "CMI01",
"shelf_code": "CMI420",
"qty": 300,
"price": 667.05,
"sum_amount": 200115.0
},
{
"item_code": "1000029",
"line_number": 2,
"unit_code": "TR",
"wh_code": "CMI01",
"shelf_code": "CMI420",
"qty": 100,
"price": 697.89,
"sum_amount": 69789.0
},
{
"item_code": "1000017",
"line_number": 3,
"unit_code": "TR",
"wh_code": "CMI01",
"shelf_code": "CMI420",
"qty": 200,
"price": 667.05,
"sum_amount": 133410.0
}
]
}