ใบเสร็จแบบแบ่งชำระแบบ Simple
ใช้ endpoint POST /receipts เพื่อสร้างใบเสร็จรับเงินแบบแบ่งชำระจากใบกำกับภาษี
โดยภาษีมูลค่าเพิ่มคำนวณในระดับเอกสาร เหมาะสำหรับใบกำกับภาษีที่มีอัตราภาษีเดียว
Request field
Required field ระดับเอกสาร
| Field | ประเภท | คำอธิบาย |
|---|
isBatchDocument | boolean | ต้องเป็น true เสมอ — ระบุว่าเป็นเอกสารแบบแบ่งชำระ |
partialPaymentMethod | number | ต้องเป็น 11 (RECPartial) |
publishedOn | string (date) | วันที่ออกเอกสาร (yyyy-MM-dd) |
creditType | number | ต้องเป็น 3 (เงินสด) ค่าอื่นไม่รองรับสำหรับใบเสร็จแบบแบ่งชำระ |
grandTotal | decimal | ต้องเท่ากับผลรวมของ partialAmount ทุกรายการ |
documentReference | array | ต้องเป็น null หรือ [] เท่านั้น |
Required field ระดับรายการสินค้า
| Field | ประเภท | คำอธิบาย |
|---|
documentId | number | recordId ของใบกำกับภาษีต้นทาง (ต้องมากกว่า 0) |
documentType | number | ต้องเป็น 7 (ใบกำกับภาษี) |
partialAmount | decimal | ยอดที่ต้องการชำระในงวดนี้ (ต้องมากกว่า 0 และไม่เกินยอดคงเหลือ) |
Field เพิ่มเติม (ไม่บังคับ)
ข้อมูลผู้ติดต่อ
| Field | ประเภท | คำอธิบาย |
|---|
contactId | integer (int64) | รหัสผู้ติดต่อ |
contactName | string | ชื่อผู้ติดต่อ |
contactCode | string | รหัสลูกค้า |
contactAddress | string | ที่อยู่ |
contactTaxId | string | เลขประจำตัวผู้เสียภาษี (13 หลัก) |
contactBranch | string | สาขา |
contactPerson | string | ชื่อผู้ติดต่อ |
contactEmail | string | อีเมล |
contactNumber | string | เบอร์โทรศัพท์ |
contactZipCode | string | รหัสไปรษณีย์ |
contactGroup | integer | ประเภทผู้ติดต่อ |
ข้อมูลเอกสาร
| Field | ประเภท | คำอธิบาย |
|---|
dueDate | string (date) | วันครบกำหนด (yyyy-MM-dd) |
creditDays | integer | จำนวนวันเครดิต |
salesName | string | ชื่อพนักงานขาย |
reference | string | เลขอ้างอิงจากระบบภายนอก |
projectName | string | ชื่อโครงการ |
remarks | string | หมายเหตุ |
internalNotes | string | บันทึกภายใน |
externalDocumentId | string | รหัสเอกสารจากระบบภายนอก |
showSignatureOrStamp | boolean | แสดงพื้นที่ลายเซ็น/ตรา |
การหักเงิน
| Field | ประเภท | คำอธิบาย |
|---|
useReceiptDeduction | boolean | ใช้การหักเงิน (ค่าเริ่มต้น: false) |
documentDeductionType | integer | ประเภทการหักเงิน |
documentDeductionAmount | number (decimal) | จำนวนเงินที่หัก |