Cane Agency · Specificationสถาบันอ้อย · เอกสารข้อกำหนด
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 ที่ประตูของตน และกรณียกเว้นที่มาถึงตน
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) จึงยังใช้ได้ทั้งหมด
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
| # | Actorผู้กระทำ | Actionการกระทำ | Systemระบบ |
|---|---|---|---|
| 1 | Platform adminผู้ดูแล platform | Provision tenant (sugar factory, quota group, สอน.)จัดตั้ง tenant (โรงงานน้ำตาล กลุ่มโควตา สอน.) | Creates Tenant; emits TenantProvisioned; tenant admins invite their usersสร้าง Tenant; ปล่อย TenantProvisioned; ผู้ดูแล tenant เชิญผู้ใช้ของตน |
| 2 | Farmer / field agentชาวไร่ / เจ้าหน้าที่ภาคสนาม | Sign up with phone number (website or field app)สมัครด้วยเบอร์โทรศัพท์ (เว็บไซต์หรือแอปภาคสนาม) | Sends OTP; creates individual account + draft Farmerส่ง OTP; สร้างบัญชีบุคคล + Farmer ฉบับร่าง |
| 3 | Farmerชาวไร่ | 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 |
| 4 | Field 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 คำนวณพื้นที่ (ไร่) |
| 5 | Quota farmer / quota officerหัวหน้าโควต้า / เจ้าหน้าที่โควตา | Review and accept the sub-farmer into the networkตรวจทานและรับลูกไร่เข้าเครือข่าย | Farmer → active; emits FarmerRegistered, UserLinkedToTenant where applicableFarmer → active; ปล่อย FarmerRegistered, UserLinkedToTenant ตามกรณี |
| 6 | Quota farmer (optional)หัวหน้าโควต้า (ทางเลือก) | Link further sub-farmers under own quotaเชื่อมลูกไร่เพิ่มเติมภายใต้โควตาของตน | Validates network rules (depth 1, no cycles)ตรวจกฎเครือข่าย (ลึก 1 ชั้น ไม่มีวงวน) |
| 7 | Quota 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 เดิม |
| 8 | Quota 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; เลขบัตรซ้ำ ⇒ ตรวจรวมตัวตนด้วยคน |
| # | Actorผู้กระทำ | Actionการกระทำ | Systemระบบ |
|---|---|---|---|
| 1 | Platform adminผู้ดูแล platform | Open season (e.g. 2569/70) with price formula versionเปิดฤดูกาล (เช่น 2569/70) พร้อม version สูตรราคา | Creates Seasonสร้าง Season |
| 2 | Mill 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 |
| 3 | Quota officer / mill staffเจ้าหน้าที่โควตา / พนักงานโรงงาน | Allocate committed tonnes per quota farmerจัดสรรตันผูกพันรายหัวหน้าโควต้า | Creates Quota; emits QuotaAllocatedสร้าง Quota; ปล่อย QuotaAllocated |
| 4 | Quota farmerหัวหน้าโควต้า | Acknowledge quota in appรับทราบโควตาในแอป | Quota visible on mobile homeโควตาแสดงบนหน้าแรกมือถือ |
| # | Actorผู้กระทำ | Actionการกระทำ | Systemระบบ |
|---|---|---|---|
| 1 | Farmerชาวไร่ | 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 |
| 2 | Farmerชาวไร่ | Harvest and load; record departure in app (works offline)เก็บเกี่ยวและขึ้นรถ; บันทึกออกเดินทางในแอป (ทำงานออฟไลน์ได้) | Queues record locally; syncs on signalเก็บระเบียนในเครื่อง; ซิงก์เมื่อมีสัญญาณ |
| 3 | Weighbridge operatorพนักงานแท่นชั่ง | Check truck in at gateเช็กอินรถที่ประตู | Delivery → arrived; emits TruckArrivedDelivery → arrived; ปล่อย TruckArrived |
| 4 | Weighbridge operatorพนักงานแท่นชั่ง | Weigh loaded truck (gross)ชั่งรถบรรทุกเต็ม (น้ำหนักรวม) | Records gross_kgบันทึก gross_kg |
| 5 | Weighbridge 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) |
| 6 | Weighbridge 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 |
| 7 | Farmerชาวไร่ | Scan ticket QR in app (optional)สแกน QR บัตรชั่งในแอป (ทางเลือก) | Links paper ticket to delivery recordเชื่อมบัตรกระดาษกับระเบียนการส่งมอบ |
| 8 | Mill staffพนักงานโรงงาน | Accept load into crushingรับเที่ยวเข้าหีบ | Delivery → accepted; quota drawdownDelivery → accepted; หักโควตา |
| # | Actorผู้กระทำ | Actionการกระทำ | Systemระบบ |
|---|---|---|---|
| Q1 | Mill 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 ออนไลน์ถึงชาวไร่และการกำกับของ สอน.; แถวที่จับคู่ไม่ได้เข้าคิวจับคู่ด้วยมือ |
| Q2 | Systemระบบ | — | 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 |
| S1 | Finance 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 กระจายข้ามหลายรอบ |
| S2 | Mill managerผู้จัดการโรงงาน | Review and approve batchตรวจทานและอนุมัติชุด | Batch immutable; emits BatchApprovedชุดแก้ไขไม่ได้; ปล่อย BatchApproved |
| S3 | Systemระบบ | — | 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 สรุปราคาสุดท้ายแยกต่างหาก |
| # | Actorผู้กระทำ | Actionการกระทำ | Systemระบบ |
|---|---|---|---|
| 1 | Cane 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 ที่ขอ |
| 2 | Quota farmer / factory finance officerหัวหน้าโควต้า / เจ้าหน้าที่การเงินโรงงาน | Review request; set limit and terms; approveตรวจคำขอ; กำหนดเพดานและเงื่อนไข; อนุมัติ | CreditLine → active; emits CreditLineOpenedCreditLine → active; ปล่อย CreditLineOpened |
| 3 | Factory 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; ยอดปลายทางรวม ≤ เพดานต้นทาง |
| 4 | Lenderผู้ให้สินเชื่อ | Disburse items through the season — as credit or direct purchaseเบิกจ่ายรายการตลอดฤดู — แบบสินเชื่อหรือซื้อตรง | Records CreditItem with financing_mode; emits CreditItemDisbursedบันทึก CreditItem พร้อม financing_mode; ปล่อย CreditItemDisbursed |
| 5 | System (at settlement)ระบบ (ตอนปิดงวด) | — | Consumes PaymentPosted; posts Repayment offsets against the payment item's deductions; emits RepaymentPostedบริโภค PaymentPosted; บันทึก Repayment หักกลบกับการหักของรายการจ่าย; ปล่อย RepaymentPosted |
| 6 | Borrowerผู้กู้ | Track balance in app; statements show each deduction line by lineติดตามยอดในแอป; ใบแจ้งยอดแสดงการหักทีละบรรทัด | Outstanding = disbursed − repaid; append-only ledgerยอดคงค้าง = เบิกจ่าย − ชำระคืน; สมุดบัญชีเพิ่มได้อย่างเดียว |
| # | 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 หน่วยงานกำกับ; อ่านอย่างเดียวจากเหตุการณ์ที่เผยแพร่ |
| # | Actorผู้กระทำ | Actionการกระทำ | Systemระบบ |
|---|---|---|---|
| 1 | Farmer / 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 |
| 2 | Farmerชาวไร่ | Set expected yield; confirm the owner of each crop (self, quota farmer, or a virtual farmer)ระบุประมาณการผลผลิต; ยืนยันเจ้าของอ้อยแต่ละรายการ (ตนเอง หัวหน้าโควต้า หรือลูกไร่ virtual) | First CropTransfer record = initial_assignmentCropTransfer เรกคอร์ดแรก = initial_assignment |
| 3 | Seller + 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) |
| 4 | Systemระบบ | — | 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 บันทึกราคาเพื่อการตรวจสอบเท่านั้น |
| 5 | System (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; หนี้ค้างกับอ้อยต้องเคลียร์หรือให้ผู้ขายรับภาระไว้อย่างชัดเจนก่อน |
| 6 | System (season close)ระบบ (ปิดฤดู) | — | Crops → closed; emits CropClosed; next season’s wizard offers the ratoon carry-forwardอ้อย → closed; ปล่อย CropClosed; ตัวช่วยฤดูถัดไปเสนอการยกยอดไว้ตอ |
| # | Actorผู้กระทำ | Actionการกระทำ | Systemระบบ |
|---|---|---|---|
| 1 | Farmer / 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 |
| 2 | Farmerชาวไร่ | 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 — ผู้ให้กู้เห็นเบิกเทียบใช้จริง; กิจกรรมอื่นเป็นส่วนตัวของชาวไร่เว้นแต่เลือกแชร์ |
| 3 | Farmer / 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 |
| 4 | Farmer / 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 → ปรับแผนโควตาและขนาดวงเงิน |
| # | Actorผู้กระทำ | Actionการกระทำ | Systemระบบ |
|---|---|---|---|
| 1 | Mill managerผู้จัดการโรงงาน | Schedule operating days: crushing capacity and burnt-share cap per day (default from CanePurchasePolicy)จัดตารางวันเดินเครื่อง: กำลังหีบและเพดานสัดส่วนอ้อยไฟไหม้รายวัน (ค่าตั้งต้นจาก CanePurchasePolicy) | Creates CrushingDay scheduledสร้าง CrushingDay scheduled |
| 2 | Mill staffพนักงานโรงงาน | Open the day for bookingเปิดวันให้จอง | Status → open; emits CrushingDayOpened; bookings draw down booked_t against capacityสถานะ → open; ปล่อย CrushingDayOpened; การจองตัดยอด booked_t ตามกำลัง |
| 3 | System (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 ถึงผู้กำกับ |
| 4 | Mill staff (end of day)พนักงานโรงงาน (สิ้นวัน) | Close the dayปิดวัน | Status → closed; emits CrushingDayClosed; nightly job derives the BurntCaneCompliance record (WF-11)สถานะ → closed; ปล่อย CrushingDayClosed; งานรายคืนสร้างระเบียน BurntCaneCompliance (WF-11) |
| # | 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 |
| 3 | System (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 |
| # | 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 พร้อมอัตราบาท/CCS | Status → 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) |
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
| ID | WorkflowWorkflow | Key steps & guardsขั้นตอนหลักและเงื่อนไข |
|---|---|---|
| WF-13 | Data-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-14 | Cane 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-15 | Loan 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-16 | Disbursement & 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-17 | Collections, 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 extend | Settlement 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 คงสัญญาเดิม |
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)
| ID | WorkflowWorkflow | Key steps & guardsขั้นตอนหลักและเงื่อนไข |
|---|---|---|
| WF-24 | Unified 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-25 | Capacity extensionการขยาย capacity | An 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-26 | Session & tenant switchingsession (เซสชัน) และการสลับ tenant | Sign-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-27 | Platform view-asview-as ของ platform | Start (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)
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 โดยตรง (พฤติกรรมคงเดิม)
| WF | WorkflowWorkflow | Flowขั้นตอน |
|---|---|---|
| WF-28 | Invitation-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-29 | Representative-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-30 | Platform operationsการดำเนินงาน platform | The 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) |
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)
| WF | WorkflowWorkflow | Flowขั้นตอน |
|---|---|---|
| WF-31 | Establish 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-32 | Stamp → 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-33 | Contract-volume fulfilmentครบปริมาณสัญญา | contract_volume_t reached → release the withheld balance in one fulfilment payout → agreement → fulfilled.ถึง contract_volume_t → จ่ายส่วนที่กันไว้เป็นก้อนเดียว → ข้อตกลง → fulfilled |
| WF-34 | Quota→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-35 | Renegotiate / 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) รวมถึงการเปิดข้อตกลงเพิ่มในฤดูเดียว |
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)
| WF | WorkflowWorkflow | Flowขั้นตอน |
|---|---|---|
| WF-36 | Books onboardingเริ่มใช้ books | On 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-37 | Auto-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-38 | AR/AP cycleวงจร AR/AP | Raise/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-39 | Bank reconciliationการกระทบยอดธนาคาร | Import/enter bank lines → match to books → resolve the difference → close balanced when statement balance = ledger balance.นำเข้า/กรอกรายการธนาคาร → จับคู่กับ books → แก้ผลต่าง → ปิด balanced เมื่อยอด statement = ยอดบัญชีแยกประเภท |
| WF-40 | Period close & statementsปิดงวดและงบ | Close the fiscal period → generate frozen P&L / balance sheet / trial balance / cash flow snapshots per period/season.ปิดงวดบัญชี → จัดทำ snapshot งบกำไรขาดทุน/งบดุล/งบทดลอง/งบกระแสเงินสดต่องวด/ฤดู |
| WF-41 | Statement 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) |
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
| WF | Workflowworkflow | Stepsขั้นตอน |
|---|---|---|
| WF-42 | Set 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-43 | Accrue & 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-44 | Compensate 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 |
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: การจองออกในฤดูที่สอง ก่อนหน้านั้นทางเข้าเดียวของเครื่องสถานะคือที่ป้อม
| Fromจาก | Eventเหตุการณ์ | Toไปยัง | Guardเงื่อนไข |
|---|---|---|---|
| booked | TruckArrived | arrived | CrushingDay 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) |
| booked | Cancel | cancelled | Before arrival onlyก่อนมาถึงเท่านั้น |
| arrived | WeightRecorded | weighed | net_kg > 0; ticket issued; cane_type and harvest_method confirmednet_kg > 0; ออกบัตรแล้ว; ยืนยัน cane_type และ harvest_method แล้ว |
| weighed | Accept | accepted | No open dispute; within quota toleranceไม่มีข้อพิพาทค้าง; อยู่ในเกณฑ์เผื่อของโควตา |
| weighed | Reject | rejected | Excess trash / contamination; reason mandatoryสิ่งปนเปื้อนเกิน; ต้องระบุเหตุผล |
| weighed | Dispute | disputed | Re-weigh supersedes original ticketการชั่งใหม่ออกบัตรแทนบัตรเดิม |
| disputed | Resolve | weighed | Supervisor sign-off recordedบันทึกการอนุมัติของหัวหน้างาน |
| accepted | FirstInstallmentPosted | part_settled | First PaymentBatch (cycle) approved; installment 1 (50% of the initial price) posted; เงินเกี๊ยว / repayment offsets applied to this installment, spread across cyclesPaymentBatch (รอบ) แรกอนุมัติ; จ่ายงวด 1 (50% ของราคาขั้นต้น); หักเงินเกี๊ยว / การชำระคืนกับงวดนี้ กระจายข้ามหลายรอบ |
| part_settled | FinalInstallmentPosted | settled | Second 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) กระทบยอดแยกต่างหาก ไม่เปิดสถานะนี้ซ้ำ |
| Fromจาก | Eventเหตุการณ์ | Toไปยัง | Guardเงื่อนไข |
|---|---|---|---|
| planned | PlantingConfirmed | growing | planted_at set (plant cane) or ratoon regrowth confirmedตั้ง planted_at (อ้อยปลูก) หรือยืนยันการแตกตอ |
| growing | HarvestOpened | harvesting | Season open; quota allocated to the crop owner’s chainฤดูเปิดแล้ว; โควตาจัดสรรถึงสายของเจ้าของอ้อยแล้ว |
| harvesting | SeasonClosed | closed | No open deliveries; terminalไม่มีการส่งมอบค้าง; สถานะสุดท้าย |
| planned / growing | CropFailed | failed | Drought / 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 แล้วไม่ถูกกระทบจากการโอนภายหลัง — เงินเป็นของเจ้าของ ณ เวลาปิดงวด
| Fromจาก | Eventเหตุการณ์ | Toไปยัง | Guardเงื่อนไข |
|---|---|---|---|
| applied | CreditAssessmentCompleted | scored | An active ConsentGrant covers the requested scope (NFR-08); score + grade + factors_snapshot recorded (NFR-09)มี ConsentGrant active ครอบคลุม scope ที่ขอ (NFR-08); บันทึกคะแนน + เกรด + factors_snapshot (NFR-09) |
| scored | UnderwriteStarted | underwriting | Analyst review of assessment, facility structure & collateralนักวิเคราะห์ทบทวนการประเมิน โครงสร้างวงเงิน และหลักประกัน |
| underwriting | LoanApproved | approved | assessment_id present; collateral registered as required by the productมี assessment_id; จดทะเบียนหลักประกันตามที่ผลิตภัณฑ์กำหนด |
| underwriting | LoanRejected | rejected | decision_reasons recorded (adverse-action); terminalบันทึก decision_reasons (เหตุผลปฏิเสธ); สถานะสุดท้าย |
| approved | LoanDisbursed | disbursed → current | Agreement signed; disbursement LoanLedgerEntry posted; repayment schedule activatedทำสัญญา; บันทึก LoanLedgerEntry การเบิก; เริ่มตารางการชำระ |
| current | PaymentMissed | delinquent | Scheduled repayment overdue beyond graceค้างชำระเกินระยะผ่อนผัน |
| delinquent | ArrearsCured | current | Arrears cleared (cash or settlement offset)เคลียร์หนี้ค้าง (เงินสดหรือหักกลบ) |
| delinquent | LoanRestructured | restructured → current | Revised terms agreed; borrower performing on the new scheduleตกลงเงื่อนไขใหม่; ผู้กู้ชำระตามตารางใหม่ |
| current | LoanRepaymentPosted | closed | outstanding_amt reaches zero; terminaloutstanding_amt เป็นศูนย์; สถานะสุดท้าย |
| delinquent | LoanWrittenOff | written_off | NPL 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)
| Fromจาก | Eventเหตุการณ์ | Toไปยัง | Guardเงื่อนไข |
|---|---|---|---|
| draft | StrategicAgreementSigned | active | Counterparty holds an active grower or quota capacity; confidential defaults trueคู่สัญญาถือ capacity grower หรือ quota ที่ active; confidential ค่าเริ่มต้น true |
| active | PremiumAccrued / PremiumStepReleased | active | Per-delivery accrual + upfront step; append-only, idempotent off the weigh-ticket net (NFR-22)การสะสมต่อการส่งมอบ + งวดล่วงหน้า; append-only idempotent จากน้ำหนักสุทธิ (NFR-22) |
| active | ContractVolumeFulfilled | fulfilled | contract_volume_t reached; withheld balance released in one payoutถึง contract_volume_t; จ่ายส่วนที่กันไว้เป็นก้อนเดียว |
| active | AgreementSuspended / Resumed | suspended ⇄ active | Either tenant pauses; accruals halt while suspended, resume on returnฝ่ายใดฝ่ายหนึ่งพัก; การสะสมหยุดขณะ suspended กลับมาเมื่อ active |
| active | AgreementRenegotiated (WF-35) | superseded | A new revision (effective_from = next day) becomes active; posted accruals never revalued (non-retroactive)ฉบับใหม่ (effective_from = วันถัดไป) active; การสะสมที่ลงแล้วไม่ตีมูลค่าใหม่ (ไม่ย้อนหลัง) |
| fulfilled | AgreementClosed | closed | All 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)
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 ติดตามการชำระ
| Machineเครื่อง | Transitionการเปลี่ยน | Guardเงื่อนไข |
|---|---|---|
| FiscalPeriod | open → closing → closed → locked | Closing 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 |
| Invoice | draft → 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) |
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 ใหม่และไม่มีผิวหน้าใหม่
| Revฉบับ | Dateวันที่ | Changesการเปลี่ยนแปลง |
|---|---|---|
| 1.0 | 2026-07-06 | Initial draft — three surfaces, cooperative modelร่างแรก — สามช่องทางใช้งานการใช้งาน model สหกรณ์ |
| 2.0 | 2026-07-06 | WF-06 financing (เงินเกี๊ยว) and WF-07 pricing; cane-type guards; credit exception pathsWF-06 สินเชื่อ (เงินเกี๊ยว) และ WF-07 ราคา; เงื่อนไขประเภทอ้อย; เส้นทางยกเว้นด้านสินเชื่อ |
| 2.1 | 2026-07-06 | Bilingual EN/TH content with navbar language switcher; removed in-page section subnav; A4 print pagination rulesเนื้อหาสองภาษา EN/TH พร้อมตัวสลับภาษาบนแถบนำทาง; นำแถบนำทางหัวข้อในหน้าออก; กฎการแบ่งหน้าพิมพ์ A4 |
| 2.3 | 2026-07-06 | WF-03/04: every truck juice-sampled at the mill on-site lab; late-result provisional settlement replaces period-average CCSWF-03/04: เก็บน้ำอ้อยทุกคันรถที่แล็บประจำโรงงาน; ผลช้าใช้ราคาชั่วคราวแทน CCS เฉลี่ยของช่วง |
| 2.2 | 2026-07-06 | PROP-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.4 | 2026-07-07 | PROP-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.0 | 2026-07-07 | PROP-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.0 | 2026-07-07 | PROP-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.0 | 2026-07-08 | PROP-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.0 | 2026-07-08 | PROP-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.0 | 2026-07-08 | PROP-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.0 | 2026-07-09 | PROP-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.0 | 2026-07-09 | PROP-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.0 | 2026-07-10 | PROP-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.0 | 2026-07-10 | PROP-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.0 | 2026-07-10 | PROP-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.0 | 2026-07-11 | PROP-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.0 | 2026-07-13 | PROP-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.1 | 2026-07-22 | PROP-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.0 | 2026-07-25 | PROP-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.1 | 2026-07-27 | Spec 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.2 | 2026-07-27 | PROP-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.0 | 2026-07-28 | PROP-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.0 | 2026-08-03 | PROP-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.3 | 2026-08-03 | PROP-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.4 | 2026-08-03 | Escape-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.0 | 2026-08-07 | PROP-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 |