Skip to main content

การระบุภาษีหัก ณ ที่จ่ายสำหรับเอกสาร Inline

เอกสารแบบ Inline สามารถระบุภาษีหัก ณ ที่จ่ายได้ทั้งระดับเอกสารและระดับรายการสินค้า ขึ้นอยู่กับการตั้งค่า useInlineDiscount และ useInlineVat

เอกสารแบบ Inline สามารถระบุภาษีหัก ณ ที่จ่ายได้ 3 แบบ คือ

  1. ระบุส่วนลดระดับสินค้า เเละ ระบุภาษีหัก ณ ที่จ่ายระดับเอกสาร
  2. ระบุส่วนลดระดับสินค้า เเต่ไม่ระบุภาษีหัก ณ ที่จ่ายระดับเอกสาร
  3. ระบุภาษีหัก ณ ที่จ่ายระดับสินค้า

เงื่อนไขสำคัญ:

  • แบบที่ 1 (ระบุภาษีหัก ณ ที่จ่ายระดับเอกสาร): ใช้ documentWithholdingTaxPercentage > 0 คำนวณจาก totalAfterDiscount
  • แบบที่ 3 (ระบุภาษีหัก ณ ที่จ่ายระดับสินค้า): documentWithholdingTaxPercentage ต้องเป็น 0 เสมอ และใช้ withHeldPerItem / withHeldPerItemValue ระดับรายการสินค้าแทน
  • documentShowWithholdingTax ต้องเป็น true สำหรับแบบที่ 1 และ 3
  • documentWithholdingTaxAmount = ผลรวมของภาษีหัก ณ ที่จ่ายทั้งหมด
tip

ในตัวอย่าง Payload และ Response ด้านล่าง fields ที่ถูกไฮไลท์ คือ fields ที่เกี่ยวข้องกับ feature การระบุภาษีหัก ณ ที่จ่าย


1. ระบุส่วนลดระดับสินค้า เเละ ระบุภาษีหัก ณ ที่จ่ายระดับเอกสาร


Scenario บริษัท ตัวอย่าง จำกัด ซึ่งเป็นบริษัทที่จดภาษี ต้องการสร้างเอกสารค่าใช้จ่ายแบบ Inline Discount พร้อมระบุภาษีหัก ณ ที่จ่าย 3% ระดับเอกสาร

  • รายการสินค้า: สินค้าตัวอย่าง
    • ราคาต่อหน่วย: 10,000 บาท
    • จำนวน: 1
    • ส่วนลด: 100 บาท
  • ภาษีหัก ณ ที่จ่ายระดับเอกสาร: 3% = 297 บาท

การตั้งค่าเอกสาร

FieldValue
isVattrue
isVatInclusivefalse
useInlineDiscounttrue
useInlineVatfalse
documentShowWithholdingTaxtrue
documentWithholdingTaxPercentage3

การคำนวณระดับสินค้า

FieldCalculation logicExampleValue
quantityinput11
pricePerUnitinput1000010000
discountAmountinput100100
totalquantity × pricePerUnit - discountAmount1 × 10000 - 1009900

การคำนวณระดับเอกสาร

FieldCalculation logicExampleValue
subTotal∑(total)1000010000
discountAmount∑(discountAmount per item)100100
totalAfterDiscountsubTotal - discountAmount10000 - 1009900
vatAmounttotalAfterDiscount × 7 / 1009900 × 7 / 100693
documentWithholdingTaxPercentageinput33
documentWithholdingTaxAmounttotalAfterDiscount × documentWithholdingTaxPercentage / 1009900 × 3 / 100297
grandTotaltotalAfterDiscount + vatAmount9900 + 69310593

document screen Inline Discount Expense พร้อมภาษีหัก ณ ที่จ่ายระดับเอกสาร
ภาพแสดงเอกสารที่ FlowAccount

Endpoint: POST /expenses/inline

Payload

{
"contactName": "บริษัท ตัวอย่าง จำกัด",
"contactAddress": "11/12 Example Rd, Silom, Bang Rak, Bangkok Example contact address",
"contactTaxId": "1234567890123",
"contactBranch": "สํานักงานใหญ่",
"contactPerson": "ExamplePerson",
"contactEmail": "Example@email.com",
"contactNumber": "087-654-3210",
"contactZipCode": "10500",
"contactGroup": 1,
"publishedOn": "2026-02-23",
"creditType": 1,
"creditDays": 30,
"dueDate": "2026-03-25",
"isVatInclusive": false,
"isVat": true,
"salesName": "n b",
"discountType": 1,
"useInlineDiscount": true,
"isManualWHT": false,
"useInlineVat": false,
"documentShowWithholdingTax": true,
"documentWithholdingTaxPercentage": 3,
"documentWithholdingTaxAmount": 297,
"subTotal": 10000,
"discountAmount": 100,
"exemptAmount": 0,
"vatableAmount": 9900,
"totalAfterDiscount": 9900,
"vatAmount": 693,
"grandTotal": 10593,
"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": "",
"pricePerUnit": 10000,
"discountAmount": 100,
"total": 9900,
"vatRate": 7,
"isManualWithholdingTaxItem": false
}
],
"showSignatureOrStamp": true
}

Response

info
  • สำหรับเอกสารแบบ Inline ที่ useInlineVat: false ค่า withHeldPerItem และ withHeldPerItemValue ใน response จะเป็นค่าว่าง ("") เนื่องจากไม่ได้ใช้งานการระบุภาษีหัก ณ ที่จ่ายระดับรายการสินค้า
{
"status": true,
"message": "",
"code": 0,
"data": {
"recordId": 127732,
"documentSerial": "EXP2026020125",
"documentType": "13",
"statusString": "awaiting",
"contactName": "บริษัท ตัวอย่าง จำกัด",
"publishedOn": "2026-02-23T00:00:00",
"isVat": "true",
"isVatInclusive": "false",
"useInlineDiscount": "true",
"useInlineVat": "false",
"useInlineWithholdingTax": false,
"documentShowWithholdingTax": "true",
"documentWithholdingTaxPercentage": "3",
"documentWithholdingTaxAmount": 297.0,
"documentWithholdingTaxTypes": 1,
"subTotal": "10000",
"discountAmount": "100",
"totalAfterDiscount": "9900",
"vatableAmount": "9900",
"vatAmount": "693.00000000",
"grandTotal": "10593",
"totalWithoutVat": "9603.00000000",
"items": [
{
"description": "สินค้าตัวอย่าง",
"quantity": "1",
"pricePerUnit": "10000",
"total": "9900",
"discountAmount": "100",
"vatRate": "7",
"withHeldPerItem": "",
"withHeldPerItemValue": ""
}
]
}
}

2. ระบุส่วนลดระดับสินค้า เเต่ไม่ระบุภาษีหัก ณ ที่จ่ายระดับเอกสาร


Scenario บริษัท ตัวอย่าง จำกัด ซึ่งเป็นบริษัทที่จดภาษี ต้องการสร้างเอกสารค่าใช้จ่ายแบบ Inline Discount โดยไม่ระบุภาษีหัก ณ ที่จ่าย

  • รายการสินค้า: สินค้าตัวอย่าง
    • ราคาต่อหน่วย: 10,000 บาท
    • จำนวน: 1
    • ส่วนลด: 100 บาท

การตั้งค่าเอกสาร

FieldValue
isVattrue
isVatInclusivefalse
useInlineDiscounttrue
useInlineVatfalse
documentShowWithholdingTaxfalse
documentWithholdingTaxPercentage0

การคำนวณระดับสินค้า

FieldCalculation logicExampleValue
quantityinput11
pricePerUnitinput1000010000
discountAmountinput100100
totalquantity × pricePerUnit - discountAmount1 × 10000 - 1009900

การคำนวณระดับเอกสาร

FieldCalculation logicExampleValue
subTotal∑(total)1000010000
discountAmount∑(discountAmount per item)100100
totalAfterDiscountsubTotal - discountAmount10000 - 1009900
vatAmounttotalAfterDiscount × 7 / 1009900 × 7 / 100693
grandTotaltotalAfterDiscount + vatAmount9900 + 69310593

document screen Inline Discount Expense ไม่ระบุภาษีหัก ณ ที่จ่าย
ภาพแสดงเอกสารที่ FlowAccount

Endpoint: POST /expenses/inline

Payload

{
"contactName": "บริษัท ตัวอย่าง จำกัด",
"contactAddress": "11/12 Example Rd, Silom, Bang Rak, Bangkok Example contact address",
"contactTaxId": "1234567890123",
"contactBranch": "สํานักงานใหญ่",
"contactPerson": "ExamplePerson",
"contactEmail": "Example@email.com",
"contactNumber": "087-654-3210",
"contactZipCode": "10500",
"contactGroup": 1,
"publishedOn": "2026-02-23",
"creditType": 1,
"creditDays": 30,
"dueDate": "2026-03-25",
"isVatInclusive": false,
"isVat": true,
"salesName": "n b",
"discountType": 1,
"useInlineDiscount": true,
"isManualWHT": false,
"useInlineVat": false,
"documentShowWithholdingTax": false,
"documentWithholdingTaxPercentage": 0,
"documentWithholdingTaxAmount": 0,
"subTotal": 10000,
"discountAmount": 100,
"exemptAmount": 0,
"vatableAmount": 9900,
"totalAfterDiscount": 9900,
"vatAmount": 693,
"grandTotal": 10593,
"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": "",
"pricePerUnit": 10000,
"discountAmount": 100,
"total": 9900,
"vatRate": 7,
"isManualWithholdingTaxItem": false
}
],
"showSignatureOrStamp": true
}

Response

{
"status": true,
"message": "",
"code": 0,
"data": {
"recordId": 127729,
"documentSerial": "EXP2026020122",
"documentType": "13",
"statusString": "awaiting",
"contactName": "บริษัท ตัวอย่าง จำกัด",
"publishedOn": "2026-02-23T00:00:00",
"isVat": "true",
"isVatInclusive": "false",
"useInlineDiscount": "true",
"useInlineVat": "false",
"useInlineWithholdingTax": false,
"documentShowWithholdingTax": "false",
"documentWithholdingTaxPercentage": "0",
"documentWithholdingTaxAmount": 0.0,
"documentWithholdingTaxTypes": 1,
"subTotal": "10000",
"discountAmount": "100",
"totalAfterDiscount": "9900",
"vatableAmount": "9900",
"vatAmount": "693.00000000",
"grandTotal": "10593",
"items": [
{
"description": "สินค้าตัวอย่าง",
"quantity": "1",
"pricePerUnit": "10000",
"total": "9900",
"discountAmount": "100",
"vatRate": "7",
"withHeldPerItem": "",
"withHeldPerItemValue": ""
}
]
}
}

3. ระบุภาษีหัก ณ ที่จ่ายระดับสินค้า


Scenario บริษัท ตัวอย่าง จำกัด ซึ่งเป็นบริษัทที่จดภาษี ต้องการสร้างเอกสารค่าใช้จ่ายแบบ Inline Discount + VAT โดยระบุภาษีหัก ณ ที่จ่าย 3% ต่อรายการสินค้า

  • รายการสินค้า: ค่าบริการที่ปรึกษา
    • ราคาต่อหน่วย: 10,000 บาท
    • จำนวน: 1 งาน
    • ภาษีหัก ณ ที่จ่าย: 3% = 300 บาท

การตั้งค่าเอกสาร

FieldValue
isVattrue
isVatInclusivefalse
useInlineDiscounttrue
useInlineVattrue
documentShowWithholdingTaxtrue
documentWithholdingTaxPercentage0

การคำนวณระดับสินค้า

FieldCalculation logicExampleValue
quantityinput11
pricePerUnitinput1000010000
totalquantity × pricePerUnit1 × 1000010000
withHeldPerIteminput33
withHeldPerItemValuetotal × withHeldPerItem / 10010000 × 3 / 100300

การคำนวณระดับเอกสาร

FieldCalculation logicExampleValue
subTotal∑(quantity × pricePerUnit)1000010000
totalAfterDiscountsubTotal1000010000
vatAmounttotalAfterDiscount × 7 / 10010000 × 7 / 100700
documentWithholdingTaxAmount∑(withHeldPerItemValue)300300
grandTotaltotalAfterDiscount+vatAmount10000 + 70010700

document screen Inline Document
ภาพแสดงเอกสารที่ FlowAccount

Endpoint: POST /expenses/inline

Payload

{
"contactName": "บริษัท ตัวอย่าง จำกัด",
"publishedOn": "2026-03-05",
"isVat": true,
"isVatInclusive": false,
"isManualWHT": false,
"documentStructureType": "InlineDocument",
"useInlineVat": true,
"documentShowWithholdingTax": true,
"documentWithholdingTaxPercentage": 0,
"documentWithholdingTaxAmount": 300,
"subTotal": 10000,
"totalAfterDiscount": 10000,
"grandTotal": 10700,
"vatableAmount": 10000,
"vatAmount": 700,
"items": [
{
"id": 1,
"type": 1,
"name": "ค่าบริการที่ปรึกษา",
"description": "ค่าที่ปรึกษาโครงการ Q1",
"quantity": 1,
"unitName": "งาน",
"pricePerUnit": 10000,
"total": 10000,
"withHeldPerItem": 3,
"withHeldPerItemValue": 300
}
]
}

Response

info
  • Response จะมี field useInlineWithholdingTax: true เพิ่มขึ้นมา เพื่อระบุว่าเอกสารนี้ใช้ Inline Withholding tax
  • documentWithholdingTaxTypes: 1 หมายถึงประเภทของการหัก ณ ที่จ่ายเป็นเเบบเปอร์เซ็นต์ (fix)
{
"status": true,
"message": "",
"code": 0,
"data": {
"recordId": 127522,
"documentSerial": "EXP2026020118",
"documentType": "13",
"statusString": "awaiting",
"contactName": "บริษัท ตัวอย่าง จำกัด",
"publishedOn": "2026-02-23T00:00:00",
"isVat": "true",
"isVatInclusive": "false",
"useInlineVat": "true",
"useInlineWithholdingTax": true,
"documentShowWithholdingTax": "true",
"documentWithholdingTaxPercentage": "0",
"documentWithholdingTaxAmount": 300.0,
"documentWithholdingTaxTypes": 1,
"subTotal": "10000",
"discountAmount": "0",
"totalAfterDiscount": "10000",
"vatableAmount": "10000",
"vatAmount": "700.00000000",
"grandTotal": "10700",
"totalWithoutVat": "9300.00000000",
"items": [
{
"description": "สินค้าตัวอย่าง",
"quantity": "1",
"pricePerUnit": "10000",
"total": "10000",
"discountAmount": "0",
"vatRate": "7",
"withHeldPerItem": "3",
"withHeldPerItemValue": "300"
}
]
}
}