Skip to content

Take Out Item (เบิกสินค้า)

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

Header Request

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

Header Example

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

Field

FieldTypeDescription
doc_noStringเอกสารเลขที่
doc_format_codeStringรหัสเอกสาร
doc_dateStringเอกสารวันที่ Format =YYYY-MM-DD
doc_timeStringเวลา Format=hh:mm
wh_codeStringคลังสินค้า
shelf_codeStringที่เก็บสินค้า
inquiry_typeNumber0 = เบิกปรกติ, 1 =เบิกไปให้ลูกค้า/ลูกหนี้, 2=เบิกไปให้จ้าหนี้
detailsArrayรายละเอียดสินค้า
doc_ref_dateStringวันที่เอกสารอ้างอิง Format =YYYY-MM-DD(Optional)
doc_refStringเอกสารอ้างอิง (Optional)
cust_codeStringลูกหนี้/เจ้าหนี้(Optional)
remarkStringหมายเหตุ(Optional)

Detail Field

FieldTypeDescription
item_codeStringรหัสสินค้า
line_numberNumberหมายเลขบรรทัด
unit_codeStringหน่วยนับ
wh_codeStringคลังสินค้า
shelf_codeStringที่เก็บสินค้า
qtyNumberจำนวน
serialsArrayรายการ Serial(Optional)

Serial Field

FieldTypeDescription
serialStringหมายเลข Serial

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": "WD59120001",
  "doc_date": "2016-12-01",
  "doc_format_code": "WD",
  "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
    },
    {
      "item_code": "1000018",
      "line_number": 1,
      "unit_code": "TR",
      "wh_code": "CMI01",
      "shelf_code": "CMI420",
      "qty": 300
    },
    {
      "item_code": "1000029",
      "line_number": 2,
      "unit_code": "TR",
      "wh_code": "CMI01",
      "shelf_code": "CMI420",
      "qty": 100
    },
    {
      "item_code": "1000017",
      "line_number": 3,
      "unit_code": "TR",
      "wh_code": "CMI01",
      "shelf_code": "CMI420",
      "qty": 2,
      "serials": [
        {
          "serial": "670011-J0001"
        },
        {
          "serial": "670011-J0002"
        }
      ]
    }
  ]
}