การระบุภาษีหัก ณ ที่จ่ายสำหรับเอกสาร Simple
เอกสารแบบ Simple (useInlineVat: false) สามารถระบุภาษีหัก ณ ที่จ่ายได้เฉพาะระดับเอกสาร ผ่าน field documentWithholdingTaxPercentage และ documentWithholdingTaxAmount
เอกสารแบบ Simple สามารถระบุภาษีหัก ณ ที่จ่ายได้ 2 แบบ คือ
เงื่อนไขสำคัญ:
documentWithholdingTaxPercentageห้ามเป็น 0 เมื่อdocumentShowWithholdingTax: true(ต้อง > 0)withHeldPerItemและwithHeldPerItemValueจะไม่ถูกใช้งานในการสร้างเอกสารแบบ Simple
ในตัวอย่าง Payload และ Response ด้านล่าง fields ที่ถูกไฮไลท์ คือ fields ที่เกี่ยวข้องกับ feature การระบุภาษีหัก ณ ที่จ่าย
1. ไม่ระบุภาษีหัก ณ ที่จ่าย
Scenario บริษัท ตัวอย่าง จำกัด ซึ่งเป็นบริษัทที่จดภาษี ต้องการสร้างเอกสารค่าใช้จ่ายแบบ Simple โดยไม่ระบุภาษีหัก ณ ที่จ่าย
- รายการสินค้า: สินค้าตัวอย่าง
- ราคาต่อหน่วย: 150 บาท
- จำนวน: 1 Package
การตั้งค่าเอกสาร
| Field | Value |
|---|---|
isVat | true |
isVatInclusive | false |
useInlineVat | false |
documentShowWithholdingTax | false |
documentWithholdingTaxPercentage | 0 |
การคำนวณระดับสินค้า
| Field | Calculation logic | Example | Value |
|---|---|---|---|
quantity | input | 1 | 1 |
pricePerUnit | input | 150 | 150 |
total | quantity × pricePerUnit | 1 × 150 | 150 |
การคำนวณระดับเอกสาร
| Field | Calculation logic | Example | Value |
|---|---|---|---|
subTotal | ∑(quantity × pricePerUnit) | 150 | 150 |
totalAfterDiscount | subTotal | 150 | 150 |
vatAmount | totalAfterDiscount × 7 / 100 | 150 × 7 / 100 | 10.50 |
grandTotal | totalAfterDiscount + vatAmount | 150 + 10.50 | 160.50 |

Endpoint: POST /expenses
Payload
{
"contactCode": "C0001",
"contactName": "บริษัท ตัวอย่าง จำกัด",
"contactAddress": "141/12 ชั้น 11 ยูนิต 12B อาคารชุด สกุลไทย สุรวงศ์ ทาวเวอร์ ถนนสุรวงศ์ แขวงสุริยวงศ์ เขตบางรัก กรุงเทพมหานคร",
"contactTaxId": "0105558096348",
"contactBranch": "สำนักงานใหญ่ 00000",
"contactPerson": "ชื่อผู้ติดต่อ",
"contactEmail": "developer_support@flowaccount.com",
"contactNumber": "099-999-9999",
"contactZipCode": "10500",
"contactGroup": 1,
"publishedOn": "2020-11-11",
"creditType": 1,
"creditDays": 0,
"dueDate": "2020-11-11",
"projectName": "Expense - Simple document exclusive vat",
"reference": "INV2020110001",
"isVatInclusive": false,
"isVat": true,
"useInlineVat": false,
"documentShowWithHoldingTax": false,
"documentWithholdingTaxPercentage": 0,
"documentWithholdingTaxAmount": 0,
"salesName": "Sale Name",
"subTotal": 150,
"discountPercentage": 0,
"discountAmount": 0,
"totalAfterDiscount": 150,
"vatAmount": 10.5,
"grandTotal": 160.5,
"items": [
{
"description": "สินค้าตัวอย่าง",
"systemCode": 1001,
"categoryId": 40238,
"nameForeign": "Marketing & Advertising",
"nameLocal": "การตลาดและโฆษณา",
"creditId": 2707131,
"creditCode": "21399",
"creditCategory": 2,
"creditNameForeign": "21399 / Other Payables",
"creditNameLocal": "21399 / เจ้าหนี้อื่นๆ",
"debitId": 2707275,
"debitCode": "53029",
"debitCategory": 5,
"debitNameForeign": "53029 / Other advertising and marketing expenses",
"debitNameLocal": "53029 / ค่าใช้จ่ายด้านโฆษณาและการตลาดอื่นๆ",
"quantity": 1,
"unitName": "Package",
"pricePerUnit": 150,
"total": 150
}
],
"remarks": "Expense - Simple document exclusive vat",
"internalNotes": "Expense - Simple document exclusive vat",
"showSignatureOrStamp": true
}
Response
{
"status": true,
"message": "",
"code": 0,
"data": {
"recordId": 127725,
"documentSerial": "EXP2020110059",
"documentType": "13",
"statusString": "awaiting",
"contactCode": "C0001",
"contactName": "บริษัท ตัวอย่าง จำกัด",
"publishedOn": "2020-11-11T00:00:00",
"isVat": "true",
"isVatInclusive": "false",
"useInlineVat": "false",
"useInlineWithholdingTax": false,
"documentShowWithholdingTax": "false",
"documentWithholdingTaxPercentage": "0",
"documentWithholdingTaxAmount": 0.0,
"documentWithholdingTaxTypes": 1,
"subTotal": "150",
"discountAmount": "0",
"totalAfterDiscount": "150",
"vatableAmount": "150",
"vatAmount": "10.50000000",
"grandTotal": "160.5",
"totalWithoutVat": "150.00000000",
"items": [
{
"description": "สินค้าตัวอย่าง",
"quantity": "1",
"unitName": "Package",
"pricePerUnit": "150",
"total": "150",
"discountAmount": "0",
"vatRate": "7",
"withHeldPerItem": null,
"withHeldPerItemValue": null
}
]
}
}
2. ระบุภาษีหัก ณ ที่จ่ายระดับเอกสาร
Scenario บริษัท ตัวอย่าง จำกัด ซึ่งเป็นบริษัทที่จดภาษี ต้องการสร้างเอกสารค่าใช้จ่ายแบบ Simple โดยระบุภาษีหัก ณ ที่จ่าย 3% ระดับเอกสาร
- รายการสินค้า: สินค้าตัวอย่าง
- ราคาต่อหน่วย: 150 บาท
- จำนวน: 1 Package
- ภาษีหัก ณ ที่จ่ายระดับเอกสาร: 3% = 4.50 บาท
การตั้งค่าเอกสาร
| Field | Value |
|---|---|
isVat | true |
isVatInclusive | false |
useInlineVat | false |
documentShowWithholdingTax | true |
documentWithholdingTaxPercentage | 3 |
การคำนวณระดับสินค้า
| Field | Calculation logic | Example | Value |
|---|---|---|---|
quantity | input | 1 | 1 |
pricePerUnit | input | 150 | 150 |
total | quantity × pricePerUnit | 1 × 150 | 150 |
การคำนวณระดับเอกสาร
| Field | Calculation logic | Example | Value |
|---|---|---|---|
subTotal | ∑(quantity × pricePerUnit) | 150 | 150 |
totalAfterDiscount | subTotal | 150 | 150 |
vatAmount | totalAfterDiscount × 7 / 100 | 150 × 7 / 100 | 10.50 |
grandTotal | totalAfterDiscount + vatAmount | 150 + 10.50 | 160.50 |
documentWithholdingTaxPercentage | input | 3 | 3 |
documentWithholdingTaxAmount | totalAfterDiscount × documentWithholdingTaxPercentage / 100 | 150 × 3 / 100 | 4.50 |

Endpoint: POST /expenses
Payload
{
"contactCode": "C0001",
"contactName": "บริษัท ตัวอย่าง จำกัด",
"contactAddress": "141/12 ชั้น 11 ยูนิต 12B อาคารชุด สกุลไทย สุรวงศ์ ทาวเวอร์ ถนนสุรวงศ์ แขวงสุริยวงศ์ เขตบางรัก กรุงเทพมหานคร",
"contactTaxId": "0105558096348",
"contactBranch": "สำนักงานใหญ่ 00000",
"contactPerson": "ชื่อผู้ ติดต่อ",
"contactEmail": "developer_support@flowaccount.com",
"contactNumber": "099-999-9999",
"contactZipCode": "10500",
"contactGroup": 1,
"publishedOn": "2020-11-11",
"creditType": 1,
"creditDays": 0,
"dueDate": "2020-11-11",
"projectName": "Expense - Simple document exclusive vat",
"reference": "INV2020110001",
"isVatInclusive": false,
"isVat": true,
"useInlineVat": false,
"documentShowWithHoldingTax": true,
"documentWithholdingTaxPercentage": 3,
"documentWithholdingTaxAmount": 4.5,
"salesName": "Sale Name",
"subTotal": 150,
"discountPercentage": 0,
"discountAmount": 0,
"totalAfterDiscount": 150,
"vatAmount": 10.5,
"grandTotal": 160.5,
"items": [
{
"description": "สินค้าตัวอย่าง",
"systemCode": 1001,
"categoryId": 40238,
"nameForeign": "Marketing & Advertising",
"nameLocal": "การตลาดและโฆษณา",
"creditId": 2707131,
"creditCode": "21399",
"creditCategory": 2,
"creditNameForeign": "21399 / Other Payables",
"creditNameLocal": "21399 / เจ้าหนี้อื่นๆ",
"debitId": 2707275,
"debitCode": "53029",
"debitCategory": 5,
"debitNameForeign": "53029 / Other advertising and marketing expenses",
"debitNameLocal": "53029 / ค่าใช้จ่ายด้านโฆษณาและการตลาดอื่นๆ",
"quantity": 1,
"unitName": "Package",
"pricePerUnit": 150,
"total": 150
}
],
"remarks": "Expense - Simple document exclusive vat",
"internalNotes": "Expense - Simple document exclusive vat",
"showSignatureOrStamp": true
}
Response
- สำหรับเอกสารแบบ Simple (
useInlineVat: false) ค่าwithHeldPerItemและwithHeldPerItemValueใน response จะเป็นค่าว่าง ("") เนื่องจากไม่ได้ใช้งานการระบุภาษีหัก ณ ที่จ่ายระดับรายการสินค้า
{
"status": true,
"message": "",
"code": 0,
"data": {
"recordId": 127561,
"documentSerial": "EXP2020110047",
"documentType": "13",
"statusString": "awaiting",
"contactCode": "C0001",
"contactName": "บริษัท ตัวอย่าง จำกัด",
"publishedOn": "2020-11-11T00:00:00",
"isVat": "true",
"isVatInclusive": "false",
"useInlineVat": "false",
"useInlineWithholdingTax": false,
"documentShowWithholdingTax": "true",
"documentWithholdingTaxPercentage": "3",
"documentWithholdingTaxAmount": 4.5,
"documentWithholdingTaxTypes": 1,
"subTotal": "150",
"discountAmount": "0",
"totalAfterDiscount": "150",
"vatableAmount": "150",
"vatAmount": "10.50000000",
"grandTotal": "160.5",
"totalWithoutVat": "150.00000000",
"items": [
{
"description": "สินค้าตัวอย่าง",
"quantity": "1",
"unitName": "Package",
"pricePerUnit": "150",
"total": "150",
"discountAmount": "0",
"vatRate": "7",
"withHeldPerItem": "",
"withHeldPerItemValue": ""
}
]
}
}