เว็บแอปที่อ่านข้อมูลจากโปรแกรมบัญชี (ERP) ของธุรกิจครอบครัวโดยตรง แล้วสรุปออกมาเป็นหน้าเดียวที่ตอบได้ว่าเดือนนี้ขายเป็นยังไง วันนี้ต้องจัดการอะไร และต้องโทรหาลูกค้ารายไหน
A web app that reads the family business's accounting software (ERP) directly and condenses it into one screen: how the month is going, what needs doing today, and which customers to call.
ขั้นที่มีคนเป็นผู้ตัดสินใจหรือใช้งานSteps where a person decides or uses it


AI เขียนโค้ดให้ แต่โจทย์ เกณฑ์ และสิ่งที่ยอมไม่ได้ ผมเป็นคนกำหนด
The AI writes the code; the problem, the criteria and the non-negotiables are mine.
แดชบอร์ดส่วนใหญ่โชว์กราฟแล้วจบ ผมให้หน้าแรกมีแถบแจ้งเตือนที่กดแล้วพาไปที่รายชื่อเลย เช่น ลูกค้า 14 รายเกินกำหนดชำระ กดแล้วเห็นทั้ง 14 รายพร้อมเบอร์โทร
Most dashboards stop at charts. Mine has alerts that jump straight to the list: "14 customers overdue" opens those 14 with phone numbers.
วันที่ 8 ของเดือน ถ้าเอาไปเทียบกับทั้งเดือนก่อน ยอดจะดูตกตลอด ผมเลยให้เทียบกับ 8 วันแรกของเดือนก่อน แล้วโชว์ตัวเลขคาดการณ์สิ้นเดือนแยกไว้
On the 8th of the month, comparing with the whole previous month always looks like a drop. It compares with the first 8 days of last month and shows a separate month-end forecast.
ทุกตัวเลขตัดบิลที่ถูกยกเลิกออกเสมอ และใช้ช่องข้อมูลที่ตรงความหมายจริง เพราะตัวเลขที่ผิดแม้แต่นิดเดียวจะทำให้คนเลิกเชื่อแดชบอร์ดทั้งหน้า
Cancelled invoices are always excluded and each field is used for what it actually means, because one wrong number makes people stop trusting the whole dashboard.
โค้ดทั้งหมดเขียนโดย Claude Code ตามที่ผมสั่ง ผมอ่านแล้วอธิบายได้ว่าแต่ละท่อนทำอะไร และทำไมต้องเขียนแบบนี้ (ข้อมูลลับอย่างรหัสผ่านและที่อยู่เครื่องถูกตัดออก)
All code was written by Claude Code under my direction. I can explain what each part does and why it's written that way. (Secrets such as keys and machine paths are removed; code comments are in Thai.)
ไล่ดูบิลทุกใบ จำวันที่ซื้อล่าสุดและจำนวนบิลของลูกค้าแต่ละราย ลูกค้าที่เคยซื้อตั้งแต่ 3 บิลขึ้นไปแต่หายไป 60–180 วัน จะนับเป็น At Risk แล้วขึ้นเป็นแถบแจ้งเตือนบนหน้าแรก กดแล้วไปที่รายชื่อได้ทันที
Walk through every invoice, remembering each customer's last purchase date and invoice count. Customers with 3+ invoices who have been silent for 60–180 days count as At Risk and appear as an alert on the home screen that links straight to the list.
// At Risk customers
const lastByCus = {}, billsByCus = {};
for (const inv of DB.invoices) {
const cod = inv.CUSCOD;
const dt = inv.DOCDAT || '';
if (!dt) continue;
if (!lastByCus[cod] || dt > lastByCus[cod]) lastByCus[cod] = dt;
billsByCus[cod] = (billsByCus[cod] || 0) + 1;
}
let atRiskCount = 0;
for (const [cod, last] of Object.entries(lastByCus)) {
if ((billsByCus[cod] || 0) < 3) continue; // ซื้อน้อยกว่า 3 บิล = ยังสรุปไม่ได้
const days = daysSince(last);
if (days >= 60 && days < 180) atRiskCount++;
}
if (atRiskCount > 0) alerts.push({ id: 'at-risk', level: 'info',
text: `ลูกค้า At Risk ${atRiskCount} ราย — เคยซื้อสม่ำเสมอแต่หายไป 60-180 วัน`,
tab: 'customers', view: 'atrisk' });ยอดขายไม่ตรงกับในโปรแกรมบัญชี
Sales didn't match the accounting software
ต้องตัดบิลที่ถูกยกเลิกออก และใช้ช่องจำนวนให้ถูกตัว (ในระบบมีสองช่องที่ชื่อคล้ายกัน ใช้ผิดตัวแล้วยอดเพี้ยน)
Exclude cancelled invoices and use the right quantity field (two fields have similar names; the wrong one skews totals)
เซิร์ฟเวอร์เปิดโฟลเดอร์ชื่อไทยไม่ได้
The server couldn't open a folder with a Thai name
ย้ายไปไว้ในโฟลเดอร์ที่ชื่อเป็นภาษาอังกฤษ
Moved it to a folder with an English name
ต้องเปิดใช้ทั้งในออฟฟิศและนอกออฟฟิศ
Needed both in-office and remote access
ตั้งค่าแยกตามเครื่อง และให้เข้าจากข้างนอกผ่านเครือข่ายส่วนตัว (VPN) ไม่เปิดสู่อินเทอร์เน็ตสาธารณะ
Per-machine settings, and remote access via a private network (VPN), never exposed to the public internet