06 · 2026

ระบบจัดการหอพักDorm & Apartment Manager

จัดการห้องและผู้เช่า จดมิเตอร์น้ำ-ไฟ ออกบิลทุกห้องในคลิกเดียวพร้อม QR พร้อมเพย์ พิมพ์ใบแจ้งหนี้ ติดตามค้างชำระ และสรุปรายรับรายเดือนRooms and tenants, water/electric meter readings, one-click monthly invoices with PromptPay QR, printable bills, overdue tracking and monthly income.

tools/dorm.ts
// หน่วยที่ใช้ = เลขเดือนนี้ − เลขเดือนก่อนconst w = units(prev?.water ?? null, curr?.water ?? null);const byUnits = r2(w.units * st.waterRate);// ค่าน้ำขั้นต่ำ (หอส่วนใหญ่มี)const water = st.waterMin > byUnits ? st.waterMin : byUnits;// บิลที่จ่ายแล้วจะไม่ถูกคำนวณทับif (existing?.status === "paid") continue;
06TESTS7

ปัญหา

เจ้าของหอพักเล็กๆ ทุกสิ้นเดือนต้องเดินจดมิเตอร์ แล้วนั่งคิดค่าน้ำค่าไฟทีละห้องด้วยเครื่องคิดเลข เขียนบิล และจำเองว่าห้องไหนยังไม่จ่าย — พลาดง่ายและเสียเวลาหลายชั่วโมง

ขั้นตอนทุกเดือน

  1. จดมิเตอร์ — ตารางเดียว ใส่เลขน้ำ/ไฟของทุกห้อง ระบบลบเลขเดือนก่อนให้ และเตือนถ้าเลขลดลง (จดผิด)
  2. ออกบิล — กดครั้งเดียวได้บิลทุกห้องที่มีผู้เช่า: ค่าเช่า + ค่าน้ำ (รองรับขั้นต่ำ) + ค่าไฟ + ค่าอื่นๆ ประจำห้อง (เน็ต ที่จอดรถ)
  3. พิมพ์/ส่งบิล — ใบแจ้งหนี้มีจำนวนเงินเป็นตัวอักษร วันครบกำหนด และ QR พร้อมเพย์ยอดตรง พิมพ์ทุกห้องได้ในครั้งเดียว (ห้องละหน้า)
  4. เก็บเงิน — ติ๊กจ่ายแล้ว ระบบแสดงห้องค้างชำระพร้อมจำนวนวันที่เลยกำหนด

จุดที่ตั้งใจทำ

  • บิลที่ จ่ายแล้วจะไม่ถูกคำนวณทับ แม้กดออกบิลใหม่ ส่วนบิลที่ยังไม่จ่ายสั่งคำนวณใหม่ได้เมื่อแก้เลขมิเตอร์
  • แจ้งปัญหาก่อนออกบิล เช่น ยังไม่จดมิเตอร์ ไม่มีเลขเดือนก่อน
  • สรุปรายรับ 6 เดือน อัตราการเข้าพัก และยอดค้างรับ
  • ตารางใช้งานด้วยคีย์บอร์ดได้ ทุกช่องมีชื่อที่ screen reader อ่านได้ (เช่น "ห้อง 203 น้ำเดือนนี้")

ข้อมูล

เก็บในเบราว์เซอร์เครื่องนี้ ไม่มี server — สำรองเป็นไฟล์ได้

The problem

Every month a small dorm owner walks around reading meters, works out water and electricity room by room on a calculator, hand-writes bills, and tries to remember who hasn't paid. It's slow and error-prone.

The monthly flow

  1. Read meters — one table for every room; usage is computed from last month, and a lower reading is flagged as a likely typo
  2. Generate bills — one click bills every occupied room: rent + water (with a minimum charge) + electricity + per-room extras (internet, parking)
  3. Print / send — each invoice shows the amount in Thai words, the due date and a PromptPay QR for the exact amount; print all rooms at once, one per page
  4. Collect — tick paid; unpaid rooms show how many days overdue they are

Details I cared about

  • Paid bills are never recalculated, even if you regenerate; unpaid ones can be refreshed after fixing a reading
  • Problems are reported before billing (missing reading, no previous reading)
  • 6-month income, occupancy and outstanding balance
  • Tables work by keyboard, and every input has a screen-reader name (e.g. "Room 203 water this month")

Data

Stored in this browser, no server — back up to a file.