Appearance
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
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
Type | Value |
---|---|
URL | /SMLJavaRESTService/restapi/salereserved |
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 |
cust_code | String | รหัสลูกหนี้ | |
sale_code | String | รหัสพนักงานขาย | |
vat_rate | Number | อัตราภาษี | |
vat_type | Number | ประเภทภาษี | |
total_value | Number | รวมมูลค่า | |
total_discount | Number | มูลค่าส่วนลด | |
total_before_vat | Number | ยอดก่อนภาษี | |
total_vat_value | Number | ภาษีมูลค่าเพิ่ม | |
total_except_vat | Number | มูลค่าสินค้ายกเว้นภาษี | |
total_after_vat | Number | มูลค่าหลังคิดภาษี | |
total_amount | Number | มูลค่าสุทธิ | |
details : Array | |||
item_code | String | รหัสสินค้า | |
line_number | Number | หมายเลขบรรทัด | |
is_permium | Number | 0=สินค้าปรกติ,1=ของแถม | |
unit_code | String | หน่วยนับ | |
wh_code | String | คลังสินค้า | |
shelf_code | String | ที่เก็บสินค้า | |
qty | Number | จำนวน | |
price | Number | ราคา | |
price_exclude_vat | Number | ราคาไม่รวมภาษี | |
discount_amount | Number | ส่วนลด | |
sum_amount | Number | รวมมูลค่า | |
vat_amount | Number | ยอดภาษี | |
tax_type | Number | ประเภทภาษีของสินค้า (0=มีภาษี,1=ยกเว้นภาษี) | |
vat_type | Number | ประเภทภาษี (0=แยกนอก,1=รวมใน,2=อัตราภาษีศูนย์) |
Optional Params
Name | Type | Description | Example |
---|---|---|---|
remark | String | หมายเหตุ |
Response
Response Success | |
---|---|
HTTP Status | 201 |
Response Success JSON Message
{
"status" : "success",
"message" : "create success"
}
Response Error | |
---|---|
HTTP Status | 400 |
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
}
]
}