Skip to content

sale creditnote Service ​

API รับคืนสินค้า/ลดหนี้


Header Request ​

FieldValue
GUIDGUID สำหรับการเชื่อมต่อ (smlx เสมอ)
providerชื่อผู้ใช้บริการ
databaseNameชื่อฐานข้อมูล
configFileNameชื่อไฟล์ตั้งค่า — รูปแบบ SMLConfig<provider>.xml
Content-Typeapplication/json; charset=utf-8

Header Example ​

json
{
  "GUID": "smlx",
  "provider": "DATA",
  "databaseName": "data1",
  "configFileName": "SMLConfigDATA.xml",
  "Content-Type": "application/json; charset=utf-8"
}

HTTP Response ​

Statusความหมาย
200สำเร็จ — กรณี list ที่ไม่พบเอกสารก็ได้ 200 เช่นกัน โดย data เป็น [] และ pages.total_record เป็น 0
400ข้อมูลผิดพลาด (code = 99) เช่น เลขที่เอกสารซ้ำ / ข้อมูลไม่ถูกต้อง — ดูสาเหตุจริงใน message
404ไม่พบเอกสาร (code = 404) กรณี GET ตามเลขที่เอกสาร หรือเรียก URL / path ไม่ถูกต้อง
405ใช้ HTTP method ไม่ถูกต้อง
500payload ผิดรูป หรือข้อผิดพลาดภายในระบบ

SaleCreditNote List ​

แสดงข้อมูลเอกสารรับคืนสินค้า/ลดหนี้ ทั้งหมด

EndPoint ​

GET /SMLJavaRESTService/salecreditnote/v4

ขอบเขตข้อมูล: คืนเฉพาะใบลดหนี้/รับคืนสินค้า (trans_flag = 48) ที่ยังไม่ถูกยกเลิก (last_status = 0)

Query Request ​

FieldDescriptionExample
dateกรองเฉพาะวันเดียว2024-11-15
from_dateตั้งแต่วันที่ (≥) — ใช้คู่กับ to_date ได้2024-01-01
to_dateจนถึงวันที่ (≤) — ใช้คู่กับ from_date ได้2024-12-31
cust_codeรหัสลูกค้าAR00016
sale_codeรหัสพนักงานขายS001
pay_typeประเภทการชำระ (cash หรือ credit)cash
doc_noเลขที่เอกสาร (ค้นแบบตรงตัว)CN67110001
last_update_date_timeวันที่แก้ไขล่าสุดตั้งแต่ (≥)2024-11-01
pageหน้าที่ (เริ่ม 1)1
sizeจำนวนต่อหน้า10

หมายเหตุ:

  • ถ้าส่ง date มาแล้ว ระบบจะใช้ date ก่อน (ไม่สนใจ from_date/to_date)
  • วันที่ทุกตัวใช้รูปแบบ yyyy-MM-dd
  • size คือจำนวนเอกสารต่อหน้า แต่ละเอกสารจะมีรายการสินค้า (details) ครบทุกบรรทัดเสมอ
  • total_record คือจำนวนเอกสารทั้งหมดที่ตรงเงื่อนไข และ max_page คือจำนวนหน้าทั้งหมด

Example: ​

GET localhost:8084/SMLJavaRESTService/salecreditnote/v4?page=1&size=2
GET localhost:8084/SMLJavaRESTService/salecreditnote/v4?from_date=2024-01-01&to_date=2024-12-31&page=1&size=10
GET localhost:8084/SMLJavaRESTService/salecreditnote/v4?cust_code=AR00016&page=1&size=10

Response Success ​

ตัวอย่างจริงจากคำสั่ง GET /SMLJavaRESTService/salecreditnote/v4?doc_no=CN2211-0001&page=1&size=1

json
{
    "success": true,
    "data": [
        {
            "trans_type": 2,
            "trans_flag": 48,
            "doc_group": "",
            "doc_date": "2022-11-30",
            "doc_no": "CN2211-0001",
            "doc_ref": "",
            "tax_doc_no": "CN2211-0001",
            "tax_doc_date": "2022-11-30",
            "inquiry_type": 0,
            "vat_type": 0,
            "cust_code": "2000",
            "contactor": "",
            "branch_code": "001",
            "project_code": "",
            "side_code": "",
            "department_code": "",
            "sale_area_code": "",
            "sale_code": "SUPERADMIN",
            "send_type": 0,
            "send_day": 0,
            "credit_day": 0,
            "answer_type": 0,
            "transport_value": 0,
            "discount_word": "",
            "vat_rate": 7,
            "currency_code": "",
            "exchange_rate": 0,
            "total_cost": 0,
            "total_value": 1800,
            "total_discount": 0,
            "total_vat_value": 126,
            "total_after_vat": 1926,
            "total_except_vat": 0,
            "total_amount": 1926,
            "balance_amount": 0,
            "adjust_reason": "",
            "approve_code": "",
            "remark": "",
            "status": 0,
            "user_request": "",
            "expire_day": 0,
            "send_mail": 0,
            "send_sms": 0,
            "doc_ref_trans": "",
            "credit_date": "2022-11-30",
            "total_before_vat": 1800,
            "doc_time": "10:20",
            "allocate_code": "",
            "job_code": "",
            "pay_amount": 0,
            "money": 0,
            "sum_pay_money_diff": 0,
            "currency_money": 0,
            "total_debt_amount": 0,
            "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": 0,
            "doc_format_code": "CN",
            "used_status_2": 0,
            "remark_2": "",
            "remark_3": "",
            "ref_amount": 1800,
            "ref_new_amount": 0,
            "ref_diff": 1800,
            "sum_point": 0,
            "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": 0,
            "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": 0,
            "sale_shift_id": "",
            "creator_code": "SUPERADMIN",
            "last_editor_code": "SUPERADMIN",
            "create_datetime": "2022-11-30 10:19:32.000",
            "lastedit_datetime": "2023-06-26 13:37:21.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": 0,
            "remark_4": "",
            "remark_5": "",
            "is_manual_vat": 0,
            "pass_book_code": "",
            "total_amount_2": 0,
            "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,
            "cust_name": "ลูกค้าทั่วไป",
            "sale_name": "ซุปเปอร์แมน",
            "total_cost_calc": 5518.24,
            "details": [
                {
                    "trans_type": 2,
                    "trans_flag": 48,
                    "doc_group": "",
                    "doc_date": "2022-11-30",
                    "doc_no": "CN2211-0001",
                    "doc_ref": "",
                    "cust_code": "2000",
                    "inquiry_type": 0,
                    "item_code": "1599990008",
                    "item_name": "ทรายถม ( 10 ล้อเหมาเที่ยว )",
                    "unit_code": "เที่ยว",
                    "qty": 2,
                    "price": 900,
                    "discount": "",
                    "sum_of_cost": 5518.24,
                    "sum_amount": 1800,
                    "remark": "",
                    "status": 0,
                    "line_number": 0,
                    "ref_doc_no": "INV2211-0004",
                    "ref_line_number": 0,
                    "ref_cust_code": "",
                    "branch_code": "001",
                    "wh_code": "01",
                    "shelf_code": "0101",
                    "wh_code_2": "",
                    "shelf_code_2": "",
                    "department_code": "",
                    "total_vat_value": 126,
                    "cancel_qty": 0,
                    "total_qty": 0,
                    "stand_value": 13,
                    "divide_value": 1,
                    "ratio": 0,
                    "ic_pattern": "",
                    "ic_color": "",
                    "ic_size": "",
                    "priority_level": 0,
                    "calc_flag": 1,
                    "last_status": 0,
                    "set_ref_line": "",
                    "set_ref_price": 0,
                    "set_ref_qty": 0,
                    "item_type": 0,
                    "vat_type": 0,
                    "doc_ref_type": 1,
                    "item_code_main": "",
                    "ref_row": 0,
                    "ref_guid": "",
                    "doc_time": "10:20",
                    "is_permium": 0,
                    "is_get_price": 1,
                    "average_cost": 212.24,
                    "sum_amount_exclude_vat": 1800,
                    "doc_date_calc": "2022-11-30",
                    "doc_time_calc": "10:20",
                    "discount_amount": 0,
                    "price_exclude_vat": 900,
                    "user_approve": "",
                    "price_type": 0,
                    "price_mode": 0,
                    "temp_float_1": 0,
                    "temp_float_2": 0,
                    "temp_string_1": "",
                    "is_serial_number": 0,
                    "bank_name": "",
                    "bank_branch": "",
                    "chq_number": "",
                    "barcode": "",
                    "discount_number": 0,
                    "price_changed": 0,
                    "discount_changed": 0,
                    "price_default": 0,
                    "tax_type": 0,
                    "is_pos": 0,
                    "auto_create": 0,
                    "hidden_cost_1": 0,
                    "hidden_cost_1_exclude_vat": 0,
                    "hidden_cost_2": 0,
                    "hidden_cost_2_exclude_vat": 0,
                    "sum_of_cost_1": 5518.24,
                    "average_cost_1": 212.24,
                    "sale_code": "SUPERADMIN",
                    "sale_group": "",
                    "lot_number_1": "",
                    "item_code_2": "",
                    "bank_name_2": "",
                    "bank_branch_2": "",
                    "sale_shift_id": "",
                    "price_base": 0,
                    "creator_code": "",
                    "last_editor_code": "",
                    "fee_amount": 0,
                    "transfer_amount": 0,
                    "price_set_ratio": 0,
                    "mfn_code": "",
                    "mfn_name": "",
                    "price_2": 0,
                    "sum_amount_2": 0,
                    "price_guid": "",
                    "discount_amount_2": 0,
                    "is_lock_cost": 0,
                    "sum_of_cost_fix": 0,
                    "profit_lost_cost_amount": 0,
                    "is_doc_copy": 0,
                    "bat_number": "",
                    "product_year": "",
                    "product_week": "",
                    "currency_code": "",
                    "exchange_rate": 0,
                    "qty_2": 0,
                    "unit_code_2": "",
                    "total_size": 0,
                    "unit_size": 0,
                    "exchange_rate_old": 0,
                    "promotion_code": "",
                    "item_brand": "",
                    "item_brand_name": null,
                    "group_main": "",
                    "group_main_name": null,
                    "group_sub": "",
                    "group_sub_name": null
                }
            ]
        }
    ],
    "pages": {
        "size": 1,
        "page": 1,
        "total_record": 1,
        "max_page": 1
    }
}

Response Error ​

json
{
    "success": false,
    "error": true,
    "message": "error message",
    "code": "99"
}

SaleCreditNote Information ​

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

EndPoint ​

GET /SMLJavaRESTService/salecreditnote/v4/{docno}

Path Parameter:

NameDescriptionExample
docnoเลขที่เอกสาร (ต้องเป็นใบลดหนี้ — ถ้าส่งเลขที่เอกสารประเภทอื่นจะได้ 404)CN2302-0001

example:

GET localhost:8084/SMLJavaRESTService/salecreditnote/v4/CN2302-0001

Response Success ​

ตัวอย่างจริงจากคำสั่ง GET /SMLJavaRESTService/salecreditnote/v4/CN2302-0001
ฟิลด์ที่เป็น null จะไม่ถูกส่งออก ยกเว้นฟิลด์ยี่ห้อ/กลุ่มสินค้าที่ส่งเป็น null เสมอ

json
{
    "success": true,
    "data": {
        "trans_type": 2,
        "trans_flag": 48,
        "doc_group": "",
        "doc_date": "2023-02-02",
        "doc_no": "CN2302-0001",
        "doc_ref": "",
        "tax_doc_no": "CN2302-0001",
        "tax_doc_date": "2023-02-02",
        "inquiry_type": 0,
        "vat_type": 0,
        "cust_code": "AR20-00001",
        "contactor": "",
        "branch_code": "",
        "project_code": "",
        "side_code": "",
        "department_code": "",
        "sale_area_code": "",
        "sale_code": "SUPERADMIN",
        "send_type": 0,
        "send_day": 0,
        "credit_day": 0,
        "answer_type": 0,
        "transport_value": 0,
        "discount_word": "",
        "vat_rate": 7,
        "currency_code": "",
        "exchange_rate": 0,
        "total_cost": 0,
        "total_value": 950,
        "total_discount": 0,
        "total_vat_value": 31.5,
        "total_after_vat": 481.5,
        "total_except_vat": 500,
        "total_amount": 981.5,
        "balance_amount": 0,
        "adjust_reason": "",
        "approve_code": "",
        "remark": "",
        "status": 0,
        "user_request": "",
        "expire_day": 0,
        "send_mail": 0,
        "send_sms": 0,
        "doc_ref_trans": "",
        "credit_date": "2023-02-02",
        "total_before_vat": 450,
        "doc_time": "13:57",
        "allocate_code": "",
        "job_code": "",
        "pay_amount": 0,
        "money": 0,
        "sum_pay_money_diff": 0,
        "currency_money": 0,
        "total_debt_amount": 0,
        "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": 0,
        "doc_format_code": "CN",
        "used_status_2": 0,
        "remark_2": "",
        "remark_3": "",
        "ref_amount": 950,
        "ref_new_amount": 0,
        "ref_diff": 950,
        "sum_point": 0,
        "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": 0,
        "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": 0,
        "sale_shift_id": "",
        "creator_code": "SUPERADMIN",
        "last_editor_code": "SUPERADMIN",
        "create_datetime": "2023-02-02 13:58:23.000",
        "lastedit_datetime": "2023-06-26 13:37:32.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": 0,
        "remark_4": "",
        "remark_5": "",
        "is_manual_vat": 0,
        "pass_book_code": "",
        "total_amount_2": 0,
        "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,
        "cust_name": "บริษัท ออนเวิร์ด",
        "sale_name": "ซุปเปอร์แมน",
        "total_cost_calc": 1962.92,
        "details": [
            {
                "trans_type": 2,
                "trans_flag": 48,
                "doc_group": "",
                "doc_date": "2023-02-02",
                "doc_no": "CN2302-0001",
                "doc_ref": "",
                "cust_code": "AR20-00001",
                "inquiry_type": 0,
                "item_code": "ICE-2302-0001",
                "item_name": "สินค้าชุด แก้วเยติ",
                "unit_code": "ชุด",
                "qty": 1,
                "price": 950,
                "discount": "",
                "sum_of_cost": 920,
                "sum_amount": 950,
                "remark": "",
                "status": 0,
                "line_number": 0,
                "ref_doc_no": "INV2302-0001",
                "ref_line_number": 0,
                "ref_cust_code": "",
                "branch_code": "",
                "wh_code": "01",
                "shelf_code": "0101",
                "wh_code_2": "",
                "shelf_code_2": "",
                "department_code": "",
                "total_vat_value": 66.5,
                "cancel_qty": 0,
                "total_qty": 0,
                "stand_value": 1,
                "divide_value": 1,
                "ratio": 0,
                "ic_pattern": "",
                "ic_color": "",
                "ic_size": "",
                "priority_level": 0,
                "calc_flag": 1,
                "last_status": 0,
                "set_ref_line": "",
                "set_ref_price": 0,
                "set_ref_qty": 0,
                "item_type": 3,
                "vat_type": 0,
                "doc_ref_type": 1,
                "item_code_main": "",
                "ref_row": 0,
                "ref_guid": "0ae64dd9-ab5a-4cb5-b16a-dbfb7f4906ce",
                "doc_time": "13:57",
                "is_permium": 0,
                "is_get_price": 1,
                "average_cost": 920,
                "sum_amount_exclude_vat": 950,
                "doc_date_calc": "2023-02-02",
                "doc_time_calc": "13:57",
                "discount_amount": 0,
                "price_exclude_vat": 950,
                "user_approve": "",
                "price_type": 0,
                "price_mode": 0,
                "temp_float_1": 0,
                "temp_float_2": 0,
                "temp_string_1": "",
                "is_serial_number": 0,
                "bank_name": "",
                "bank_branch": "",
                "chq_number": "",
                "barcode": "",
                "discount_number": 0,
                "price_changed": 0,
                "discount_changed": 0,
                "price_default": 0,
                "tax_type": 0,
                "is_pos": 0,
                "auto_create": 0,
                "hidden_cost_1": 0,
                "hidden_cost_1_exclude_vat": 0,
                "hidden_cost_2": 0,
                "hidden_cost_2_exclude_vat": 0,
                "sum_of_cost_1": 920,
                "average_cost_1": 920,
                "sale_code": "SUPERADMIN",
                "sale_group": "",
                "lot_number_1": "",
                "item_code_2": "",
                "bank_name_2": "",
                "bank_branch_2": "",
                "sale_shift_id": "",
                "price_base": 0,
                "creator_code": "",
                "last_editor_code": "",
                "fee_amount": 0,
                "transfer_amount": 0,
                "price_set_ratio": 0,
                "mfn_code": "",
                "mfn_name": "",
                "price_2": 0,
                "sum_amount_2": 0,
                "price_guid": "",
                "discount_amount_2": 0,
                "is_lock_cost": 0,
                "sum_of_cost_fix": 0,
                "profit_lost_cost_amount": 0,
                "is_doc_copy": 0,
                "bat_number": "",
                "product_year": "",
                "product_week": "",
                "currency_code": "",
                "exchange_rate": 0,
                "qty_2": 0,
                "unit_code_2": "",
                "total_size": 0,
                "unit_size": 0,
                "exchange_rate_old": 0,
                "promotion_code": "",
                "item_brand": "",
                "item_brand_name": null,
                "group_main": "",
                "group_main_name": null,
                "group_sub": "",
                "group_sub_name": null
            },
            {
                "trans_type": 2,
                "trans_flag": 48,
                "doc_group": "",
                "doc_date": "2023-02-02",
                "doc_no": "CN2302-0001",
                "doc_ref": "",
                "cust_code": "AR20-00001",
                "inquiry_type": 0,
                "item_code": "AGPAN15B001",
                "item_name": "แก้วเยติ (สีดำ)",
                "unit_code": "แก้ว",
                "qty": 1,
                "price": 500,
                "discount": "",
                "sum_of_cost": 598.38,
                "sum_amount": 500,
                "remark": "",
                "status": 0,
                "line_number": 1,
                "ref_doc_no": "INV2302-0001",
                "ref_line_number": 0,
                "ref_cust_code": "",
                "branch_code": "",
                "wh_code": "01",
                "shelf_code": "0101",
                "wh_code_2": "",
                "shelf_code_2": "",
                "department_code": "",
                "total_vat_value": 0,
                "cancel_qty": 0,
                "total_qty": 0,
                "stand_value": 1,
                "divide_value": 1,
                "ratio": 0,
                "ic_pattern": "",
                "ic_color": "",
                "ic_size": "",
                "priority_level": 0,
                "calc_flag": 1,
                "last_status": 0,
                "set_ref_line": "0ae64dd9-ab5a-4cb5-b16a-dbfb7f4906ce",
                "set_ref_price": 0,
                "set_ref_qty": 0,
                "item_type": 0,
                "vat_type": 0,
                "doc_ref_type": 1,
                "item_code_main": "ICE-2302-0001",
                "ref_row": 1,
                "ref_guid": "",
                "doc_time": "13:57",
                "is_permium": 0,
                "is_get_price": 1,
                "average_cost": 598.38,
                "sum_amount_exclude_vat": 500,
                "doc_date_calc": "2023-02-02",
                "doc_time_calc": "13:57",
                "discount_amount": 0,
                "price_exclude_vat": 500,
                "user_approve": "",
                "price_type": 0,
                "price_mode": 0,
                "temp_float_1": 0,
                "temp_float_2": 0,
                "temp_string_1": "",
                "is_serial_number": 0,
                "bank_name": "",
                "bank_branch": "",
                "chq_number": "",
                "barcode": "",
                "discount_number": 0,
                "price_changed": 0,
                "discount_changed": 0,
                "price_default": 0,
                "tax_type": 1,
                "is_pos": 0,
                "auto_create": 0,
                "hidden_cost_1": 0,
                "hidden_cost_1_exclude_vat": 0,
                "hidden_cost_2": 0,
                "hidden_cost_2_exclude_vat": 0,
                "sum_of_cost_1": 598.38,
                "average_cost_1": 598.38,
                "sale_code": "SUPERADMIN",
                "sale_group": "",
                "lot_number_1": "",
                "item_code_2": "",
                "bank_name_2": "",
                "bank_branch_2": "",
                "sale_shift_id": "",
                "price_base": 0,
                "creator_code": "",
                "last_editor_code": "",
                "fee_amount": 0,
                "transfer_amount": 0,
                "price_set_ratio": 0,
                "mfn_code": "",
                "mfn_name": "",
                "price_2": 0,
                "sum_amount_2": 0,
                "price_guid": "",
                "discount_amount_2": 0,
                "is_lock_cost": 0,
                "sum_of_cost_fix": 0,
                "profit_lost_cost_amount": 0,
                "is_doc_copy": 0,
                "bat_number": "",
                "product_year": "",
                "product_week": "",
                "currency_code": "",
                "exchange_rate": 0,
                "qty_2": 0,
                "unit_code_2": "",
                "total_size": 0,
                "unit_size": 0,
                "exchange_rate_old": 0,
                "promotion_code": "",
                "item_brand": "SCG",
                "item_brand_name": "ກາຊ້າງ",
                "group_main": "A",
                "group_main_name": "ຊີມັງ",
                "group_sub": "AA",
                "group_sub_name": "ປູນເທົາ"
            },
            {
                "trans_type": 2,
                "trans_flag": 48,
                "doc_group": "",
                "doc_date": "2023-02-02",
                "doc_no": "CN2302-0001",
                "doc_ref": "",
                "cust_code": "AR20-00001",
                "inquiry_type": 0,
                "item_code": "AGPAN18A001",
                "item_name": "แก้วเยติ (สีเขียว)",
                "unit_code": "ใบ",
                "qty": 1,
                "price": 450,
                "discount": "",
                "sum_of_cost": 444.54,
                "sum_amount": 450,
                "remark": "",
                "status": 0,
                "line_number": 2,
                "ref_doc_no": "INV2302-0001",
                "ref_line_number": 0,
                "ref_cust_code": "",
                "branch_code": "",
                "wh_code": "01",
                "shelf_code": "0101",
                "wh_code_2": "",
                "shelf_code_2": "",
                "department_code": "",
                "total_vat_value": 31.5,
                "cancel_qty": 0,
                "total_qty": 0,
                "stand_value": 1,
                "divide_value": 1,
                "ratio": 0,
                "ic_pattern": "",
                "ic_color": "",
                "ic_size": "",
                "priority_level": 0,
                "calc_flag": 1,
                "last_status": 0,
                "set_ref_line": "0ae64dd9-ab5a-4cb5-b16a-dbfb7f4906ce",
                "set_ref_price": 0,
                "set_ref_qty": 0,
                "item_type": 0,
                "vat_type": 0,
                "doc_ref_type": 1,
                "item_code_main": "ICE-2302-0001",
                "ref_row": 2,
                "ref_guid": "",
                "doc_time": "13:57",
                "is_permium": 0,
                "is_get_price": 1,
                "average_cost": 444.54,
                "sum_amount_exclude_vat": 450,
                "doc_date_calc": "2023-02-02",
                "doc_time_calc": "13:57",
                "discount_amount": 0,
                "price_exclude_vat": 450,
                "user_approve": "",
                "price_type": 0,
                "price_mode": 0,
                "temp_float_1": 0,
                "temp_float_2": 0,
                "temp_string_1": "",
                "is_serial_number": 0,
                "bank_name": "",
                "bank_branch": "",
                "chq_number": "",
                "barcode": "",
                "discount_number": 0,
                "price_changed": 0,
                "discount_changed": 0,
                "price_default": 0,
                "tax_type": 0,
                "is_pos": 0,
                "auto_create": 0,
                "hidden_cost_1": 0,
                "hidden_cost_1_exclude_vat": 0,
                "hidden_cost_2": 0,
                "hidden_cost_2_exclude_vat": 0,
                "sum_of_cost_1": 444.54,
                "average_cost_1": 444.54,
                "sale_code": "SUPERADMIN",
                "sale_group": "",
                "lot_number_1": "",
                "item_code_2": "",
                "bank_name_2": "",
                "bank_branch_2": "",
                "sale_shift_id": "",
                "price_base": 0,
                "creator_code": "",
                "last_editor_code": "",
                "fee_amount": 0,
                "transfer_amount": 0,
                "price_set_ratio": 0,
                "mfn_code": "",
                "mfn_name": "",
                "price_2": 0,
                "sum_amount_2": 0,
                "price_guid": "",
                "discount_amount_2": 0,
                "is_lock_cost": 0,
                "sum_of_cost_fix": 0,
                "profit_lost_cost_amount": 0,
                "is_doc_copy": 0,
                "bat_number": "",
                "product_year": "",
                "product_week": "",
                "currency_code": "",
                "exchange_rate": 0,
                "qty_2": 0,
                "unit_code_2": "",
                "total_size": 0,
                "unit_size": 0,
                "exchange_rate_old": 0,
                "promotion_code": "",
                "item_brand": "",
                "item_brand_name": null,
                "group_main": "D",
                "group_main_name": "ເຫຼັກ",
                "group_sub": "DG",
                "group_sub_name": "ອຸປະກອນເຫຼັກຊັ້ນເກັບຂອງ"
            }
        ]
    }
}

Response Error ​

ไม่พบเอกสาร (รวมถึงกรณีส่งเลขที่เอกสารประเภทอื่น เช่นใบขาย) → HTTP 404

json
{
    "success": false,
    "error": true,
    "message": "SaleCreditNote not found: CN2302-0001",
    "code": "404"
}

Add SaleCreditNote ​

สร้างเอกสารรับคืนสินค้า/ลดหนี้

EndPoint ​

POST /SMLJavaRESTService/salecreditnote/v4/

Body Data: ​

JSON body with SaleCreditNote Request Attribute

example:

{
    "doc_date": "2023-02-27",
    "doc_no": "CN23020001",
    "tax_doc_no": "CN23020001",
    "tax_doc_date": "2023-02-27",
    "inquiry_type": 0,
    "vat_type": 1,
    "cust_code": "AR00016",
    "branch_code": "001",
    "vat_rate": 7,
    "total_value": 150,
    "total_discount": 0,
    "total_vat_value": 9.813,
    "total_after_vat": 150,
    "total_except_vat": 0,
    "total_amount": 150,
    "balance_amount": 0,
    "total_before_vat": 140.187,
    "doc_time": "14:19",
    "doc_format_code": "CN",
    "details": [
        {
            "doc_no": "CN23020001",
            "item_code": "AC-00014",
            "item_name": "น้ำยาบัดกรี",
            "unit_code": "อัน",
            "qty": 3,
            "price": 50,
            "sum_of_cost": 45,
            "sum_amount": 150,
            "status": 0,
            "line_number": 0,
            "ref_doc_no": "INV23020008",
            "ref_row": 0,
            "ref_line_number": 0,
            "doc_ref_type": 1,
            "calc_flag": 1,
            "vat_type": 1,
            "item_type": 0,
            "wh_code": "CENTER",
            "shelf_code": "CENTER"
        }
    ],
    "transaction_ref": [
        {
            "billing_no": "INV23020008",
            "billing_date": "2023-02-13",
            "doc_date": "2023-02-27",
            "sum_debt_value": 999.00,
            "sum_debt_balance": 999.00
        }
    ]
}

SaleCreditNote Attribute ​

เรื่องต้นทุน

  • ต้นทุนต่อรายการสินค้าอยู่ที่ sum_of_cost ใน details แต่ละบรรทัด
  • ต้นทุนรวมของเอกสารอยู่ที่ total_cost_calc ซึ่งระบบคำนวณให้จากผลรวม sum_of_cost ของรายการสินค้า (ไม่นับบรรทัดที่ถูกยกเลิก)
  • ฟิลด์ total_cost เป็นค่าที่ SML เก็บไว้ในเอกสาร ซึ่งปกติเป็น 0 จึงไม่ควรนำไปใช้
  • เอกสารที่สร้างผ่าน API โดยไม่ส่ง sum_of_cost มา ระบบใส่ต้นทุนตั้งต้นจากทุนเฉลี่ยของสินค้าให้ (เป็น 0 ถ้าสินค้ายังไม่มีทุนเฉลี่ย) แล้ว SML จะคำนวณต้นทุนจริงทับเมื่อประมวลผลคิว ฟิลด์ read-only — ฟิลด์ที่ระบบ JOIN มาจากตารางอื่น (cust_name, sale_name, total_cost_calc, item_brand, item_brand_name, group_main, group_main_name, group_sub, group_sub_name) เป็นข้อมูลสำหรับอ่านเท่านั้น ถ้าส่งมาใน POST ระบบจะไม่นำไปบันทึก
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ลูกหนี้/เจ้าหนี้
cust_nameString255ชื่อลูกหนี้/ลูกค้า (read-only)
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_nameString255ชื่อพนักงานขาย (read-only)
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_cost_calcFloatต้นทุนรวมของเอกสาร คำนวณจากผลรวม sum_of_cost ของรายการสินค้า (read-only)
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คลังปลายทาง
detailsArrayObjectรายละเอียดสินค้า

SaleCreditNote Detail ​

ฟิลด์ที่บันทึกได้ตอน POST — item_code, barcode, unit_code, qty, price, discount, discount_amount, sum_amount, sum_amount_exclude_vat, remark, tax_type, wh_code, shelf_code, line_number, ref_doc_no, ref_row, ref_line_number, doc_ref_type, calc_flag, vat_type, item_type, total_vat_value, sum_of_cost, average_cost

  • ค่าที่ระบบใส่ให้ถ้าไม่ส่งมา
    • calc_flag = 1 (รับคืนเข้าสต็อก)
    • ref_row, ref_line_number = 0
    • doc_ref_type = 1 ถ้ามี ref_doc_no (อ้างบิลขาย) / 0 ถ้าไม่มี
    • vat_type = ตาม vat_type หัวเอกสาร ถ้าหัวเป็น 0 หรือ 1 / นอกนั้นเป็น 0 (รายการสินค้าใช้เลขคนละชุดกับหัวเอกสาร)
    • item_type = ประเภทสินค้าในทะเบียนสินค้า
    • average_cost = ทุนเฉลี่ยปัจจุบันในทะเบียนสินค้า และ sum_of_cost = average_cost × qty × อัตราส่วนหน่วยนับ — เป็นค่าตั้งต้น SML จะคำนวณต้นทุนจริงทับเมื่อประมวลผลคิว
  • หลังบันทึก ระบบส่งรหัสสินค้าเข้าคิวประมวลผลสต็อก (ตาราง process) ให้อัตโนมัติ ยอดคงเหลือจะอัปเดตเมื่อ SML ประมวลผลคิว
  • item_name, stand_value, divide_value, doc_date_calc, doc_time_calc ระบบเติมให้หลังบันทึก ไม่ต้องส่ง
  • ฟิลด์อื่นในตารางเป็นข้อมูลสำหรับอ่าน (GET) ถ้าส่งมาใน POST ระบบจะไม่นำไปบันทึก
  • ถ้าอ้างอิงบิลขาย ควรส่ง ref_doc_no, ref_row, ref_line_number, doc_ref_type ให้ครบ เพื่อให้ SML ผูกรายการกับบรรทัดในบิลขายต้นทางได้
Field NameField TypeLengthDescription
auto_createInteger0สร้างโดยโปรแกรม
average_costFloat0ราคาทุนเฉลี่ย — ไม่ส่งมาระบบใส่ทุนเฉลี่ยจากทะเบียนสินค้า
average_cost_1Float0ราคาทุนเฉลี่ยแฝง
bank_branchString25สาขา
bank_branch_2String25สาขา
bank_nameString25ธนาคาร
bank_name_2String25ธนาคาร
barcodeString25Barcode
bat_dateDate0bat date
bat_numberString255bat number
branch_codeString25สาขา
calc_flagInteger0บวกหรือลบสต็อก (1=บวก,-1=ลบ) ใบลดหนี้ใช้ 1 — ไม่ส่งมาระบบใส่ 1 ให้
cancel_qtyFloat0จำนวนยกเลิก
chq_numberString25เลขที่เช็ค
create_datetimeDate0วันที่สร้างเอกสาร
creator_codeString25ผู้สร้างเอกสาร
currency_codeString25สกุลเงิน
cust_codeString25ลูกหนี้/เจ้าหนี้
date_dueDate0วันครบกำหนด
date_expireDate0หมดอายุ
department_codeString25แผนกที่ขออนุมัติ
discountString25ส่วนลด
discount_amountFloat0มูลค่าส่วนลด
discount_amount_2Float0มูลค่าส่วนลด
discount_changedInteger0มีการแก้ไขส่วนลด
discount_numberInteger0หมายเลขส่วนลด
divide_valueFloat0ตัวหาร
doc_dateDate0เอกสารวันที่
doc_date_calcDate0วันที่สำหรับคำนวณ
doc_groupString25กลุ่มเอกสาร
doc_noString25เอกสารเลขที่
doc_refString25เอกสารอ้างอิง
doc_ref_typeInteger0ประเภทเอกสารอ้างอิง (อ้างบิลขาย = 1) — ไม่ส่งมา: มี ref_doc_no = 1 ไม่มี = 0
doc_timeString5เวลา
doc_time_calcString5เวลาสำหรับคำนวณ
due_dateDate0วันที่ต้องการ
exchange_rateFloat0อัตราแลกเปลี่ยน
exchange_rate_oldFloat0อัตราแลกเปลี่ยนเดิม
fee_amountFloat0ค่าธรรมเนียม
group_mainString25รหัสกลุ่มสินค้าหลัก (จากทะเบียนสินค้า) (read-only)
group_main_nameString255ชื่อกลุ่มสินค้าหลัก (read-only)
group_subString25รหัสกลุ่มสินค้าย่อย (จากทะเบียนสินค้า) (read-only)
group_sub_nameString255ชื่อกลุ่มสินค้าย่อย (read-only)
hidden_cost_1Float0ต้นทุนแฝงบริหาร
hidden_cost_1_exclude_vatFloat0ต้นทุนแฝงบริหารไม่รวมภาษี
hidden_cost_2Float0ต้นทุนแฝงบัญชี
hidden_cost_2_exclude_vatFloat0ต้นทุนแฝงบัญชีไม่รวมภาษี
ic_colorString25สีสินค้า
ic_patternString25รูปแบบสินค้า
ic_sizeString25ขนาดสินค้า
inquiry_typeInteger0ประเภทการซื้อ
is_doc_copyInteger0เป็นเอกสารที่ออกแทน
is_get_priceInteger0ให้ดึงราคาขาย (1=ดึง)
is_lock_costInteger0กำหนดต้นทุนเอง
is_permiumInteger01=ของแถม
is_posInteger0จาก POS
is_serial_numberInteger0มีหมายเลขเครื่อง
item_brandString25รหัสยี่ห้อสินค้า (จากทะเบียนสินค้า) (read-only)
item_brand_nameString255ชื่อยี่ห้อสินค้า (read-only)
item_codeString25รหัสสินค้า
item_code_2String25รหัสสินค้า
item_code_mainString25สินค้าหลัก
item_nameString255ชื่อสินค้า
item_typeInteger0ประเภทสินค้า (สินค้าปกติ = 0)
last_editor_codeString25ผู้แก้ไขเอกสารล่าสุด
last_statusInteger0สถานะล่าสุด (0=Normal,1=ยกเลิก)
lastedit_datetimeDate0วันที่แก้ไขล่าสุด
line_numberInteger0บรรทัด
lot_number_1String50เลข LOT
mfd_dateDate0วันที่ผลิต
mfn_codeString50รหัสผู้ผลิต
mfn_nameString255ผู้ผลิต
priceFloat0ราคา
price_2Float0ราคา
price_baseFloat0ราคากลาง
price_changedInteger0มีการแก้ไขราคา
price_defaultFloat0ราคาเริ่มต้น
price_exclude_vatFloat0ราคาไม่รวมภาษี
price_guidString55Price Guid
price_modeInteger0กลุ่มราคา
price_set_ratioFloat0อัตราส่วนราคาสินค้าชุด
price_typeInteger0ประเภทราคา
priority_levelInteger0ความสำคัญ
product_weekString10สัปดาห์ที่ผลิต
product_yearString10ปีที่ผลิต
profit_lost_cost_amountFloat0กำไรขาดทุน
promotion_codeString50รหัสโปรโมชั่น
qtyFloat0จำนวน
qty_2Float0จำนวนขาย
ratioFloat0อัตราส่วน
ref_cust_codeString25อ้างอิง เจ้าหนี้/ลูกหนี้
ref_doc_dateDate0อ้างอิง วันที่
ref_doc_noString25อ้างอิง
ref_guidString40ref_guid
ref_line_numberInteger0อ้างอิง บรรทัด — ไม่ส่งมาระบบใส่ 0
ref_rowInteger0ลำดับบรรทัดในเอกสารอ้างอิง (เริ่มที่ 0) — ไม่ส่งมาระบบใส่ 0
remarkString255หมายเหตุ
sale_codeString25รหัสพนักงานขาย
sale_groupString25กลุ่มพนักงานขาย
sale_shift_idString50รอบการขาย
set_ref_lineString40บรรทัดอ้างอิง (สินค้าชุด)
set_ref_priceFloat0ราคาอ้างอิง (สินค้าชุด)
set_ref_qtyFloat0จำนวนอ้างอิง (สินค้าชุด)
shelf_codeString25พื้นที่เก็บ
shelf_code_2String25พื้นที่เก็บ
stand_valueFloat0ตัวตั้ง
statusInteger0สถานะ
sum_amountFloat0รวมมูลค่า
sum_amount_2Float0รวมมูลค่า
sum_amount_exclude_vatFloat0รวมมูลค่า
sum_of_costFloat0รวมต้นทุน — ไม่ส่งมาระบบคำนวณจาก average_cost × qty
sum_of_cost_1Float0ต้นทุนรวมต้นทุนแฝงบริหาร
sum_of_cost_fixFloat0ต้นทุน
tax_typeInteger0ประเภทภาษี (0=มีภาษี,1=ยกเว้น)
temp_float_1Float0ตัวเลข 1
temp_float_2Float0ตัวเลข 2
temp_string_1String25ตัวอักษร 1
total_qtyFloat0จำนวนคงเหลือ
total_sizeFloat0รวมหน่วยนับ 2
total_vat_valueFloat0ภาษีมูลค่าเพิ่มรายบรรทัด — ส่งตอน POST ได้ (ส่งในชื่อ vat_amount แทนก็ได้)
trans_flagInteger0รายวันระบบ
trans_typeInteger0ประเภทรายวัน
transfer_amountFloat0ยอดโอนเงิน
unit_codeString25หน่วยนับ
unit_code_2String25หน่วยช่วยขาย
unit_sizeFloat0ขนาดสินค้า
user_approveString25รหัสผู้อนุมัติ
vat_typeInteger0ประเภทภาษี (0=แยกนอก,1=รวมใน,2=อัตรา 0) — ไม่ส่งมา: ตามหัวเอกสารถ้าเป็น 0/1 นอกนั้น 0
wh_codeString25คลัง
wh_code_2String25คลัง

SaleCreditNote Transaction_ref ​

Field NameField TypeLengthDescription
billing_noString0เอกสารเลขที่
billing_dateDate0เอกสารวันที่
doc_dateDate0เอกสารวันที่
sum_debt_valueFloat25รวมมูลค่า
sum_debt_balanceFloat25ยอดหนี้คงเหลือ