SPEC-PWF Rev 0.6.0 · 2026-08-07

Cane Agency · Specificationสถาบันอ้อย · เอกสารข้อกำหนด

Process Workflowกระบวนการทำงาน

Documentเอกสาร
SPEC-PWF
Versionversion (เวอร์ชัน)
0.6.0 · Draftฉบับร่าง
Updatedปรับปรุงล่าสุด
2026-08-07
Ownerเจ้าของเอกสาร
Operationsฝ่ายปฏิบัติการ
WorkflowsWorkflow
26 + 5 state machines26 + สเตตแมชีน 5 ชุด
Depends onอ้างอิงจาก
SPEC-DDD, SPEC-ERD

Executive summaryบทสรุปผู้บริหาร

Forty-four workflows and six state machines carry the season from onboarding to the final-price true-up. This master remains the canonical workflow catalogue (WF-01…44, state machines, exception paths — addresses unchanged); each card below opens the capacity's own operational reading: the workflows it drives, the guards at its gates and the exceptions that reach it.

Workflow สี่สิบสี่รายการและ state machine หกชุดพาฤดูกาลตั้งแต่การรับเข้าจนถึงการสรุปราคาสุดท้าย แม่บทนี้ยังเป็นบัญชี workflow ฉบับบรรทัดฐาน (WF-01…44, state machine, เส้นทางกรณียกเว้น — ตำแหน่งเดิม); การ์ดด้านล่างเปิดการอ่านเชิงปฏิบัติการของแต่ละ capacity: workflow ที่ตนขับเคลื่อน guard ที่ประตูของตน และกรณียกเว้นที่มาถึงตน

44WorkflowsWorkflow
6State machinesState machine
110Domain eventsDomain event
20Bounded contextsBounded context
9Perspective docsเอกสารมุมมอง

Perspective documentsเอกสารรายมุมมอง

SPEC-PWF-CFC Cane Farmer — workflows & state machinesลูกไร่อ้อย — workflow และ state machine WF-01 · WF-08 · WF-09 · WF-31 · WF-34 · WF-36 · WF-37 · WF-38 · WF-39 · WF-40 · WF-41 SPEC-PWF-CFQ Quota Farmer — workflows & state machinesหัวหน้าโควต้า — workflow และ state machine WF-01 · WF-02 · WF-06 · WF-08 · WF-31 · WF-34 · WF-35 · WF-36 · WF-37 · WF-38 · WF-39 · WF-40 · WF-41 SPEC-PWF-MILL Sugar Factory — workflows & state machinesโรงงานน้ำตาล — workflow และ state machine WF-03 · WF-04 · WF-05 · WF-10 · WF-31 · WF-32 · WF-33 · WF-35 · WF-36 · WF-37 · WF-38 · WF-39 · WF-40 · WF-41 SPEC-PWF-FIN Bank — workflows & state machinesธนาคาร — workflow และ state machine WF-13 · WF-14 · WF-15 · WF-16 · WF-17 SPEC-PWF-CEC Contractor — workflows & state machinesผู้รับเหมา — workflow และ state machine WF-18 · WF-19 · WF-20 · WF-21 · WF-22 · WF-23 · WF-36 · WF-40 SPEC-PWF-GOV-OCSB OCSB (สอน.) — workflows & state machinesสอน. — workflow และ state machine WF-07 · WF-11 · WF-12 SPEC-PWF-GOV-OCSF OCSF — Cane & Sugar Fund — workflows & state machinesกองทุนอ้อยและน้ำตาลทราย — workflow และ state machine WF-42 · WF-43 · WF-44 SPEC-PWF-FED Federation — workflows & state machinesชั้นอัตลักษณ์ — workflow และ state machine WF-24 · WF-25 · WF-26 · WF-27 SPEC-PWF-OPS Platform Operator — workflows & state machinesผู้ให้บริการ platform — workflow และ state machine WF-28 · WF-29 · WF-30 · WF-27 · WF-25 SPEC-PWF-PLT Platform Intelligence — workflowsข่าวกรอง platform — workflow WF-52 SPEC-PWF-GRP Factory Group — workflowsกลุ่มโรงงาน — workflow WF-76 · WF-77 · WF-78 · WF-79 · WF-80 SPEC-PWF-CFL Lead Farmer — process workflowsหัวตัน — กระบวนการทำงาน lead_network

The numbered sections below remain the master-level normative reference — their addresses are unchanged, so every existing cross-reference (including the graph's citedBy pointers) stays valid.

ส่วนที่มีหมายเลขด้านล่างยังเป็นเนื้อหาอ้างอิงเชิงบรรทัดฐานระดับแม่บท — ตำแหน่งคงเดิม การอ้างอิงข้ามที่มีอยู่ (รวมถึงตัวชี้ citedBy ของ graph) จึงยังใช้ได้ทั้งหมด

1. Purpose1. วัตถุประสงค์

This document specifies the operational workflows of a crushing season — from onboarding (incl. virtual farmers) through season crop registry & ownership transfer (ขายเหมาไร่), financing (เงินเกี๊ยว), delivery, weighing, quality testing, settlement, and price regulation — and the delivery and crop state machines their contexts enforce. v2.4 (PROP-002) adds WF-09 farm activity & input usage, WF-10 crushing-day scheduling, WF-11 CCS audit & burnt-cane compliance, and WF-12 the 70:30 revenue account behind price announcements. v4.0 (PROP-003) adds the bank lending workflows WF-13…17 on the finance surface — consent, credit scoring, loan origination, disbursement/repayment, collections — the loan state machine (ข้อ 8a), and a WF-05 extension routing an assigned delivery receivable to a loan repayment. Actors and permissions are defined in SPEC-APP Section 3; the events each step emits in SPEC-DDD Section 5.

เอกสารนี้ระบุworkflowเชิงปฏิบัติการของฤดูหีบ — ตั้งแต่เริ่มใช้งาน (รวมลูกไร่ virtual) ทะเบียนอ้อยรายฤดูและการโอนสิทธิ์ (ขายเหมาไร่) สินเชื่อ (เงินเกี๊ยว) การส่งมอบ การชั่ง การตรวจคุณภาพ การปิดงวด และการกำกับราคา — รวมถึงสเตตแมชีนการส่งมอบและอ้อยรายฤดูที่แต่ละบริบทบังคับใช้ v2.4 (PROP-002) เพิ่ม WF-09 กิจกรรมแปลงและการใช้ปัจจัย, WF-10 ตารางวันหีบ, WF-11 การตรวจประเมิน CCS และกำกับอ้อยไฟไหม้ และ WF-12 บัญชีรายได้ 70:30 เบื้องหลังประกาศราคา v4.0 (PROP-003) เพิ่มworkflowสินเชื่อธนาคาร WF-13…17 บนช่องทางใช้งานการเงิน — ความยินยอม การให้คะแนนเครดิต การออกสินเชื่อ การเบิก/ชำระ การเร่งรัดหนี้ — state machine สินเชื่อ (ข้อ 8a) และส่วนขยาย WF-05 ที่ส่งลูกหนี้ที่โอนสิทธิไปเป็นการชำระสินเชื่อ ผู้กระทำและสิทธิ์นิยามใน SPEC-APP Section 3; เหตุการณ์ที่แต่ละขั้นปล่อยออกมาอยู่ใน SPEC-DDD Section 5

2. Season cycle overview2. ภาพรวมวงจรฤดูกาล

01Registerลงทะเบียนลงทะเบียนชาวไร่
→
02Register cropsขึ้นทะเบียนอ้อยอ้อยรายฤดู (ปลูก/ตอ)
→
03Financeสินเชื่อเงินเกี๊ยว / ปัจจัยการผลิต
→
04Allocate quotaจัดสรรโควตาจัดสรรโควตา
→
05Deliver & weighส่งมอบและชั่งส่งอ้อย + ชั่ง + ตรวจ CCS
→
06Settle & offsetปิดงวดและหักหนี้ตั้งงวดจ่าย + หักหนี้
→
07Final priceราคาขั้นสุดท้ายราคาขั้นสุดท้าย (สอน.)

3. WF-01 — Farmer & tenant onboarding (incl. virtual farmers)3. WF-01 — การเริ่มใช้งานชาวไร่และ tenant (รวมลูกไร่ virtual)

#Actorผู้กระทำActionการกระทำSystemระบบ
1Platform adminผู้ดูแล platformProvision tenant (sugar factory, quota group, สอน.)จัดตั้ง tenant (โรงงานน้ำตาล กลุ่มโควตา สอน.)Creates Tenant; emits TenantProvisioned; tenant admins invite their usersสร้าง Tenant; ปล่อย TenantProvisioned; ผู้ดูแล tenant เชิญผู้ใช้ของตน
2Farmer / field agentชาวไร่ / เจ้าหน้าที่ภาคสนามSign up with phone number (website or field app)สมัครด้วยเบอร์โทรศัพท์ (เว็บไซต์หรือแอปภาคสนาม)Sends OTP; creates individual account + draft Farmerส่ง OTP; สร้างบัญชีบุคคล + Farmer ฉบับร่าง
3Farmerชาวไร่Provide name, citizen ID; choose standing — sub-farmer under a quota farmer, or independentให้ชื่อ เลขบัตรประชาชน; เลือกสถานะ — ลูกไร่ภายใต้หัวหน้าโควต้า หรืออิสระHashes citizen ID; sets farmer_kind / quota_farmer_idแฮชเลขบัตรประชาชน; ตั้งค่า farmer_kind / quota_farmer_id
4Field agentเจ้าหน้าที่ภาคสนามRegister fields on-site: walk GPS boundary (land facts only — variety lives on the season crop, WF-08)ลงทะเบียนแปลงถึงที่: เดินขอบเขต GPS (ข้อมูลที่ดินเท่านั้น — พันธุ์อยู่ที่อ้อยรายฤดู, WF-08)Stores GPS boundary, computes area (ไร่)บันทึกขอบเขต GPS คำนวณพื้นที่ (ไร่)
5Quota farmer / quota officerหัวหน้าโควต้า / เจ้าหน้าที่โควตาReview and accept the sub-farmer into the networkตรวจทานและรับลูกไร่เข้าเครือข่ายFarmer → active; emits FarmerRegistered, UserLinkedToTenant where applicableFarmer → active; ปล่อย FarmerRegistered, UserLinkedToTenant ตามกรณี
6Quota farmer (optional)หัวหน้าโควต้า (ทางเลือก)Link further sub-farmers under own quotaเชื่อมลูกไร่เพิ่มเติมภายใต้โควตาของตนValidates network rules (depth 1, no cycles)ตรวจกฎเครือข่าย (ลึก 1 ชั้น ไม่มีวงวน)
7Quota farmerหัวหน้าโควต้าCreate a virtual farmer for an unregistered grower — the name parts (name_prefix? · first_name · last_name); phone optionalสร้างลูกไร่ virtual แทนชาวไร่ที่ยังไม่ลงทะเบียน — ส่วนย่อยของชื่อ (name_prefix? · first_name · last_name); เบอร์โทรถ้ามีCreates Farmer registration_status = virtual in the quota network; emits VirtualFarmerCreated; may own crops and borrow (debt ledger) but cannot log in, lend, or receive direct mill payments. v0.54.0 (PROP-078): the act also FOUNDS THE PERSON — the tenant’s owner self-membership is created at birth and membership.person_id is NOT NULL, so a representative tenant cannot exist without a person row. It is founded at id_verified_level = none with no credential and no claim about identity, and the steward writes the name parts onto it: Farmer.name is retired and no human name is stored on a record that is not a human (FR-437). The later claim binds an entry factor to that same person_idสร้าง Farmer registration_status = virtual ในเครือข่ายโควตา; ปล่อย VirtualFarmerCreated; เป็นเจ้าของอ้อยและกู้ได้ (บัญชีลูกหนี้) แต่เข้าสู่ระบบ ให้กู้ หรือรับเงินตรงจากโรงงานไม่ได้ v0.54.0 (PROP-078): การกระทำนี้ ก่อตั้งบุคคล ด้วย — สมาชิกภาพเจ้าของถูกสร้างพร้อม tenant และ membership.person_id เป็น NOT NULL ดังนั้น tenant ตัวแทนมีอยู่โดยไม่มีแถวบุคคลไม่ได้ ก่อตั้งที่ id_verified_level = none ไม่มีกุญแจและไม่มีข้ออ้างเรื่องอัตลักษณ์ และผู้ดูแลเขียนส่วนย่อยของชื่อลงบนแถวนั้น: Farmer.name ยกเลิก และไม่มีชื่อคนเก็บบนระเบียนที่ไม่ใช่คน (FR-437) การอ้างสิทธิ์ภายหลังผูกกุญแจเข้ากับ person_id เดิม
8Quota farmer → growerหัวหน้าโควต้า → ชาวไร่Invite: OTP link to the grower’s phone; grower verifies identity and reviews & acknowledges the ledger opened on their behalfเชิญ: ส่งลิงก์ OTP ถึงชาวไร่; ชาวไร่ยืนยันตัวตนและตรวจรับทราบบัญชีลูกหนี้ที่เปิดแทนตนCreates User linked to the SAME farmer_id; registration_status → active; emits VirtualFarmerConverted; duplicate citizen ID ⇒ manual merge reviewสร้าง User ผูกกับ farmer_id เดิม; registration_status → active; ปล่อย VirtualFarmerConverted; เลขบัตรซ้ำ ⇒ ตรวจรวมตัวตนด้วยคน

4. WF-02 — Quota allocation4. WF-02 — การจัดสรรโควตา

#Actorผู้กระทำActionการกระทำSystemระบบ
1Platform adminผู้ดูแล platformOpen season (e.g. 2569/70) with price formula versionเปิดฤดูกาล (เช่น 2569/70) พร้อม version สูตรราคาCreates Seasonสร้าง Season
2Mill managerผู้จัดการโรงงานSet intake capacity per period and the cane purchase policy (burnt deduction, green incentive, daily burnt cap)กำหนดกำลังรับเข้ารายช่วงและนโยบายรับซื้ออ้อย (หักไฟไหม้ จูงใจอ้อยสด เพดานไฟไหม้รายวัน)Derives bookable queue slots; creates CanePurchasePolicyคำนวณช่องคิวที่จองได้; สร้าง CanePurchasePolicy
3Quota officer / mill staffเจ้าหน้าที่โควตา / พนักงานโรงงานAllocate committed tonnes per quota farmerจัดสรรตันผูกพันรายหัวหน้าโควต้าCreates Quota; emits QuotaAllocatedสร้าง Quota; ปล่อย QuotaAllocated
4Quota farmerหัวหน้าโควต้าAcknowledge quota in appรับทราบโควตาในแอปQuota visible on mobile homeโควตาแสดงบนหน้าแรกมือถือ

5. WF-03 — Delivery & weigh-in (core loop)5. WF-03 — การส่งมอบและชั่งเข้า (วงจรแกนกลาง)

#Actorผู้กระทำActionการกระทำSystemระบบ
1Farmerชาวไร่Book into an open crushing day; declare crop (field × season), truck (registry pick or new), cane type (อ้อยสด / อ้อยไฟไหม้) and harvest method (ตัดมือ / รถตัด)จองเข้าวันหีบที่เปิดอยู่; ระบุอ้อย (แปลง × ฤดู) รถ (เลือกจากทะเบียนหรือเพิ่มใหม่) ประเภทอ้อย (อ้อยสด / อ้อยไฟไหม้) และวิธีเก็บเกี่ยว (ตัดมือ / รถตัด)Creates Delivery booked with truck_id + crushing_day_id; validates the quota belongs to the crop owner’s chain; draws down CrushingDay capacity and checks its burnt cap; emits DeliveryBookedสร้าง Delivery booked พร้อม truck_id + crushing_day_id; ตรวจว่าโควตาอยู่ในสายของเจ้าของอ้อย; ตัดยอดกำลังของ CrushingDay และตรวจเพดานอ้อยไฟไหม้; ปล่อย DeliveryBooked
2Farmerชาวไร่Harvest and load; record departure in app (works offline)เก็บเกี่ยวและขึ้นรถ; บันทึกออกเดินทางในแอป (ทำงานออฟไลน์ได้)Queues record locally; syncs on signalเก็บระเบียนในเครื่อง; ซิงก์เมื่อมีสัญญาณ
3Weighbridge operatorพนักงานแท่นชั่งCheck truck in at gateเช็กอินรถที่ประตูDelivery → arrived; emits TruckArrivedDelivery → arrived; ปล่อย TruckArrived
4Weighbridge operatorพนักงานแท่นชั่งWeigh loaded truck (gross)ชั่งรถบรรทุกเต็ม (น้ำหนักรวม)Records gross_kgบันทึก gross_kg
5Weighbridge operator / queue organizerพนักงานแท่นชั่ง / เจ้าหน้าที่คิวRecord the queue coin, crushing line and tipper slot — no CCS at the gateบันทึกเหรียญคิว สายการหีบ และช่องเท — ไม่มี CCS ที่หน้าประตูForms the %N-### tag on the delivery; CCS arrives later by government re-note (FR-100)ประกอบเป็นแท็ก %N-### บนการส่งมอบ; CCS มาภายหลังจากรีโน้ตของรัฐ (FR-100)
6Weighbridge operatorพนักงานแท่นชั่งWeigh empty truck (tare); confirm cane type and harvest method; issue ticketชั่งรถเปล่า (tare); ยืนยันประเภทอ้อยและวิธีเก็บเกี่ยว; ออกบัตรชั่งComputes net_kg; prints 80 mm ticket with QR; updates CrushingDay weighed_t / burnt_intake_t; emits WeightRecordedคำนวณ net_kg; พิมพ์บัตร 80 มม. พร้อม QR; ปรับ weighed_t / burnt_intake_t ของ CrushingDay; ปล่อย WeightRecorded
7Farmerชาวไร่Scan ticket QR in app (optional)สแกน QR บัตรชั่งในแอป (ทางเลือก)Links paper ticket to delivery recordเชื่อมบัตรกระดาษกับระเบียนการส่งมอบ
8Mill staffพนักงานโรงงานAccept load into crushingรับเที่ยวเข้าหีบDelivery → accepted; quota drawdownDelivery → accepted; หักโควตา

6. WF-04 — Quality (CCS)  ·  WF-05 — Settlement6. WF-04 — คุณภาพ (CCS)  ·  WF-05 — การปิดงวด

#Actorผู้กระทำActionการกระทำSystemระบบ
Q1Mill staffพนักงานโรงงานIngest the government (สอน.) re-note (MVP: upload the สอน. paper/Excel)นำเข้ารีโน้ตของรัฐ (สอน.) (MVP: อัปโหลดกระดาษ/Excel ของ สอน.)Auto-matches each CCS line to its delivery on the %N-### tag; creates/updates QualityTest (provisional → confirmed); emits CcsReNoteIngested / CcsMatched / QualityRecorded; CCS publishes online to the farmer and to สอน. oversight; unmatched rows queue for manual matchจับคู่แต่ละค่า CCS กับการส่งมอบด้วยแท็ก %N-###; สร้าง/อัปเดต QualityTest (provisional → confirmed); ปล่อย CcsReNoteIngested / CcsMatched / QualityRecorded; CCS ออนไลน์ถึงชาวไร่และการกำกับของ สอน.; แถวที่จับคู่ไม่ได้เข้าคิวจับคู่ด้วยมือ
Q2Systemระบบ—Net tonnage is known instantly at weigh-out; a provisional CCS that is later confirmed (or corrected) trues up on installment 2 or a correction entry — payment still runs on the statutory schedule regardless of CCS timingรู้น้ำหนักสุทธิทันทีตอนชั่งออก; ค่า CCS เบื้องต้นที่ยืนยันภายหลัง (หรือถูกแก้) ปรับที่งวด 2 หรือลงรายการปรับ — การจ่ายเดินตามกำหนดกฎหมายไม่ขึ้นกับเวลา CCS
S1Finance officerเจ้าหน้าที่การเงินOpen the payment batch for the cycle (รอบจ่าย)เปิดชุดจ่ายเงินประจำรอบComputes each delivery's two installments on the initial price (50% this cycle, 50% +30d) from MillPaymentSchedule: base (regional ขั้นต้น price) × net weight + CCS premium ± cane-type adjustment; เงินเกี๊ยว/loan offsets deduct from installment 1, spread across cyclesคำนวณสองงวดต่อการส่งมอบบนราคาขั้นต้น (50% รอบนี้, 50% +30 วัน) จาก MillPaymentSchedule: ฐาน (ราคาขั้นต้นรายภูมิภาค) × น้ำหนักสุทธิ + พรีเมียม CCS ± ส่วนต่างประเภทอ้อย; หักเงินเกี๊ยว/สินเชื่อจากงวด 1 กระจายข้ามหลายรอบ
S2Mill managerผู้จัดการโรงงานReview and approve batchตรวจทานและอนุมัติชุดBatch immutable; emits BatchApprovedชุดแก้ไขไม่ได้; ปล่อย BatchApproved
S3Systemระบบ—Posts installment 1 in this cycle → part_settled (FirstInstallmentPosted); posts installment 2 in the +30d cycle → settled (FinalInstallmentPosted); statements to mobile; financing posts RepaymentPosted offsets. A season-end FinalPriceSettled trues up the final price separately.บันทึกจ่ายงวด 1 ในรอบนี้ → part_settled (FirstInstallmentPosted); บันทึกจ่ายงวด 2 ในรอบ +30 วัน → settled (FinalInstallmentPosted); ส่งใบแจ้งยอดไปมือถือ; ฝั่งสินเชื่อบันทึกหักกลบ RepaymentPosted; สิ้นฤดูมี FinalPriceSettled สรุปราคาสุดท้ายแยกต่างหาก

6a. WF-06 — Contract farming & financing (เงินเกี๊ยว)6a. WF-06 — เกษตรพันธสัญญาและสินเชื่อ (เงินเกี๊ยว)

#Actorผู้กระทำActionการกระทำSystemระบบ
1Cane farmerลูกไร่อ้อยRequest financing in app — pick items: cane variety/seed, fertilizer, pesticide, land prep, harvesting, transport, or cashขอสินเชื่อในแอป — เลือกรายการ: พันธุ์อ้อย ปุ๋ย ยา เตรียมดิน เก็บเกี่ยว ขนส่ง หรือเงินสดDrafts CreditLine with requested CreditItemsร่าง CreditLine พร้อม CreditItem ที่ขอ
2Quota farmer / factory finance officerหัวหน้าโควต้า / เจ้าหน้าที่การเงินโรงงานReview request; set limit and terms; approveตรวจคำขอ; กำหนดเพดานและเงื่อนไข; อนุมัติCreditLine → active; emits CreditLineOpenedCreditLine → active; ปล่อย CreditLineOpened
3Factory finance officer (optional)เจ้าหน้าที่การเงินโรงงาน (ทางเลือก)Fund a quota farmer's line for the network (pass-through)สนับสนุนวงเงินของหัวหน้าโควต้าสำหรับเครือข่าย (ส่งผ่าน)Links downstream lines via upstream_credit_id; downstream total ≤ upstream limitเชื่อมวงเงินปลายทางผ่าน upstream_credit_id; ยอดปลายทางรวม ≤ เพดานต้นทาง
4Lenderผู้ให้สินเชื่อDisburse items through the season — as credit or direct purchaseเบิกจ่ายรายการตลอดฤดู — แบบสินเชื่อหรือซื้อตรงRecords CreditItem with financing_mode; emits CreditItemDisbursedบันทึก CreditItem พร้อม financing_mode; ปล่อย CreditItemDisbursed
5System (at settlement)ระบบ (ตอนปิดงวด)—Consumes PaymentPosted; posts Repayment offsets against the payment item's deductions; emits RepaymentPostedบริโภค PaymentPosted; บันทึก Repayment หักกลบกับการหักของรายการจ่าย; ปล่อย RepaymentPosted
6Borrowerผู้กู้Track balance in app; statements show each deduction line by lineติดตามยอดในแอป; ใบแจ้งยอดแสดงการหักทีละบรรทัดOutstanding = disbursed − repaid; append-only ledgerยอดคงค้าง = เบิกจ่าย − ชำระคืน; สมุดบัญชีเพิ่มได้อย่างเดียว

6b. WF-07 — Price announcement & central bidding (concept)6b. WF-07 — ประกาศราคาและการประมูลส่วนกลาง (แนวคิด)

#Actorผู้กระทำActionการกระทำSystemระบบ
1สอน. regulator officerเจ้าหน้าที่ สอน.Announce the regional initial price (ราคาอ้อยขั้นต้น) before the seasonประกาศราคาอ้อยขั้นต้นรายภูมิภาคก่อนฤดูCreates CanePriceAnnouncement (initial); emits CanePriceAnnounced; settlement uses it as the base rateสร้าง CanePriceAnnouncement (ขั้นต้น); ปล่อย CanePriceAnnounced; การปิดงวดใช้เป็นอัตราฐาน
2สอน. + sugar boardสอน. + คณะกรรมการฯRun central sugar bidding on lotsดำเนินการประมูลน้ำตาลส่วนกลางรายล็อตRecords SugarBid clearing prices; emits SugarBidClearedบันทึกราคาเคลียร์ของ SugarBid; ปล่อย SugarBidCleared
3สอน. regulator officerเจ้าหน้าที่ สอน.Announce the final price (ราคาอ้อยขั้นสุดท้าย) after season closeประกาศราคาขั้นสุดท้ายหลังปิดฤดูCreates CanePriceAnnouncement (final); differences post retroactively as adjustment itemsสร้าง CanePriceAnnouncement (ขั้นสุดท้าย); ส่วนต่างบันทึกย้อนหลังเป็นรายการปรับปรุง
4สอน.Monitor sugar distributionติดตามการจำหน่ายน้ำตาลOversight dashboards on the regulator portal; read-only over published eventsdashboard (แดชบอร์ด) กำกับดูแลบน portal หน่วยงานกำกับ; อ่านอย่างเดียวจากเหตุการณ์ที่เผยแพร่

6c. WF-08 — Season crop registry & ownership transfer (ขายเหมาไร่)6c. WF-08 — ทะเบียนอ้อยรายฤดูและการโอนสิทธิ์ (ขายเหมาไร่)

#Actorผู้กระทำActionการกระทำSystemระบบ
1Farmer / field agentชาวไร่ / เจ้าหน้าที่ภาคสนามAt season open, run the carry-forward wizard: per field — keep the ratoon (ตอ +1), replant (new variety), or leave fallowตอนเปิดฤดู ใช้ตัวช่วยยกยอด: ต่อแปลง — ไว้ตอ (ตอ +1) รื้อปลูกใหม่ (พันธุ์ใหม่) หรือพักแปลงCreates Crops per (field, season); previous_crop_id chains ratoons; emits CropRegisteredสร้าง Crop ต่อ (แปลง, ฤดู); previous_crop_id ต่อสายอ้อยตอ; ปล่อย CropRegistered
2Farmerชาวไร่Set expected yield; confirm the owner of each crop (self, quota farmer, or a virtual farmer)ระบุประมาณการผลผลิต; ยืนยันเจ้าของอ้อยแต่ละรายการ (ตนเอง หัวหน้าโควต้า หรือลูกไร่ virtual)First CropTransfer record = initial_assignmentCropTransfer เรกคอร์ดแรก = initial_assignment
3Seller + buyerผู้ขาย + ผู้ซื้อReassign a crop, or agree an outright standing-crop purchase priced in ฿/rai (ขายเหมาไร่)มอบหมายอ้อยใหม่ หรือตกลงซื้อเหมายืนแปลงคิดราคาบาท/ไร่ (ขายเหมาไร่)Appends CropTransfer (reassignment / outright_purchase: price_per_rai × field-area snapshot); cross-network transfers need two-side confirmation; emits CropOwnershipTransferred (+ CropPurchasedOutright)ต่อท้าย CropTransfer (reassignment / outright_purchase: ราคา/ไร่ × พื้นที่ ณ เวลาโอน); โอนข้ามเครือข่ายต้องยืนยันสองฝ่าย; ปล่อย CropOwnershipTransferred (+ CropPurchasedOutright)
4Systemระบบ—settle_method = ledger posts a crop_purchase CreditItem via Financing; cash_outside records the price for audit onlysettle_method = ledger บันทึก CreditItem ชนิด crop_purchase ผ่านบริบทสินเชื่อ; cash_outside บันทึกราคาเพื่อการตรวจสอบเท่านั้น
5System (guard)ระบบ (เงื่อนไข)—Transfers allowed in planned / growing / harvesting only; blocked after closed / failed; open credit against the crop must be settled or explicitly carried by the seller firstโอนได้เฉพาะสถานะ planned / growing / harvesting; ห้ามหลัง closed / failed; หนี้ค้างกับอ้อยต้องเคลียร์หรือให้ผู้ขายรับภาระไว้อย่างชัดเจนก่อน
6System (season close)ระบบ (ปิดฤดู)—Crops → closed; emits CropClosed; next season’s wizard offers the ratoon carry-forwardอ้อย → closed; ปล่อย CropClosed; ตัวช่วยฤดูถัดไปเสนอการยกยอดไว้ตอ

6d. WF-09 — Farm activity & input usage v2.46d. WF-09 — กิจกรรมแปลงและการใช้ปัจจัย v2.4

#Actorผู้กระทำActionการกระทำSystemระบบ
1Farmer / field agentชาวไร่ / เจ้าหน้าที่ภาคสนามRecord an activity on a crop — land prep, planting, fertilizing (material + qty), pest/weed control, irrigation, ripener, soil test, observation (works offline)บันทึกกิจกรรมบนอ้อย — เตรียมดิน ปลูก ใส่ปุ๋ย (สูตร + ปริมาณ) กำจัดศัตรูพืช/วัชพืช ให้น้ำ สารเร่งสุก ตรวจดิน สังเกตการณ์ (ทำงานออฟไลน์ได้)Appends FarmActivity; emits FarmActivityRecordedต่อท้าย FarmActivity; ปล่อย FarmActivityRecorded
2Farmerชาวไร่When the input came from เงินเกี๊ยว, pick the disbursed credit item it usedหากปัจจัยมาจากเงินเกี๊ยว เลือกรายการสินเชื่อที่เบิกจ่ายแล้วที่ใช้Links credit_item_id — the lender sees financed-vs-applied; other activities stay farmer-private unless sharedเชื่อม credit_item_id — ผู้ให้กู้เห็นเบิกเทียบใช้จริง; กิจกรรมอื่นเป็นส่วนตัวของชาวไร่เว้นแต่เลือกแชร์
3Farmer / system feedชาวไร่ / ฟีดระบบRecord rainfall/temperature per field (manual), or ingest zone weather from the external feedบันทึกฝน/อุณหภูมิรายแปลง (มือ) หรือรับข้อมูลอากาศรายเขตจากฟีดภายนอกAppends WeatherObservation (manual | tmd_api | satellite); emits WeatherObservedต่อท้าย WeatherObservation (manual | tmd_api | satellite); ปล่อย WeatherObserved
4Farmer / agent / modelชาวไร่ / เจ้าหน้าที่ / model (โมเดล)Update the crop’s yield estimate (declared, or model-assisted from variety × soil × rain)ปรับประมาณการผลผลิตของอ้อย (แจ้งเอง หรือ model ช่วยจาก พันธุ์ × ดิน × ฝน)Appends YieldEstimate with basis snapshot; latest mirrors into Crop.expected_yield_t; emits YieldEstimateUpdated → quota planning & credit sizing refreshต่อท้าย YieldEstimate พร้อม snapshot (สแนปช็อต) ฐานข้อมูล; ค่าล่าสุดสะท้อนเข้า Crop.expected_yield_t; ปล่อย YieldEstimateUpdated → ปรับแผนโควตาและขนาดวงเงิน

6e. WF-10 — Crushing-day scheduling & intake caps v2.46e. WF-10 — ตารางวันหีบและเพดานรับอ้อย v2.4

#Actorผู้กระทำActionการกระทำSystemระบบ
1Mill managerผู้จัดการโรงงานSchedule operating days: crushing capacity and burnt-share cap per day (default from CanePurchasePolicy)จัดตารางวันเดินเครื่อง: กำลังหีบและเพดานสัดส่วนอ้อยไฟไหม้รายวัน (ค่าตั้งต้นจาก CanePurchasePolicy)Creates CrushingDay scheduledสร้าง CrushingDay scheduled
2Mill staffพนักงานโรงงานOpen the day for bookingเปิดวันให้จองStatus → open; emits CrushingDayOpened; bookings draw down booked_t against capacityสถานะ → open; ปล่อย CrushingDayOpened; การจองตัดยอด booked_t ตามกำลัง
3System (all day)ระบบ (ตลอดวัน)—Weigh-ins accumulate weighed_t / burnt_intake_t; arrivals over the burnt cap are refused; a cap breach emits BurntCapBreached to the regulatorการชั่งสะสม weighed_t / burnt_intake_t; รถที่เกินเพดานไฟไหม้ถูกปฏิเสธ; การละเมิดเพดานปล่อย BurntCapBreached ถึงผู้กำกับ
4Mill staff (end of day)พนักงานโรงงาน (สิ้นวัน)Close the dayปิดวันStatus → closed; emits CrushingDayClosed; nightly job derives the BurntCaneCompliance record (WF-11)สถานะ → closed; ปล่อย CrushingDayClosed; งานรายคืนสร้างระเบียน BurntCaneCompliance (WF-11)

6f. WF-11 — CCS audit & burnt-cane compliance (สอน.) v2.46f. WF-11 — การตรวจประเมิน CCS และกำกับอ้อยไฟไหม้ (สอน.) v2.4

#Actorผู้กระทำActionการกระทำSystemระบบ
1สอน. regulator officerเจ้าหน้าที่ สอน.Open a CCS audit for a mill and 15-day period; draw the sample of per-truck QualityTestsเปิดการตรวจประเมิน CCS รายโรงงานรายรอบ 15 วัน; สุ่มตัวอย่างผล QualityTest รายคันรถCreates CcsAudit; sampling only over existing tests of that mill/periodสร้าง CcsAudit; สุ่มเฉพาะผลที่มีอยู่จริงของโรงงาน/รอบนั้น
2สอน. auditorผู้ตรวจ สอน.Re-test sampled juice; record audit means and deviation vs the mill’s resultsตรวจซ้ำตัวอย่าง; บันทึกค่าเฉลี่ยและความเบี่ยงเบนเทียบผลของโรงงานSets finding: pass | deviation | suspect; emits CcsAuditCompleted; a deviation triggers retroactive settlement adjustment; QualityTest is never edited by the auditตั้ง finding: pass | deviation | suspect; ปล่อย CcsAuditCompleted; ผลเบี่ยงเบนกระตุ้นการปรับงวดจ่ายย้อนหลัง; การตรวจประเมินไม่แก้ QualityTest
3System (nightly)ระบบ (รายคืน)—Derives BurntCaneCompliance per mill per day from CrushingDay + weigh tickets: burnt %, cap, breach flag, sliding deduction rate (฿30–130/t); mills annotate, never authorสร้าง BurntCaneCompliance รายโรงงานรายวันจาก CrushingDay + บัตรชั่ง: % อ้อยเผา เพดาน ธงละเมิด อัตราหักขั้นบันได (30–130 บาท/ตัน); โรงงานหมายเหตุได้แต่ไม่ใช่ผู้เขียน
4สอน. regulator officerเจ้าหน้าที่ สอน.Review breaches; apply measures (warning … intake suspension)ตรวจการละเมิด; ใช้มาตรการ (ตักเตือน … สั่งหยุดรับอ้อย)Records measure on the compliance record; deduction_rate_per_t feeds PaymentItem.cane_type_adjบันทึก measure บนระเบียนกำกับ; deduction_rate_per_t ป้อนเข้า PaymentItem.cane_type_adj

6g. WF-12 — Revenue account (70:30) & price announcement v2.46g. WF-12 — บัญชีรายได้ 70:30 และการประกาศราคา v2.4

#Actorผู้กระทำActionการกระทำSystemระบบ
1สอน. regulator officerเจ้าหน้าที่ สอน.Draft the season’s revenue account: sugar sales, by-products, system costs → net revenue split 70% growers / 30% mills; production return ฿/tร่างบัญชีรายได้ของฤดู: ยอดขายน้ำตาล ผลพลอยได้ ค่าใช้จ่ายระบบ → รายได้สุทธิแบ่งชาวไร่ 70% / โรงงาน 30%; ผลตอบแทนการผลิต บาท/ตันCreates RevenueAccount draftสร้าง RevenueAccount draft
2สอน. (pre-season)สอน. (ก่อนฤดู)Publish the account and announce the initial price per zone at 10 CCS with the ฿/CCS incrementเผยแพร่บัญชีและประกาศราคาขั้นต้นรายเขตที่ 10 CCS พร้อมอัตราบาท/CCSStatus → announced_initial; emits RevenueAccountAnnounced then CanePriceAnnounced (initial, per region, referencing the account)สถานะ → announced_initial; ปล่อย RevenueAccountAnnounced ตามด้วย CanePriceAnnounced (ขั้นต้น รายเขต อ้างอิงบัญชี)
3สอน. (post-season)สอน. (หลังฤดู)Finalize the account with actual revenue; announce the final priceปิดบัญชีด้วยรายได้จริง; ประกาศราคาขั้นสุดท้ายStatus → announced_final; if final > initial, mills owe growers the difference — adjustment items post retroactively (WF-05)สถานะ → announced_final; ถ้าขั้นสุดท้าย > ขั้นต้น โรงงานต้องจ่ายส่วนต่าง — รายการปรับปรุงบันทึกย้อนหลัง (WF-05)

6h. WF-13…17 — Bank lending & credit-risk (finance surface) v4.06h. WF-13…17 — สินเชื่อธนาคารและความเสี่ยงเครดิต (ช่องทางใช้งานการเงิน) v4.0

The finance surface runs five bank workflows. They read the shared platform core only through a scoped, revocable ConsentGrant (PDPA, NFR-08) and never mutate it. Detailed step tables are in SPEC-PWF-FIN; the loan lifecycle is Section 8a.

ช่องทางใช้งานการเงินมีworkflowธนาคารห้าชุด อ่านแกนกลางที่ใช้ร่วมได้เฉพาะผ่าน ConsentGrant ที่จำกัดขอบเขตและเพิกถอนได้ (PDPA, NFR-08) โดยไม่แก้ไขแกน ตารางขั้นตอนละเอียดอยู่ใน SPEC-PWF-FIN; วงจรสินเชื่ออยู่ที่ ข้อ 8a

IDWorkflowWorkflowKey steps & guardsขั้นตอนหลักและเงื่อนไข
WF-13Data-sharing consent (PDPA)ความยินยอมแบ่งปันข้อมูล (PDPA)A relationship officer requests access; the farmer/mill grants a scoped, time-boxed ConsentGrant to one FI; every cross-tenant read checks it; revocation is append-only — emits ConsentGranted / ConsentRevoked.เจ้าหน้าที่ลูกค้าสัมพันธ์ขอสิทธิเข้าถึง; ชาวไร่/โรงงานให้ ConsentGrant ที่จำกัดขอบเขตมีอายุแก่ FI หนึ่งแห่ง; ทุกการอ่านข้ามฝ่ายตรวจสอบ; เพิกถอนแบบต่อท้าย — ปล่อย ConsentGranted / ConsentRevoked
WF-14Cane credit scoringการให้คะแนนเครดิตอ้อยAssemble the consented feature snapshot (delivery, CCS, quota, repayment, yield), run the model, produce score + grade + reasons; freezes model_ver + factors_snapshot (NFR-09) — emits CreditAssessmentCompleted.ประกอบ snapshot คุณลักษณะที่ได้รับความยินยอม (ส่งมอบ CCS โควตา ชำระคืน ผลผลิต) รัน model ให้คะแนน + เกรด + เหตุผล; ตรึง model_ver + factors_snapshot (NFR-09) — ปล่อย CreditAssessmentCompleted
WF-15Loan originationการออกสินเชื่อApplication → scoring → underwriting → collateral → decision → agreement; approved requires an assessment_id; declines record adverse-action reasons — emits LoanApplicationSubmitted / LoanApproved / LoanRejected.คำขอ → ให้คะแนน → วิเคราะห์ → หลักประกัน → ตัดสิน → ทำสัญญา; approved ต้องมี assessment_id; การปฏิเสธบันทึกเหตุผล — ปล่อย LoanApplicationSubmitted / LoanApproved / LoanRejected
WF-16Disbursement & repaymentการเบิกจ่ายและชำระคืนSchedule, disburse, accrue interest, repay — cash or settlement-offset on an assigned delivery receivable; each posts an append-only LoanLedgerEntry — emits LoanDisbursed / DeliveryReceivableAssigned / LoanRepaymentPosted.จัดตาราง เบิก คิดดอกเบี้ย ชำระ — เงินสดหรือหักกลบตอนปิดงวดจากลูกหนี้ที่โอนสิทธิ; แต่ละรายการบันทึก LoanLedgerEntry แบบต่อท้าย — ปล่อย LoanDisbursed / DeliveryReceivableAssigned / LoanRepaymentPosted
WF-17Collections, delinquency & restructuringการเร่งรัดหนี้ ค้างชำระ และปรับโครงสร้างArrears follow-up, restructure, write-off, NPL classification & regulatory reporting — drives the loan state machine (Section 8a); emits LoanDelinquent / LoanRestructured / LoanWrittenOff.ติดตามหนี้ค้าง ปรับโครงสร้าง ตัดหนี้สูญ จำแนก NPL และรายงานเชิงกำกับ — ขับเคลื่อน state machine สินเชื่อ (ข้อ 8a); ปล่อย LoanDelinquent / LoanRestructured / LoanWrittenOff
WF-05 extendSettlement extensionส่วนขยายการปิดงวดWhen a settled delivery carries an assigned delivery_receivable, settlement routes part of the PaymentItem deduction to a LoanAccount repayment — assigned pledges rank ahead of เงินเกี๊ยว offsets; PaymentPosted keeps its contract.เมื่อการส่งมอบที่ปิดงวดมี delivery_receivable ที่โอนสิทธิ การปิดงวดส่งส่วนหนึ่งของการหัก PaymentItem ไปเป็นการชำระ LoanAccount — การจำนำมาก่อนเงินเกี๊ยว; PaymentPosted คงสัญญาเดิม

6i. WF-24…27 — Federated identity (account surface) v6.06i. WF-24…27 — อัตลักษณ์สหพันธ์ (ช่องทาง account) v6.0

PROP-005 adds four platform-owned workflows on the account surface — the sole identity writer. Unified onboarding (WF-24) replaces the six separate group onboardings as the single entry; every other surface consumes the token contract (sub · tnt · cap · srf · perm · ver).

PROP-005 เพิ่มworkflowของ platform สี่ชุดบนช่องทาง account — ผู้เขียนอัตลักษณ์รายเดียว การขึ้นทะเบียนรวม (WF-24) แทนการขึ้นทะเบียนแยกหกกลุ่มด้วยทางเข้าเดียว; ช่องทางอื่นทุกช่องบริโภคสัญญา token (โทเคน) (sub · tnt · cap · srf · perm · ver)

IDWorkflowWorkflowKey steps & guardsขั้นตอนหลักและเงื่อนไข
WF-24Unified onboardingการขึ้นทะเบียนรวมPerson registers once (phone OTP → verification level) → founds or joins a tenant → requests the first capacity; per-capacity verification branches (grower self-serve evidence · contractor id-verification + review · quota/mill registry check · bank BOT license · government appointment, Q1).บุคคลลงทะเบียนครั้งเดียว (OTP → ระดับยืนยัน) → ตั้งหรือเข้าร่วม tenant → ขอ capacity แรก; แขนงการยืนยันราย capacity (grower หลักฐานเอง · contractor ยืนยันตัวตน+ตรวจ · quota/mill ทะเบียน · bank ใบอนุญาต ธปท. · government แต่งตั้ง, Q1)
WF-25Capacity extensionการขยาย capacityAn existing tenant requests an additional capacity (the drone farmer, the mill service arm): verification → approval authority (Q1) → entitlement recompile (srf = matrix union, FR-62) → exclusivity check (NFR-16).tenant เดิมขอ capacity เพิ่ม (ชาวไร่โดรน หน่วยบริการโรงงาน): ยืนยัน → อำนาจอนุมัติ (Q1) → คอมไพล์สิทธิ์ใหม่ (srf = ยูเนียนตาราง, FR-62) → ตรวจเอกสิทธิ์ (NFR-16)
WF-26Session & tenant switchingsession (เซสชัน) และการสลับ tenantSign-in → tenant-context choice → token issue; switching re-issues the token — exactly one active tenant per token (FR-60), never a merged session; offline field surfaces (crew, mobile) receive JWS with a 72-hour window, revocation list synced on reconnect (NFR-17, Q6).ลงชื่อเข้าใช้ → เลือกบริบท tenant → ออก token; การสลับออก token ใหม่ — หนึ่ง tenant ที่ใช้งานต่อ token (FR-60) ไม่มี session ปนกัน; ช่องทางภาคสนามออฟไลน์ (crew, มือถือ) รับ JWS หน้าต่าง 72 ชั่วโมง ซิงก์รายการถอนเมื่อกลับมาออนไลน์ (NFR-17, Q6)
WF-27Platform view-asview-as ของ platformStart (permission gate) → persistent banner naming the impersonated tenant → every action dual-logged (tenant audit + platform audit, attributed to acting tenant + acting person, FR-67) → end; read-only by default (Q5).เริ่ม (ประตู permission) → แบนเนอร์ถาวรระบุ tenant ที่ถูกสวม → ทุกการกระทำบันทึกคู่ (บันทึก tenant + บันทึก platform ระบุ tenant และบุคคลที่กระทำ, FR-67) → จบ; อ่านอย่างเดียวโดยปริยาย (Q5)

Extensions (v6.0): WF-01 virtual-farmer claiming becomes person-claiming — the unclaimed person on the virtual tenant is claimed by phone verification, continuity promise unchanged; WF-13…15 run on the tenant↔tenant ConsentGrant (X1) with capacity-selected scorecards; WF-18 contractor onboarding becomes a WF-24/25 specialization (the contractor capacity's verification branch; freelance→org upgrade becomes a capacity move).

ส่วนขยาย (v6.0): การอ้างสิทธิ์ลูกไร่ virtual ใน WF-01 กลายเป็นการอ้างสิทธิ์บุคคล — บุคคลที่ยังไม่อ้างสิทธิ์บน tenant virtual ถูกอ้างด้วยการยืนยันเบอร์ คำมั่นความต่อเนื่องคงเดิม; WF-13…15 วิ่งบน ConsentGrant tenant↔tenant (X1) โดยเกณฑ์ประเมินเลือกตาม capacity; WF-18 การขึ้นทะเบียนผู้รับเหมาเป็นกรณีเฉพาะของ WF-24/25 (แขนงยืนยันของ capacity ผู้รับเหมา; การอัปเกรดฟรีแลนซ์→องค์กรคือการย้าย capacity)

6j. WF-28…30 — Platform operator (admin surface) v7.06j. WF-28…30 — ผู้ให้บริการ platform (ช่องทาง admin) v7.0

PROP-006 adds three operator workflows on the admin surface — Cane Agency's own back office. Admission is invitation-gated: mill, bank and government (and operator itself) can never be self-claimed. Extensions: WF-25 (capacity extension) now rejects a self-request for any invitation-only capacity with an explain-and-redirect state (FR-70); WF-27 (platform view-as) is hosted natively in the admin Support area — no longer borrowing the tenant portal (behaviour unchanged).

PROP-006 เพิ่มworkflowผู้ให้บริการสามชุดบนช่องทาง admin — หลังบ้านของสถาบันอ้อยเอง การรับเข้าเป็นแบบเชิญเท่านั้น: mill, bank, government (และ operator เอง) ขอเองไม่ได้ ส่วนขยาย: WF-25 ตอนนี้ปฏิเสธคำขอด้วยตนเองสำหรับ capacity เข้าโดยการเชิญ (FR-70); WF-27 view-as โฮสต์ในกลุ่ม Support ของ admin โดยตรง (พฤติกรรมคงเดิม)

WFWorkflowWorkflowFlowขั้นตอน
WF-28Invitation-gated admissionการรับเข้าโดยการเชิญOperator issues an Invitation for an invitation-only capacity (mill / bank / government) → invitee registers or signs in (WF-24) → claims the Invitation → per-capacity verification (สอน. mill registry / BOT license / appointment) → capacity active; self-requests rejected upstream (FR-70).ผู้ให้บริการออก Invitation สำหรับ capacity เข้าโดยการเชิญ (mill / bank / government) → ผู้ถูกเชิญลงทะเบียนหรือลงชื่อ (WF-24) → รับ Invitation → ยืนยันราย capacity (ทะเบียน สอน. / ใบอนุญาต ธปท. / การแต่งตั้ง) → capacity active; คำขอด้วยตนเองถูกปฏิเสธ (FR-70)
WF-29Representative-mill stewardship & conversionการดูแลและแปลงโรงงานตัวแทนOperator creates a representative mill from สอน. registry data → growers/quota designate it as a delivery destination (Quota.mill_id) & plan → operator invites the mill (WF-28) → on claim, the representative tenant converts to real/active preserving mill_id and every link (FR-73). A WF-01 specialization for mills.ผู้ให้บริการสร้างโรงงานตัวแทนจากข้อมูลทะเบียน สอน. → ชาวไร่/โควต้าระบุเป็นปลายทางส่งมอบ (Quota.mill_id) และวางแผน → ผู้ให้บริการเชิญโรงงาน (WF-28) → เมื่ออ้างสิทธิ์ tenant ตัวแทนแปลงเป็น real/active คง mill_id และทุกลิงก์ (FR-73) กรณีเฉพาะของ WF-01 สำหรับโรงงาน
WF-30Platform operationsการดำเนินงาน platformThe admin surface's working loop: open/close Season, publish price announcements, version catalogs & formulas, toggle feature flags, watch monitoring dashboards, triage support cases; every change dual-logged (NFR-20).วงรอบทำงานของช่องทาง admin: เปิด/ปิดฤดู ประกาศราคา กำกับรุ่น catalog (แคตตาล็อก) และสูตร สลับ feature flag เฝ้า dashboard คัดกรองเคสสนับสนุน; ทุกการเปลี่ยนแปลงบันทึกคู่ (NFR-20)

6k. WF-31…35 — Strategic cane payment (ค่าอ้อยกลยุทธ์) v8.06k. WF-31…35 — ค่าอ้อยกลยุทธ์ v8.0

PROP-009 adds five workflows inside the existing mill / grower / quota capacities — no new surface. The premium is confidential by default and never surfaces to the government capacity (NFR-21); every accrual and release is append-only, idempotent off the weigh-ticket net and non-retroactive across renegotiations (NFR-22).

PROP-009 เพิ่มworkflowห้าชุดภายใน capacity mill / grower / quota เดิม — ไม่มีช่องทางใหม่ เงินเพิ่มเป็นความลับโดยค่าเริ่มต้น และไม่ปรากฏต่อ capacity ของรัฐ (NFR-21); ทุกการสะสมและจ่ายเป็น append-only idempotent จากน้ำหนักสุทธิ และไม่ย้อนหลัง (NFR-22)

WFWorkflowWorkflowFlowขั้นตอน
WF-31Establish a strategic agreementตั้งข้อตกลงกลยุทธ์Mill ↔ grower/quota agree a pricing_mode (checkpoint / fixed_price เหมาจ่าย), premium, contract volume and upfront step (25/50/75) → confidential agreement signed → active.โรงงาน ↔ ชาวไร่/โควตาตกลง pricing_mode (checkpoint / fixed_price เหมาจ่าย) เงินเพิ่ม ปริมาณสัญญา และงวดล่วงหน้า → ลงนามลับ → active
WF-32Stamp → accrue → upfront releaseประทับตรา → สะสม → จ่ายงวดล่วงหน้าCheckpoint stamp → match delivery at weigh-in → accrue premium off the weighed net → release the upfront step with the delivery's settlement (never on PaymentItem).ประทับตรา → จับคู่การส่งมอบเมื่อชั่ง → สะสมเงินเพิ่มจากน้ำหนักสุทธิ → จ่ายงวดล่วงหน้าพร้อมการปิดงวด (ไม่อยู่บน PaymentItem)
WF-33Contract-volume fulfilmentครบปริมาณสัญญาcontract_volume_t reached → release the withheld balance in one fulfilment payout → agreement → fulfilled.ถึง contract_volume_t → จ่ายส่วนที่กันไว้เป็นก้อนเดียว → ข้อตกลง → fulfilled
WF-34Quota→cane-farmer onward relayการส่งต่อโควตา→ลูกไร่Quota Farmer records the cash (or ledger) payout against the factory delivery_receipt_ref (scheme mirror / flat_per_t / split) — without exposing the mill's headline terms.หัวหน้าโควต้าบันทึกการจ่ายสด (หรือลงบัญชี) ตาม delivery_receipt_ref ของโรงงาน (scheme mirror / flat_per_t / split) — โดยไม่เปิดเผยเงื่อนไขหลักของโรงงาน
WF-35Renegotiate / add concurrent agreementเจรจาใหม่ / เพิ่มข้อตกลงพร้อมกันAuthor a new revision effective the next day (effective_from), superseding the prior; posted accruals are unchanged (non-retroactive, NFR-22). Also opens an additional concurrent agreement within the same season.จัดทำฉบับใหม่มีผลวันถัดไป (effective_from) แทนที่ฉบับก่อน; การสะสมที่ลงแล้วไม่เปลี่ยน (ไม่ย้อนหลัง NFR-22) รวมถึงการเปิดข้อตกลงเพิ่มในฤดูเดียว

6l. WF-36…41 — General ledger & financial system (PROP-010 · GL) v9.06l. WF-36…41 — บัญชีแยกประเภทและระบบการเงิน (PROP-010 · GL) v9.0

PROP-010 adds six workflows inside the existing mill / grower / quota / contractor capacities — no new surface. Books are tenant-agnostic; every money-event auto-posts a balanced, idempotent, source-attributed entry (NFR-24); statements are frozen snapshots shared to a bank only via ConsentGrant scope books, and PROP-009 strategic postings never enter a statement shared to the government capacity (FR-94, NFR-26).

PROP-010 เพิ่ม workflow หกชุดภายใน capacity mill / grower / quota / contractor เดิม — ไม่มีช่องทางใหม่ books เป็น tenant-agnostic; ทุกเหตุการณ์การเงินลงรายการที่ดุล idempotent ระบุที่มาอัตโนมัติ (NFR-24); งบเป็น snapshot ที่ตรึง แบ่งให้ธนาคารผ่าน ConsentGrant scope books เท่านั้น และการลงกลยุทธ์ PROP-009 ไม่เข้างบที่แบ่งให้ capacity รัฐ (FR-94, NFR-26)

WFWorkflowWorkflowFlowขั้นตอน
WF-36Books onboardingเริ่มใช้ booksOn first use, seed the preset chart for the tenant's capacity (mill/quota/grower/contractor) as locked system_flag accounts → create the tenant's BooksProfile with capacity-seeded default_basis (cash for growers, accrual for mill/quota), books_edition (mill split, others unified) and ledger_view (grower cash_book) → open the first fiscal period seeded from default_basis (PROP-011, FR-105…107).เมื่อใช้ครั้งแรก seed ผังสำเร็จตาม capacity เป็นบัญชี system_flag ที่ล็อก → สร้าง BooksProfile ของ tenant พร้อมค่าตั้งต้นตาม capacity — default_basis (ชาวไร่เงินสด โรงงาน/โควตาคงค้าง), books_edition (โรงงาน split ที่เหลือ unified) และ ledger_view (ชาวไร่ cash_book) → เปิดงวดบัญชีแรกที่ seed จาก default_basis (PROP-011, FR-105…107)
WF-37Auto-postingการลงบัญชีอัตโนมัติOn each money-event (settlement / เงินเกี๊ยว / service payment / loan / PROP-009 release) → post the balanced journal entry(ies) into every affected tenant's books, idempotently, attributed to the source.ทุกเหตุการณ์การเงิน (การปิดยอด / เงินเกี๊ยว / ค่าบริการ / สินเชื่อ / การจ่าย PROP-009) → ลงรายการที่ดุลในสมุดของทุก tenant ที่เกี่ยวข้อง แบบ idempotent ระบุที่มา
WF-38AR/AP cycleวงจร AR/APRaise/receive an invoice (auto or manual) → record a Receipt or PaymentVoucher → clear the open balance (partial supported); status issued → part_paid → paid.ออก/รับใบแจ้งหนี้ (อัตโนมัติหรือกรอกเอง) → บันทึกใบเสร็จหรือใบสำคัญจ่าย → ตัดยอดค้าง (รองรับบางส่วน); issued → part_paid → paid
WF-39Bank reconciliationการกระทบยอดธนาคารImport/enter bank lines → match to books → resolve the difference → close balanced when statement balance = ledger balance.นำเข้า/กรอกรายการธนาคาร → จับคู่กับ books → แก้ผลต่าง → ปิด balanced เมื่อยอด statement = ยอดบัญชีแยกประเภท
WF-40Period close & statementsปิดงวดและงบClose the fiscal period → generate frozen P&L / balance sheet / trial balance / cash flow snapshots per period/season.ปิดงวดบัญชี → จัดทำ snapshot งบกำไรขาดทุน/งบดุล/งบทดลอง/งบกระแสเงินสดต่องวด/ฤดู
WF-41Statement sharingแบ่งปันงบShare a frozen statement to a bank via ConsentGrant scope books; strategic detail stays walled from the government capacity (FR-94, NFR-21/26).แบ่งงบที่ตรึงให้ธนาคารผ่าน ConsentGrant scope books; รายละเอียดกลยุทธ์กั้นจาก capacity รัฐ (FR-94, NFR-21/26)

6m. WF-42…44 — Cane & Sugar Fund (fund console) v11.06m. WF-42…44 — กองทุนอ้อยและน้ำตาลทราย (console fund) v11.0

PROP-013 adds three workflows on the new fund console — OCSF's proportionate surface, distinct from the regulator portal. They read statutory price / quality / volume facts and write only fund ledger entries (NFR-29); no strategic-pricing amount ever enters (NFR-30). WF-44 resolves PROP-012's open item R1 — the payer side of FinalPriceSettlement.

PROP-013 เพิ่ม workflow สามชุดบน console fund ใหม่ — surface ที่ได้สัดส่วนของ OCSF คนละหน่วยกับ portal ผู้กำกับ อ่านข้อมูลราคา/คุณภาพ/ปริมาณตามกฎหมาย เขียนเฉพาะรายการกองทุน (NFR-29); ห้ามค่ากลยุทธ์เข้า (NFR-30) WF-44 ปิดข้อค้าง R1 ของ PROP-012 — ฝั่งผู้จ่ายของ FinalPriceSettlement

WFWorkflowworkflowStepsขั้นตอน
WF-42Set the season levyตั้งอัตราเงินเก็บรายฤดูThe Board (กอน.) sets the Article 28 research-&-promotion fee and the per-tonne board levy (per zone, may be ฿0) → versioned & effective-dated FundLevyRate (FundLevyRateSet).คณะกรรม (กอน.) ตั้งค่าธรรมเนียมมาตรา 28 และเงินเก็บรายตัน (รายเขต อาจ ฿0) → FundLevyRate ที่มี version และวันมีผล (FundLevyRateSet)
WF-43Accrue & collect contributionsตั้งค้างและเก็บเงินสมทบAuto-accrue a FundContribution from delivered cane tonnage and produced sugar (by-products excluded, Q4) at the Board-set Article 28 rate → post into the Fund and its books (auto_fund, FundContributionPosted).ตั้งค้าง FundContribution อัตโนมัติจากตันอ้อยที่ส่งและน้ำตาลที่ผลิต (ไม่รวมผลพลอยได้ Q4) ตามอัตรามาตรา 28 → ลงกองทุนและ books (auto_fund, FundContributionPosted)
WF-44Compensate a mill (Article 56)ชดเชยโรงงาน (มาตรา 56)On Cabinet final-price approval when final<initial, accrue a FundCompensation per mill per zone (payer side of FinalPriceSettlement) → schedule → pay; or flag deferred_shortfall and manage the gap both ways — age the mill's receivable AND roll into next season's initial price (Q2c). Resolves PROP-012 R1.เมื่อ ครม. อนุมัติราคาสุดท้ายและสุดท้าย<ขั้นต้น ตั้งค้าง FundCompensation รายโรงงานรายเขต (ฝั่งผู้จ่ายของ FinalPriceSettlement) → กำหนดจ่าย → จ่าย; หรือทำเครื่อง deferred_shortfall และจัดการส่วนขาดสองทาง — คิดอายุลูกหนี้ของโรงงาน และยกไปราคาขั้นต้นฤดูถัดไป (Q2c) ปิด R1 ของ PROP-012

7. Delivery state machine7. สเตตแมชีนการส่งมอบ

Release (v0.32.0, PROP-060 D-2). arrived is a first-class initial state with an explicit creation transition — gate/queue-booth registration of a checked-in QueueTicket (or of an unbooked truck) creates the Delivery directly into arrived, seq_no → coin_no. booked and its two transitions carry release: v2: booking ships in season two, and until then the machine's only entry is the gate. Before this amendment the walk-in entry existed as prose only, so deferring booked would have left V1 with no way in.

รุ่น (v0.32.0, PROP-060 D-2) arrived เป็น สถานะเริ่มต้นชั้นหนึ่ง พร้อมการเปลี่ยนสถานะแบบสร้างใหม่อย่างชัดเจน — การลงทะเบียนที่ป้อม/จุดแจ้งคิวจาก QueueTicket ที่เช็กอินแล้ว (หรือรถที่ไม่ได้จอง) สร้าง Delivery เข้าสู่ arrived โดยตรง และ seq_no → coin_no ส่วน booked และการเปลี่ยนสถานะสองรายการของมันมีป้าย release: v2: การจองออกในฤดูที่สอง ก่อนหน้านั้นทางเข้าเดียวของเครื่องสถานะคือที่ป้อม

booked · v2จองคิวแล้ว (ฤดูที่สอง)
→
arrived · V1 entryถึงโรงงาน (ทางเข้าของ V1)
→
weighedออกบัตรชั่ง
→
acceptedตรวจรับแล้ว
→
part_settledจ่ายงวดแรกแล้ว
→
settledจ่ายครบแล้ว
FromจากEventเหตุการณ์ToไปยังGuardเงื่อนไข
bookedTruckArrivedarrivedCrushingDay open with capacity available; crop owner’s quota not exhausted; burnt cane within the CrushingDay daily cap (burnt_intake_t / weighed_t ≤ burnt_cap_pct, defaulted from CanePurchasePolicy)CrushingDay เปิดอยู่และกำลังเหลือ; โควตาของเจ้าของอ้อยยังไม่หมด; อ้อยไฟไหม้อยู่ในเพดานรายวันของ CrushingDay (burnt_intake_t / weighed_t ≤ burnt_cap_pct ค่าตั้งต้นจาก CanePurchasePolicy)
bookedCancelcancelledBefore arrival onlyก่อนมาถึงเท่านั้น
arrivedWeightRecordedweighednet_kg > 0; ticket issued; cane_type and harvest_method confirmednet_kg > 0; ออกบัตรแล้ว; ยืนยัน cane_type และ harvest_method แล้ว
weighedAcceptacceptedNo open dispute; within quota toleranceไม่มีข้อพิพาทค้าง; อยู่ในเกณฑ์เผื่อของโควตา
weighedRejectrejectedExcess trash / contamination; reason mandatoryสิ่งปนเปื้อนเกิน; ต้องระบุเหตุผล
weighedDisputedisputedRe-weigh supersedes original ticketการชั่งใหม่ออกบัตรแทนบัตรเดิม
disputedResolveweighedSupervisor sign-off recordedบันทึกการอนุมัติของหัวหน้างาน
acceptedFirstInstallmentPostedpart_settledFirst PaymentBatch (cycle) approved; installment 1 (50% of the initial price) posted; เงินเกี๊ยว / repayment offsets applied to this installment, spread across cyclesPaymentBatch (รอบ) แรกอนุมัติ; จ่ายงวด 1 (50% ของราคาขั้นต้น); หักเงินเกี๊ยว / การชำระคืนกับงวดนี้ กระจายข้ามหลายรอบ
part_settledFinalInstallmentPostedsettledSecond PaymentBatch (cycle) approved on/after the +30d due date; installment 2 (remaining 50%) posted; terminal. The season-end final-price true-up (FinalPriceSettlement) reconciles separately and does not reopen this state.PaymentBatch (รอบ) ที่สองอนุมัติในวันครบ +30 วันหรือหลัง; จ่ายงวด 2 (50% ที่เหลือ); สถานะสุดท้าย การสรุปราคาสุดท้ายปลายฤดู (FinalPriceSettlement) กระทบยอดแยกต่างหาก ไม่เปิดสถานะนี้ซ้ำ

8. Crop state machine8. สเตตแมชีนอ้อยรายฤดู

plannedขึ้นทะเบียนแล้ว
→
growingกำลังเติบโต
→
harvestingกำลังเก็บเกี่ยว
→
closedปิดฤดู
FromจากEventเหตุการณ์ToไปยังGuardเงื่อนไข
plannedPlantingConfirmedgrowingplanted_at set (plant cane) or ratoon regrowth confirmedตั้ง planted_at (อ้อยปลูก) หรือยืนยันการแตกตอ
growingHarvestOpenedharvestingSeason open; quota allocated to the crop owner’s chainฤดูเปิดแล้ว; โควตาจัดสรรถึงสายของเจ้าของอ้อยแล้ว
harvestingSeasonClosedclosedNo open deliveries; terminalไม่มีการส่งมอบค้าง; สถานะสุดท้าย
planned / growingCropFailedfailedDrought / flood / fire; terminal — open credit stays outstanding and rolls per Financing rulesแล้ง / น้ำท่วม / ไฟไหม้; สถานะสุดท้าย — หนี้ค้างยังคงอยู่และยกยอดตามกฎบริบทสินเชื่อ

Ownership transfers (WF-08) are permitted in planned, growing and harvesting; never after closed or failed. Deliveries already settled are unaffected by later transfers — money follows the owner at settlement time.

การโอนสิทธิ์ (WF-08) ทำได้ในสถานะ planned, growing และ harvesting; ห้ามหลัง closed หรือ failed การส่งมอบที่ settled แล้วไม่ถูกกระทบจากการโอนภายหลัง — เงินเป็นของเจ้าของ ณ เวลาปิดงวด

8a. Loan state machine v4.08a. สเตตแมชีนสินเชื่อ v4.0

appliedยื่นคำขอ
→
scoredให้คะแนนแล้ว
→
underwritingกำลังวิเคราะห์
→
approvedอนุมัติ
→
currentเบิกจ่าย · ปกติ
→
closedปิดบัญชี
FromจากEventเหตุการณ์ToไปยังGuardเงื่อนไข
appliedCreditAssessmentCompletedscoredAn active ConsentGrant covers the requested scope (NFR-08); score + grade + factors_snapshot recorded (NFR-09)มี ConsentGrant active ครอบคลุม scope ที่ขอ (NFR-08); บันทึกคะแนน + เกรด + factors_snapshot (NFR-09)
scoredUnderwriteStartedunderwritingAnalyst review of assessment, facility structure & collateralนักวิเคราะห์ทบทวนการประเมิน โครงสร้างวงเงิน และหลักประกัน
underwritingLoanApprovedapprovedassessment_id present; collateral registered as required by the productมี assessment_id; จดทะเบียนหลักประกันตามที่ผลิตภัณฑ์กำหนด
underwritingLoanRejectedrejecteddecision_reasons recorded (adverse-action); terminalบันทึก decision_reasons (เหตุผลปฏิเสธ); สถานะสุดท้าย
approvedLoanDisburseddisbursed → currentAgreement signed; disbursement LoanLedgerEntry posted; repayment schedule activatedทำสัญญา; บันทึก LoanLedgerEntry การเบิก; เริ่มตารางการชำระ
currentPaymentMisseddelinquentScheduled repayment overdue beyond graceค้างชำระเกินระยะผ่อนผัน
delinquentArrearsCuredcurrentArrears cleared (cash or settlement offset)เคลียร์หนี้ค้าง (เงินสดหรือหักกลบ)
delinquentLoanRestructuredrestructured → currentRevised terms agreed; borrower performing on the new scheduleตกลงเงื่อนไขใหม่; ผู้กู้ชำระตามตารางใหม่
currentLoanRepaymentPostedclosedoutstanding_amt reaches zero; terminaloutstanding_amt เป็นศูนย์; สถานะสุดท้าย
delinquentLoanWrittenOffwritten_offNPL classified and written off per risk policy; terminalจำแนก NPL และตัดหนี้สูญตามนโยบายความเสี่ยง; สถานะสุดท้าย

The loan machine parallels — never replaces — the delivery (Section 7) and crop (Section 8) machines; a loan’s repayments may draw on the same settlement stream via an assigned receivable (WF-05, Section 6h).

state machine สินเชื่อทำงานคู่ขนาน — ไม่แทนที่ — state machine การส่งมอบ (ข้อ 7) และอ้อย (ข้อ 8); การชำระคืนของสินเชื่ออาจดึงจากสายการปิดงวดเดียวกันผ่านลูกหนี้ที่โอนสิทธิ (WF-05, ข้อ 6h)

8b. Strategic agreement state machine v8.08b. สเตตแมชีนข้อตกลงกลยุทธ์ v8.0

draftร่าง
→
activeลงนาม · สะสม/จ่าย
→
fulfilledครบปริมาณ
→
closedปิด
FromจากEventเหตุการณ์ToไปยังGuardเงื่อนไข
draftStrategicAgreementSignedactiveCounterparty holds an active grower or quota capacity; confidential defaults trueคู่สัญญาถือ capacity grower หรือ quota ที่ active; confidential ค่าเริ่มต้น true
activePremiumAccrued / PremiumStepReleasedactivePer-delivery accrual + upfront step; append-only, idempotent off the weigh-ticket net (NFR-22)การสะสมต่อการส่งมอบ + งวดล่วงหน้า; append-only idempotent จากน้ำหนักสุทธิ (NFR-22)
activeContractVolumeFulfilledfulfilledcontract_volume_t reached; withheld balance released in one payoutถึง contract_volume_t; จ่ายส่วนที่กันไว้เป็นก้อนเดียว
activeAgreementSuspended / Resumedsuspended ⇄ activeEither tenant pauses; accruals halt while suspended, resume on returnฝ่ายใดฝ่ายหนึ่งพัก; การสะสมหยุดขณะ suspended กลับมาเมื่อ active
activeAgreementRenegotiated (WF-35)supersededA new revision (effective_from = next day) becomes active; posted accruals never revalued (non-retroactive)ฉบับใหม่ (effective_from = วันถัดไป) active; การสะสมที่ลงแล้วไม่ตีมูลค่าใหม่ (ไม่ย้อนหลัง)
fulfilledAgreementClosedclosedAll releases settled; terminalจ่ายครบทุกงวด; สถานะสุดท้าย

The strategic-agreement machine runs entirely inside the confidential strategic_pricing plane — it never touches the delivery (Section 7) or settlement machines and never emits an event to the government capacity (NFR-21).

state machine ข้อตกลงกลยุทธ์ทำงานภายในระนาบความลับ strategic_pricing ทั้งหมด — ไม่แตะ state machine การส่งมอบ (ข้อ 7) หรือการปิดงวด และไม่ส่งเหตุการณ์ใดไป capacity ของรัฐ (NFR-21)

8c. Fiscal-period & invoice state machines (PROP-010) v9.08c. สเตตแมชีนงวดบัญชีและใบแจ้งหนี้ (PROP-010) v9.0

Two small append-only machines run inside books / receivables. A FiscalPeriod gates when postings land; an Invoice tracks settlement.

มี state machine แบบ append-only สองตัวภายใน books / receivables — FiscalPeriod คุมว่ารายการจะลงเมื่อใด ส่วน Invoice ติดตามการชำระ

openเปิด
→
closingกำลังปิด
→
closedปิดแล้ว
→
lockedล็อก
Machineเครื่องTransitionการเปลี่ยนGuardเงื่อนไข
FiscalPeriodopen → closing → closed → lockedClosing freezes late postings to the next open period; reopening a closed period is logged & permission-gated (NFR-25). basis: cash | accrual.การปิดตรึงรายการที่ลงช้าไปงวดถัดไป; เปิดงวดที่ปิดแล้วต้องบันทึกและมีสิทธิ์ (NFR-25) basis: cash | accrual
Invoicedraft → issued → part_paid → paid (· void)A Receipt (receivable) or PaymentVoucher (payable) reduces the open balance; part_paid while a balance remains, paid at zero; append-only — corrections post a reversal, never an edit (NFR-24).ใบเสร็จ (ลูกหนี้) หรือใบสำคัญจ่าย (เจ้าหนี้) ลดยอดค้าง; part_paid ขณะยังค้าง paid เมื่อเป็นศูนย์; append-only — แก้ด้วยการกลับรายการ (NFR-24)

9. Exception paths9. เส้นทางกรณียกเว้น

Applied — PROP-050 · spec v0.28.0apply แล้ว — PROP-050 · spec v0.28.0

PROP-050 (spec v0.28.0) — cost centres to field & crop level. The ledger gains a cost dimension (five columns on JournalEntry.lines) over a derived CostCentre register, the CropCycle as the unit of return with its establishment asset, declared/versioned/reversible allocation, the photographed receipt as evidence on the entry, and the network lending branch for quota and lead farmers. Eleven new records, ten extensions, one withdrawal (CropExpense as a store), fourteen vocabularies, eighteen relationships, twenty-five events, FR-267…312, NFR-87…106, WF-96…111 — no new bounded context and no new surface.

PROP-050 (spec v0.28.0) — ศูนย์ต้นทุนถึงระดับแปลงและอ้อยรุ่น สมุดบัญชีได้มิติต้นทุน (ห้าคอลัมน์บน JournalEntry.lines) บนทะเบียน CostCentre ที่สร้างเอง CropCycle เป็นหน่วยของผลตอบแทนพร้อมสินทรัพย์ต้นทุนก่อตั้ง การปันส่วนที่ประกาศ มีรุ่น และกลับรายการได้ ใบเสร็จที่ถ่ายไว้เป็นหลักฐานบนรายการบัญชี และกิ่งการให้ยืมของเครือข่ายสำหรับหัวหน้าโควต้าและหัวตัน ระเบียนใหม่สิบเอ็ด ขยายสิบ ถอนหนึ่ง คำศัพท์สิบสี่ชุด ความสัมพันธ์สิบแปด เหตุการณ์ยี่สิบห้า FR-267…312, NFR-87…106, WF-96…111 — ไม่มี bounded context ใหม่และไม่มีผิวหน้าใหม่

10. Related documents10. เอกสารที่เกี่ยวข้อง

11. Revision history11. ประวัติการแก้ไข

RevฉบับDateวันที่Changesการเปลี่ยนแปลง
1.02026-07-06Initial draft — three surfaces, cooperative modelร่างแรก — สามช่องทางใช้งานการใช้งาน model สหกรณ์
2.02026-07-06WF-06 financing (เงินเกี๊ยว) and WF-07 pricing; cane-type guards; credit exception pathsWF-06 สินเชื่อ (เงินเกี๊ยว) และ WF-07 ราคา; เงื่อนไขประเภทอ้อย; เส้นทางยกเว้นด้านสินเชื่อ
2.12026-07-06Bilingual EN/TH content with navbar language switcher; removed in-page section subnav; A4 print pagination rulesเนื้อหาสองภาษา EN/TH พร้อมตัวสลับภาษาบนแถบนำทาง; นำแถบนำทางหัวข้อในหน้าออก; กฎการแบ่งหน้าพิมพ์ A4
2.32026-07-06WF-03/04: every truck juice-sampled at the mill on-site lab; late-result provisional settlement replaces period-average CCSWF-03/04: เก็บน้ำอ้อยทุกคันรถที่แล็บประจำโรงงาน; ผลช้าใช้ราคาชั่วคราวแทน CCS เฉลี่ยของช่วง
2.22026-07-06PROP-001: WF-01 extended with virtual farmer create/invite/convert; new WF-08 season crop registry & ownership transfer (ขายเหมาไร่); crop state machine (ข้อ 8); crop-aware booking guards; field wordingPROP-001: ขยาย WF-01 ด้วยการสร้าง/เชิญ/แปลงเป็นบัญชีจริงลูกไร่ virtual; เพิ่ม WF-08 ทะเบียนอ้อยรายฤดูและการโอนสิทธิ์ (ขายเหมาไร่); สเตตแมชีนอ้อย (ข้อ 8); เงื่อนไขการจองอิงเจ้าของอ้อย; ปรับถ้อยคำ field
2.42026-07-07PROP-002 Proposal B: new WF-09 farm activity & input usage, WF-10 crushing-day scheduling, WF-11 CCS audit & burnt-cane compliance, WF-12 revenue account (70:30); WF-03 booking gains truck / crushing day / harvest method; delivery guards re-point at CrushingDayPROP-002 ข้อเสนอ B: เพิ่ม WF-09 กิจกรรมแปลงและการใช้ปัจจัย, WF-10 ตารางวันหีบ, WF-11 ตรวจประเมิน CCS และกำกับอ้อยไฟไหม้, WF-12 บัญชีรายได้ 70:30; การจองใน WF-03 เพิ่มรถ / วันหีบ / วิธีเก็บเกี่ยว; เงื่อนไขการส่งมอบอ่านจาก CrushingDay
3.02026-07-07PROP-002 Proposal A: perspective document series — SPEC-PWF-CFC/-CFQ/-MILL/-GOV added (actor-sliced workflows, guards and exceptions); series docnavPROP-002 ข้อเสนอ A: ชุดเอกสารรายมุมมอง — เพิ่ม SPEC-PWF-CFC/-CFQ/-MILL/-GOV (workflow เงื่อนไข และกรณียกเว้นตัดตามผู้ใช้); แถบนำทางชุดเอกสาร
4.02026-07-07PROP-003: WF-13…17 bank lending & credit-risk (finance surface); WF-05 settlement extension (assigned delivery receivable → loan repayment); loan state machine (Section 8a); consent-gated reads (NFR-08); bank perspective (SPEC-PWF-FIN)PROP-003: WF-13…17 สินเชื่อธนาคารและความเสี่ยงเครดิต (ช่องทางใช้งานการเงิน); ส่วนขยาย WF-05 (ลูกหนี้ที่โอนสิทธิ → การชำระสินเชื่อ); state machine สินเชื่อ (ข้อ 8a); การอ่านที่ต้องมีความยินยอม (NFR-08); มุมมองธนาคาร (SPEC-PWF-FIN)
5.02026-07-08PROP-004 (v5.0): WF-18…23 (contractor onboarding, request→quote→award incl. instant dispatch จองด่วน, field execution, four payment rails, reviews & endorsements, books) + the work-order state machine; WF-05/06/13…15 extensions; new SPEC-PWF-CECPROP-004 (v5.0): WF-18…23 + state machine ใบสั่งงาน; ส่วนขยาย WF-05/06/13…15; เพิ่ม SPEC-PWF-CEC
6.02026-07-08PROP-005 (FED, spec v6.0): new Section 6i WF-24…27 (unified onboarding · capacity extension · session & tenant switching with offline JWS · platform view-as); WF-01 virtual-farmer claiming becomes person-claiming; WF-13…15 run on the tenant↔tenant ConsentGrant with capacity-selected scorecards; WF-18 becomes a WF-24/25 specializationPROP-005 (FED, spec (สเปก) v6.0): ข้อ 6i ใหม่ WF-24…27 (ขึ้นทะเบียนรวม · ขยาย capacity · session และการสลับ tenant พร้อม JWS ออฟไลน์ · view-as ของ platform); การอ้างสิทธิ์ลูกไร่ virtual ใน WF-01 เป็นการอ้างสิทธิ์บุคคล; WF-13…15 วิ่งบน ConsentGrant tenant↔tenant โดยเกณฑ์ประเมินเลือกตาม capacity; WF-18 เป็นกรณีเฉพาะของ WF-24/25
7.02026-07-08PROP-006 (OPS, spec v7.0): new Section 6j WF-28…30 (invitation-gated admission · representative-mill stewardship & conversion · platform operations) on the admin surface; WF-25 gains the admission gate (self-requests for invitation-only capacities rejected, FR-70); WF-27 view-as hosted natively in the admin Support area; representative-mill lifecycle mirrors the virtual farmer (WF-01).PROP-006 (OPS, spec v7.0): ข้อ 6j ใหม่ WF-28…30 (การรับเข้าโดยการเชิญ · การดูแลและแปลงโรงงานตัวแทน · การดำเนินงาน platform) บนช่องทาง admin; WF-25 เพิ่มประตูการรับเข้า (FR-70); WF-27 view-as โฮสต์ในกลุ่ม Support ของ admin; วงจรโรงงานตัวแทนสะท้อนลูกไร่ virtual (WF-01)
8.02026-07-09PROP-009 (STR, spec v8.0): new Section 6k WF-31…35 (establish agreement · stamp→accrue→upfront · fulfilment balance · quota→cane-farmer relay · renegotiate/concurrent) inside the mill/grower/quota capacities; new Section 8b strategic-agreement state machine (draft→active→fulfilled→closed / suspended / superseded). Confidential by default, off the statutory PaymentItem, no edge to the government capacity (NFR-21…23).PROP-009 (STR, spec v8.0): ข้อ 6k ใหม่ WF-31…35 (ตั้งข้อตกลง · ประทับตรา→สะสม→จ่ายล่วงหน้า · ส่วนครบปริมาณ · ส่งต่อโควตา→ลูกไร่ · เจรจาใหม่/พร้อมกัน) ภายใน capacity mill/grower/quota; ข้อ 8b ใหม่ state machine ข้อตกลงกลยุทธ์ (draft→active→fulfilled→closed / suspended / superseded) เป็นความลับโดยค่าเริ่มต้น ไม่แตะ PaymentItem ไม่มีเส้นไป capacity รัฐ (NFR-21…23)
9.02026-07-09PROP-010 (GL, spec v9.0): new Section 6l WF-36…41 (books onboarding · auto-posting · AR/AP cycle · bank reconciliation · period close & statements · statement sharing) inside the mill/grower/quota/contractor capacities; new Section 8c fiscal-period (open→closing→closed→locked) & invoice (draft→issued→part_paid→paid) state machines. Books tenant-agnostic; auto-postings balanced/idempotent/source-attributed (NFR-24); frozen statements & gated period reopen (NFR-25); books private, PROP-009 wall preserved (FR-94, NFR-26).PROP-010 (GL, spec v9.0): ข้อ 6l ใหม่ WF-36…41 (เริ่มใช้ books · ลงอัตโนมัติ · วงจร AR/AP · กระทบยอดธนาคาร · ปิดงวดและงบ · แบ่งปันงบ) ภายใน capacity mill/grower/quota/contractor; ข้อ 8c ใหม่ state machine งวดบัญชีและใบแจ้งหนี้ books เป็น tenant-agnostic; ลงอัตโนมัติดุล/idempotent/ระบุที่มา (NFR-24); งบตรึงและเปิดงวดมีสิทธิ์ (NFR-25); books ลับ คงกำแพง PROP-009 (FR-94, NFR-26)
10.02026-07-10PROP-012 (settlement & CCS-by-re-note correction, spec v10.0): Section 7 delivery state machine adds part_settled and splits accepted → settled into FirstInstallmentPosted / FinalInstallmentPosted (statutory two installments on the initial price); WF-04 is re-grounded to government re-note ingestion & auto-match on the %N-### tag (no on-site lab, tonnage instant at weigh-out); WF-05 posts two installments per cycle with a season-end final-price true-up.PROP-012 (แก้การจ่ายเงินและ CCS จากรีโน้ต, spec v10.0): ข้อ 7 state machine เพิ่ม part_settled และแยก accepted → settled เป็น FirstInstallmentPosted / FinalInstallmentPosted (สองงวดตามกฎหมายบนราคาขั้นต้น); WF-04 อิงการนำเข้ารีโน้ตของรัฐและจับคู่ด้วยแท็ก %N-### (ไม่มีแล็บในโรงงาน รู้น้ำหนักทันที); WF-05 จ่ายสองงวดต่อรอบ พร้อมสรุปราคาสุดท้ายปลายฤดู
11.02026-07-10PROP-013 (spec v11.0): new Section 6m WF-42…44 (set the season levy · accrue & collect contributions · compensate a mill under Article 56) on the new fund console — OCSF's proportionate surface, distinct from the regulator portal. Reads statutory facts, writes only fund ledger entries (NFR-29); no strategic-pricing amount enters (NFR-30). WF-44 resolves PROP-012 R1 (payer side of FinalPriceSettlement; shortfall managed both ways, Q2c).PROP-013 (spec v11.0): ข้อ 6m ใหม่ WF-42…44 (ตั้งอัตราเงินเก็บรายฤดู · ตั้งค้างและเก็บเงินสมทบ · ชดเชยโรงงานตามมาตรา 56) บน console fund ใหม่ — surface ที่ได้สัดส่วนของ OCSF คนละหน่วยกับ portal ผู้กำกับ อ่านข้อเท็จจริงตามกฎหมาย เขียนเฉพาะรายการบัญชีกองทุน (NFR-29); ห้ามค่าอ้อยกลยุทธ์เข้า (NFR-30) WF-44 ปิด R1 ของ PROP-012 (ฝั่งผู้จ่ายของ FinalPriceSettlement; ส่วนขาดจัดการสองทาง Q2c)
12.02026-07-10PROP-011 (GL, spec v12.0): WF-36 (books onboarding) extended to create the tenant's BooksProfile with capacity-seeded defaults (default_basis / books_edition / ledger_view); the fiscal period now seeds its basis from the profile. A basis change and an edition upgrade (via the books_split entitlement) apply to the next open period only; no new workflow number.PROP-011 (GL, spec v12.0): ขยาย WF-36 (เริ่มใช้ books) ให้สร้าง BooksProfile ของ tenant พร้อมค่าตั้งต้นตาม capacity (default_basis / books_edition / ledger_view); งวดบัญชี seed basis จากโปรไฟล์ การเปลี่ยนเกณฑ์และการอัปเกรดรุ่น (ผ่านสิทธิ์ books_split) มีผลกับงวดถัดไปที่เปิดเท่านั้น ไม่มีหมายเลข workflow ใหม่
0.1.02026-07-11PROP-014 (spec v0.1.0): adopted semantic versioning and restarted at 0.1.0 — the legacy whole-integer line (v2.0→v12.0, this master was Rev 12.0) is frozen as a crosswalk. Added the .spec-docnav perspective navbar and the government gov_cluster split: สอน./OCSB (government), the new กอน. board capacity + board surface, and OCSF (fund) — see the GOV hub.PROP-014 (spec v0.1.0): ใช้ semantic versioning และรีสตาร์ทที่ 0.1.0 — สายเลขจำนวนเต็มเดิม (v2.0→v12.0 เอกสารนี้เคยเป็น Rev 12.0) ถูกแช่แข็งเป็นตารางเทียบ เพิ่ม navbar มุมมอง .spec-docnav และการแยกกลุ่มภาครัฐ gov_cluster: สอน./OCSB (government), capacity board (กอน.) + surface board ใหม่ และ OCSF (fund) — ดู ศูนย์ GOV
0.2.02026-07-13PROP-018 P3 (spec v0.4.0): landing layer prepended — executive summary, headline figures and one navigation card per perspective document (unnumbered sections, so all existing section addresses and the graph's citedBy pointers remain valid).PROP-018 P3 (spec v0.4.0): เพิ่มชั้น landing ด้านบน — บทสรุปผู้บริหาร ตัวเลขสำคัญ และการ์ดนำทางหนึ่งใบต่อเอกสารมุมมอง (ส่วนไม่มีหมายเลข ตำแหน่งข้อเดิมและตัวชี้ citedBy ของ graph จึงยังใช้ได้)
0.2.12026-07-22PROP-046 (spec v0.18.0): third infrastructure family -PLT — platform intelligence & shared master data; perspective card + docnav entry added beside FED/OPS; SPEC-PWF-PLT created (Rev 0.1.0) owning WF-52; farmer_reliability re-homed to PLT (OQ-3).PROP-046 (spec v0.18.0): ตระกูลโครงสร้างพื้นฐานที่สาม -PLT — ข่าวกรองระดับ platform และข้อมูลหลักที่ใช้ร่วมกัน; เพิ่มการ์ดมุมมองและรายการ docnav เคียง FED/OPS; สร้าง SPEC-PWF-PLT (Rev 0.1.0) เป็นเจ้าของ WF-52; farmer_reliability ย้ายบ้านไป PLT (OQ-3)
0.3.02026-07-25PROP-026 accepted & applied (spec v0.25.0): WF-76…80 — group formation & ownership verification, dated admission/divestment, the consolidation run, directory delegation and department creation/re-parenting; SPEC-PWF-GRP created (Rev 0.1.0).PROP-026 รับและ apply (spec v0.25.0): WF-76…80 — การตั้งกลุ่มและตรวจความเป็นเจ้าของ การรับเข้า/ขายออกตามวันที่ การจัดทำงบรวม การมอบอำนาจไดเรกทอรี และการสร้าง/ย้ายรากหน่วยงาน; สร้าง SPEC-PWF-GRP (Rev 0.1.0)
0.3.12026-07-27Spec v0.27.0 (PROP-049 approved & applied 27 Jul 2026): the seventh market perspective family CFL — Lead Farmer (หัวตัน) joins the perspective cards. The second grower tier gains the lead capacity on existing surfaces, the lead_network context with LeadMandate and NetworkAllocation, WF-92…95, FR-254…266 and NFR-81…86. No new surface.spec v0.27.0 (PROP-049 อนุมัติและ apply 27 ก.ค. 2569): ตระกูล perspective ฝั่งตลาดลำดับที่เจ็ด CFL — หัวตัน เข้าร่วมในการ์ด perspective ชั้นที่สองของชาวไร่ได้ capacity lead บนช่องทางที่มีอยู่ context lead_network พร้อม LeadMandate และ NetworkAllocation, WF-92…95, FR-254…266 และ NFR-81…86 ไม่มี surface ใหม่
0.3.22026-07-27PROP-050 (spec v0.28.0, approved & applied 27 Jul 2026; all 26 OQs client-closed): cost centres to field & crop level — the cost dimension on the ledger, the crop cycle and its establishment asset, declared allocation, evidence in the cloud, the network lending branch, FR-267…312 / NFR-87…106 / WF-96…111PROP-050 (spec v0.28.0 อนุมัติและ apply 27 ก.ค. 2569; ปิดคำถามเปิดครบ 26 ข้อ): ศูนย์ต้นทุนถึงระดับแปลงและอ้อยรุ่น — มิติต้นทุนบนสมุดบัญชี รอบปลูกและสินทรัพย์ต้นทุนก่อตั้ง การปันส่วนที่ประกาศไว้ หลักฐานบนคลาวด์ กิ่งการให้ยืมของเครือข่าย FR-267…312 / NFR-87…106 / WF-96…111
0.4.02026-07-28PROP-060 applied — spec v0.32.0 (D-2). Section 7: arrived is declared a first-class INITIAL state with an explicit creation transition (gate registration of a checked-in QueueTicket, seq_no → coin_no); booked and its two transitions carry release: v2. Without this the V1 machine had no modelled entry — the walk-in path existed as prose only.apply PROP-060 — spec v0.32.0 (D-2) ข้อ 7: ประกาศให้ arrived เป็นสถานะเริ่มต้นชั้นหนึ่งพร้อมการเปลี่ยนสถานะแบบสร้างใหม่ และ booked มีป้าย release: v2
0.5.02026-08-03PROP-073 (spec v0.47.0): one word — Tenant. Party → Tenant, party_id (and every prefixed form) → tenant_id, PartyCapacity/PartyQualification/PartyFounded → Tenant*, party context/switcher → tenant context/switcher, cross-party → cross-tenant, organisation → organization, and ผู้เล่น retired as the Thai gloss (the Latin word tenant instead, R-THAI). Hold list untouched: counterparty · third party · tripartite working group · Person*/person_id; display codes and token claims were held by R-NULL for one release and then MOVED at v0.47.1 on client decision (C-1), because no token has ever been SIGNED — no auth exists in the built ocsb/ocsf prototypes — and the only printed codes were eight fixture strings in apps/ocsf/fund-shell.jsx, swept in the same pass: PTY- → TNT-, TCA- → TCA-, TQL- → TQL-, claim tnt → tnt, claim dep → dep. Carried in the same pass: the PROP-075 rectification — the retired directory noun domain becomes department (A-82 R-ONETREE) and the dangling A-86/A-87/A-88 citations are re-pointed at the ids they were actually given, A-81/A-82/A-83.PROP-073 (spec v0.47.0): คำเดียว — Tenant Party → Tenant, party_id ทุกรูป → tenant_id, PartyCapacity/PartyQualification/PartyFounded → Tenant*, cross-party → cross-tenant และเลิกใช้ ผู้เล่น เป็นคำแทนวัตถุนี้ในภาษาไทย (ใช้คำละติน tenant ตาม R-THAI) รายการห้ามแตะไม่ถูกแตะ: คู่สัญญา · third party · คณะทำงานไตรภาคี · Person*/person_id รอบเดียวกันแก้ค้างจาก PROP-075: domain → department (A-82) และแก้การอ้าง A-86/A-87/A-88 ที่ไม่มีอยู่จริงเป็น A-81/A-82/A-83
0.5.32026-08-03PROP-073 PATCH 1–3 (spec v0.47.1 / v0.47.2 / v0.47.3 as applicable): the identifiers v0.47.0 had held, moved on client decision. PTY-######## → TNT-######## · PCA-######## → TCA-######## · PQL-######## → TQL-######## · token claim pty → tnt · token claim dom → dep (v0.47.1, C-1 — R-NULL had held them as a stored VALUE and a wire format; reversed because no token has ever been signed and the only printed codes were fixture strings). quota_org_officer → quota_officer · lead_org_officer → lead_officer (v0.47.2, C-2 — org is organization abbreviated, not a resemblance). The retired role LABEL swept as a phrase family and quota organization naming the tenant → quota group / กลุ่มโควตา (v0.47.3). All retired forms are in the FR-396 crosswalk and refused in new text by NFR-142.PROP-073 PATCH 1–3 (spec v0.47.1 / v0.47.2 / v0.47.3 ตามที่เกี่ยวข้อง): ตัวระบุที่ v0.47.0 คงไว้ ถูกย้ายตามการตัดสินของลูกค้า PTY- → TNT- · PCA- → TCA- · PQL- → TQL- · claim pty → tnt · claim dom → dep (v0.47.1, C-1) · quota_org_officer → quota_officer · lead_org_officer → lead_officer (v0.47.2, C-2) · ป้ายชื่อบทบาทที่เลิกใช้และ องค์กรโควตา ที่เรียก tenant → กลุ่มโควตา (v0.47.3) ทุกรูปที่เลิกใช้อยู่ในตารางแปลง FR-396
0.5.42026-08-03Escape-sequence repair — spec v0.48.1 (patch). 189 literal backslash-u escape sequences (187 decoded plus 2 that hid the section glyph) resolved to the characters they stood for, so Thai in this document reads as Thai again instead of as a run of six ASCII characters. Found by check V-10 of tools/validate.html on its first run (NFR-143, PROP-076, spec v0.48.0) and carried as a dated OVERRIDE in SPEC-APP-PLT Rev 0.9.0; this row discharges that override for this document. Where an escape hid the section glyph, the text now reads Section N in English and ข้อ N in Thai, per project rule. No model change: not one requirement, entity, event, state or number moved.ซ่อมลำดับหลบหนี — spec v0.48.1 (patch) แก้ลำดับหลบหนีที่ยังเป็นตัวอักษร 189 จุด (ถอด 187 จุด บวกอีก 2 จุดที่ซ่อนสัญลักษน์หัวข้อ) กลับเป็นอักขระที่มันแทน ภาษาไทยในเอกสารนี้จึงอ่านเป็นภาษาไทยอีกครั้ง ไม่ใช่ตัวอักษร ASCII หกตัวเรียงกัน พบโดยการตรวจ V-10 ของ tools/validate.html ในการรันครั้งแรก (NFR-143, PROP-076, spec v0.48.0) และถูกบันทึกเป็น OVERRIDE ที่มีวันที่ใน SPEC-APP-PLT Rev 0.9.0 แถวนี้ปลดการยกเว้นนั้นสำหรับเอกสารฉบับนี้ ที่ใดที่ escape ซ่อนสัญลักษณ์หัวข้อไว้ ข้อความอ่านเป็น Section N ในภาษาอังกฤษ และ ข้อ N ในภาษาไทย ตามกฎของโครงการ ไม่มีการเปลี่ยนแบบจำลอง: ไม่มี requirement เอนทิตี เหตุการณ์ สถานะ หรือตัวเลขใดขยับ
0.6.02026-08-07PROP-078 approved & applied — spec v0.54.0. WF-01 step 7 now SAYS what founding a virtual farmer does: it founds the PERSON as well as the tenant, and the steward writes the name parts onto that person row. It had been leaving the person to be inferred from a cardinality, which is what let Farmer.name — a human name on a record that is not a human — survive since v6.0.PROP-078 อนุมัติและ apply — spec v0.54.0 WF-01 ขั้นที่ 7 เขียนไว้เป็นคำแล้วว่าการสร้างลูกไร่ virtual ก่อตั้งบุคคลด้วย ไม่ใช่แค่ tenant และผู้ดูแลเขียนส่วนย่อยของชื่อลงบนแถวบุคคลนั้น เดิมปล่อยให้อนุมานตัวบุคคลจาก cardinality ซึ่งเป็นเหตุให้ Farmer.name รอดมาตั้งแต่ v6.0