Skip to content

Sale Reserve ใบสั่งจอง

Title Sale Reserved

List Sale Reserved

เป็นการแสดงรายการขายสินค้า

EndPoint

GET /SMLJavaRESTService/v3/api/salereserved

GET /SMLJavaRESTService/v3/api/salereserved/{doc_no}

Header

Required SMLRequestHeader

Query Parameter

Transaction Query Paremeter

example:

GET http://localhost:8086/SMLJavaRESTService/v3/api/salereserved?from_date=2020-01-01&to_date=2020-01-02

GET http://localhost:8086/SMLJavaRESTService/v3/api/salereserved/BS17010001

Response Success:

JSON
{
  "success": true,
  "data": {
    "doc_no": "BS17010001",
    "doc_date": "2017-01-03",
    "doc_time": "13:36",
    "doc_format_code": "BS",
    "cust_code": "AR00002",
    "cust_name": "นาย กอไก่ ขอไข่",
    "sale_type": 1,
    "vat_type": 1,
    "total_value": 14678.00,
    "total_discount": 0,
    "total_before_vat": 13717.76,
    "vat_rate": 7.00,
    "total_vat_value": 960.24,
    "total_amount": 14678.00,
    "transport_name": "นาย กอไก่ ขอไข่",
    "transport_address": "0",
    "transport_remark": "",
    "transport_remark_2": "",
    "items": [
      {
        "docDate": 1483376400000,
        "item_code": "CB-00001",
        "item_name": "สาย VAF 100M",
        "unit_code": "ม้วน",
        "qty": 5.00,
        "price": 690.00,
        "discount_amount": 0E-10,
        "sum_amount": 3450.00,
        "is_permium": 0,
        "line_number": 0,
        "tax_type": 0,
        "wh_code": "",
        "shelf_code": ""
      },
      {
        "docDate": 1483376400000,
        "item_code": "AC-00001",
        "item_name": "แจ็คโทรศัพท์",
        "unit_code": "แพ็ค",
        "qty": 5.00,
        "price": 50.00,
        "discount_amount": 0E-10,
        "sum_amount": 250.00,
        "is_permium": 0,
        "line_number": 1,
        "tax_type": 0,
        "wh_code": "",
        "shelf_code": ""
      },
      {
        "docDate": 1483376400000,
        "item_code": "AC-00003",
        "item_name": "เทป พันสายไฟ",
        "unit_code": "ม้วน",
        "qty": 2.00,
        "price": 39.00,
        "discount_amount": 0E-10,
        "sum_amount": 78.00,
        "is_permium": 0,
        "line_number": 2,
        "tax_type": 0,
        "wh_code": "",
        "shelf_code": ""
      },
      {
        "docDate": 1483376400000,
        "item_code": "AC-00015",
        "item_name": "เครื่องตัดไฟ",
        "unit_code": "ตัว",
        "qty": 2.00,
        "price": 5250.00,
        "discount_amount": 0E-10,
        "sum_amount": 10500.00,
        "is_permium": 0,
        "line_number": 3,
        "tax_type": 0,
        "wh_code": "",
        "shelf_code": ""
      },
      {
        "docDate": 1483376400000,
        "item_code": "EC-00002",
        "item_name": "คัทเอาท์ 30A",
        "unit_code": "ตัว",
        "qty": 5.00,
        "price": 80.00,
        "discount_amount": 0E-10,
        "sum_amount": 400.00,
        "is_permium": 0,
        "line_number": 4,
        "tax_type": 0,
        "wh_code": "",
        "shelf_code": ""
      }
    ],
    "credit_day": 0,
    "credit_date": "2017-01-03",
    "send_day": 0,
    "send_date": "2017-01-03"
  }
}

New Reserved

TypeValue
URL/SMLJavaRESTService/restapi/salereserved
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
cust_codeStringรหัสลูกหนี้
sale_codeStringรหัสพนักงานขาย
vat_rateNumberอัตราภาษี
vat_typeNumberประเภทภาษี
total_valueNumberรวมมูลค่า
total_discountNumberมูลค่าส่วนลด
total_before_vatNumberยอดก่อนภาษี
total_vat_valueNumberภาษีมูลค่าเพิ่ม
total_except_vatNumberมูลค่าสินค้ายกเว้นภาษี
total_after_vatNumberมูลค่าหลังคิดภาษี
total_amountNumberมูลค่าสุทธิ
details : Array
item_codeStringรหัสสินค้า
line_numberNumberหมายเลขบรรทัด
is_permiumNumber0=สินค้าปรกติ,1=ของแถม
unit_codeStringหน่วยนับ
wh_codeStringคลังสินค้า
shelf_codeStringที่เก็บสินค้า
qtyNumberจำนวน
priceNumberราคา
price_exclude_vatNumberราคาไม่รวมภาษี
discount_amountNumberส่วนลด
sum_amountNumberรวมมูลค่า
vat_amountNumberยอดภาษี
tax_typeNumberประเภทภาษีของสินค้า (0=มีภาษี,1=ยกเว้นภาษี)
vat_typeNumberประเภทภาษี (0=แยกนอก,1=รวมใน,2=อัตราภาษีศูนย์)

Optional Params

NameTypeDescriptionExample
remarkStringหมายเหตุ

Response

Response Success
HTTP Status201

Response Success JSON Message

{
    "status" :  "success", 
    "message" : "create success"
}
Response Error
HTTP Status400

Response Success JSON Message

{
    "status" :  "error",
    "message" : "Message Error"
}

Sample Call

{ 
    "doc_no" : "SR59120001", 
    "doc_date" : "2016-12-01",
    "doc_format_code" : "SR", 
    "cust_code" : "20S0108", 
    "sale_code" : "1056", 
    "vat_rate" : 7, 
    "total_value" : 473103.00, 
    "total_after_vat" : 506220.21,
    "total_amount" : 506220.21, 
    "total_before_vat" : 473103.00, 
    "total_discount" : 0, 
    "total_except_vat" : 0, 
    "total_vat_value" : 33117.21,
    "doc_time" : "09:00", 
    "sale_type" : 1, 
    "vat_type": 0, 
    "details" : 
    [ 
        { 
        "item_code" : "1000030", 
        "line_number" : 0, 
        "is_permium" : 0, 
        "unit_code" : "TR", 
        "wh_code" : "CMI01", 
        "shelf_code" : "CMI420", 
        "qty" : 100, 
        "price": 697.8900, 
        "price_exclude_vat" : 697.89, 
        "sum_amount" : 69789.00, 
        "discount_amount" : 0, 
        "vat_amount" : 4885.23, 
        "tax_type" : 0, 
        "vat_type" : 0 
        }, 
        { 
        "item_code" : "1000018", 
        "line_number": 1, 
        "is_permium" : 0, 
        "unit_code" : "TR", 
        "wh_code" : "CMI01", 
        "shelf_code" : "CMI420", 
        "qty" : 300, 
        "price" : 667.0500, 
        "price_exclude_vat" : 667.05, 
        "sum_amount" : 200115.00, 
        "discount_amount" : 0, 
        "vat_amount" : 14008.05, 
        "tax_type" : 0, 
        "vat_type" : 0 
        }, 
        { 
        "item_code" : "1000029", 
        "line_number" : 2, 
        "is_permium" : 0, 
        "unit_code" : "TR", 
        "wh_code" : "CMI01", 
        "shelf_code" : "CMI420", 
        "qty" : 100, 
        "price" : 697.8900, 
        "price_exclude_vat" : 697.89, 
        "sum_amount" : 69789.00, 
        "discount_amount" : 0, 
        "vat_amount" : 4885.23, 
        "tax_type": 0, 
        "vat_type" : 0 
        }, 
        { 
            "item_code" : "1000017", 
            "line_number" : 3, 
            "is_permium": 0,
            "unit_code" : "TR", 
            "wh_code" : "CMI01", 
            "shelf_code" : "CMI420", 
            "qty" : 200, 
            "price" : 667.0500, 
            "price_exclude_vat" : 667.05, 
            "sum_amount" : 133410.00, 
            "discount_amount" : 0, 
            "vat_amount" : 9338.70, 
            "tax_type" : 0, 
            "vat_type" : 0 
        } 
        
    ] 
}