รองรับการคำนวณภาษีมูลค่าเพิ่มแบบกำหนดเองด้วย isManualVat
รองรับการคำนวณภาษีมูลค่าเพิ่มแบบกำหนดเองผ่าน isManualVat field
FlowAccount OpenAPI ได้เพิ่ม field ใหม่ isManualVat (boolean) ใน request body สำหรับ Document APIs ทุกประเภท ที่ช่วยให้ผู้ใช้งานสามารถกำหนด ยอด VAT เองได้โดยไม่ต้องให้ระบบคำนวณตาม vatRate อัตโนมัติ
เริ่มมีผลบน Production Environment: 11/02/2026
รายละเอียดการเปลี่ยนแปลง
รองรับการคำนวณภาษีมูลค่าเพิ่มแบบกำหนดเองผ่าน isManualVat field
เพิ่ม field ใหม่ isManualVat (boolean) ใน request body สำหรับ Document APIs ทุกประเภท ที่ช่วยให้ผู้ใช้งานสามารถกำหนดยอด VAT เองได้โดยไม่ต้องให้ระบบคำนวณตาม vatRate อัตโนมัติ
เอกสารที่รองรับ (SimpleDocument)
- Quotation
- Billing Note
- Tax Invoice
- Cash Invoice
- Receipt
- Purchase Order
- Receiving Inventory
- Expense
วิธีการใช้งาน
เมื่อต้องการระบุ vatAmount ที่ไม่ตรงกับสูตรการคำนวณ vatAmount ของระบบ ( ดูเพิ่มเติมได้จาก: Document API ) ให้ผู้ใช้งานระบุค่า isManualVat: true เพื่อให้ระบบ FlowAccount สามารถสร้างเอกสารได้อย่างถูกต้อง
ตัวอย่างการใช้งาน
Scenario บริษัท ตัวอย่าง จำกัด ต้องการออกใบกำก ับภาษี โดยมียอด VAT ที่ต้องการระบุเองจากเอกสารต้นทาง ซึ่งยอด VAT ไม่ตรงกับสูตรคำนวณ 7% โดยระบุ ภาษีมูลค่าเพิ่มเท่ากับ 74 บาท
มีรายการสินค้าดังนี้:
- สินค้า: Product A
- ราคาต่อหน่วย: 1,060 บาท (ราคารวม VAT)
- จำนวน: 1 ชิ้น
การตั้งค่าเอกสาร
| Field | Value |
|---|---|
isManualVat | true |
isVatInclusive | true |
isVat | true |
การคำนวณระดับสินค้า
| Field | Calculation logic | Example | Value |
|---|---|---|---|
quantity | input | 1 | 1 |
pricePerUnit | input | 1060 | 1060 |
total | quantity × pricePerUnit | 1 × 1060 | 1060 |
การคำนวณระดับเอกสาร
| Field | Calculation logic | Example | Value |
|---|---|---|---|
subTotal | ∑(quantity × pricePerUnit) | 1 × 1060 | 1060 |
discountAmount | input | 0 | 0 |
totalAfterDiscount | subTotal - discountAmount | 1060 - 0 | 1060 |
vatAmount | input | 74 | 74 |
grandTotal | totalAfterDiscount | 1060 | 1060 |
API Reference
https://openapi.flowaccount.com/v1/tax-invoices
ดูเพิ่มเติมได้จาก: API reference - Tax invoice
Payload
{
"recordId": 0,
"contactCode": "001",
"contactName": "บริษัท ลูกค้า จำกัด",
"contactAddress": "ที่อยู่ลูกค้า",
"contactTaxId": "1234567890123",
"contactBranch": "สำนักงานใหญ่",
"contactPerson": "คุณลูกค้า",
"contactEmail": "contact@email.com",
"contactNumber": "099-999-9999",
"contactZipCode": "10110",
"contactGroup": 1,
"publishedOn": "2026-02-04",
"creditType": 1,
"creditDays": 30,
"dueDate": "2026-03-06",
"salesName": "พนักงานขาย",
"projectName": "",
"reference": "",
"isManualVat": true,
"isVatInclusive": true,
"isVat": true,
"subTotal": 1060,
"discountPercentage": 0,
"discountAmount": 0,
"totalAfterDiscount": 1060,
"vatAmount": 74,
"grandTotal": 1060,
"documentShowWithholdingTax": false,
"documentWithholdingTaxPercentage": 0,
"documentWithholdingTaxAmount": 0,
"useReceiptDeduction": false,
"documentDeductionType": 0,
"documentDeductionAmount": 0,
"remarks": "",
"internalNotes": "",
"showSignatureOrStamp": true,
"documentStructureType": "SimpleDocument",
"items": [
{
"id": 1,
"type": 1,
"name": "Product A",
"description": "สินค้าตัวอย่าง",
"quantity": 1,
"unitName": "ชิ้น",
"pricePerUnit": 1060,
"total": 1060,
"sellChartOfAccountCode": "41210",
"buyChartOfAccountCode": ""
}
]
}
Scenario บริษัท ตัวอย่าง จำกัด ต้องการออกใบกำกับภาษีแบบแยกส่วนลดและภาษี โดยคิดราคาสินค้าแบบไม่รวม VAT และมียอด VAT ที่ต้องการระบุเองจากเอกสารต้นทาง ซึ่งยอด VAT ไม่ตรงกับสูตรคำนวณ 7% โดยระบุภาษีมูลค่าเพิ่มเท่ากับ 63 บาท
มีรายการสินค้าดังนี้:
- รายการ 1: สินค้าคิดภาษี 7%
- ราคาต่อหน่วย: 200 บาท
- จำนวน: 5 ชิ้น
- ส่วนลดสินค้า 50 บาท
- ภาษี: 7%
- รายการ 2: สินค้าภาษี 0%
- ราคาต่อหน่วย: 100 บาท
- จำนวน: 2 ชิ้น
- ส่วนลดสินค้า 0 บาท
- ภาษี: 0%
- รายการ 3: สินค้ายกเว้นภาษี
- ราคาต่อหน่วย: 150 บาท
- จำนวน: 3 ชิ้น
- ส่วนลดสินค้า: 20 บาท
- ภาษี: ยกเว้น
การคำนวณระดับสินค้า
| Field | Value |
|---|---|
quantity | input |
pricePerUnit | input |
discountAmount[item]* | input |
total | (quantity × pricePerUnit) - discountAmount[item] |
*หมายเหตุ
- ถ้าส่วนลด รายสินค้าเป็น เปอร์เซ็นต์ ให้ตั้งค่า
discountTypeที่ระดับเอกสาร เป็น 1 - ถ้าส่วนลด รายสินค้าเป็น จำน วน ให้ตั้งค่า
discountTypeที่ระดับเอกสาร เป็น 3
| รายการสินค้า | quantity | pricePerUnit | discountAmount | total | Value |
|---|---|---|---|---|---|
| สินค้าคิดภาษี 7 | 5 | 200 | 50 | (5 × 200) - 50 | 950 |
| สินค้าภาษี 0 | 2 | 100 | 0 | (2 × 100) - 0 | 200 |
| สินค้ายกเว้นภาษี | 3 | 150 | 20 | (3 × 150) - 20 | 430 |
การตั้งค่าเอกสาร
| Field | Value |
|---|---|
isVatInclusive | false |
isVat | true |
useInlineDiscount | true |
useInlineVat | true |
การคำนวณระดับเอกสาร
| Field | Calculation logic | Example | Value |
|---|---|---|---|
subTotal | ∑(quantity × pricePerUnit) | (5 × 200) + (2 × 100) + (3 × 150) | 1650 |
discountAmount[document] | ∑(discountAmount[item]) | 50 + 0 + 20 | 70 |
totalAfterDiscount | subTotal - discountAmount[document] | 1650 - 70 | 1580 |
exemptAmount | ∑(total) (ผลรวมเฉพาะรายการสินค้า ที่มีภาษี 0% หรือ ยกเว้นภาษี) | 200 + 430 | 630 |
vatableAmount | totalAfterDiscount - exemptAmount | 1580 - 630 | 950 |
vatAmount | input | 63 | 63 |
grandTotal | exemptAmount + vatableAmount + vatAmount | 630 + 950 + 63 | 1643 |
Payload
{
"recordId": 0,
"contactCode": "001",
"contactName": "บริษัท ลูกค้า จำกัด, คุณลูกค้า ซื้อประจำ",
"contactAddress": "ที่อยู่ ลูกค้า/ผู้จำหน่าย",
"contactTaxId": "1234567890123",
"contactBranch": "สำนักงาน/สาขา",
"contactPerson": "ลูกค้า",
"contactEmail": "contact@email.com",
"contactNumber": "099-999-9999",
"contactZipCode": "12345",
"contactGroup": 1,
"publishedOn": "2025-05-01",
"creditType": 1,
"creditDays": 30,
"dueDate": "2025-05-31",
"salesName": "พนักงาน ขายหน้าร้าน",
"projectName": "project A",
"reference": "INV2020010001",
"isManualVat": true,
"isVatInclusive": false,
"isVat": true,
"subTotal": 1650,
"discountPercentage": 0,
"discountAmount": 70,
"totalAfterDiscount": 1580,
"vatAmount": 63,
"grandTotal": 1643,
"documentShowWithholdingTax": false,
"documentWithholdingTaxPercentage": 0,
"documentWithholdingTaxAmount": 0,
"useReceiptDeduction": false,
"documentDeductionType": 0,
"documentDeductionAmount": 0,
"remarks": "remarks",
"internalNotes": "note",
"showSignatureOrStamp": true,
"discountType": 3,
"useInlineDiscount": true,
"useInlineVat": true,
"exemptAmount": 630,
"vatableAmount": 950,
"documentStructureType": "InlineDocument",
"saleAndPurchaseChannel": "",
"items": [
{
"id": 1,
"type": 1,
"name": "สินค้าคิดภาษี 7",
"description": "Type Product",
"quantity": 5,
"unitName": "unit",
"pricePerUnit": 200,
"total": 950,
"sellChartOfAccountCode": "41210",
"buyChartOfAccountCode": "",
"discountAmount": 50,
"vatRate": 7
},
{
"id": 2,
"type": 1,
"name": "สินค้าภาษี 0",
"description": "Type Product",
"quantity": 2,
"unitName": "unit",
"pricePerUnit": 100,
"total": 200,
"sellChartOfAccountCode": "41210",
"buyChartOfAccountCode": "",
"discountAmount": 0,
"vatRate": 0
},
{
"id": 3,
"type": 1,
"name": "สินค้ายกเว้นภาษี",
"description": "Type Product",
"quantity": 3,
"unitName": "unit",
"pricePerUnit": 150,
"total": 430,
"sellChartOfAccountCode": "41210",
"buyChartOfAccountCode": "",
"discountAmount": 20,
"vatRate": -1
}
]
}
APIs ที่ได้รับผลกระทบ
APIs สร้างเอกสารใบเสนอราคา (Quotations)
- POST /quotations
- POST /quotations/inline
- PUT /quotations/{id}
APIs สร้างเอกสารใบวางบิล (Billing Notes)
- POST /billing-notes
- POST /billing-notes/inline
- POST /upgrade/billing-notes
- POST /upgrade/billing-notes/inline
- PUT /billing-notes/{id}
APIs สร้างเอกสารใบกำกับภาษี (Tax Invoices)
- POST /tax-invoices
- POST /tax-invoices/with-payment
- POST /tax-invoices/inline
- POST /tax-invoices/inline/with-payment
- POST /upgrade/tax-invoices
- POST /upgrade/tax-invoices/with-payment
- POST /upgrade/tax-invoices/inline
- POST /upgrade/tax-invoices/inline/with-payment
- PUT /tax-invoices/{id}
APIs สร้างเอกสารใบเสร็จรับเงิน (Receipts)
- POST /upgrade/receipts
- POST /upgrade/receipts/with-payment
- POST /upgrade/receipts/inline
- POST /upgrade/receipts/inline/with-payment
- PUT /receipts/{id}
APIs สร้างเอกสารใบกำกับภาษี/ใบเสร็จรั บเงิน (Cash Invoices)
- POST /cash-invoices
- POST /cash-invoices/with-payment
- POST /cash-invoices/inline
- POST /cash-invoices/inline/with-payment
- POST /upgrade/cash-invoices
- POST /upgrade/cash-invoices/with-payment
- POST /upgrade/cash-invoices/inline
- POST /upgrade/cash-invoices/inline/with-payment
APIs สร้างเอกสารใบสั่งซื้อ (Purchase Orders)
- POST /purchases-orders
- POST /purchases-orders/inline
- POST /upgrade/purchases-orders
- POST /upgrade/purchases-orders/inline
- PUT /purchases-orders/{id}
APIs สร้างเอกสารใบรับสินค้า (Purchases)
- POST /purchases
- POST /purchases/with-payment
- POST /purchases/inline
- POST /purchases/inline/with-payment
- POST /upgrade/purchases
- POST /upgrade/purchases/with-payment
- POST /upgrade/inline
- POST /upgrade/inline/with-payment
- PUT /purchases/{id}
APIs สร้างเอกสารค่าใช้จ่าย (Expenses)
- POST /expenses
- POST /expenses/with-payment
- POST /expenses/inline
- POST /expenses/inline/with-payment
- PUT /expenses/{id}
APIs ที่จะได้รับผลกระทบในอนาคต
- PUT /cash-invoices/{id}