Skip to content

Take In Item (รับสินค้า)

TypeValue
URL/SMLJavaRESTService/restapi/takeinitem
MethodPOST
Content-TypeApplication/json

Header Request

FieldValue
GUIDGUID สำหรับการเชื่อมต่อ (smlx เสมอ)
configFIleNameชื่อไฟล์เก็บ Server Config
databaseNameชื่อฐานข้อมูล

Header Example

{
  "GUID" : "smlx"
  "configFIleName" : "SMLConfigBRSMLST.xml"
  "databaseName" : "smlst2016"
}

Data Params Request Params

NameTypeDescriptionExample
doc_noStringเอกสารเลขที่
doc_format_codeStringรหัสเอกสาร
doc_dateStringเอกสารวันที่Format=YYYY-MM-DD
doc_timeStringเวลา Format=hh:mm
wh_codeStringคลังสินค้า
shelf_codeStringที่เก็บสินค้า
inquiry_typeNumber0=รับปรกติ, 1=รับจากลูกค้า/ลูกหนี้, 2=รับจากเจ้าหนี้
total_amountNumberมูลค่าสุทธิ
details : Array
item_codeStringรหัสสินค้า
line_numberNumberหมายเลขบรรทัด
unit_codeStringหน่วยนับ
wh_codeStringคลังสินค้า
shelf_codeStringที่เก็บสินค้า
qtyNumberจำนวน
priceNumberราคา
sum_amountNumberรวมมูลค่า
SerialsArray optional
Serialหมายเลข Serial

Optional Params

NameTypeDescriptionExample
cust_codeStringลูกหนี้/เจ้าหนี้
remarkStringหมายเหตุ
doc_ref_dateStringวันที่เอกสารอ้างอิงFormat =YYYY-MM-DD
doc_refStringเอกสารอ้างอิง

Response

Response CodeDescription
201Create Success
400Failed

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
		}
	]
}