วิเคราะห์เส้นทางข้อมูลของแบบฟอร์มภาษีทั้งหมด — ว่าข้อมูลมาจาก Feature ไหน และนักบัญชีต้องบันทึกอะไรบ้าง
ทุกฟอร์มภาษีไม่ว่าจะเป็น VAT, WHT, CIT, PP36 — ล้วนคำนวณจากข้อมูลใน Journal Entries (สมุดรายวัน) ทั้งสิ้น เมื่อนักบัญชีบันทึก Bill หรือ Invoice ระบบจะ auto-post เข้า Journal Entries ให้อัตโนมัติ แล้ว engine คำนวณภาษีจากข้อมูลนั้น
| ประเภท | วิธีเก็บข้อมูล | Feature ที่เกี่ยวข้อง |
|---|---|---|
| Auto-compute | ระบบดึงข้อมูลจาก DB อัตโนมัติ นักบัญชีไม่ต้องกรอกเพิ่ม | Bills, Invoices, Journal Entries |
| Manual Input | นักบัญชีต้องกรอกตัวเลขลงใน form payload โดยตรง | PP4 (ป้าย), PP13 (สถานบริการ), ภาษีที่ดิน, รถยนต์, ประกัน, โรงแรม, ปิโตรเลียม, Remittance, RE Transfer |
| Hybrid | ดึงข้อมูลจาก DB บางส่วน + กรอกข้อมูลเพิ่ม | PND1 (bills + journals), PP36/Por40 (journals + manual adjustments) |
| Journal-based | อ่านจาก journal_lines โดยตรง (whtRate, whtAmount, vatRate, vatAmount) | PND1 (payroll + manual journals), PP36, Por40 |
| ฟอร์ม | ฟีเจอร์ที่สร้างข้อมูล | ข้อมูลที่นักบัญชีต้องบันทึก | Engine คำนวณ |
|---|---|---|---|
| ภ.พ.30 (pp30) |
|
|
computePP30(period, invoices, bills, vendors, customers)คำนวณ Output VAT (ฝั่งขาย) - Input VAT (ฝั่งซื้อ) = VAT ที่ต้องชำระ |
| ภ.พ.20 (pp20) | Manual input — กรอกใน form payload |
|
Manual (ไม่มี auto-compute engine) |
| ภ.พ.60 (pp60) | Manual input — กรอกใน form payload |
|
Manual (ไม่มี auto-compute engine) |
| ฟอร์ม | ฟีเจอร์ที่สร้างข้อมูล | ข้อมูลที่นักบัญชีต้องบันทึก | Engine |
|---|---|---|---|
| ภ.ง.ด.3 (pnd3) |
|
|
computePND3(period, bills, vendors)filter bills ที่ whtAmount > 0 + vendor.type = individual |
| ภ.ง.ด.53 (pnd53) |
|
|
computePND53(period, bills, vendors)filter bills ที่ whtAmount > 0 + vendor.type = corporate |
| ภ.ง.ด.1 (pnd1) |
|
|
computePND1(period, bills, vendors, undefined, journals)รวม PND3 + PND53 + journal lines (payroll + manual) |
| ภ.ง.ด.50 (pnd50) | Same source as PND3/53 — รายชื่อผู้ถูกหัก | ข้อมูลเดียวกับ PND3 + PND53 (รายชื่อ vendor ทั้งหมด) | computeWHTByType() |
| ภ.ง.ด.50 Annual (pnd50_annual) | Bills ทั้งปี | ข้อมูลเดียวกับข้างบน แต่รวมทั้งปี | computePND50Annual(year, bills, vendors) |
| ภ.ง.ด.51 (pnd51) | Bills (กรณีพิเศษ) | ข้อมูลเดียวกับ above | computeWHTByType() |
| 50 ทวิ (wht_cert) | Bills + Vendors (หลังยื่น PND1) | ข้อมูลเดียวกับ PND3/53 (แยกตาม vendor) | Auto-generate จาก bills + vendors |
| ฟอร์ม | ฟีเจอร์ที่สร้างข้อมูล | ข้อมูลที่นักบัญชีต้องบันทึก | Engine |
|---|---|---|---|
| ภ.ง.ด.2 (pnd2) | Bills (vendor.type = corporate) | เหมือน PND53 แต่เป็นฟอร์มหลัก | computeWHTByType(period, 'pnd2', bills, vendors) |
| ภ.ง.ด.2ก (pnd2a) | Bills (กรณีขายอสังหา — นิติบุคคล) |
|
computeWHTByType(period, 'pnd2a', bills, vendors) |
| ภ.ง.ด.3ก (pnd3a) | Bills (กรณีขายอสังหา — บุคคลธรรมดา) |
|
computeWHTByType(period, 'pnd3a', bills, vendors) |
| ภ.ง.ด.5 (pnd5) | Bills (เงินได้อื่นๆ) | Bill ที่มี whtRate > 0 (ประเภทเงินได้อื่น) | computeWHTByType(period, 'pnd5', bills, vendors) |
| ภ.ง.ด.6 (pnd6) | Bills (ขายทอดตลาด) | Bill กรณีขายทอดตลาด | computeWHTByType(period, 'pnd6', bills, vendors) |
| ภ.ง.ด.9 (pnd9) | Bills (เงินปันผล/ดอกเบี้ย) | Bill ที่เกี่ยวกับเงินปันผลหรือดอกเบี้ย | computeWHTByType(period, 'pnd9', bills, vendors) |
| ภ.ง.ด.20 (pnd20) | Bills (นิติบุคคลต่างประเทศ) | Bill ที่จ่ายให้นิติบุคคลต่างประเทศ | computeWHTByType(period, 'pnd20', bills, vendors) |
| ภ.ง.ด.22 (pnd22) | Bills (ขายสินค้า) | Bill ที่เกี่ยวกับการขายสินค้า | computeWHTByType(period, 'pnd22', bills, vendors) |
| ภ.ง.ด.54 (pnd54) | Bills (กองทุนรวม) | Bill ที่เกี่ยวกับกองทุนรวม | computeWHTByType(period, 'pnd54', bills, vendors) |
| ฟอร์ม | ฟีเจอร์ที่สร้างข้อมูล | ข้อมูลที่นักบัญชีต้องบันทึก | Engine |
|---|---|---|---|
| ภ.พ.36 (pp36) |
|
|
computePP36(year, half, journals, accounts)คำนวณ accountingNetProfit → CIT payable |
| ภ.ธ.40 (por40) |
|
|
computePor40(year, journals, accounts)คำนวณ CIT ประจำปี + progressive tax |
| ภ.ธ.50 (por50) | Manual input — กรอกประมาณการกำไร |
|
computeCITEstimated(year, half, estProfit) |
| ภ.ธ.51 (por51) | Manual input |
|
computeMisc('por51', period, totalAmt) |
| ภ.ธ.52 (por52) | Manual input |
|
computeMisc('por52', period, totalAmt) |
| ภ.ธ.54 (por54) | Manual input |
|
computeMisc('por54', period, totalAmt) |
| ภ.ธ.91 (por91) | Manual input |
|
Manual (default case) |
| ฟอร์ม | ฟีเจอร์ที่สร้างข้อมูล | ข้อมูลที่นักบัญชีต้องบันทึก | Engine |
|---|---|---|---|
| ภ.พ.40 (pp40) | Manual input — กรอกใน form payload |
|
computeSBT(period, businessType, grossReceipt)คำนวณ 3% ของรายรับ |
| ภ.บ.จ.1 (bj1) | Manual input |
|
computeMisc('bj1', period, totalAmt) |
| ภ.บ.จ.2 (bj2) | Manual input |
|
computeMisc('bj2', period, totalAmt) |
| ฟอร์ม | ประเภทข้อมูล | ข้อมูลที่นักบัญชีต้องบันทึก | Engine |
|---|---|---|---|
| ภ.ป.4 (pp4) | Manual Input |
|
computePorPor4(year, signboards)คำนวณภาษีตามขนาดป้าย (ไม่เกิน 3,000 บ./ป้าย/ปี) |
| ภ.ป.13 (pp13) | Manual Input |
|
computePorPor13(period, venues)คำนวณภาษีสถานบริการ 10% |
| ภ.ป.12 (pp12) | Auto-compute จาก Bills |
|
computePorPor12(period, bills, vendors)คำนวณหัก 1% |
| ฟอร์ม | ข้อมูลที่นักบัญชีต้องบันทึก | Engine |
|---|---|---|
| ภาษีที่ดินฯ (land_building) |
|
computeLandBuilding(year, parcels)คำนวณภาษีตามมูลค่าประเมิน x อัตรา |
| ภาษีรถยนต์ (vehicle) |
|
computeVehicleTax(year, vehicles)คำนวณภาษีตาม cc/น้ำหนัก + ค่าปรับล่าช้า |
| ฟอร์ม | ประเภทข้อมูล | ข้อมูลที่นักบัญชีต้องบันทึก | Engine |
|---|---|---|---|
| อากรแสตมป์ (stamp_duty) | Manual Input |
|
computeStampDuty(items) |
| ภ.ด.ส.1 (ds1) | Manual Input |
|
computeStampDutyByType(docId, 'ds1', date, parties, amount)เช่าทรัพย์ 0.1% |
| ภ.ด.ส.2-5 (ds2-ds5) | Manual Input | เช่นเดียวกับ ds1 แต่ระบุ type ต่างกัน | computeStampDutyByType() — อัตราตามประเภท |
| ฟอร์ม | ข้อมูลที่นักบัญชีต้องบันทึก | Engine |
|---|---|---|
| ภ.ร.ด.1 (rd1) — บุคคล |
|
computeRealEstateTransfer(data)คำนวณภาษีเงินได้, ภาษีธุรกิจเฉพาะ, อากรแสตมป์ ตามประเภทผู้โอน |
| ภ.ร.ด.2 (rd2) — นิติบุคคล | ||
| ภ.ร.ด.3 (rd3) — ต่างด้าว | ||
| ภ.ร.ด.90 (rd90) — สรุป | Manual input (สรุปรายการ) | Manual |
| ภ.ร.ด.91 (rd91) — เพิ่มเติม |
|
Manual (คำนวณจาก ownershipYears) |
| ฟอร์ม | ข้อมูลที่นักบัญชีต้องบันทึก | Engine |
|---|---|---|
| ภ.ส.ร.1 (sr1) — บุคคล |
|
Manual — ไม่มี auto-compute engine |
| ภ.ส.ร.2 (sr2) — นิติบุคคล | ||
| ภ.ส.ร.3 (sr3) — กองทุน | ||
| ภ.ส.ร.4 (sr4) — สรุปรายปี | สรุปภาษีหลักทรัพย์ทั้งปี | Manual |
| ฟอร์ม | ข้อมูลที่นักบัญชีต้องบันทึก | Engine |
|---|---|---|
| ภ.บ.ท.1 (bt1) — ครึ่งปี |
|
computeRemittanceTax(period, frequency, totalRemit, exempt)คำนวณ 5% ของเงินได้สุทธิส่งออก |
| ภ.บ.ท.2 (bt2) — รายปี | ||
| ภ.บ.ท.3 (bt3) — รายเดือน | ||
| ภ.บ.ท.4 (bt4) — กรณีพิเศษ |
| ฟอร์ม | ข้อมูลที่นักบัญชีต้องบันทึก | Engine |
|---|---|---|
| ภ.ย.1-3 (y1-y3) |
|
computeInsuranceTax(period, type, life, nonLife, count)คำนวณภาษีเบี้ยประกัน 2.5% |
| ภ.ร.1-2 (r1-r2) |
|
computeHotelTax(period, roomRev, serviceRev, occupancy, nights)คำนวณภาษีโรงแรม 1.5% |
| ภ.อ.1-3 (o1-o3) |
|
computePetroleumTax(period, type, ng, co, cd)คำนวณภาษีปิโตรเลียม |
| ฟอร์ม | ประเภทข้อมูล | ข้อมูลที่นักบัญชีต้องบันทึก | Engine |
|---|---|---|---|
| BOI (boi) | Manual Input |
|
computeBOI(cert, citForms)คำนวณภาษีที่ประหยัดได้จาก BOI |
| Transfer Pricing (transfer_pricing) | Manual Input |
|
computeTransferPricing(doc)วิเคราะห์ราคาโอนระหว่างบริษัทในเครือ |
| Feature / Module | ฟอร์มภาษีที่ได้ข้อมูลจาก Feature นี้ | วิธีเก็บข้อมูล |
|---|---|---|
| Bills (ใบรับวางบิล) | ภ.พ.30, ภ.ง.ด.1, ภ.ง.ด.3, ภ.ง.ด.53, ภ.ง.ด.2, 2ก, 3ก, 5, 6, 9, 20, 22, 50, 51, 54, ภ.ป.12 | นักบัญชีสร้าง Bill → auto-post Journal |
| Invoices (ใบส่ง Invoice) | ภ.พ.30 (Output VAT), ภ.พ.36, ภ.ธ.40 (ผ่าน journal) | นักบัญชีสร้าง Invoice → auto-post Journal |
| Journal Entries (สมุดรายวัน) | ภ.ง.ด.1 (payroll+manual), ภ.พ.36, ภ.ธ.40 | Auto-post จาก Bills/Invoices/Payroll หรือ Manual Journal |
| Payroll (เงินเดือน) | ภ.ง.ด.1 (มาตรา 40(1) WHT rate = 0%) | นักบัญชีบันทึก payroll → auto-post Journal |
| Vendors (เจ้าหนี้) | ภ.ง.ด.3, ภ.ง.ด.53, ภ.ง.ด.1 (+ ฟอร์มย่อย WHT ทั้งหมด) | นักบัญชีสร้าง Vendor พร้อม taxId, type |
| Customers (ลูกหนี้) | ภ.พ.30 (Output VAT) | นักบัญชีสร้าง Customer |
| Chart of Accounts (ผังบัญชี) | ภ.พ.36, ภ.ธ.40 (CIT คำนวณจากบัญชีรายได้/ค่าใช้จ่าย) | ตั้งค่าผังบัญชีตั้งแต่แรก |
| Manual Input (กรอกเอง) | ภ.ป.4, ภ.ป.13, ภาษีที่ดิน, ภาษีรถยนต์, อากรแสตมป์, ภ.ด.ส.1-5, ภ.ร.ด.1-3, 90, 91, ภ.ส.ร.1-4, ภ.บ.ท.1-4, ภ.ย.1-3, ภ.ร.1-2, ภ.อ.1-3, BOI, Transfer Pricing, ภ.พ.20, ภ.พ.40, ภ.พ.60, ภ.ธ.50-54 | นักบัญชีกรอกข้อมูลลงใน form โดยตรง |
Step 1 — ตั้งค่าข้อมูลพื้นฐาน (ทำครั้งเดียว):
Step 2 — บันทึกรายการตามปกติ (ทำทุกวัน):
Step 3 — ระบบคำนวณภาษีอัตโนมัติ: