Skip to content

Sale Invoice POS Cancel Service

API ยกเลิกขาย POS


Header Request

FieldValue
GUIDGUID สำหรับการเชื่อมต่อ (smlx เสมอ)
providerชื่อผู้ใช้บริการ
databaseNameชื่อฐานข้อมูล
configFileNameไฟล์ตั้งค่าผู้ให้บริการ
ใส่ SMLConfig และตามด้วยชื่อผู้ให้บริการ และตามด้วย .xml (SMLConfig___.xml)

Header Example

{
  "GUID" : "smlx"
  "provider" : "DATA"
  "databaseName" : "data1"
  "configFileName" : "SMLConfigDATA.xml"
}

HTTP Response

StatusDescripton
200Success return with data
500Bas Request
401Unauthorize

saleinvoiceposcancel List

แสดงข้อมูลเอกสารยกเลิกขาย POS ทั้งหมด

EndPoint

GET /SMLJavaRESTService/saleinvoiceposcancel/v4

Query Request

FieldDescription
pagenumber of page
sizepage size

Example:

GET localhost:8084/SMLJavaRESTService/saleinvoiceposcancel/v4?page=1&size=2

saleinvoiceposcancel Information

เป็นการดึงข้อมูลเอกสารยกเลิกขาย POS มาแสดงทีละ 1 เอกสารโดยจะต้องระบุเลขที่เอกสาร

EndPoint

GET /SMLJavaRESTService/saleinvoiceposcancel/v4/{docno}

Path Parameter:

NameDescriptionExample
docnoเลขที่เอกสารPOS01-INV220721-0001

example:

GET localhost:8084/SMLJavaRESTService/saleinvoiceposcancel/v4/POS03-SIC230511-0001

Response Success

{
    {
    "success": true,
    "data": {
        "trans_type": 2,
        "trans_flag": 45,
        "doc_group": "",
        "doc_date": "2017-11-13",
        "doc_no": "SIC17110002",
        "doc_ref": "POS01-171113-0001",
        "tax_doc_no": "",
        "inquiry_type": 0,
        "vat_type": 0,
        "cust_code": "AR00011",
        "contactor": "",
        "branch_code": "",
        "project_code": "",
        "side_code": "",
        "department_code": "",
        "sale_area_code": "",
        "sale_code": "",
        "send_type": 0,
        "send_day": 0,
        "credit_day": 0,
        "answer_type": 0,
        "transport_value": 0E-10,
        "discount_word": "",
        "vat_rate": 0E-10,
        "currency_code": "",
        "exchange_rate": 0E-10,
        "total_cost": 0E-10,
        "total_value": 0E-10,
        "total_discount": 0E-10,
        "total_vat_value": 0E-10,
        "total_after_vat": 0E-10,
        "total_except_vat": 0E-10,
        "total_amount": 0E-10,
        "balance_amount": 0E-10,
        "adjust_reason": "",
        "approve_code": "",
        "remark": "",
        "status": 0,
        "user_request": "",
        "expire_day": 0,
        "send_mail": 0,
        "send_sms": 0,
        "doc_ref_trans": "",
        "total_before_vat": 0E-10,
        "doc_time": "17:10",
        "allocate_code": "",
        "job_code": "",
        "pay_amount": 0E-10,
        "money": 0E-10,
        "sum_pay_money_diff": 0E-10,
        "currency_money": 0E-10,
        "total_debt_amount": 0E-10,
        "cancel_type": 0,
        "last_status": 0,
        "used_status": 0,
        "doc_success": 0,
        "total_manual": 0,
        "on_hold": 0,
        "extra_word": "",
        "transport_code": "",
        "want_day": 0,
        "deposit_day": 0,
        "sale_group": "",
        "not_approve_1": 0,
        "user_approve": "",
        "approve_status": 0,
        "expire_status": 0,
        "advance_amount": 0E-10,
        "doc_format_code": "SIC",
        "used_status_2": 0,
        "remark_2": "",
        "remark_3": "",
        "ref_amount": 0E-10,
        "ref_new_amount": 0E-10,
        "ref_diff": 0E-10,
        "sum_point": 0E-10,
        "cashier_code": "",
        "is_pos": 0,
        "pos_id": "",
        "member_code": "",
        "doc_no_guid": "",
        "pos_bill_type": 0,
        "pos_bill_change": 0,
        "doc_type": 0,
        "recheck_count_day": 0E-10,
        "recheck_count": 0,
        "wh_from": "",
        "location_from": "",
        "wh_to": "",
        "location_to": "",
        "auto_create": 0,
        "send_to_pick_and_pack": 0,
        "service_charge_word": "",
        "total_service_charge": 0E-10,
        "sale_shift_id": "",
        "creator_code": "SUPERADMIN",
        "last_editor_code": "",
        "create_datetime": "2017-11-13 17:11:31.000",
        "table_number": "",
        "period_guid": "",
        "branch_code_to": "",
        "allocate_code_to": "",
        "project_code_to": "",
        "job_code_to": "",
        "side_code_to": "",
        "department_code_to": "",
        "point_telephone": "",
        "sum_point_2": 0E-10,
        "remark_4": "",
        "remark_5": "",
        "is_manual_vat": 0,
        "pass_book_code": "",
        "total_amount_2": 0E-10,
        "sender_code": "",
        "is_cancel": 0,
        "cancel_code": "",
        "is_hold": 0,
        "auto_approved": 0,
        "pos_transfer": 0,
        "doc_close": 0,
        "ref_doc_type": "",
        "is_doc_copy": 0,
        "doc_reason": "",
        "discount_word_2": "",
        "total_discount_2": 0,
        "total_value_2": 0,
        "total_amout_old": 0,
        "lost_profit_exchange_amount": 0
    }
}

Response Error

  {
    "error": true,
    "code": "99",
    "message": "error message"
  }

Add saleinvoiceposcancel

สร้างเอกสารยกเลิกขาย POS

EndPoint

POST /SMLJavaRESTService/saleinvoiceposcancel/v4/

Body Data:

JSON body with saleinvoiceposcancel Request Attribute

example:

{
    "balance_amount": 0,
    "branch_code": "",
    "cashier_code": "001",
    "cust_code": "SPY000999",
    "doc_date": "2023-05-11",
    "doc_format_code": "SIC",
    "doc_no": "POS03-SIC230511-0001",
    "doc_ref": "POS03-230511-0002",
    "doc_time": "14:13",
    "inquiry_type": 1,
    "sale_code": "",
    "tax_doc_date": "2023-05-11",
    "tax_doc_no": "POS03-SIC230511-0001",
    "total_after_vat": 0,
    "total_amount": 0,
    "total_before_vat": 0,
    "total_discount": 0,
    "total_except_vat": 0,
    "total_value": 0,
    "total_vat_value": 0,
    "vat_rate": 7,
    "vat_type": 1
}

saleinvoiceposcancel Attribute

Field NameField TypeLengthDescription
adjust_reasonString25เหตุผลการปรับปรุง
advance_amountFloat0ตัดเงินมัดจำ
allocate_codeString25การจัดสรร
allocate_code_toString25ถึงการจัดสรร
answer_typeInteger0ลูกค้าตอบกลับ
approve_codeString25กลุ่มผู้อนุมัติ
approve_dateDate0วันที่อนุมัติ
approve_statusInteger0สถานะการอนุมัติ
auto_approvedInteger0อนุมัติโดยอัตโนมัติ
auto_createInteger0สร้างโดยโปรแกรม
balance_amountFloat0ยอดเงินคงเหลือ
branch_codeString25สาขา
branch_code_toString25ถึงสาขา
cancel_codeString255ผู้ยกเลิกเอกสาร
cancel_datetimeDate0เวลายกเลิกเอกสาร
cancel_typeInteger0ประเภทการยกเลิก
cashier_codeString25Cashier
contactorString25ผู้ติดต่อ
create_datetimeDate0วันที่สร้างเอกสาร
creator_codeString255ผู้สร้างเอกสาร
credit_dateDate0วันที่ครบกำหนด
credit_dayInteger0วันเครดิต
currency_codeString25รหัสสกุลเงิน
currency_moneyFloat0ยอดคงเหลือ(ตามสกุลเงิน)
cust_codeString25ลูกหนี้/เจ้าหนี้
delivery_dateDate0วันที่ส่งของ
department_codeString25แผนก
department_code_toString25ถึงแผนก
deposit_dateDate0ระยะเวลาภายใน (วันที่)
deposit_dayInteger0ระยะเวลาภายใน (วัน)
discount_wordString25ส่วนลด
discount_word_2String50ส่วนลด(สกุลเงิน)
doc_closeInteger0ปิดเอกสาร
doc_dateDate0เอกสารวันที่
doc_format_codeString25รหัสเอกสาร
doc_groupString25กลุ่มเอกสาร
doc_noString25เอกสารเลขที่
doc_no_guidString25เลขที่เอกสารเปรียบเทียบ
doc_reasonString500เหตุผล
doc_refString255เอกสารอ้างอิง
doc_ref_dateDate0เอกสารอ้างอิงวันที่
doc_ref_transString25อ้างอิงเอกสาร
doc_successInteger0สิ้นสุด
doc_timeString5เวลา
doc_typeInteger0ประเภทเอกสาร
due_dateDate0วันที่ครบกำหนด
exchange_rateFloat0อัตราแลกเปลี่ยน
expire_dateDate0วันที่หมดอายุ
expire_dayInteger0จำนวนวันหมดอายุ
expire_statusInteger0สถานะหมดอายุ
extra_wordString100ข้อความเพิ่มเติม
guid_codeString35GUID
inquiry_typeInteger0ประเภทรายการ
is_cancelInteger0เอกสารยกเลิก
is_doc_copyInteger0เป็นเอกสารที่ออกแทน
is_holdInteger0ระงับเอกสาร
is_manual_vatInteger0บันทึกรายการภาษีเอง
is_posInteger0จากระบบ POS
job_codeString25งาน
job_code_toString25ถึงงาน
last_editor_codeString255ผู้แก้ไขเอกสารล่าสุด
last_statusInteger0สถานะ
lastedit_datetimeDate0วันที่แก้ไขล่าสุด
location_fromString25พื้นที่เก็บ
location_toString25ที่เก็บปลายทาง
lost_profit_exchange_amountFloat0ผลต่างจากอัตราแลกเปลี่ยน
member_codeString25รหัสสมาชิก
moneyFloat0จำนวนเงินคืน
not_approve_1Integer0ไม่อนุมัติ
on_holdInteger0ระงับชั่วคราว
pass_book_codeString25สมุดเงินฝาก
pay_amountFloat0เงินชำระ
period_guidString50GUID กะ
point_telephoneString25หมายเลขโทรศัพท์
pos_bill_changeInteger00=ปรกติ,1=ใบแทน
pos_bill_typeInteger00=อย่างย่อ,1=อย่างเต็ม
pos_idString25หมายเลขเครื่อง POS
pos_transferInteger0โอนมาจากPOS
project_codeString25โครงการ
project_code_toString25ถึงโครงการ
recheck_countInteger0เปิดระบบเตือนตรวจนับซ้ำ
recheck_count_dayFloat0เตือนย้อนหลัง (วัน)
ref_amountFloat0มูลค่าเอกสารเดิม
ref_diffFloat0ผลต่าง
ref_doc_typeString50ประเภทเอกสาร
ref_new_amountFloat0มูลค่าที่ถูกต้อง
remarkString255หมายเหตุ
remark_2String255หมายเหตุ 2
remark_3String255หมายเหตุ 3
remark_4String255หมายเหตุ 4
remark_5String255หมายเหตุ 5
sale_area_codeString25เขตการขาย
sale_codeString25พนักงานขาย
sale_groupString25กลุ่มพนักงานขาย
sale_shift_idString50รอบการขาย
send_dateDate0วันที่รับ/ส่งสินค้า
send_dayInteger0รับ/ส่ง ภายใน(วัน)
send_mailInteger0แจ้งส่งทาง อีเมล์
send_smsInteger0แจ้งส่งทาง SMS
send_to_pick_and_packInteger0สั่งจัดสินค้า
send_typeInteger0ประเภทการส่ง
sender_codeString25พนักงานขนส่ง
service_charge_wordString25Service Charge
side_codeString25ฝ่าย
side_code_toString25ถึงฝ่าย
statusInteger0สถานะ
sum_pay_money_diffFloat0ผลต่างยอดชำระ
sum_pointFloat0แต้ม
sum_point_2Float0ยอดแต้มสะสมระบบกลาง
table_numberString25หมายเลขโต๊ะ
tax_doc_dateDate0วันที่ใบกำกับ
tax_doc_noString25เลขที่ใบกำกับ
total_after_vatFloat0มูลค่าหลังคิดภาษี
total_amountFloat0มูลค่าสุทธิ
total_amount_2Float0มูลค่าสุทธิ(สกุลเงิน)
total_amout_oldFloat0มูลค่าสุทธิเดิม
total_before_vatFloat0ยอดก่อนภาษี
total_costFloat0ต้นทุนสินค้า
total_debt_amountFloat0ยอดหนี้รวมภาษี
total_discountFloat0มูลค่าส่วนลด
total_discount_2Float0มูลค่าส่วนลด(สกุลเงิน)
total_except_vatFloat0มูลค่ายกเว้นภาษี
total_manualInteger0บันทึกยอดรวมเอง
total_service_chargeFloat0มูลค่า Service Charge
total_valueFloat0มูลค่าสินค้า
total_value_2Float0มูลค่าสินค้า(สกุลเงิน)
total_vat_valueFloat0ภาษีมูลค่าเพิ่ม
trans_flagInteger0รายวันระบบ
trans_typeInteger0ประเภทรายวัน
transport_codeString25ขนส่งโดย
transport_valueFloat0ค่าขนส่ง
used_statusInteger0มีการอ้างอิงแล้ว
used_status_2Integer0สถานะ 2
user_approveString25ผู้อนุมัติ
user_requestString25ผู้ขออนุมัติ
vat_rateFloat0อัตราภาษี
vat_typeInteger0ประเภทภาษี
want_dateDate0ต้องการภายใน (วันที่)
want_dayInteger0ต้องการภายใน (วัน)
wh_fromString25คลัง
wh_toString25คลังปลายทาง