ข้ามไปยังเนื้อหาหลัก

บันทึกการเปลี่ยนแปลง

This page tracks documentation-relevant system changes over time.

สิ่งที่ควรบันทึกในหน้านี้

Add entries when a change affects:

  • user-visible flows
  • architecture boundaries
  • setup or release steps
  • device integrations
  • permission gates
  • operational behavior that the team needs to remember

2026-08-24

Core

ตรวจ Checklist ก่อนเริ่มขนส่งใน Production

  • ก่อน Mobile และ POS Terminal ตรวจเลขไมล์เริ่มต้นหรือเรียก POST /api/transports/{id}/started ระบบ PRD จะตรวจงาน transportation Checklist ที่ยังไม่เสร็จของผู้ใช้ที่ล็อกอินผ่าน Checklist API คนละโดเมน
  • data ที่เป็น array ว่างจะให้เริ่มขนส่งต่อได้ ส่วน array ที่มีรายการจะบล็อกพร้อม alert ให้ดำเนินงาน Checklist ให้เสร็จ และ response ที่เรียกไม่สำเร็จหรือรูปแบบไม่ถูกต้องจะหยุดการเริ่มขนส่งเช่นกัน โดย UAT จะไม่เรียก API นี้

Group ใบจัดสินค้าหน้าร้านด้วยใบสั่งขาย

  • รายการใบจัดสินค้าหน้าร้านของ Mobile และ POS Terminal ตัด Invoice สถานะ CANCELED ออก แล้ว Group รายการที่เหลือด้วย orderNo โดยแสดงเลขใบเบิกทุกใบในการ์ดใบสั่งขายเดียวกัน
  • การ์ด Group จะเป็นสีเขียวเฉพาะเมื่อ Invoice ทุกใบเป็น CONFIRMED; Group ผสมยังประเมินเงื่อนไขรอ delivery, คำขอยกเลิกค้าง และสีเริ่มต้นตามลำดับเดิม
  • เมื่อเปิด Group ระบบโหลด Invoice ทุกใบและรวมสินค้าในหน้ารายละเอียดเดียว โดยเก็บตัวตนและสถานะของ Invoice ต้นทางไว้กับสินค้าแต่ละบรรทัด
  • การรับงาน บันทึก delivery lots และสร้าง delivery เพื่อตัด B1 ทำทีละ Invoice ตามลำดับ ใบที่รับงานแล้วจะไม่ยิง Accept API ซ้ำ และสินค้าของ Invoice ที่ CONFIRMED เป็นแบบอ่านอย่างเดียว
  • Metadata แสดงเลขใบสั่งขายจาก orderNo และแสดงเลขใบเบิกทุกใบต่อกัน
  • เอกสารที่อัปเดต:
    • menus/shipping-storefront
    • governance/change-log

การเปลี่ยนแปลงผลกระทบต่ำ

Low-impact changes can still be logged when they help preserve project history.

Examples:

  • purely internal refactors with no behavior change
  • typo fixes
  • docs cleanup with no content change

For these, keep the entry short and factual.

2026-08-12

Core

ปรับ limit ใบเบิกยืมดูปลาสาขาหลักตามประเภท

  • Mobile และ POS Terminal จำกัดสินค้าไม่เกิน 3 รายการ และจำนวนไม่เกิน 3 ชิ้นต่อรายการในสาขาหลัก เฉพาะประเภท SPEC (ให้ลูกค้าดู) เท่านั้น
  • ประเภท MARKET, VIDEO, SEMINAR, DESTROY และ LAB ของสาขาหลักไม่มี limit จำนวนรายการหรือจำนวนต่อรายการจาก UI แต่ทุกประเภทยังต้องเป็นจำนวนเต็มบวกและไม่เกิน stock ที่ใช้ได้
  • สาขาย่อยยังคง limit เดิม ไม่เกิน 5 ชิ้นต่อรายการสำหรับทุกประเภท

2026-08-07

Core

เพิ่มข้อมูล COD ในสรุปยอดขายใบแจ้งหนี้

  • modal สรุปยอดขายของหน้าใบแจ้งหนี้แสดง codCount และ codTotal แยกตามบริษัทและในยอดรวม โดยแสดงเป็น ค่าธรรมเนียม COD : codCount @ codTotal
  • คงเหลือยังคำนวณด้วย amountTotal - discount - useCreditNote เหมือนเดิม โดยแสดงค่าธรรมเนียม COD แยกต่างหากและไม่หักออกจากคงเหลือ

เพิ่มสินค้าในใบสั่งขายและใบเบิกยืมปลาอย่างต่อเนื่อง

  • เมื่อมี orderId หรือ borrowId ที่ persist แล้ว การเพิ่มสินค้าจะไม่แสดง loading แบบเต็มหน้าจอที่บังการทำงาน และ Product Picker ยังพร้อมให้เพิ่มสินค้าต่อเนื่อง
  • ใบเบิกใหม่จะสร้าง header ก่อน ใช้ borrowId ที่ได้กลับมาสร้างสินค้ารายการแรก แล้ว refresh detail/list และ route เพื่อให้เห็นรายการแรกทันที โดยไม่ใช้ borrowNo แทน identity สำหรับสร้าง item

ปรับความสูงช่องหมายเหตุใบจองราคา

  • textarea หมายเหตุของใบจองราคาใน Mobile และ POS Terminal เริ่มสูง 1 บรรทัด และขยาย/ย่อตามข้อความโดยอัตโนมัติ

2026-08-05

Core

เลือก Lot/Batch ใบจัดสินค้าหน้าร้านใหม่ได้

  • Mobile และ POS Terminal แสดง items[].lots[] ที่มากับ invoice เป็นค่าเริ่มต้น แต่เปิดให้แก้ไข ลบ และเลือก Lot/Batch ใหม่ได้เมื่อ invoice เป็น NEW และผู้ใช้มีสิทธิ์แก้ไข
  • การแก้ไข Lot/Batch ใช้กติกาเดียวกันทั้งสาขาหลักและสาขาย่อย โดยไม่ใช้ isMain เป็นเงื่อนไข

Metadata และ validation ของไฟล์หลักฐานขนส่ง

  • Mobile และ POS Terminal ส่ง customerCode, U_BFP_Latitude และ U_BFP_Longitude ของลูกค้าที่กำลังเปิดอยู่ไปพร้อม files และ whGrpCode ใน POST /api/transports/{transportId}/files
  • หากข้อมูลลูกค้าหรือพิกัดตัวใดตัวหนึ่งไม่มี/ว่าง ระบบจะแสดง Alert และหยุดก่อนเรียก upload API

2026-08-04

Mobile

ปรับสัญญา payload วันเวลา batch สินค้าคงคลัง

  • เมนูรับสินค้าเข้าตรง, โอนสินค้าไปสาขา, รับสินค้าจากสาขา และย้ายสินค้าระหว่างคลัง ส่งวันที่รับเข้าด้วย admissionDate แล้ว และไม่ส่งคีย์เดิม addmisionDate
  • admissionDate และ dueDate ที่ส่งจาก Mobile และ POS Terminal ใช้รูปแบบเวลา YYYY-MM-DDTHH:mm:ss; เอกสารเก่าที่ใช้ชื่อคีย์เดิมยังอ่านได้

ตรวจ Firestore inventory index จากหน้าเลือกคลัง

  • กดค้างคลังเพื่อเริ่ม real-time inventory subscription ของคลังนั้น 5 วินาที โดยไม่เลือกคลัง
  • เมื่อ Firestore แจ้งว่ายังไม่มี composite index แอปจะ log URL สำหรับสร้าง index ใน Firebase Console เป็นรายการแยกที่กดได้จาก DevTools

2026-07-31

Core

กู้ flow การอนุมัติ Customer Draft เข้า SAP B1

  • Mobile จะ replace หน้าฟอร์มลูกค้าใหม่ด้วยหน้ารายละเอียด Draft เมื่อการอนุมัติเข้า SAP B1 ทันทีล้มเหลว เพื่อเก็บ Draft ไว้และไม่ย้อนกลับไปฟอร์มเดิม
  • Mobile และ POS Terminal โหลด Draft ใหม่หลังตัดสินใจไม่สำเร็จ แล้วเลือก action จาก status: DRAFT แสดงอนุมัติ/ไม่อนุมัติ และ SAP_PARTIAL เรียก POST /customer-draft/:id/retry เพื่อส่งอนุมัติอีกครั้ง

ยอดค่าขนส่งและค่าธรรมเนียมบนการ์ดลูกค้าขนส่ง

  • การ์ดลูกค้าของ Mobile และ POS Terminal แสดงยอดของแต่ละ shipping invoice จาก shippingAmount ของใบนั้นเสมอ ทั้ง docType: SHIPPING และ docType: FEE โดยไม่ขึ้นกับการเปิด/ปิด COD; response รุ่นเก่าที่ไม่มี shippingAmount จะ fallback ไปใช้ amount ของใบนั้น

2026-07-30

Core

ควบคุม QR Payment ใน UAT

  • เพิ่ม ENABLE_QR_PAYMENT ใน packages/api/src/config.ts: production สร้าง QR Payment ได้เสมอ ส่วน UAT สร้างได้เฉพาะเมื่อ flag เป็น 1
  • เมื่อ UAT ปิด flag (0) Mobile และ POS Terminal จะไม่เรียก QR API จากการกดสร้าง QR; เอกสารใบแจ้งหนี้และใบค่าขนส่งยังพิมพ์ได้โดยเว้น QR Payment ไว้ ขณะที่ QR Claim ของใบแจ้งหนี้ยังทำงานตามปกติ

2026-07-24

Core

รถทดสอบในรายการขนส่ง

  • Mobile และ POS Terminal แสดงรถทดสอบส่วนกลางสถานะ READY คือ dummy-001 ถึง dummy-003 ไว้ด้านบนของ modal เลือกทะเบียนรถ รถทดสอบถูกกรองตามคำค้นเดียวกับรถจริง และไม่สามารถใช้เริ่มขนส่งได้ ระบบจะแจ้งให้เลือกทะเบียนรถจริงก่อน

ป้องกัน request สร้างใบสั่งขายซ้ำ

  • Mobile และ POS Terminal รวมการเรียก createOrder ที่ซ้ำกันภายใน 2.65 วินาที โดยมีเฉพาะการเรียกแรกที่ส่ง POST /orders; request รายการสินค้ายังคงเดิม

2026-07-21

Core

สิทธิ์เลือกตำแหน่งวางใบคืนสินค้าสำหรับสาขา non-main

  • ในใบลดหนี้/คืนสินค้าของ Mobile และ POS Terminal แผนก 20 และ 23 เลือกตำแหน่งวาง/Lot ของรายการคืนสินค้าจริงได้เฉพาะเมื่อสาขาที่เลือกมี isMain = false เท่านั้น ส่วนสิทธิ์เดิมของแผนก 12, 22, 28 ยังเลือกได้ทุกสาขา

2026-07-16

Wiki: สูตรยอดการ์ดลูกค้าในขนส่ง

  • เพิ่มหัวข้ออ้างอิงวิธีคำนวณยอดการ์ดลูกค้าจาก invoice, ส่วนลด, Credit Note และ shipping invoice พร้อมอธิบายความต่างระหว่างยอดที่แสดงในบรรทัด invoice, ยอดรวม และยอดรับจริง รวมถึงข้อกำหนดของ grandAmount

Core

กรองรายการย้ายสินค้าตามคลัง และซ่อนทางเข้าลืมรหัสผ่าน

  • Mobile และ POS Terminal ส่ง whGrpCode ของ warehouse group ที่ผู้ใช้ login อยู่เพิ่มใน query GET /transfer-branches ควบคู่กับ branch filter เดิม
  • ซ่อนปุ่ม ลืมรหัสผ่าน บนหน้า Login ทั้งสองแอปชั่วคราว แต่ flow ตั้งรหัสผ่านใหม่ที่เกิดจาก validation ตอน login ยังใช้งานได้ตามเดิม

รูปแบบรายการ

Use a short, durable format:

## YYYY-MM-DD

### Core

#### Changes that affect multiple apps or shared foundations

- What changed

### Core

#### Changes that affect only mobile

- What changed

### POS Terminal

#### Changes that affect only pos-terminal

- What changed

2026-07-15

Core

ยอดโอนเมื่อชำระกับฝ่ายขายภายหลัง

  • ปรับตัวเลือก QR ลูกค้าจะโอนชำระกับฝ่ายขายเองภายหลัง ทั้ง Mobile และ POS Terminal ให้ส่ง transfer เป็นยอดที่ต้องชำระทั้งหมด โดยคง paymentType: OTHER, cash: 0 และ System note เดิมไว้
  • ปรับสีการ์ดลูกค้าทั้ง Mobile และ POS Terminal: สถานะที่ไม่ใช่ FINISHED ใช้สีฟ้าอ่อน และเมื่อ FINISHED แล้วจึงใช้สีตาม payment type
  • เมื่อเปิดการ์ดลูกค้าที่ยังไม่เสร็จ ให้โหลดข้อมูลเฉพาะลูกค้าจาก API และจับคู่ด้วยรหัสลูกค้ากับพิกัดจุดส่งก่อนอัปเดตการ์ดและเปิด modal พร้อมรองรับ flow ยืนยันส่งสินค้าเมื่อ grandAmount เป็น 0 สำหรับ SHIPPING และ BILL_PAYMENT

2026-07-10

Core

ปรับ Wiki ให้ค้นหาตามเมนูในแอป

  • ปรับ sidebar ของ Wiki ให้ยึดตามกลุ่มเมนูจริงในแอป ได้แก่ เริ่มต้นใช้งาน, เมนูในแอป, สิทธิ์และเงื่อนไข, workflow เชิงลึก, architecture, setup และ governance
  • เพิ่มหน้า overview รายเมนูครบทุกเมนูใน Mobile/POS Terminal Home รวมถึง POS หน้าร้าน เฉพาะ Terminal เพื่อให้ทีม operation เปิดอ่านตามเมนูที่เห็นในแอปได้โดยตรง

Wiki flow ครบของ Mobile และ Terminal

  • เพิ่มเอกสาร end-to-end workflow ของ Mobile และ POS Terminal ตั้งแต่เปิดแอป, login, เลือกสาขา/คลัง, เข้า Home, และ POS หน้าร้านเฉพาะ Terminal
  • เพิ่ม menu map ครบทุกเมนูของ Mobile และ Terminal Home ครอบคลุม permission gate, shortcut ของ Mobile, split-pane behavior ของ Terminal, และ route POS หน้าร้าน เฉพาะ Terminal

Wiki flow ใบจัดสินค้าสายส่งและขนส่ง

  • เพิ่มหน้า workflow เฉพาะสำหรับ ใบจัดสินค้าสายส่ง และ ขนส่ง ครอบคลุมข้อมูลที่แสดงใน list, ความหมาย status, gate ของ action, API endpoints, สิทธิ์ตาม deptCode, behavior ของ confirmedAt, guard การ prepare/start/finish ขนส่ง, และ parity ระหว่าง Mobile/POS Terminal

2026-06-24

Core

Android setup docs

  • เพิ่มโน้ต Android setup สำหรับรัน Mobile POS และ POS Terminal บน Android 2 เครื่องที่ต่อพร้อมกันด้วย ANDROID_SERIAL, fallback ด้วย React Native --deviceId, และแนวทาง adb reverse แยกตามเครื่องเมื่อต้องใช้ Metro คนละ port

2026-06-18

Mobile

ขนส่ง shipping invoice document types

  • Updated transport customer shipping-invoice rows to display docType labels, showing SHIPPING as ค่าขนส่ง and FEE as ค่าธรรมเนียม with the invoice amount.
  • Transport shipping receipt printing now receives the selected shipping invoice docType, so fee receipts use the fee-specific receipt layout.
  • Docs updated:
    • governance/change-log

POS Terminal

ขนส่ง shipping invoice document types

  • Updated transport customer shipping-invoice rows and customer shipping helper rows to display docType labels, showing SHIPPING as ค่าขนส่ง and FEE as ค่าธรรมเนียม with the invoice amount.
  • Transport shipping receipt printing now receives the selected shipping invoice docType, so fee receipts use the fee-specific receipt layout.
  • Docs updated:
    • governance/change-log

2026-06-17

Core

ค่าธรรมเนียมใน shippingInvoices

  • รองรับ shippingInvoices[].docType เป็น SHIPPING และ FEE ในหน้าชำระเงินใบสั่งขายของ Mobile และ POS Terminal โดยแสดง SHIPPING เป็นค่าขนส่ง และ FEE เป็นค่าธรรมเนียมแยกกัน.
  • ปรับยอดชำระให้รวมค่าธรรมเนียมที่ยังไม่จ่าย และปรับ QR/รายการพิมพ์ให้ใช้ label ตามประเภทเอกสาร.
  • ปรับใบเสร็จรับเงิน/ใบกำกับภาษีอย่างย่อของรายการ FEE ให้ใช้รายการ ค่าธรรมเนียม โดยไม่แสดงระยะ ราคา และหมายเหตุ.

POS Terminal

POS หน้าร้าน

  • เพิ่มเมนู POS หน้าร้าน ต่อจากปุ่มตั้งค่าในแถบเมนูหลักของ POS Terminal โดยใช้ไอคอน monitor เพื่อสื่อถึงเครื่อง POS.
  • เพิ่ม stack/screen ใหม่ StorefrontPosStack สำหรับหน้า POS หน้าร้านแบบเต็มจอ ไม่มี side menu และทำ layout ระบุลูกค้าตามภาพอ้างอิงเบื้องต้น พร้อม keypad, ปุ่มค้นหา, ขายสดไม่ระบุชื่อ, ค้นหาด้วยชื่อ, สมัครสมาชิก และแปลงคิวดูตัวอย่าง.

2026-06-16

POS Terminal

ปรับหน้าใบสั่งขายให้ใกล้ Mobile

  • ปรับหน้า detail ใบสั่งขายใน POS Terminal ให้แยก view รายละเอียดและ view ชำระเงิน โดยปุ่มหลักเปลี่ยน label เป็น สร้างใบแจ้งหนี้ หรือ ชำระเงิน ตามสถานะเหมือน Mobile.
  • เพิ่ม action state แบบ Mobile สำหรับ gate ปุ่มสร้างใบแจ้งหนี้/ชำระเงิน: ต้องมีสินค้าและไม่ใช่สถานะยกเลิก.
  • ปรับเงื่อนไข isMain=false ให้บังคับประเภทการขายเป็นหน้าร้าน, ซ่อนตัวเลือกสายส่ง, และแสดงข้อมูลประเภทการเบิก/สถานะยืนยันบิล/ใบเคลื่อนย้ายเฉพาะสาขา non-main.
  • เมื่อเปิดขั้นตอนใบแจ้งหนี้จากใบ DRAFT จะอัปเดตสถานะเป็น NEW ก่อนโหลดหรือสร้างใบแจ้งหนี้และเข้าสู่ flow ชำระเงิน.
  • ย้าย action ใช้คะแนน/ใช้คูปอง/ใช้ส่วนลดเครดิต ไปไว้ในเมนูสามจุดบน header ใกล้ปุ่มปิดรายละเอียด.
  • ปรับ flow ใช้คะแนน/ใช้คูปอง/ใช้ส่วนลดเครดิตใน POS Terminal ให้เปิดเป็น modal เหมือน Mobile รวมถึง modal OTP ของส่วนลดเครดิต.
  • ลดการ reload list เต็มหลังอัปเดตข้อมูลในหน้าใบสั่งขาย POS Terminal โดย patch ข้อมูล detail/list จากข้อมูลล่าสุดแทน และเพิ่ม identity guard ไม่ให้ reset form เมื่อเป็นใบเดิม เพื่อไม่ให้ panel 3 ปิดเปิดหรือกระพริบระหว่างแก้ไข.
  • ปรับ flow เปลี่ยนประเภทการขายใน POS Terminal ให้ update แบบ local/optimistic โดยไม่เปิด global loading และลดการ patch parent ระหว่างทาง เหลือ patch จากข้อมูลล่าสุดหลัง API สำเร็จ.
  • กัน parent detail loader ไม่ให้ยิง GET /orders/:id ซ้ำเมื่อ list item ของใบสั่งขายเดิมถูก patch จากฟอร์ม เพื่อแก้อาการ panel 3 reload หลังเปลี่ยนประเภทการขาย.
  • ลบ section พิมพ์เอกสารท้ายหน้าใบสั่งขาย POS Terminal และย้ายปุ่มพิมพ์เข้า flow การทำงานเหมือน Mobile; non-main ใช้ modal เลือกพิมพ์ใบเบิกมี/ไม่มี Lots.
  • ปรับ customer card หัวหน้าใบสั่งขาย POS Terminal ให้แสดงเฉพาะชื่อลูกค้า เบอร์ และที่อยู่ โดยกดทั้ง card เพื่อเลือกที่อยู่แทนปุ่มแยก.
  • ปรับหัว metadata ใบสั่งขาย POS Terminal ให้ไม่แสดงสถานะเอกสาร และย้ายปุ่มสายส่ง/หน้าร้านมาอยู่แถวเดียวกับเลขที่เอกสารแทน section เดิม.
  • ปรับวันที่เบิกของในหัว metadata ใบสั่งขายเป็นรูปแบบ DD/MM/YYYY และลด gap ระหว่างบรรทัดของ metadata ให้แน่นขึ้น.
  • ปรับ flow สร้างใบสั่งขายจากการเลือกลูกค้าใน POS Terminal ให้ fetch รายละเอียดลูกค้าแล้วเปิด panel 3 เป็น local draft โดยยังไม่ยิง POST /orders และไม่แทรก draft เข้า list ที่อิงข้อมูล API; จะสร้างใบจริงตอนบันทึก draft หรือเพิ่มสินค้าชิ้นแรกให้ตรงกับ Mobile.

Core

รับสินค้าจากสาขา

  • ปรับ Mobile และ POS Terminal ตอน submit POST /transfer-in ให้ lineNum: -1 เฉพาะสินค้าที่ผู้ใช้เพิ่มใหม่ ส่วน line จากเอกสารเดิมคง lineNum เดิมแม้ยอดรวม batchNumbers.quantity จะน้อยกว่า เท่ากับ หรือมากกว่า line.quantity.

Flow ตรวจสอบค่าธรรมเนียมในหน้าขนส่ง

  • เพิ่ม service wrapper GET /api/transports/{transportId}/fee ใน Mobile และ POS Terminal สำหรับการชำระขนส่งแบบเงินสด/อื่นๆ.
  • ปรับ flow ชำระเงินลูกค้าประเภท CASH และ OTHER ให้ต้องกดตรวจสอบค่าธรรมเนียมก่อน จึงจะแสดงช่องรูปส่งของ/ลายเซ็น และบันทึกชำระได้.
  • reset ค่าธรรมเนียมที่ตรวจแล้วเมื่อยอดเงินสด วิธีชำระ หรือ flag ของการชำระแบบอื่นๆ เปลี่ยน และตอน submit จะส่ง cash เป็น cash + dropoffFee.
  • ปรับ Mobile และ POS Terminal ให้ใช้ totalFee จาก response ตรวจค่าธรรมเนียมขนส่งเป็นยอดค่าธรรมเนียมหลัก โดยยัง fallback ไป field เดิมได้.
  • ปัดเศษค่าธรรมเนียมขนส่งใน Mobile และ POS Terminal ก่อนเก็บเป็นยอดค่าธรรมเนียม โดยใช้เงื่อนไขเศษ .5 ปัดขึ้น.
  • เพิ่มยอดค่าธรรมเนียมที่ตรวจแล้วเข้า system note ตอน submit ชำระขนส่งเมื่อมีค่าธรรมเนียม.
  • ข้ามการเรียก PATCH /transports/:transportId/customers/:customerCode หลังชำระขนส่ง เพราะ endpoint payment อัปเดตสถานะลูกค้าแล้ว.

คำนวณค่าขนส่งตอนสร้างใบสั่งขายสายส่ง

  • เพิ่มการคำนวณระยะทางด้วย Google Routes ใน Mobile และ POS Terminal เมื่อเปิดใบสั่งขายใหม่ที่เป็นสายส่ง หรือเมื่อเปลี่ยนประเภท/ที่อยู่จัดส่งเป็นสายส่ง.
  • ใช้สูตรเดียวกับหน้าขนส่ง: ฟรี 150 กม., ระยะเกินปัดขึ้นเมื่อเศษตั้งแต่ 500 ม., และคิด 15 บาท/กม.
  • แจ้งเตือนค่าขนส่งพร้อมระยะทางรวมเมื่อมีค่าขนส่ง และแจ้งเตือน ที่อยู่นี้ ไม่มีข้อมูลพิกัดลูกค้า เมื่อที่อยู่ไม่มีพิกัด.
  • เพิ่ม modal เลือกที่อยู่ลูกค้า/จุดรับสินค้าสาขาใน POS Terminal order detail ให้บันทึกที่อยู่, เส้นทาง, และพิกัดลง order แล้วคำนวณค่าขนส่งใหม่เหมือน Mobile.

2026-06-15

Core

เงื่อนไขคืน/เคลมและ lot ในใบพิมพ์ใบแจ้งหนี้

  • ปรับ label QR แจ้งเคลมใน template พิมพ์ใบแจ้งหนี้กลางให้รวมการอ่านเงื่อนไขการคืน.
  • เพิ่มข้อความยืนยันการชำระเงินและการยอมรับเงื่อนไขคืน/เคลมใต้ QR payment และรูป sticker ในใบแจ้งหนี้.
  • พิมพ์ lot ในรายการสินค้าใบแจ้งหนี้ของสาขา non-main ด้วยรูปแบบ Lot : lotNo (qty) เหมือนใบเบิก/ใบฝาก.
  • ใช้รายการสินค้าจาก order detail เป็น fallback สำหรับ lot ตอนพิมพ์ใบแจ้งหนี้ หาก invoice detail ยังไม่มีข้อมูล lots ในรายการสินค้า.
  • เพิ่มข้อความแจ้งเงื่อนไขซื้อฝากใต้ตารางรายการสินค้าเมื่อสาขา non-main และ withdrawType = DEPOSIT โดยคำนวณวันครบกำหนดจากวันที่ใบแจ้งหนี้ + 7 วัน.

รายการสินค้าของลูกค้าในหน้าขนส่ง

  • เพิ่ม action ใน popup ลูกค้าหน้าขนส่งเพื่อโหลดข้อมูลใบแจ้งหนี้ของลูกค้าทุกใบ และเปิดเป็น step แยกใน popup สำหรับแสดงรายการสินค้า/จำนวนที่ต้องส่งให้ลูกค้านั้น.
  • รวมสินค้าซ้ำจากหลายใบแจ้งหนี้ด้วย productCode และ fallback เป็นชื่อสินค้าเมื่อไม่มีรหัสสินค้า.

2026-06-13

Core

ปุ่มส่งข้อมูลใบค่าขนส่งอีกครั้ง

  • ปรับวันที่ในใบเสร็จ/ใบกำกับภาษีอย่างย่อค่าขนส่งให้ใช้เฉพาะ createdAt.
  • เพิ่มปุ่ม retry ในหน้าชำระใบสั่งขายและการ์ดลูกค้าหน้าขนส่ง: เมื่อ b1Status = 0 จะแสดง ส่งข้อมูลอีกครั้ง และเมื่อ b1Status = 1, collectedAt มีค่า, paidAt ว่าง จะแสดง ส่ง Incoming อีกครั้ง.
  • เพิ่ม service wrapper POST /api/transports/{transportId}/shipping/{shippingInvoiceId}/retry-incoming ทั้ง Mobile และ POS Terminal.
  • เพิ่ม action ที่ header หน้าขนส่งสำหรับพิมพ์ค่าขนส่งทั้งหมด เมื่อขนส่งถูกเริ่มแล้วและมีใบค่าขนส่งอย่างน้อย 1 ใบ.
  • เพิ่ม icon ค่าขนส่งในรายการใบแจ้งหนี้ และเพิ่ม section ค่าขนส่งในหน้ารายละเอียดใบแจ้งหนี้ พร้อมสถานะจ่ายแล้ว/ยังไม่จ่าย และปุ่ม retry/retry-incoming.
  • ย้ายแถวค่าขนส่งในหน้ารายละเอียดใบแจ้งหนี้ไปไว้ใต้ น้ำหนักรวม เพื่อให้ยอด สถานะจ่ายแล้ว และปุ่ม retry อยู่ในบล็อกข้อมูลใบแจ้งหนี้.

ทะเบียนรถลูกค้าในใบเบิกยืมดูปลา

  • เพิ่ม customerLicensePlate ใน payload สร้าง/แก้ไขใบเบิกยืมดูปลา และ state รายละเอียดใบเบิก.
  • เพิ่มช่องกรอกทะเบียนรถลูกค้าในหน้ารายละเอียดใบเบิกยืมดูปลาของ Mobile และ POS Terminal.
  • แสดงช่องทะเบียนรถลูกค้าและวันที่มาเบิกสินค้าเฉพาะใบเบิกยืมดูปลา SPEC ของสาขาที่ isMain = false โดยวางทั้งสองช่องใน row เดียวกัน และเปลี่ยน label วันที่เป็น วันที่มาเบิกสินค้า.
  • เพิ่ม expectedQty ใน payload เพิ่ม/แก้ไขสินค้าใบเบิกยืมดูปลา และแสดงช่อง จำนวนที่คาดว่าจะซื้อ ตอนเพิ่มหรือแก้ไขสินค้าเมื่อเป็นสาขาที่ isMain = false.
  • ปรับเงื่อนไขจำนวนสินค้าใบเบิกยืมดูปลาให้สาขา main เบิกได้สูงสุด 3 ชิ้นต่อรายการ และสาขาที่ isMain = false เบิกได้สูงสุด 5 ชิ้นต่อรายการ.
  • เพิ่มเงื่อนไขใบเบิกยืมดูปลาของสาขา non-main: ห้ามเปลี่ยนเป็น SPEC หากมีสินค้าอยู่, ห้ามแก้วันที่มาเบิกสินค้าของ SPEC หากมีสินค้าอยู่ และถ้าใบเบิกมี borrowId แล้วจะบันทึกประเภท/วันที่ทันทีเมื่อเปลี่ยน.
  • แสดง expectedQty ของสินค้าใบเบิกยืมดูปลาเป็นบรรทัดล่างสุดตัวเล็กในรายการสินค้า.
  • แสดง lots ของสินค้าใบเบิกยืมดูปลาเป็นบรรทัดละหนึ่ง lot ในรูปแบบ lotNo (qty).
  • เพิ่มข้อมูลวันที่มาเบิกสินค้า คาดว่าจะซื้อ และ lot รายสินค้าในใบพิมพ์แจ้งเบิกสินค้า โดยใช้รูปแบบ Lot : lotNo (qty).
  • แสดง lot ของสินค้าใบสั่งขายสำหรับสาขา non-main ในรูปแบบ Lot : lotNo (qty).
  • พิมพ์ lot ในใบเบิกของใบสั่งขายแบบมี lots เป็นบรรทัดละหนึ่ง lot พร้อมลดระยะห่างบรรทัด.

2026-06-12

Core

ใบค่าขนส่งในหน้าชำระใบสั่งขายและการพิมพ์ใบเสร็จ/ใบกำกับภาษีอย่างย่อค่าขนส่ง

  • เพิ่มการรองรับ shipping invoice ที่ยังไม่ชำระในสรุปหน้าชำระใบสั่งขายของ Mobile และ POS Terminal รวมถึงการแสดงยอดค่าขนส่ง การสร้าง QR ค่าขนส่ง และข้อความค่าขนส่งที่จ่ายแล้ว
  • เพิ่ม template กลางสำหรับพิมพ์ใบเสร็จรับเงิน/ใบกำกับภาษีอย่างย่อค่าขนส่ง โดยหัวตารางใช้ รายการ, ระยะ, ราคา, มูลค่า, คำนวณระยะที่คิดเงินจากยอดค่าขนส่งที่ 15 บาท/กม. และแสดงระยะรวมเป็นระยะที่คิดเงิน + ฟรี 150 กม.
  • เพิ่ม QR payment ค่าขนส่งในใบเสร็จ โดยใช้ ref1 = transportNo.replace("-", "") และ ref2 = shippingInvoiceNo.replace("-", "").
  • เปลี่ยนปุ่มพิมพ์ใบค่าขนส่งในหน้าชำระใบสั่งขายและการ์ดลูกค้าหน้าขนส่งจาก placeholder เป็นการพิมพ์จริงทั้ง Mobile และ POS Terminal.

2026-06-11

Core

Borrow fish pickup date and conversion

  • เปิดให้สาขา non-main เห็นเมนูใบเบิกยืมดูปลาใน Mobile และ POS Terminal.
  • เพิ่ม dateOfPickup ใน draft/create/update payload ของใบเบิกยืมดูปลา โดย default เป็น null และแสดงตัวเลือกวันที่รูปแบบ YYYY-MM-DD เมื่อประเภทเป็น SPEC.
  • รองรับ response เพิ่มเติมจาก borrow detail ได้แก่ dateOfPickup, convertedOrderId และ convertedAt.
  • เพิ่ม action POST /borrow/{id}/convert ใน Mobile และ POS Terminal สำหรับใบเบิกประเภท SPEC ของสาขา non-main ที่สถานะ DONE; เมื่อสำเร็จจะโหลด detail ใหม่เพื่อให้ UI แสดงสถานะ CONVERTED.
  • เพิ่มสถานะ CONVERTED ของใบเบิก และกำหนดสีในหน้ารายการให้เหมือน DONE.
  • Docs updated:
    • governance/change-log
    • workflows/home-menu-and-permissions

Mobile loading states

  • ปรับ customerDetailScreen ให้บล็อกเนื้อหาด้วย initial loading จนกว่า user, branch, routes และ customer details จะโหลดเสร็จ
  • ปรับ order product picker ให้แสดงสถานะกำลังโหลดระหว่าง sync product inventory ชุดแรก แทนการขึ้นว่าไม่พบสินค้าเร็วเกินไป
  • ปรับ POS Terminal ให้ customer detail และ product picker แสดง loading ทันที ก่อนโหลด detail/product data เสร็จ

Customer draft validation

  • บังคับกรอก aliasName (ฉายา) เมื่อสร้าง customer draft ที่ไม่มี customerId ใน Mobile และ POS Terminal

Order withdraw type for non-main branches

  • เพิ่ม withdrawType ใน payload create/update order ของ Mobile และ POS Terminal โดย default เป็น NOW
  • เพิ่ม radio สำหรับ order ของสาขาย่อยให้เลือก NOW (เบิกทันที) และ DEPOSIT (ฝากต่อ 7 วัน) โดยใช้ style radio เดิมของหน้า order

ขนส่ง payment split QR and shipping slip

  • ปรับ Mobile และ POS Terminal transport customer payment flows ให้ส่ง shippingSlipPath ใน POST /transports/:transportId/payment
  • เพิ่มช่องอัปโหลดสลิปค่าขนส่งแยก เมื่อผู้ใช้เลือกโอน/บิลเพย์และลูกค้ามีค่าขนส่ง และบังคับแนบเมื่อมีการแนบสลิปชำระค่าสินค้าสำหรับลูกค้าที่มีค่าขนส่ง
  • แยก QR ชำระเงินขนส่งเป็น QR ค่าสินค้าและ QR ค่าขนส่ง: QR ค่าสินค้าใช้ ref transport/customer/GPS เดิมแต่ยอดไม่รวมค่าขนส่ง ส่วน QR ค่าขนส่งใช้ transportNo เป็น ref1, shippingInvoiceNo เป็น ref2 และยอดเท่าค่าขนส่ง
  • normalize ref ของ QR ค่าขนส่งโดยลบเครื่องหมาย - ออกจาก transportNo และ shippingInvoiceNo ก่อนส่งเป็น ref1 และ ref2
  • เพิ่ม label แบบ contrast สูงก่อน QR แต่ละอันและในรูป QR สำหรับแชร์ เพื่อแยกค่าสินค้ากับค่าขนส่งให้ชัดเจน
  • Verified with yarn workspace @bsr/pos-terminal typecheck and yarn workspace @bsr/mobile tsc --noEmit.
  • Docs updated:
    • governance/change-log

2026-06-10

POS Terminal

Login and authentication parity re-audit

  • ตรวจสอบ Mobile login/reset-password behavior เทียบกับ POS Terminal user-selection และ employee-login flows อีกครั้ง
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ sign-in endpoint usage, alcohol-check guard ก่อน login, token/user/login-date storage, FCM token refresh, permission flag patch payload, missing-required-values reset flow, request-reset salt, set-new-password request, theme toggle, required app update modal และ app version label
  • audit slice นี้ไม่ต้องแก้ runtime เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Shipping route parity re-audit

  • ตรวจสอบ Mobile shipping list/detail behavior เทียบกับ POS Terminal shipping route split-panel flow อีกครั้ง
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ delivery list query และ status filtering, create/delete permissions, route prefill พร้อม closed-route guard, add/delete invoice, delete reload loop, invoice sorting, accept/dock/loaded/assign actions, product lot checking, delivery lot payload allocation, B1 status update, invoice cancel request guards และ entry point พิมพ์ทั้งหมด/พิมพ์สรุปสินค้าที่ตอนนี้ยังถูกซ่อนไว้เหมือนกัน
  • audit slice นี้ไม่ต้องแก้ runtime เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Settings, notification, branch, and profile parity

  • ตรวจสอบ Mobile notification token, branch selection, auth/tax lookup และ employee profile password flows เทียบกับ POS Terminal settings/profile panels อีกครั้ง
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ FCM permission/token refresh, foreground notification registration, action ล้าง token เก่าแล้วขอใหม่, การกรอง branch/warehouse, การบันทึก branch และการโหลด tax ใหม่หลังเลือก branch
  • เพิ่ม helper clearAllStorage() แบบ Mobile ให้ POS Terminal และใช้กับ stale boot sessions, API 401 logout และ explicit logout/profile password-change logout paths เพื่อให้ branch/tax/theme/session data ถูกล้างสอดคล้องกับ Mobile
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Booking price parity re-audit

  • ตรวจสอบ Mobile booking price list/detail behavior เทียบกับ POS Terminal booking price split-panel flow อีกครั้ง
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ list query shape, สิทธิ์สร้างผ่าน shared sales-order creation gate, delete permission overrides, detail edit locks ตามสถานะ/วันที่สร้าง/เจ้าของ, product picker และ step-price item payloads, stock และ booked-quantity validation, item edit/delete พร้อม total recalculation, save/create behavior และ convert-to-sales-order flow
  • audit slice นี้ไม่ต้องแก้ runtime เพิ่มนอกเหนือจาก shared permission alignment ที่บันทึกไว้ใน customer permission update แล้ว
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer permissions and address parity

  • ตรวจสอบ Mobile customer list/detail, customer management, customer address request และ customer activation flows เทียบกับ POS Terminal split-panel flows อีกครั้ง
  • แก้ POS Terminal customer และ sales-order creation permission constants ให้ตรงกับ Mobile: แผนก 20 ยังเข้าเมนูใบสั่งขายได้ แต่ไม่สามารถสร้างใบสั่งขายหรือเข้าเมนูลูกค้าผ่าน permission gate เฉพาะ Terminal ได้แล้ว
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ customer shipping type และ route filters, customer-to-document blocked reasons, main-branch existing-order prompts, customer status change requests, address creation พร้อม route/GPS validation, การเลือก default shipping address, customer address GPS update requests, การอนุมัติ/ไม่อนุมัติ draft ลูกค้า, การอนุมัติ/ปฏิเสธคำขอเปิด/ปิดสถานะ และการอนุมัติ/ไม่อนุมัติคำขอ GPS ที่อยู่
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Invoice manual payment parity

  • ตรวจสอบ Mobile invoice list/detail behavior เทียบกับ POS Terminal invoice split-panel flow อีกครั้ง
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับแท็บ all/pending B1, guard การส่งเข้า B1 ตามเจ้าของใบ/วันที่/สถานะชำระเงิน, การอนุมัติ/ปฏิเสธคำขอยกเลิก, สรุปยอดขาย, การเปิดใบสั่งขายซ้ำจาก invoice detail, การเปิด draft ใบคืนสินค้า และ action พิมพ์ invoice/pack/storage
  • แก้ POS Terminal invoice mode switching ให้ตอนเปิดหรือออกจาก manual payment mode โหลดรายการด้วย query rule ของ manual/default ทันที โดยไม่พึ่ง React state ที่ยังรอ commit
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Sales order list and payment parity re-audit

  • ตรวจสอบ Mobile sales order list/detail/payment behavior เทียบกับ POS Terminal sales order และ sales order review panels อีกครั้ง
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ list query filters, review-mode WAITING_PAYMENT และ hasShipment filtering, user-only toggle, retry/delete permission gates, invoice/refKey delete guards, clear pending bookings, review bulk payment, การแก้ไขสินค้าในใบสั่งขาย, benefit apply/remove flows, OTP confirmation, invoice creation fallback checks, cash/transfer/QR payment payloads, slip upload, QR share/check, invoice print, retry invoice และ pack/storage print flows
  • audit slice นี้ไม่ต้องแก้ runtime เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Shipping route invoice sort parity

  • ตรวจสอบ Mobile shipping route detail sorting เทียบกับ POS Terminal shipping route detail อีกครั้ง
  • เพิ่มปุ่มเลื่อนลำดับ invoice ใน POS Terminal shipping route เมื่อผู้ใช้ปัจจุบันมีสิทธิ์แก้ใบจัด และใบจัดยังไม่ถูกจัดขึ้นขนส่ง
  • เพิ่ม action ยกเลิก/บันทึกลำดับใหม่ โดยส่ง ordered invoice id payload ผ่าน shipping route sort API เดิม
  • ปิดการจัดลำดับระหว่างกรองรายการ invoice เพื่อไม่ให้รายการที่มองไม่เห็นถูกเลื่อนโดยไม่ตั้งใจ
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Shipping route invoice delete reload parity

  • ตรวจสอบ Mobile shipping route invoice deletion เทียบกับ POS Terminal shipping route detail อีกครั้ง
  • เพิ่ม post-delete detail reload loop แบบ Mobile ใน POS Terminal เพื่อโหลด delivery detail ซ้ำจน invoice ที่ลบหายจาก response
  • sync state รายการ invoice/product grouped ภายใน POS Terminal จาก delivery detail ล่าสุดก่อน refresh split panel รอบนอก
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Storefront flow parity re-audit

  • ตรวจสอบ Mobile storefront list/detail เทียบกับ POS Terminal storefront split-panel flow อีกครั้ง
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ storefront list query shape (/invoices, shippingType=2, invoiceStatus, refKey filtering และ duplicate filtering), สี card ตามสถานะ, guard เปิดใบที่ถูกยกเลิก, accept prompt rules, submit validation, lot payload, B1 submit และ cancel request flow
  • audit slice นี้ไม่ต้องแก้ runtime
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Deposit, expense bill, and borrow parity sweep

  • ตรวจสอบ Mobile deposit list retry/delete rules เทียบกับ POS Terminal และยืนยันว่า retry filter, retry ownership override (012265), delete department gate, card tones และ page limit ตรงกันแล้ว
  • ตรวจสอบ Mobile expense bill list retry/delete rules เทียบกับ POS Terminal และยืนยันว่า retry visibility, delete action, card tones, duplicate filtering และ page limit ตรงกันแล้ว
  • ตรวจสอบ Mobile borrow detail/list permissions, status colors, service endpoints, item edit/delete rules, confirm/accept/approve/retry actions และ B1 department gates เทียบกับ POS Terminal
  • ปรับ POS Terminal borrow item payload companyName fallback order ให้ตรง Mobile buildBorrowItemPayload (companyName, ComName, company) โดยยังคง fallback เพิ่มเติม comName ของ Terminal ไว้
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Stock transfer and goods receipt parity sweep

  • ตรวจสอบ Mobile transfer-out helpers, stock issue submit flow, product lot loading และ stock transfer-out service calls เทียบกับ POS Terminal
  • ยืนยันว่า POS Terminal transfer-out ตรงกับ Mobile แล้วสำหรับ line sorting, numeric quantity conversion, batch payload conversion, branch/user fields, numAtCard และ date fallbacks
  • ตรวจสอบ Mobile transfer-in helpers, stock transfer-in submit flow, dummy product support และ service endpoints เทียบกับ POS Terminal
  • ยืนยันว่า POS Terminal transfer-in ตรงกับ Mobile แล้วสำหรับ line sorting, batch date fallbacks, branch/user fields, generated batch codes และ context tab item scopes
  • ตรวจสอบ Mobile goods receipt helpers, stock-in submit validation, batch editing behavior, dummy product support และ service endpoints เทียบกับ POS Terminal
  • ยืนยันว่า POS Terminal goods receipt ตรงกับพฤติกรรม Mobile แล้ว โดย Terminal ยังเก็บ submit-time blank/duplicate batch guards ไว้เพราะ inline batch editor สามารถมี transient invalid rows ได้ ในขณะที่ Mobile กันด้วย modal save validation ก่อนหน้า
  • audit slice นี้ไม่ต้องแก้ runtime
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Transfer warehouse payload parity

  • ตรวจสอบ Mobile transfer-warehouse list/detail, warehouse picker, header save, item add/edit/delete และ send-to-B1 flow เทียบกับ POS Terminal
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ /transfer-branches list/detail/delete endpoints, branch-scoped warehouse options, duplicate filtering, header payload fields, item save lifecycle, batch requirement ก่อน B1 submit และ B1 endpoint
  • ปรับ POS Terminal transfer-warehouse item payload builder ให้ normalize batch quantity เป็นตัวเลขก่อน submit ตาม mapping ของ Mobile
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Credit note parity re-audit

  • ตรวจสอบ Mobile credit-note list filters, paging, return-only default, delete permissions, status colors และ /credit-notes service endpoints เทียบกับ POS Terminal
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ credit-note draft creation, invoice-to-credit-note seeding, sale-person lookup, reason selection, save status transitions, item add/edit/delete validation, lot/location updates, image upload/delete และ send-to-B1 validation
  • audit slice นี้ไม่ต้องแก้ runtime
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Employee permissions parity re-audit

  • ตรวจสอบ Mobile employee list/detail และ transfer receive warehouse permission screens เทียบกับ POS Terminal
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ /users paging/search/detail loading, employee permission patch payloads, reset-password request flow, branch warehouse permission endpoints, branch/sub-warehouse mapping และ can-approve toggle persistence
  • ยืนยันว่า Mobile transfer receive setting screen ถูกแทนใน POS Terminal เป็น inline employee detail panel ที่ใช้ data contract เดิม แต่เข้ากับ Terminal split-panel workflow
  • audit slice นี้ไม่ต้องแก้ runtime
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Vehicle status parity re-audit

  • ตรวจสอบ Mobile vehicle list/status modal เทียบกับ POS Terminal vehicle split-panel detail
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ /vehicles search loading, license-plate dedupe, vehicle status normalization (UNCHECKED, READY, NOT_READY), status labels, vehicle status note editing และ /vehicle-status patch payloads
  • ยืนยันว่า POS Terminal ใช้ data contract เดิม โดยแสดง Mobile status modal เป็น split-panel detail form และ refresh list หลังบันทึก
  • audit slice นี้ไม่ต้องแก้ runtime
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

ขนส่ง flow parity re-audit

  • ตรวจสอบ Mobile transport list/detail helpers, service endpoints, trip start/finish, customer payment, shipping fee, delivery assignment, sort planner, print, GPS/map, deposit และ expense-bill shortcuts เทียบกับ POS Terminal
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ /transports list/detail/create/update/delete, delivery add/remove/status, customer loading, shipping create/retry/cancel/delete, start shipping payloads, mileage validation, finish validation, payment payloads, QR/signature/photo/slip upload, customer status update และ transport flag updates
  • ยืนยันว่า POS Terminal ใช้ data contract เดิม โดยปรับ Mobile modal/navigation flows ให้เป็น split-panel detail actions รวมถึง inline deposit และ expense-bill forms
  • audit slice นี้ไม่ต้องแก้ runtime
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Product inventory and order shortcut parity re-audit

  • ตรวจสอบ Mobile product inventory list/detail, Firestore inventory snapshot sync, booking tab filtering, product detail step-price loading และ add-to-order flow เทียบกับ POS Terminal
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ product branch context, products/sub-inventories sync, Firestore inventory collection reads, item-code dedupe, positive-price filtering, booking-only filtering, product detail lookup และ /products/step-price loading
  • ยืนยันว่า POS Terminal คง validation เพิ่มสินค้าเข้าใบสั่งขายแบบ Mobile สำหรับจำนวนและสินค้าคุมน้ำหนัก โดยปรับ order context ให้เป็น customer-picker workflow ของ Terminal ที่สร้าง sales order draft และเพิ่ม product item
  • audit slice นี้ไม่ต้องแก้ runtime
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

2026-06-09

Core

Shared dummy product boundary

  • ย้าย dummy product generation ไปไว้ที่ packages/utils/src/dummyProducts.ts และ export buildDummyProducts จาก @bsr/utils
  • คง apps/mobile/src/utils/dummyProducts.ts เป็น compatibility re-export ไปยัง helper กลาง
  • ปรับ POS Terminal goods receipt และ transfer-in product picker ให้ใช้ helper กลางแทน local hardcoded dummy product list
  • Verified with yarn workspace @bsr/mobile tsc --noEmit and yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • workflows/goods-receipt-flow
    • governance/change-log

Booking-price item warehouse payload parity

  • เพิ่ม whsCode ใน BookingPriceItemPayload ให้ตรงกับพฤติกรรม shared mobile order-item payload
  • ปรับ POS Terminal booking-price item payload ให้ส่ง whsCode แยกจาก whGrpCode/whGrpName; warehouse group field จะ fallback จาก branch ที่เลือกแทนการ fallback ผ่าน item.whsCode
  • Verified with yarn workspace @bsr/mobile tsc --noEmit and yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal

Sales order bulk payment parity re-audit

  • Audit ซ้ำ Mobile order-list bulk payment flow เทียบกับ POS Terminal salesOrderReview bulk payment modal
  • ยืนยันว่า POS Terminal ตรงกับ Mobile อยู่แล้วสำหรับ selectable order tracking ด้วย orderNo, bulk payment channel เฉพาะ CASH/TRANSFER, การยิง /payment แยกทีละ order ด้วย discount/charge เป็นศูนย์, invoice-amount fallback ไป order amount, partial-failure reporting, modal reset, selection clearing, และ list refresh หลัง submit
  • รอบนี้ไม่ต้องแก้ runtime code
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Sales order QR payment submit parity

  • Audit ซ้ำ Mobile order payment QR flow, toOrderPaymentPayload, QR generation, duplicate-invoice guard, และ POS Terminal order payment section
  • ปรับ POS Terminal QR payment submission ให้ตรงกับ Mobile: เลือก QR แล้วยืนยันชำระเงินจาก payment section ได้ และ /payment payload จะ map paymentChannel จาก QR เป็น CASH
  • ยืนยันว่า Terminal ยังรักษา duplicate active-invoice guard, cash-received validation เฉพาะ cash payment, QR image generation, QR share/check actions, และ empty-slip success handling ตาม Mobile
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Sales order logistics payload parity

  • Audit ซ้ำ Mobile sales-order detail payload building, order meta save, shipping-type update pickup-date persistence, item total persistence, และ print-before-update flows เทียบกับ POS Terminal OrderDetailForm
  • ปรับ POS Terminal order detail updates ให้ใช้ payload builder เทียบเท่า Mobile โดยส่ง vehicleRelease และ documentMove เฉพาะเมื่อ branch ที่เลือกเป็นสาขาย่อย
  • ส่ง selected branch เข้า OrderDetailForm จาก Terminal split-pane เพื่อให้ save/update/print persistence ใช้ branch-scoped logistics payload rule เดียวกับ Mobile
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Booking and borrow customer shortcut payload parity

  • Audit ซ้ำ Mobile customer-to-booking-price และ customer-to-borrow shortcuts เทียบกับ POS Terminal customer document shortcut handling
  • ปรับ POS Terminal customer document draft seeding ให้ booking-price draft ใช้ address แรกของลูกค้าสำหรับ route code/name และ latitude/longitude ตาม Mobile booking-price initialization ปัจจุบัน
  • ปรับ shared customer document base ให้ billing address ไม่ fallback ไป address แรกเมื่อไม่มี address ชนิด BillTo
  • ยืนยันว่า borrow creation ยังตรงกับ Mobile ในขอบเขต payload ที่ส่งจริง: borrow POST payload ส่งเฉพาะ customer/branch/user/notes/borrow type fields และไม่ส่ง route/address fields
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer address GPS request parity re-audit

  • Audit ซ้ำ Mobile customer address management list/detail flows, address GPS request service endpoints, request card colors, detail map rendering, pending-only approve/reject actions, และ POS Terminal customerAddressManagement split-pane implementation
  • ยืนยันว่า POS Terminal ตรงกับ Mobile อยู่แล้วสำหรับ /customer-draft/address-lat-lng list parameters, branch-scoped search/paging, การเลือก request ด้วย id ?? customerDraftId, detail loading by request id, แผนที่ read-only ของพิกัดเก่า/ใหม่, สี card approved/rejected, และ approve/reject endpoints
  • ยืนยันว่า Terminal ใช้ shared @bsr/utils dbAddress source และ string-normalized address search mapping เหมือน Mobile
  • รอบนี้ไม่ต้องแก้ runtime code
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer sales-order payload parity

  • Audit ซ้ำ Mobile customer list/detail/request flows, customer permission gates, customer activation approval/rejection, customer address actions, และ POS Terminal customer/customerActivation split-pane implementations
  • ปรับ POS Terminal sales-order-from-customer payload ให้ตรงกับ Mobile: ลูกค้าที่ไม่ใช่สายส่งจะส่ง route code/name ว่าง และ billing address จะไม่ fallback ไป address แรกเมื่อไม่มี address ชนิด BillTo
  • ยืนยันว่า POS Terminal ตรงกับ Mobile อยู่แล้วสำหรับ customer list paging/search/dedupe, shipping type และ route filters, request-mode isRequest=1, activation approve/reject endpoints, call/status/address GPS/default-address actions, และ customer document permission gates
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Deposit and expense bill parity re-audit

  • Audit ซ้ำ Mobile deposit และ expense bill list/detail flows, service endpoints, create/update payload builders, retry/delete actions, transport-linked save behavior, account/company/vehicle/partner pickers, และ permission gates เทียบกับ POS Terminal
  • ยืนยันว่า POS Terminal ตรงกับ Mobile อยู่แล้วสำหรับ deposit create/delete department sets, deposit owner-or-special retry guard, retry-only deposit filter, deposit invoice selection payload totals/notes, cash/bank account loading, expense bill draft-update accounting gate, bill date permission, vehicle mileage/balance lookup, gas partner lookup, send-slip-later date behavior, และ transport post-save updates
  • รอบนี้ไม่ต้องแก้ runtime code
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Product and vehicle master parity re-audit

  • Audit ซ้ำ Mobile product list/detail และ vehicle list/status-update flows เทียบกับ POS Terminal product และ vehicle split-pane implementations
  • ยืนยันว่า POS Terminal ตรงกับ Mobile อยู่แล้วสำหรับ product inventory sync context, main/PC-.../NF-... warehouse snapshots, product search/dedupe, all/booking tabs, product detail reload by item code, step-price loading/display, add-to-sales-order validation, vehicle list paging/search/dedupe, vehicle status normalization, และ vehicle status update payloads
  • รอบนี้ไม่ต้องแก้ runtime code
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Stock movement flows parity re-audit

  • Audit ซ้ำ Mobile goods receipt, transfer out, transfer in, และ transfer warehouse list/detail flows, shared batch helpers, dummy product filtering, product/company search, stock-movement service endpoints, และ submit/send-to-B1 payloads เทียบกับ POS Terminal
  • ยืนยันว่า POS Terminal ตรงกับ Mobile อยู่แล้วสำหรับ goods receipt stock-in payloads, transfer-out issue payloads, transfer-in receipt payloads, transfer-in main/NF-... warehouse tab loading and dedupe, transfer warehouse header/item create/update/delete behavior, send-to-B1 preconditions, และ branch/warehouse context mapping
  • รอบนี้ไม่ต้องแก้ runtime code
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Employee profile and transfer setting parity re-audit

  • Audit ซ้ำ Mobile employee list/detail/profile/password flows, employee permission options, department access gates, password reset/change services, และ transfer receive branch/warehouse permission setting เทียบกับ POS Terminal employee
  • ยืนยันว่า POS Terminal ตรงกับ Mobile อยู่แล้วสำหรับ employee menu/detail permission sets, editable permission payloads, admin password reset salt request, own password change sequence, branch loading by user code, warehouse filtering/mapping, และ branch-warehouse permission create/update payloads
  • รอบนี้ไม่ต้องแก้ runtime code
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer management approval gate parity

  • Audit ซ้ำ Mobile customer-management detail/edit/address-request flows, shared dbAddress mapping, customer draft save/update, draft child address/branch recovery, address GPS request decisions, และ POS Terminal customer-management split-pane implementation
  • ปรับ POS Terminal customer draft approve/reject action gating ให้ตรงกับ Mobile: ใช้สิทธิ์ approver เป็น gate โดยไม่ซ่อน action เพิ่มจากการมี approved/rejected marker แล้ว
  • ยืนยันว่า POS Terminal ตรงกับ Mobile อยู่แล้วสำหรับ shared address search mapping, customer draft create/update payloads, pending child address/branch retry behavior, address create/update/delete validation, save-to-B1 approve endpoint, และ address GPS approve/reject pending-only actions
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

ขนส่ง step-two item key parity

  • Audit ซ้ำ Mobile transport list/detail, access rules, create/delete guards, route and vehicle selection, delivery/customer sorting, shipping draft cache, start/finish mileage validation, payment payloads, shipping retry/delete actions, และ step-two customer/special rows เทียบกับ POS Terminal transport
  • ปรับ POS Terminal transport step-two item key generation ให้ตรงกับ Mobile รูปแบบ typeData-customerCode-index เพื่อกัน key ชนกันระหว่างแถวลูกค้ากับแถวพิเศษ เช่น เติมน้ำมัน และฝากเงิน
  • ยืนยันว่า POS Terminal ตรงกับ Mobile อยู่แล้วสำหรับ transport list paging/search/dedupe, create access department rules, owner-before-start delete guard, start payload shipping amount calculation, SAP error reporting, finish-trip preconditions, payment validation, และ payment/customer-finished update sequence
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Shipping route create permission parity

  • Audit ซ้ำ Mobile shipping route list/detail, helper permissions, create-delivery flow, invoice add/delete/sort, lot/batch save, accept/loading/assign actions, invoice cancel request, และ send-to-B1 status transitions เทียบกับ POS Terminal shippingRoute
  • ปรับ POS Terminal shipping route create permission ให้ตรงกับ Mobile create/finalize department set ปัจจุบัน โดยเพิ่มแผนก 30 และถอดแผนก 21 ออกจาก create action gate
  • ยืนยันว่า POS Terminal ตรงกับ Mobile อยู่แล้วสำหรับ list paging/search/status filtering/dedupe, delivery creation plus invoice assignment, product lot validation, CHECKLOCATION save sequence, DONE/SOME_DELIVERY_FAIL/PENDING_FOR_B1 B1 status transitions, cancel-note validation, และ sort payload behavior
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Borrow fish list/detail parity re-audit

  • Audit ซ้ำ Mobile borrow list/detail, borrow utility permissions, product picker stock handling, item add/edit/delete validation, B1 accept/approve/retry actions, และ borrow print actions เทียบกับ POS Terminal borrowFish
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ list paging/search/dedupe, create/cancel permission rules, borrow type gate ก่อนเพิ่มสินค้า, จำกัดสูงสุด 3 รายการและ 3 ชิ้นต่อรายการ, stock และ edit-stock validation, item payload fields, confirm-before-B1 update sequence, accept/complete/retry endpoints, และ branch-based print action selection
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Booking price detail edit parity re-audit

  • Audit ซ้ำ Mobile booking-price list/detail, item add/edit/delete permissions, step-price และ weight validation, totals persistence, และ convert-to-order flow เทียบกับ POS Terminal booking-price split-pane behavior
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ list query parameters, delete permission override rules, header payload creation, item whsCode payload handling, add-item stock validation, edit-item original-quantity และ available-stock guards, item delete permission, save gate, และ convert-to-order API sequence
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Storefront accept prompt cancel parity

  • Audit ซ้ำ Mobile storefront list/detail screens, storefront list card colors, status tabs, accept prompt, batch/lot checking, cancel request, delivery lot submit flow, และ POS Terminal storefront split-list/detail implementation
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ storefront invoice list parameters (shippingType=2, status tab NEW), valid-ref filtering, dedupe, สี list, accept/save permissions, non-main branch accept rollout, batch auto-selection, duplicate batch guard, pending quantity validation, cancel guards, และ delivery lot submit endpoints
  • ปรับ POS Terminal storefront accept prompt ให้เมื่อผู้ใช้ cancel prompt "รับงาน" จะปิด detail pane ให้ตรงกับ Mobile navigation.goBack() เมื่อผู้ใช้ไม่รับงานใบจัดหน้าร้านที่ยังไม่มีผู้รับงาน
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Current Mobile shared utility and service surface re-audit

  • Audit ซ้ำ Mobile worktree ปัจจุบันสำหรับ shared dbAddress, shared buildDummyProducts, customer/customer-management address search mapping, และ Mobile service exports เทียบกับ POS Terminal
  • ยืนยันว่า POS Terminal customer และ customer-management address forms import dbAddress จาก @bsr/utils และ map ค่า district, amphoe, province, zipcode แบบ null-safe string เหมือน Mobile shared-address boundary ปัจจุบัน
  • ยืนยันว่า POS Terminal goods receipt, transfer-in, และ transfer-warehouse product pickers ใช้ shared buildDummyProducts จาก @bsr/utils; dummy products เข้าร่วม search filtering behavior เดียวกับ Mobile
  • รัน service export surface comparison ซ้ำโดย resolve Terminal re-export aliases (goodsReceipt, transferIn, transferOut, user) แล้ว ยืนยันว่าไม่มี Mobile service exports ที่ POS Terminal ขาด
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Invoice duplicate order payload parity

  • Audit ซ้ำ Mobile invoice detail duplicate-order flow, InvoiceDuplicateConfigModal, duplicate invoice seeding ใน Mobile order detail, และ POS Terminal invoice split-pane duplicate order flow
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ duplicate-order confirmation, modal เลือก vehicleRelease/documentMove เมื่อเป็นสาขาย่อย, invoice detail reload, product inventory lookup, stock guard, step-price lookup, order item creation, totals update, และการเปิด order ที่สร้างแล้วใน sales-order pane
  • ปรับ POS Terminal duplicate-order payload seeding ให้ order ใหม่ใช้ current branch/user context, remark ว่าง, address fallback เป็น - ตาม Mobile, และส่ง vehicleRelease/documentMove เฉพาะสาขาย่อย ให้ตรงกับ Mobile buildOrderPayloadFromDetail(..., { includeLogisticsFields })
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Credit note list/detail file-permission parity

  • Audit ซ้ำ Mobile credit-note list/detail screens, credit-note helper permissions, credit-note service endpoints, invoice item source loading, lot selection, image upload/delete behavior, B1 send validation, และ POS Terminal split-list/detail implementations
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ status filtering, return-only filtering, create permissions, branch-scoped /credit-notes list parameters, document delete permissions, invoice-item add flow, item qty/amount validation, warehouse check requirements, lot update endpoint, และ B1 send flow
  • ปรับ POS Terminal credit-note detail image actions ให้ credit note ที่มีเอกสารแล้วสามารถเพิ่ม/ลบรูปแนบได้เมื่อเอกสารยังไม่เป็น RECEIVED ให้ตรงกับ Mobile image picker behavior แทนการผูก file change กับสิทธิ์ลบ item แบบ owner-only
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Expense bill list/detail parity audit

  • Audit ซ้ำ Mobile expense-bill list/detail screens, expense-bill service, vehicle/dealer pickers, mileage loading, update-draft behavior, retry/delete swipe actions, slip-later date behavior, และ transport expense-bill flow เทียบกับ POS Terminal expense-bill split-list, ExpenseBillDetailForm, และ expense-bill services
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ /bills list parameters, branch scoping, ignoreDraft=true, dedupe ด้วย billId/billNo, สี card draft/retry/success, retry เฉพาะรายการที่ไม่มี RefKey และ branchId ไม่ใช่ 0, delete action, create payload, draft update โดยพนักงานบัญชี, company/vehicle/dealer loading, vehicle mileage/balance lookup, date edit permission ผ่าน editDeliveryDate หรือ dept บัญชี, required field validation, และ transport callback update
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Deposit list/detail parity

  • Audit ซ้ำ Mobile deposit list/detail screens, deposit service, retry-only filter, delete/retry swipe actions, invoice picker, slip-later date behavior, และ transport deposit flow เทียบกับ POS Terminal deposit split-list, DepositDetailForm, และ deposit services
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ /deposits list parameters, whs scoping, hasRetry, dedupe ด้วย depositId/depositNo, สี card สำหรับ deleted/retry/success states, retry owner override user 012265, create/delete permissions, invoice date-range selection, selected-invoice amount/notes calculation, company/cash/bank account loading, create payload, และ transport callback update
  • ปรับ POS Terminal deposit create permission ให้ dept 21 ไม่เห็น create action แล้ว ตรงกับ Mobile canCreateDepositDeptCodes ปัจจุบัน
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

ขนส่ง shipping draft amount parity

  • Audit ซ้ำ Mobile transport detail step-two customer shipping amount behavior เทียบกับ POS Terminal TransportDetailForm
  • ปรับ POS Terminal transport customer card ให้รายการขนส่งสถานะ draft แก้ค่าขนส่งรายลูกค้าแบบ inline ก่อนเริ่มทริปได้ ตรงกับ editable step-two customer card ของ Mobile
  • เพิ่ม per-transport AsyncStorage draft cache สำหรับค่าขนส่งที่คำนวณ/แก้มือ โดยผูก key ด้วย customer และพิกัด เพื่อให้ refresh/reopen ยังรักษาค่าที่แก้ไว้จนกว่าจะเริ่มทริป จบทริป หรือยกเลิก
  • คง customer action modal เดิมของ Terminal สำหรับ post-start shipping invoice add/retry/delete actions
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Product list/detail parity audit

  • Audit ซ้ำ Mobile product list/detail screens, product inventory services, Firestore inventory subscription, booking tab, step-price loading, และ add-to-order behavior เทียบกับ POS Terminal product split-list, ProductDetailForm, และ product services
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ branch inventory context, main/sub-branch product sync endpoints, inventory warehouse-code scope, price-positive filtering, item-code dedupe, all/booking tabs, product search, detail loading by product code, step-price lookup ด้วย item/UOM, stock/booking/available display, weight-based amount preview, positive quantity และ weight validation, create-sales-order permission gating, และ create-order-plus-add-item workflow
  • ยืนยันว่า POS Terminal คง behavior ของ Mobile ไว้ในรูปแบบ Terminal โดยใช้ paginated split-list loading และ customer picker selection แทน Mobile navigation params/draft route state
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Transfer warehouse list/detail parity audit

  • Audit ซ้ำ Mobile transfer-warehouse list/detail screens, warehouse picker, product picker, product lot picker, item CRUD, delete, และ B1 submit behavior เทียบกับ POS Terminal TransferWarehouseDetailForm, split-list normalization, list card, และ transfer-warehouse services
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ branch-scoped transfer-branches loading, search/dedupe ด้วย transferBranchId/transferBranchNo, create/edit header payload, destination warehouse loading จาก current warehouse รวม filtered sub-warehouses, company fields จาก warehouse/product แรกที่เลือก, product inventory sync/subscription, dummy product fallback, batch loading ด้วย source warehouse และ company, quantity-plus-batch item validation, item create/update/delete endpoints, B1 eligibility guard, B1 confirmation, to-b1 endpoint, และ transfer document delete behavior
  • ยืนยันว่า POS Terminal คง Mobile item workflow ไว้ในรูปแบบ split-pane modal layout ของ Terminal และ refresh detail/list state หลัง header save, item save/delete, และ B1 submit
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Transfer in list/detail parity audit

  • Audit ซ้ำ Mobile transfer-in list/detail screens, transfer-in services, warehouse-tab loading, product picker, product lot picker, dummy product handling, และ submit payload เทียบกับ POS Terminal TransferInDetailForm, split-list normalization, list card, และ transfer-in services
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ transfer-in context loading, per-warehouse transfers-in queries, local search/dedupe ด้วย company/docEntry/docNum, source-branch card display, product inventory sync/subscription, company-aware product filtering, dummy product fallback, duplicate product guard, dummy auto-batch generation, batch picker/search, duplicate batch guard, positive quantity requirement, available-lot quantity guard, การ roll-up batch quantity เข้า line quantity, product line delete, numAtCard generation, destination branch/user payload fields, numeric amount/quantity conversion, และ transfer-in submit endpoint
  • ยืนยันว่า POS Terminal แทน warehouse tab UI ของ Mobile ด้วย split-list aggregation ครบทุก transfer-in tab และรักษา selected tab context เป็น sourceWhsCode สำหรับ product line ที่เพิ่มเอง
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Transfer out list/detail parity audit

  • Audit ซ้ำ Mobile transfer-out list/detail screens, transfer-out services, product lot picker behavior, และ transfer-out helper validation เทียบกับ POS Terminal TransferOutDetailForm, split-list normalization, list card, และ transfer-out services
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ branch-scoped transfer-out loading, local list search/dedupe ด้วย company/docEntry/docNum, source-branch fallback, source-to-destination card display, product lot loading ด้วย item/warehouse/company, batch search, duplicate batch guard, positive quantity requirement, available-lot quantity guard, pending-quantity guard, line-close incomplete guard, submit-time incomplete line guard, numAtCard generation, branch/user payload overrides, line sorting, numeric quantity conversion, และ transfer-out submit endpoint
  • ยืนยันว่า POS Terminal คง Mobile batch picker workflow ไว้ในรูปแบบ split-pane/modal interaction ของ Terminal และ refresh current split list หลังบันทึก
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Goods receipt list/detail parity audit

  • Audit ซ้ำ Mobile goods receipt list/detail screens, goods receipt services, product inventory subscription, dummy product fallback, และ batch editor behavior เทียบกับ POS Terminal GoodsReceiptDetailForm, split-list normalization, list card, และ goods receipt services
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ branch-scoped goods receipt loading, local list search/dedupe ด้วย company/docEntry/docNum, list card document/date/comment/user display, product inventory sync และ subscription, company-aware product filtering, dummy product fallback, duplicate product guard, line delete สำหรับสินค้าที่เพิ่มเอง, generated batch codes, batch date defaults, batch quantity totals, blank/negative quantity validation, stock-in payload branch/user fields, line sorting, numeric quantity/weight conversion, และ stock-in submit endpoint
  • ยืนยันว่า POS Terminal คง Mobile batch workflow ไว้ครบในรูปแบบ inline batch editor ของ Terminal; Terminal ยังมี submit-time blank batch-number และ duplicate batch-number guards เพื่อกัน inline edit ที่ไม่ถูกต้องก่อน submit
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Employee profile password parity audit

  • Audit ซ้ำ Mobile employee profile/password screen และ auth password services เทียบกับ POS Terminal employee profile entry path, EmployeeDetailForm, root logout handling, และ auth services
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับการเปิด profile ผู้ใช้ปัจจุบันจาก header/settings area, โหลด employee detail ด้วย user id, profile access rules สำหรับ own profile หรือ employee-menu users, reset-salt request, editable salt/reset-password fields, required-field validation, password confirmation validation, setNewPassword payload fields, success feedback, การ clear password form state, และ logout หลังเปลี่ยนรหัสผ่านสำเร็จ
  • ยืนยันว่า POS Terminal คง session-clearing boundary เดิม โดยล้าง auth token/login date/user และกลับไปหน้าเลือกผู้ใช้ พร้อมรักษา branch/theme context ของ Terminal
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Vehicle list and status parity audit

  • Audit ซ้ำ Mobile vehicle list/status modal และ common vehicle services เทียบกับ POS Terminal vehicle split-list, list card, detail form, และ common services
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ vehicle loading/search endpoint parameters, การ dedupe ด้วย license plate, status normalization (UNCHECKED, READY, NOT_READY), status labels/colors/card tones, การแสดง vehicle type และ max payload, การแก้ไข status note, status update endpoint ด้วย license plate, และ list refresh หลังบันทึก
  • ยืนยันว่า split-pane detail editor และ paginated/load-more list ของ POS Terminal เป็นรูปแบบ interaction ของ Terminal โดยยังคง Mobile vehicle status workflow ไว้ครบ
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Employee transfer receive setting parity audit

  • Audit ซ้ำ Mobile employee detail และ employee transfer receive setting screens เทียบกับ POS Terminal EmployeeDetailForm และ user/common services
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับการแก้/บันทึก employee permissions, reset-password action, การโหลด branch สำหรับ transfer receive ด้วย fallback user 999999, การโหลด branch ของพนักงานด้วย userCode, การ filter main/sub warehouse, การเพิ่ม selected main warehouse เมื่อพนักงานอยู่ในสาขานั้นแล้ว, existing warehouse-permission lookup, optimistic pending toggles, create/update permission endpoints, และ branch reset/back behavior
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer address GPS request parity audit

  • Audit ซ้ำ Mobile customer address GPS request list/detail screens และ customer address latitude/longitude services เทียบกับ POS Terminal customer address management split-list และ detail form
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ customer-management permission gating, branch-scoped list loading, search/pagination, การ dedupe request ด้วย id/customerDraftId, สี card ตาม approved/rejected, metadata ผู้ขอ/ผู้อนุมัติ/ผู้ไม่อนุมัติ, detail lookup, การแสดงพิกัดเก่า/ใหม่, read-only Google map rendering, ปุ่ม approve/reject เฉพาะ pending, confirmation prompts, API endpoints, และการ refresh detail/list หลังตัดสินใจ
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer management edit pending child parity

  • Audit ซ้ำ Mobile customer management edit/detail flows เทียบกับ POS Terminal CustomerManagementDetailForm และ customer draft services
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ draft core validation, name-length limit, phone formatting, customer type และ know-us pickers, approve/reject permission checks, address search จาก shared dbAddress, route picker, GPS/map coordinate capture, address route requirement สำหรับลูกค้าสายส่ง, branch duplicate guard, และ at-least-one-branch delete guard
  • ปรับ POS Terminal customer-management draft creation ให้เพิ่ม/แก้/ลบ address และ branch ที่เปิดบิลได้แบบ local pending ก่อนสร้าง core draft ได้ แล้วค่อย post เป็น child records หลัง createCustomerDraft ให้ตรงกับ pending address/branch behavior ของ Mobile
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Order detail and payment parity audit

  • Audit ซ้ำ Mobile order detail, order payment screen, order services, order-payment utilities, และ invoice/payment helper behavior เทียบกับ POS Terminal OrderDetailForm และ order services
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ order list/detail endpoints, order item CRUD endpoints, shipping-type update, การเติม pickup date อัตโนมัติสำหรับหน้าร้าน, guard documentMove/vehicleRelease ของสาขาย่อย, shipping address/GPS validation ก่อน invoice/payment actions, และ storage print remark requirements
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ payment invoice loading, duplicate active-invoice prefix detection, invoice retry, invoice printing with order context, payment total calculation, cash received validation, transfer slip upload, QR payment generation/check flow, และ payment submit payload fields
  • ยืนยันว่า POS Terminal คง benefit flows ของ Mobile สำหรับ point, coupon, และ credit-note discounts รวมถึง credit-note company-amount checks และ OTP confirmation
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Product picker and order-item validation parity

  • Audit ซ้ำ Mobile shared product picker/order item flow สำหรับ order และ booking เทียบกับ POS Terminal ProductPickerModal, booking detail, และ order detail flows
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ product filters (ALL, LASTED, CHANGEPRICE, HOT), customer last-buy data, changed-price และ hot-product markers, step-price loading, quick quantity choices, duplicate item editing, booking stock validation, และ borrow quantity/stock limits
  • ปรับ POS Terminal order item add/edit validation ให้จำนวนต้องเป็นเลขจำนวนเต็ม, มากกว่า 0, และห้ามเกิน available stock; การแก้ไข item เดิมใช้ available stock บวกจำนวนเดิมของ item ให้ตรงกับ Mobile order detail behavior
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer list and picker parity audit

  • Audit ซ้ำ Mobile CustomerList filters, customer request mode, route lookup, pagination/dedupe behavior, customer card data, และ primary document actions เทียบกับ POS Terminal customer list panes และ CustomerPickerModal
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ SAP customer query parameters ได้แก่ shippingType, selected branch branchId, routeCode, และ request-mode isRequest=1 สำหรับรายการคำขอเปิด/ปิดสถานะลูกค้า
  • ยืนยันว่า POS Terminal คง route loading behavior ปัจจุบันของ Mobile โดยใช้ active branch code กับ getRoutesByBranch, แยก route/shipping filters ของรายการ customer และ customer activation ออกจากกัน, และให้ picker ใช้เฉพาะ flow สร้าง booking, borrow, และ sales order
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Printing and print-log parity

  • Audit ซ้ำ Mobile order, borrow, invoice, shipping invoice, shipping product summary, และ Firestore print-log behavior เทียบกับ POS Terminal printing
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ print log collection print, NoDetail count lookup, NoPrint increment, UserCode, non-blocking print-log failures, invoice QR assets, branch tax data usage, และ shared order/borrow/invoice templates
  • ปรับ POS Terminal invoice printing ให้ส่ง printIndex ผ่าน invoice template options และให้ shipping invoice printing เรียก printInvoice ด้วย option นั้น เพื่อให้ลำดับใบแจ้งหนี้สายส่งตรงกับ Mobile
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Swipeable row parity

  • Audit ซ้ำ Mobile SwipeableFlashList row behavior เทียบกับ POS Terminal SwipeableRow และ list-pane swipe actions
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ left/right action layout, gesture thresholds, action touch ที่เปิดเฉพาะตอน row เปิด, tap-to-close overlay, auto-close หลังแตะ action, และการปิด row เก่าที่เปิดอยู่ใน list panes
  • ปรับ POS Terminal SwipeableRow imperative methods ให้มี openLeft และ openRight คู่กับ close/reset เพื่อให้ตรงกับ method contract ของ Mobile swipeable row
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Alcohol-check login parity

  • Audit ซ้ำ Mobile login alcohol-check guard, reset-password fallback, FCM patch, และ session save order เทียบกับ POS Terminal user-selection login
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ alcohol-check department gates, bypass user codes, UAT bypass, /alcohol/check-status request, failed-check message, missing-required-values reset flow, password reset salt, และ new-password submission
  • ปรับลำดับ POS Terminal login ให้หลัง sign-in และ alcohol check สำเร็จ จะ save auth token, user profile, และ login date ก่อน refresh FCM token และ patch user ให้ตรงกับ login sequence ปัจจุบันของ Mobile
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Branch selection and settings parity audit

  • Audit ซ้ำ Mobile branch selection และ branch settings navigation เทียบกับ POS Terminal branch/user/home flow
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับการโหลด branch ทั้งหมดด้วย fallback user 999999, โหลด branch ของ current user, เลือกสาขาหลัก, โหลด/filter คลังย่อย, แสดงคลังหลักเฉพาะเมื่อ user มีสิทธิสาขานั้น, และบันทึก warehouse ที่เลือกเป็น active branch
  • ยืนยันว่า POS Terminal ตรงกับ app-entry rule ปัจจุบันของ Mobile โดยต้องมี selected branch ก่อนเข้า login/home แต่ถือ branch tax data เป็น best-effort หลัง save branch จึงไม่ block navigation เมื่อ tax lookup ล้มเหลว
  • ยืนยันว่า POS Terminal คงพฤติกรรมเปลี่ยน branch หลัง login ของ Mobile ในรูปแบบ Terminal ผ่าน UserSelection และ Home settings entry points
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Notification and FCM token parity re-audit

  • Audit ซ้ำ Mobile notification service, Home foreground handler, login FCM token patch, และ NotificationsScreen token tools เทียบกับ POS Terminal
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ Firebase Messaging background handler registration, notification permission request, device registration, token retrieval, foreground notification handler, login-time fcmToken patching, token refresh, และ clear-and-refresh token helper
  • ยืนยันว่า POS Terminal แสดง notification token diagnostics ใน Home settings panel เพื่อคงพฤติกรรม token refresh และ clear-token ของ Mobile NotificationsScreen ในรูปแบบ Terminal
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Required app update gate parity audit

  • Audit ซ้ำ Mobile required app update flow เทียบกับ POS Terminal login/home flow
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับการดึง native app version บน Android/iOS, Firestore version/vapp lookup, platform-specific remote version fields, required-update comparison, version label formatting, และ blocking update modal
  • ยืนยันว่า POS Terminal ต่อ update gate เข้า user-selection login screen และ Home screen refresh path ตามรูปแบบ Terminal โดยยังรักษาพฤติกรรม check ที่หน้า login ของ Mobile
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Shared address and dummy utility parity re-audit

  • Audit ซ้ำการย้าย dbAddress และ buildDummyProducts ปัจจุบันของ Mobile ไป @bsr/utils เทียบกับ POS Terminal customer, customer-management, goods-receipt, transfer-in, และ transfer-warehouse flows
  • ยืนยันว่า POS Terminal import dbAddress และ buildDummyProducts จาก @bsr/utils อยู่แล้ว ตรงกับ shared utility boundary ปัจจุบันของ Mobile
  • ยืนยันว่า POS Terminal customer และ customer-management address search map district, amphoe, และ province ด้วย null-safe string conversion ตรงกับ address picker ปัจจุบันของ Mobile
  • ยืนยันว่า POS Terminal stock document product pickers ยังใช้ shared dummy-product builder เพื่อคง dummy item data ที่เข้ากันกับ Mobile
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with yarn workspace @bsr/mobile tsc --noEmit and yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Borrow fish parity audit

  • Audit ซ้ำ Mobile borrow-fish list/detail และ product flow เทียบกับ POS Terminal borrowFish split-panel detail
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ /borrow list loading ด้วย selected warehouse group, page size 200, search, pagination, dedupe, main-branch menu access, cancel permission guards, และ delete endpoint
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ borrow detail create/update payloads, persist draft ก่อนเพิ่มสินค้า, product quantity และ stock validation, จำกัดสูงสุด 3 รายการและ 3 ชิ้นต่อรายการ, item add/edit/delete endpoints, borrow-type selection, confirm flow, accept flow, approve/retry flow, และปุ่มพิมพ์แยกสาขาหลักกับห้องฝาก
  • ปรับ POS Terminal create permission ของ borrow fish โดยตัดแผนก 20 ออกให้ตรงกับ canCreateBorrow ปัจจุบันของ Mobile โดยยังคง menu visibility เดิม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Storefront shipping parity audit

  • Audit ซ้ำ Mobile storefront list/detail และ stock-cut flow เทียบกับ POS Terminal shippingStorefront split-panel detail
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ storefront invoice list loading ผ่าน /invoices ด้วย selected branch, shippingType=2, status tabs ทั้งหมด/NEW, search, pagination, refKey filtering, dedupe, และ card status colors
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ detail loading, accept prompt และ permission gates, main/non-main branch handling, product check editing, batch auto-select และ manual batch editor, duplicate/available/pending quantity validation, submit guards สำหรับ refKey, cancel request, และ checked item count
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับลำดับ B1 stock-cut: add invoice to delivery เมื่อยังไม่มี delivery, submit delivery lots ด้วย storefront invoice lot payload, แล้ว create delivery จากนั้น refresh detail/list
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ storefront cancel guards และ POST /invoices/:id/cancel notes payload
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Deposit parity audit

  • Audit ซ้ำ Mobile deposit list/detail และ transport-to-deposit flow เทียบกับ POS Terminal deposit split-panel detail
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ /deposits list loading ด้วย selected warehouse group, hasRetry filter, page size 200, search, dedupe, card tones, delete permission departments, retry owner/override guard, และ delete/retry endpoints
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ deposit create payload fields, invoice multi-select net amount calculation, invoice-number notes, company code normalization, cash/bank account loading, 300-day invoice lookup window, block การเลือก invoice สำหรับแผนก 14/30, send-slip-later date toggle, และ transport context save ผ่าน flagBank=1
  • ยืนยันว่า POS Terminal ตั้งใจคงแผนก 21 ใน create action เพราะ Terminal list-pane create entry map กับ Mobile Home deposit shortcut permission ส่วน Mobile list floating button ใช้ screen-local gate ที่แคบกว่า
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Credit note parity audit

  • Audit ซ้ำ Mobile credit note list/detail, helper permissions, item editing, lot location, image upload, และ B1 submission เทียบกับ POS Terminal credit note split-panel detail
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ credit-note list loading ด้วย selected branch, status filter, default return-only filter (isReturn=1), search, pagination, dedupe, card status labels/colors, create permission, และ delete permission guards
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ create/update payload fields, next-status rules, owner-only item add/edit/delete, department gates สำหรับแก้จำนวน/ตำแหน่งวาง, warehouse check gates, postCreditNoteToB1 แล้ว update เป็น RECEIVED, item lots payload, และ image upload/delete endpoints
  • ยืนยันว่า invoice-to-credit-note entry จาก invoice detail ยังคง behavior ของ Mobile route ในรูปแบบ Terminal split-panel flow
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Expense bill parity audit

  • Audit ซ้ำ Mobile expense bill list/detail และ transport-to-expense flow เทียบกับ POS Terminal expense bill split-panel detail
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ /bills list loading ด้วย selected branch และ ignoreDraft=true, page size 200, search, dedupe, card colors, retry visibility เมื่อ RefKey ว่างและ branchId ไม่ใช่ 0, delete/retry endpoints, และ main-branch menu access
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ create/update payload fields, company code normalization, gas partner loading, vehicle/mileage lookup, back-date permission ผ่าน editDeliveryDate หรือแผนกบัญชี, draft branchId=0 accounting-only update, และ transport context save พร้อม flagGas=1
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Vehicle status parity audit

  • Audit ซ้ำ Mobile vehicle list/status modal เทียบกับ POS Terminal vehicle split-panel detail
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ vehicle list loading ผ่าน getVehicles, search, license-plate dedupe, status normalization, vehicle card status tones, และ PATCH /vehicles/:licensePlate/vehicle-status payload พร้อม vehicleStatus และ vehicleStatusNote
  • ยืนยันว่า POS Terminal คง behavior ของ Mobile status modal ในรูปแบบ Terminal detail panel และ refresh list หลังบันทึก
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Employee detail permission action parity

  • Audit ซ้ำ Mobile employee list/detail/profile และ transfer receive setting screens เทียบกับ POS Terminal EmployeeDetailForm
  • ปรับ POS Terminal employee detail action buttons ให้ปุ่มบันทึกสิทธิ์และรีเซ็ตรหัสผ่านผู้ใช้อื่นถูก disabled เมื่อ user ปัจจุบันไม่มีสิทธิ์จัดการผู้ใช้ ตรงกับ disabled action behavior ของ Mobile
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ employee list/detail loading, permission flag payloads, reset-password salt request, own-password reset flow, transfer receive branch/warehouse permission loading, และ create/update warehouse permission endpoints
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Product detail add-to-order permission parity

  • Audit ซ้ำ Mobile product list/detail behavior เทียบกับ POS Terminal product split-panel detail
  • ปรับ POS Terminal product detail ให้ต่อ action เพิ่มเข้าใบสั่งขายเฉพาะเมื่อ user ปัจจุบันมีสิทธิ์สร้างใบสั่งขาย ตรงกับ Mobile create-order permission boundary ที่ใช้กับ product-to-order flows
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ inventory list loading, tabs ทั้งหมด/ติดจอง, product detail loading, step-price display, weight-based validation, และ order-item payload fields
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer address management permission parity

  • Audit ซ้ำ Mobile customer address GPS request management screens เทียบกับ POS Terminal customerAddressManagement
  • ปรับ POS Terminal customer-management menu permissions ให้แผนก 14 และ 30 เปิด customer management และ customer address management flows ได้ ตรงกับ Mobile getCustomerManagementAccess
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ GPS request list loading, detail loading, pending-only approve/reject actions, read-only old/new coordinate maps, และ address-lat-lng/:id/approve|reject endpoints
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer activation request parity audit

  • Audit ซ้ำ Mobile customer request mode เทียบกับ POS Terminal CustomerActivationDetailForm
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ request-list loading ด้วย isRequest=1, detail loading ผ่าน getCustomerSapById, approve/reject endpoints ด้วย customerCode, permission แผนก [2, 4, 7, 16, 29] plus admin, confirmation prompts, success/error feedback, และกลับสู่ list หลังจัดการคำขอสำเร็จ
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Docs updated:
    • governance/change-log

Customer detail action permission parity

  • Audit ซ้ำ Mobile customer detail permissions, address actions, status requests, GPS update requests, default shipping address updates, call logging, edit entry, และ customer-to-document creation actions เทียบกับ POS Terminal CustomerDetailForm
  • ปรับ POS Terminal customer-detail document action permission ให้แผนก 20 ไม่เห็นปุ่มสร้าง sales order, booking price, และ borrow จาก customer detail panel แล้ว ตรงกับ Mobile customer detail ที่ใช้ getSalesOrderAccess().canCreateSalesOrder และไม่มีแผนก 20 ในจุดนี้
  • คง Mobile Home shortcut/list create behavior ที่กว้างกว่าไว้แยกจาก customer-detail actions
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

ขนส่ง trip and payment action parity audit

  • Audit ซ้ำ Mobile TransportDetailScreen, transport helpers, และ transport service calls เทียบกับ POS Terminal TransportDetailForm และ TransportDetailHelpers
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ transport edit ownership, finalize-delivery permission, sort-planner ownership guard, start-trip guard, finalized-delivery requirement, mileage validation, startTransport payload พร้อม customer shipping amounts, SAP-error feedback, finish-trip guard, bank/gas completion guard, และ finish mileage validation
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ customer payment modal state, cash/transfer/other/shipping payment types, payment validation, QR generation, photo/slip/signature uploads, payTransport payload พร้อม current coordinates, customer status update, transport shipping create/retry/retry-cancel/delete actions, และ deposit/expense bill contexts ที่ update flagBank/flagGas
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Docs updated:
    • governance/change-log

Shipping action permission parity audit

  • Audit ซ้ำ Mobile shipping list/detail permission helpers เทียบกับ POS Terminal shipping route list/detail helpers
  • ยืนยันว่า POS Terminal ตรงกับ Mobile shipping detail action permissions สำหรับ finalize/create-route detail actions, accept work, dock/loaded confirmation, assignment, B1 submission, product checking, invoice add/delete, และ invoice cancel request guards
  • ยืนยันว่า POS Terminal คง list-pane create entry ให้ map กับ Mobile Home shipping shortcut permission ส่วน detail finalize permissions ตรงกับ Mobile ShippingDetail helper behavior
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Docs updated:
    • governance/change-log

Deposit create permission parity

  • Audit ซ้ำ Mobile Home CAN_CREATE_DEPOSIT shortcut permissions เทียบกับ POS Terminal deposit list create gate
  • ปรับ POS Terminal deposit create permission ให้แผนก 21 สร้าง deposit drafts จาก Terminal list pane ได้ ตรงกับ Mobile deposit shortcut behavior
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer document and borrow create permission parity

  • Audit ซ้ำ Mobile Home CAN_CREATE_ORDER shortcut permissions เทียบกับ POS Terminal customer document และ borrow create gates
  • ปรับ POS Terminal create-shortcut/list behavior ให้แผนก 20 ใช้ sales order, booking price, และ borrow create flows ได้ในจุดที่ Terminal map กับ Mobile Home shortcut behavior
  • ปรับ POS Terminal borrow list create permission ให้แผนก 20 สร้าง borrow documents จาก Terminal list pane ได้ ตรงกับ Mobile borrow shortcut behavior
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Mobile route and home shortcut coverage audit

  • Audit ซ้ำ Mobile RootNavigator route coverage และ Home shortcut navigation เทียบกับ POS Terminal single-Home split-panel navigation model
  • ยืนยันว่า Mobile list/detail routes สำหรับ sales order, order review/payment, booking price, borrow, invoice, shipping route, storefront, transport, vehicle, stock documents, deposit, expense bill, credit note, product, customer, customer management, customer address management, customer activation, และ employee flows ถูกแทนด้วย POS Terminal menu keys, split-list loaders, และ detail forms แล้ว
  • ยืนยันว่า Mobile standalone routes สำหรับ branch settings, notifications, print demo, และ employee profile ถูกแทนด้วย POS Terminal Home settings actions/modals และ employee detail profile opening แล้ว
  • ยืนยันว่า Mobile Home shortcut routes ถูกแทนใน Terminal ผ่าน list-pane create actions และ customer picker flows สำหรับ sales order, booking price, borrow, shipping route, transport, และ deposit drafts
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Docs updated:
    • governance/change-log

Mobile service export surface parity audit

  • Audit ซ้ำ Mobile และ POS Terminal service export surfaces ใน apps/mobile/src/services และ apps/pos-terminal/src/services โดย resolve Terminal export * compatibility aliases ก่อนเทียบ
  • ยืนยันว่า POS Terminal ไม่มี Mobile service export ที่ขาดแล้วหลัง resolve goodsReceipt.ts -> goodsReceipts.ts, transferIn.ts -> transferIns.ts, transferOut.ts -> transferOuts.ts, และ user.ts/users.ts service boundaries
  • ยืนยันว่า service export differences ที่เหลือเป็น Terminal-specific helpers เช่น split-list loaders, Terminal product list helpers, และ Terminal delivery/status helpers ไม่ใช่ Mobile APIs ที่ Terminal ขาด
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Docs updated:
    • governance/change-log

Shared address and dummy utility parity audit

  • Audit ซ้ำ current Mobile shared utility changes สำหรับ dbAddress และ buildDummyProducts เทียบกับ POS Terminal customer address forms และ stock document product pickers
  • ยืนยันว่า POS Terminal import dbAddress และ buildDummyProducts จาก @bsr/utils แล้ว ตรงกับ shared boundary ใหม่ของ Mobile และไม่เก็บ local copy ซ้ำ
  • ยืนยันว่า POS Terminal customer และ customer-management address search mapping ใช้ null-safe string conversion สำหรับ district, amphoe, และ province เหมือน Mobile ปัจจุบัน
  • ยืนยันว่า POS Terminal goods receipt, transfer-in, และ transfer-warehouse product pickers ใช้ shared dummy-product builder เดียวกัน ทำให้ dummy item data ใน Terminal stock flows ตรงกับ Mobile
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Docs updated:
    • governance/change-log

Invoice list, manual payment, and detail parity audit

  • Audit ซ้ำ Mobile InvoiceListScreen, InvoiceDetailScreen, และ invoice service behavior เทียบกับ POS Terminal invoice list/detail panels
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ invoice list/detail, pending-B1 query, sales summary, send-to-B1, retry, cancel approve/reject/cancel service endpoints, และ query shapes
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ all/pending-B1 tabs, manual payment mode, selectable invoice guards (refKey, cancel request, confirmed order), owner/override B1 permissions, date guard, summary modal, cancel approval modal, detail refresh, duplicate order from invoice, และ invoice-to-credit-note action ใน split-panel layout
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Notification and FCM token parity audit

  • Audit ซ้ำ Mobile notification service และ login FCM refresh behavior เทียบกับ POS Terminal notification handling
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ Firebase Messaging background handler registration, notification permission request, remote-message device registration, FCM token retrieval, foreground notification handler, token refresh, delete-and-refresh token helper, app-start permission request, และ login-time FCM token patching ลง user record
  • ยืนยันว่า POS Terminal คง token refresh behavior เดียวกัน พร้อมแสดง token ใน Terminal settings/home สำหรับตรวจสอบอุปกรณ์
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Login and user-selection parity audit

  • Audit ซ้ำ Mobile LoginScreen เทียบกับ POS Terminal UserSelectionScreen
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ POST /login, alcohol-check verification ก่อน login, auth token persistence, user persistence, login-date persistence, FCM token refresh, permission flag patching ผ่าน user update, missing-required-values password reset fallback, reset salt lookup, และ new password submission
  • ยืนยันว่า POS Terminal คง login data flow เดียวกันใน Terminal-specific user-selection layout โดยโหลด branch sale persons ก่อน, รองรับ selected-user password login, และยังมี direct employee-code login path สำหรับผู้ใช้ที่ไม่อยู่ใน branch sale-person list
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Required app update gate parity audit

  • Audit ซ้ำ Mobile login app-version/update gate เทียบกับ POS Terminal user-selection login flow
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ native app-version lookup, version label display, Firestore version/vapp required-update check, platform-specific remote version fields, forced update modal behavior, และ non-blocking warning behavior เมื่อ version check ล้มเหลว
  • ยืนยันว่า POS Terminal แสดง required-update modal เดียวกันบน login/user-selection surface และ refresh update check เมื่อผู้ใช้ refresh user-selection screen
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Branch selection parity audit

  • Audit ซ้ำ Mobile BranchScreen เทียบกับ POS Terminal BranchScreen และ app-level branch settings flow
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับการโหลดสาขาทั้งหมดด้วย fallback user 999999, โหลดสาขาของ current user, เลือกสาขาหลัก, โหลด all warehouses และ sub-warehouses, กรอง main warehouse code ออกจาก sub-warehouse choices, ใส่ selected main warehouse กลับเข้ารายการเมื่อ current user มีสิทธิ์, save selected warehouse payload, clear/save tax data by branch, และถือว่า tax lookup เป็น best-effort หลัง navigation
  • ยืนยันว่า POS Terminal คง branch-required และ branch-settings navigation behavior เดียวกันผ่าน app-level onBranchSelected callbacks โดยยังมี Terminal-specific theme/settings controls
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Order list and review bulk-payment parity audit

  • Audit ซ้ำ Mobile OrderListScreen default mode และ shipping-review mode เทียบกับ POS Terminal salesOrder และ salesOrderReview split lists
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ order search, shipping-type filter, status filter, user-only filter behavior, sales-order create permission, retry-pending action, delete permission overrides, และ list pagination/refresh behavior
  • ยืนยันว่า POS Terminal salesOrderReview ตรงกับ Mobile review mode โดยบังคับ WAITING_PAYMENT, บังคับ current user's orders, กรอง order ที่มี shipment ออก, รองรับ selected-order bulk clear/payment, และ POST order ที่เลือกแต่ละใบไป /payment ด้วย cash/transfer payload shape และ partial-failure messaging เดียวกัน
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Order payment flow parity audit

  • Audit ซ้ำ Mobile OrderPaymentScreen, OrderListScreen bulk payment, และ order payment utilities เทียบกับ POS Terminal OrderDetailForm payment section และ sales-order bulk-payment modal
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับการโหลด order detail และ related invoices, การสร้าง invoice ที่ยังไม่มีใบก่อนชำระ, active/canceled invoice filtering, duplicate invoice-prefix guard, cash/transfer/QR payment channels, cash-received validation, transfer slip upload ผ่าน orderUploadImage, QR generation/share/check ผ่าน generatePaymentQrCode, invoice retry, invoice print, และ POST /payment payload shape
  • ยืนยันว่า POS Terminal คง payment behavior เดียวกันในรูปแบบ split-panel form แทน Mobile separate OrderPayment route และ refresh detail/list หลัง payment หรือ QR confirmation
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Transfer warehouse submit and B1 close parity

  • Audit ซ้ำ Mobile TransferWarehouseListScreen และ TransferWarehouseDetailScreen เทียบกับ POS Terminal transferWarehouse split-list/detail form
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ transfer-branches list/detail/create/update/delete endpoints, warehouse/sub-warehouse picker context, item create/update/delete endpoints, product and batch selection, send-to-B1 endpoint, และ transfer-branch payload shape
  • ปรับ POS Terminal Transfer Warehouse success handling ให้ header save และ send-to-B1 success confirmation ปิด split-panel detail ที่เปิดอยู่ ตรงกับ Mobile navigation.goBack() behavior โดยยังคง onSaved path เดิมที่ใช้ patch detail ของ header ที่สร้างใหม่
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Transfer in submit close parity

  • Audit ซ้ำ Mobile TransferInListScreen และ TransferInDetailScreen เทียบกับ POS Terminal transferIn split-list/detail form
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ transfers-in list endpoint, transfer-in submit endpoint, warehouse context tabs, product picker, product-lot picker, duplicate batch guard, pending quantity calculation, quantity validation, และ transfer-in payload shape
  • ปรับ POS Terminal Transfer In submit success handling ให้ปิด split-panel detail ที่เปิดอยู่หลังผู้ใช้ยืนยัน success ตรงกับ Mobile navigation.replace('TransferInList') behavior และกันการ submit ซ้ำจาก transfer detail เดิมที่ยังค้างอยู่
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Transfer out submit close parity

  • Audit ซ้ำ Mobile TransferOutListScreen และ TransferOutDetailScreen เทียบกับ POS Terminal transferOut split-list/detail form
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ transfers-out list endpoint, transfer-out submit endpoint, source-warehouse context, transfer list dedupe, pending quantity calculation, product-lot picker, duplicate batch guard, pending quantity validation, และ transfer-out payload shape
  • ปรับ POS Terminal Transfer Out submit success handling ให้ปิด split-panel detail ที่เปิดอยู่หลังผู้ใช้ยืนยัน success ตรงกับ Mobile navigation.replace('TransferOutList') behavior และกันการ submit ซ้ำจาก transfer detail เดิมที่ยังค้างอยู่
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Goods receipt submit close parity

  • Audit ซ้ำ Mobile GoodsReceiptListScreen และ GoodsReceiptDetailScreen เทียบกับ POS Terminal goodsReceipt split-list/detail form
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับ goods-receipt-po list endpoint, stock-in submit endpoint, company-filtered product picker, dummy product fallback, line quantity validation, batch quantity validation, duplicate batch-number guard, และ stock-in payload shape
  • ปรับ POS Terminal Goods Receipt submit success handling ให้ปิด split-panel detail ที่เปิดอยู่หลังผู้ใช้ยืนยัน success ตรงกับ Mobile navigation.goBack() behavior และกันการ submit ซ้ำจาก receipt detail เดิมที่ยังค้างอยู่
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Product list and detail parity audit

  • Audit ซ้ำ Mobile ProductListScreen และ ProductDetailScreen เทียบกับ POS Terminal product split-list/detail panel
  • ยืนยันว่า POS Terminal คง branch inventory context, Firestore inventory source, product search, price-positive filtering, duplicate item-code filtering, และ booking stock tab behavior เดียวกันผ่าน getProductInventoryList
  • ยืนยันว่า Terminal แสดง product tabs ทั้งหมด/ติดจอง ใน list controls และ reset pagination/detail selection เมื่อเปลี่ยน tab แล้ว
  • ยืนยันว่า Terminal product detail โหลด warehouse-scoped inventory detail ด้วย itemCode, ดึง step prices เมื่อมี stepPriceFlag, แสดง stock/booking/available/price และ product metadata, และรองรับการเพิ่มสินค้าเข้า sales order ใหม่ผ่าน customer-picker flow ของ Terminal
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer detail address and GPS request parity audit

  • Audit ซ้ำ Mobile CustomerDetailScreen address management และ GPS request behavior เทียบกับ POS Terminal customer detail split-panel form
  • ยืนยันว่า POS Terminal ตรงกับ Mobile สำหรับการสร้าง customer address ผ่าน createCustomerAddressByPass, shipping-route validation สำหรับลูกค้าสายส่ง, การตั้ง default ShipTo address, การเปิด map/navigation actions, และการ refresh detail หลัง address mutations
  • ยืนยันว่า POS Terminal ส่ง customer address GPS requests ผ่าน customer-draft/address-lat-lng endpoint เดียวกันด้วย current device coordinates และ note text ตรงกับ request queue behavior ของ Mobile
  • ยืนยันว่า Terminal ยังคง POS-specific map picker สำหรับเพิ่มพิกัดที่อยู่แบบ manual โดยไม่เปลี่ยน Mobile request-GPS flow สำหรับที่อยู่เดิม
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer activation request parity audit

  • Audit ซ้ำ Mobile customer request mode (CustomerList/CustomerDetail) เทียบกับ POS Terminal customerActivation split-list/detail panel
  • ยืนยันว่า POS Terminal โหลดเฉพาะ customer activation requests ด้วย isRequest=1 พร้อมคง search, shipping-type, และ route filters ผ่าน shared customer list endpoint
  • ยืนยันว่า POS Terminal ใช้ /customers/:customerCode/approve และ /customers/:customerCode/reject endpoints ชุดเดียวกับ Mobile พร้อม request-permission department guard เดียวกัน
  • ยืนยันว่า Terminal refresh activation request list และปิด detail panel หลัง approve/reject สำเร็จ ตรงกับ Mobile navigation.goBack() behavior ในรูปแบบ split-panel ของ Terminal
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer draft decision refresh parity

  • Audit ซ้ำ Mobile customer draft detail/edit approval behavior เทียบกับ POS Terminal customerManagement split-panel detail form
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ customer draft endpoints, การโหลด draft detail พร้อม addresses/branches, create/update draft payloads, child address/branch creation, auto-create ShipTo, branch delete guard, และ approve/reject endpoints
  • ปรับ POS Terminal customer draft approve/reject handling ให้ refresh open detail panel หลังตัดสินใจพร้อมกับ refresh list; ทำให้ state ของ split-panel ตรงกับ Mobile ที่ออกจาก detail screen หลัง approve/reject
  • เพิ่ม Terminal-only decision guard ให้ซ่อนปุ่ม approve/reject เมื่อ draft ที่ refresh แล้วมี marker ว่า approved หรือ rejected เพื่อกันการกดตัดสินใจซ้ำจาก split panel ที่ยังเปิดอยู่
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer address GPS request parity audit

  • Audit ซ้ำ Mobile CustomerManagementAddressListScreen และ CustomerManagementAddressDetailScreen เทียบกับ POS Terminal customerAddressManagement split-list/detail panel
  • ยืนยันว่า POS Terminal ใช้ customer-draft/address-lat-lng list/detail endpoints และ approve/reject endpoints ชุดเดียวกับ Mobile
  • ยืนยันว่าสี list card ตรงกับ Mobile สำหรับคำขอที่อนุมัติ/ไม่อนุมัติ/รอดำเนินการ รวมถึงโทนเขียวของ approved และโทนแดงของ rejected
  • ยืนยันว่า Terminal detail view คง old/new coordinate maps, request metadata, pending-only approve/reject actions, confirmation prompts, success/error alerts, และ refresh-after-decision behavior ในรูปแบบ split-panel ของ Terminal
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Employee transfer receive setting parity audit

  • Audit ซ้ำ Mobile EmployeeTransferReceiveSettingScreen เทียบกับ POS Terminal employee detail warehouse-permission section
  • ยืนยันว่า POS Terminal ใช้ /users/:userId/branches/:branchId/warehouses get/create/update endpoints และ data sources getBranchesByUserCode, getWarehouses, getWarehousesSub ชุดเดียวกับ Mobile
  • ยืนยันว่า branch selection, การรวม branch ของ selected user, sub-warehouse filtering, optimistic permission toggles, duplicate-pending guards, และ reload-after-save behavior ตรงกับ Mobile โดยคง UI แบบฝังใน employee detail panel ของ Terminal
  • ยืนยันว่า Terminal ยัง guard สิทธิ์จัดการผู้ใช้ก่อนเปิดหรือเปลี่ยน warehouse permission แล้ว; รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log
  • Audit ซ้ำ Mobile PrintDemoScreen และ printing/print helpers เทียบกับ POS Terminal settings-menu print demo action และ printDemoSample
  • ยืนยันว่า POS Terminal ส่ง sample HTML ขนาด 16K (184mm x 260mm) ผ่าน react-native-print ด้วยรายการสินค้าตัวอย่างและขนาดหน้ากระดาษตรงกับ Mobile
  • ยืนยันว่า Terminal เปิด demo ผ่าน Home settings menu พร้อม loading และ error alert ตามรูปแบบ Terminal ตรงกับ behavior ของ Mobile dedicated PrintDemo route ในรูปแบบ shell ของ Terminal
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Notification screen and token modal parity audit

  • Audit ซ้ำ Mobile NotificationsScreen และ notification service helpers เทียบกับ POS Terminal Home notification settings modal และ services/notifications
  • ยืนยันว่า POS Terminal ใช้ Firebase Messaging permission request, foreground/background handler registration, token refresh, และ clear-and-refresh token helpers ชุดเดียวกับ Mobile
  • ยืนยันว่า Terminal เปิดดู token และสั่ง clearAndRefreshToken ได้ผ่าน Home settings notification modal ตรงกับ behavior ของ Mobile notification screen ในรูปแบบ settings-modal ของ Terminal
  • ยืนยันว่า Terminal refresh FCM token ระหว่าง user login และบันทึกกลับผ่าน user update payload แล้ว; รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Credit note detail invoice item source parity

  • Audit ซ้ำ Mobile credit-note detail item-add flow เทียบกับ POS Terminal credit-note split-panel detail behavior
  • ปรับ POS Terminal persisted credit-note detail loading ให้โหลด invoice detail ที่ผูกอยู่เมื่อมี invoiceId และแนบ sourceInvoiceItems เข้า detail payload
  • ทำให้ add-item picker ใน Terminal ยังมีรายการสินค้าให้เลือกหลังเปิด credit note เดิมจาก list ตรงกับ Mobile ที่โหลด invoice detail สำหรับ existing credit note ก่อนเลือกรายการ invoice items
  • ยืนยันว่า Terminal detail flow เดิมตรงกับ Mobile แล้วสำหรับ reason guard, save status transition, B1 location/check validations, item qty/amount validation, lot update, image upload/delete endpoints, item delete, และ list refresh หลัง mutation
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Credit note list status color parity

  • Audit ซ้ำ Mobile credit-note list behavior เทียบกับ POS Terminal credit-note split-list behavior
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ /credit-notes list query, default return-only filter, status filter options, delete permission/disabled logic, delete confirmation, และ refresh หลัง delete
  • ปรับสี credit-note card ใน POS Terminal ให้ตรงกับ Mobile getCreditNoteCardColor mapping: NEW ใช้ draft cyan, WAITINGCN ใช้ waiting lime, APPROVED/APPROVE ใช้ approved purple, และ CANCELED fall through เป็น error orange
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Vehicle list and status parity audit

  • Audit ซ้ำ Mobile vehicle list/status modal behavior เทียบกับ POS Terminal vehicle split-list และ detail form
  • ยืนยันว่า POS Terminal ใช้ /vehicles list endpoint และ /vehicles/:licensePlate/vehicle-status update endpoint เดียวกับ Mobile
  • ยืนยันว่า status normalization, labels, card background/border/status colors, search/refresh behavior, status note editing, license-plate guard, และ list refresh หลัง save ตรงกับ Mobile vehicle behavior ปัจจุบัน; Terminal คง behavior เดียวกันในรูปแบบ split-panel form แทน modal ของ Mobile
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Deposit and expense bill detail parity audit

  • Audit ซ้ำ Mobile deposit detail และ expense bill detail screens เทียบกับ POS Terminal split-panel detail forms
  • ยืนยันว่า POS Terminal deposit detail ตรงกับ Mobile create/read behavior ปัจจุบันแล้วสำหรับ default branch/user context, company/cash/bank pickers, invoice multi-select total/notes behavior, slip-later date handling, save validation, deposit payload shape, และ transport-flow update
  • ยืนยันว่า POS Terminal expense bill detail ตรงกับ Mobile create/update behavior ปัจจุบันแล้วสำหรับ branch draft update context, accounting-only draft save guard, company/vehicle/partner pickers, vehicle mileage lookup, slip-later date handling, save validation, payload shape, และ transport-flow update
  • รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Deposit and expense bill list visual parity

  • Audit ซ้ำ Mobile deposit และ expense bill list actions เทียบกับ POS Terminal split-list behavior
  • ยืนยันว่า retry filters, retry/delete actions, action permissions, retry ownership checks, list refreshes, และ API list parameters ตรงกับ Mobile behavior ปัจจุบัน
  • ปรับสี border ของ POS Terminal deposit และ expense bill list card ให้ตรงกับ status tone ของ Mobile: deposit card ใช้สีเดียวกันทั้ง border/background ตามสถานะ และ expense bill card ใช้ borderData สำหรับ draft/confirmed card กับ borderOther สำหรับ retry-error card
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Borrow fish list and action parity audit

  • Audit ซ้ำ Mobile borrow-fish list card helpers และ detail action guards เทียบกับ POS Terminal borrow split-list/detail behavior
  • ยืนยันว่า POS Terminal ตรงกับ Mobile borrow behavior ปัจจุบันแล้วสำหรับสี list card, status labels, การแสดงลูกค้า/ผู้เบิก/ผู้อนุมัติ, cancel permissions, B1 processing permissions, accept action, complete/retry action, และ confirmation messages; รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Booking price server-date card parity

  • Audit ซ้ำสี booking-price list card ของ Mobile เทียบกับ POS Terminal booking-price split-list cards
  • ปรับ POS Terminal booking-price card color selection ให้ใช้ server date label จาก Home ตอนตัดสินว่า DRAFT booking price ถูกสร้างวันนี้หรือไม่ ให้ตรงกับพฤติกรรม serverDateLabel ของ Mobile และลดปัญหาวันจากนาฬิกาเครื่องไม่ตรง server
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Sales order received card color parity

  • Audit ซ้ำสี sales-order list card status ของ Mobile เทียบกับ POS Terminal split-list order cards
  • ปรับ POS Terminal sales-order card สถานะ RECEIVED ให้ใช้สีเขียว received/confirmed แบบ Mobile แทนสีเหลืองเขียวของ NEW เพื่อแยก order ที่รับสินค้าแล้วออกจาก order ใหม่ใน list
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Invoice manual payment card tone parity

  • Audit ซ้ำสี invoice card ใน Mobile manual-payment mode เทียบกับ POS Terminal invoice split-list cards
  • ปรับ POS Terminal invoice card tone selection ให้ใช้สี manual-payment แบบ Mobile: invoice ที่เลือกแล้วยังเป็นสีเขียว, invoice สายส่งเงินสดเป็นสีเขียว, invoice สายส่งที่โอน/บิลเพย์เมนต์เป็นสีเหลือง, invoice สายส่งที่ไม่มี payment marker เป็นสีแดง, และ invoice หน้าร้านเป็นสีฟ้า
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Order payment invoice guard parity

  • Audit ซ้ำ Mobile order payment/current-source flow เทียบกับ POS Terminal order payment panel ครอบคลุม invoice creation, duplicate-invoice blocking, QR generation/share/check, invoice print/retry, slip upload, payment payload shape, และ benefit-discount handling
  • ปรับ POS Terminal payment opening ให้รัน invoice guard เทียบเท่า Mobile ก่อนโหลดหรือสร้าง invoice: การเลือก logistics สำหรับสาขาย่อย, ยอดหลังหัก benefit ต้องมากกว่า 0, product code ซ้ำ, น้ำหนักสินค้าคุมน้ำหนัก, และ backend amount/weight recheck
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Invoice list and detail parity audit

  • Audit ซ้ำ Mobile invoice list/detail flow เทียบกับ POS Terminal ครอบคลุม default และ pending-B1 tabs, manual payment selection, dept-3 all-user manual payment loading, send-to-B1 guards, approve/reject cancel request handling, summary modal, invoice detail refresh, และ duplicate-order-from-invoice config
  • ยืนยันว่า POS Terminal ตรงกับ Mobile invoice behavior ปัจจุบันแล้ว โดยยังคง split-pane และ credit-note-from-invoice extensions เฉพาะ Terminal; รอบนี้ไม่ต้องแก้ runtime code เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Sales order shipping coordinate parity

  • Audit ซ้ำ Mobile sales-order detail flow เทียบกับ POS Terminal order detail ครอบคลุม order service query fields, item create/update/delete total persistence, shipping type metadata, invoice/payment opening, duplicate invoice blocking, payment validation, point/coupon/credit-note benefit flows, และ print actions
  • ปรับ POS Terminal order payment opening ให้ block ออเดอร์สายส่งเมื่อไม่มีที่อยู่จัดส่ง หรือที่อยู่จัดส่งที่เลือกไม่มี latitude/longitude ให้ตรงกับ Mobile recheck ก่อนเปิด invoice/payment
  • ใช้ missing-coordinate message เดียวกับ Mobile เพื่อให้ผู้ใช้งานรู้ว่าต้องเลือก/อัปเดตที่อยู่จัดส่งใหม่ก่อนดำเนินการต่อ
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Product inventory parity audit

  • Audit ซ้ำ Mobile product list/detail flow เทียบกับ POS Terminal ครอบคลุม branch product context, inventory sync, Firestore warehouse filters, item-code dedupe, search, booking-only tab, product card price/SAP/POS/booking metrics, detail stats, weight-based inputs, step-price display, และ add-to-sales-order behavior
  • ยืนยันว่า POS Terminal ตรงกับ Mobile product behavior ปัจจุบันแล้ว โดยยังคง split-pane pagination และ customer-picker add-to-sales-order flow ตามรูปแบบ Terminal; รอบนี้ไม่ต้องแก้ code เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Required app update parity audit

  • Audit ซ้ำ Mobile required app update flow เทียบกับ POS Terminal ครอบคลุม Firestore version/vapp lookup, platform-specific remote version fields, native app version code comparison, hook error handling, blocking update modal, login-screen coverage, และ authenticated Home/header coverage
  • ยืนยันว่า POS Terminal ตรงกับ Mobile required-update behavior ปัจจุบันแล้ว โดยยังคง user-selection และ Home surfaces แยกตามรูปแบบ Terminal; รอบนี้ไม่ต้องแก้ code เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Login alcohol gate parity audit

  • Audit ซ้ำ Mobile login alcohol-check gate เทียบกับ POS Terminal user selection login ครอบคลุม UAT bypass, required department codes, bypass employee codes, alcohol API timeout, failed-check messages, และการตรวจหลัง signIn แต่ก่อนบันทึก token/user session data
  • ย้าย POS Terminal alcohol-check constants ไปไว้ที่ apps/pos-terminal/src/constants/alcohol.ts ให้ตรง boundary ของ Mobile และลด future drift โดยคง runtime behavior เดิม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Booking price item delete totals parity

  • Audit ซ้ำ Mobile booking-price detail flow เทียบกับ POS Terminal ครอบคลุม list query warehouse-group filtering, created-day edit guard, owner/override permissions, item add/edit validation, item payload shape, delete behavior, และ convert-to-order flow
  • ปรับ POS Terminal booking-price item delete ให้ตรงกับ Mobile โดยลบ persisted item ด้วย item id, คำนวณและ persist booking totals ทันที, reload saved detail, และ clear dirty state หลังลบสำเร็จ
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Transfer warehouse batch validation parity

  • Audit ซ้ำ Mobile transfer-warehouse detail flow เทียบกับ POS Terminal ครอบคลุม warehouse selection, product inventory subscription, dummy products, item create/update/delete, batch loading ตาม source warehouse/company, save-header behavior, และ send-to-B1 guards
  • ปรับ POS Terminal transfer-warehouse batch selection ให้เปิด batch picker หลัง getProductLots สำเร็จเท่านั้น ให้ตรงกับ Mobile และไม่ปล่อย picker ว่างหลัง lot loading error
  • ปรับ POS Terminal transfer-warehouse item submit validation ให้ต้องมี Batch number จริงก่อนบันทึกรายการ ให้ตรงกับ Mobile selected-batch guard
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Transfer out batch picker parity

  • Audit ซ้ำ Mobile transfer-out detail flow เทียบกับ POS Terminal ครอบคลุม branch/user payload fields, lot loading ตาม item/warehouse/company, duplicate batch guard, pending quantity checks, available batch quantity checks, line completion validation, และ transfer-out payload shape
  • ปรับ POS Terminal transfer-out batch selection ให้เปิด batch picker หลัง getProductLots สำเร็จเท่านั้น ให้ตรงกับ Mobile และไม่ปล่อย picker ว่างค้างไว้เมื่อโหลด lot ไม่สำเร็จ
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Goods receipt batch-number validation parity

  • Audit ซ้ำ Mobile goods-receipt detail flow เทียบกับ POS Terminal ครอบคลุม product picker inventory subscription, shared dummy products, company filtering, duplicate product guard, quantity validation, generated batch codes, batch date fields, batch quantity totals, delete-new-line behavior, และ stock-in payload shape
  • ปรับ POS Terminal goods-receipt submit validation ให้ block Lot/Batch number ว่างก่อนส่ง stock-in payload ให้ตรงกับ Mobile batch editor guard โดยยังคงรูปแบบ inline batch editor ของ Terminal
  • ยืนยันว่า POS Terminal goods-receipt flow ปัจจุบันตรงกับ Mobile แล้วสำหรับ branch/user payload fields, batch date handling, duplicate-batch guard, และ list refresh หลัง save
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer address request parity audit

  • Audit ซ้ำ Mobile customer address GPS request list/detail เทียบกับ POS Terminal customer-address-management split list/detail ครอบคลุม permission entry, in-flight list loading guard, search, pagination, dedupe, card status tones, detail maps, approve/reject confirmations, และ post-decision refresh
  • Audit ซ้ำ Mobile customer detail address actions เทียบกับ POS Terminal customer detail ครอบคลุม open-map guard, default shipping address guard, current-location permission, GPS update request payload, note handling, และ map-picker coordinate fallback สำหรับเครื่อง terminal ที่ไม่มี GPS
  • ยืนยันว่า POS Terminal ตรงกับ Mobile customer address request behavior ปัจจุบันแล้ว โดยยังคง terminal-native split-pane และ map-picker UX; รอบนี้ไม่ต้องแก้ code เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Branch and notification settings parity audit

  • Audit ซ้ำ Mobile branch setup เทียบกับ POS Terminal branch settings ครอบคลุม fallback/user branch loading, main-branch selection, sub-warehouse filtering, main warehouse insertion เมื่อ user มีสิทธิ์สาขานั้น, selected-warehouse payload shape, best-effort tax caching, retry state, และ back-to-branch behavior
  • Audit ซ้ำ Mobile notification screen/service เทียบกับ POS Terminal settings modal และ notification service ครอบคลุม foreground/background handler registration, FCM token refresh, clear-and-refresh token action, token display, และ startup/login notification hooks
  • ยืนยันว่า POS Terminal ตรงกับ Mobile branch และ notification contracts ปัจจุบันแล้ว โดยยังคง terminal-native theme/settings UI; รอบนี้ไม่ต้องแก้ code เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Employee profile password control parity

  • Audit ซ้ำ Mobile order payment current-source behavior เทียบกับ POS Terminal ครอบคลุม duplicate-invoice blocking, QR generation/share/check, invoice print, retry invoice, cash validation, transfer slip upload, และ payment payload shape; รอบนี้ไม่ต้องแก้ code เพิ่มสำหรับ payment
  • Audit ซ้ำ Mobile employee profile password flow เทียบกับ POS Terminal EmployeeDetailForm ครอบคลุม own-profile access, reset salt request, password validation, successful password-change logout, และ reset/password fields
  • ปรับ POS Terminal employee profile password reset และ save buttons ให้ disabled เมื่อ current user ไม่มีสิทธิ์เปลี่ยนรหัสผ่านของ employee นั้น ให้ตรงกับ Mobile password controls แทนการปล่อยให้กดแล้วค่อยขึ้น error อย่างเดียว
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Invoice duplicate confirm parity

  • Audit ซ้ำ Mobile invoice detail duplicate-order flow เทียบกับ POS Terminal ครอบคลุม sales-order permission gating, main-branch direct duplicate behavior, non-main branch vehicleRelease/documentMove modal, และ duplicate order payload handoff
  • ปรับ POS Terminal invoice duplicate action ให้แสดง confirmation prompt แบบ Mobile ก่อนเปิดใบสั่งขายซ้ำหรือเปิด non-main branch configuration modal
  • ยืนยันว่า duplicate configuration modal และ payload options ปัจจุบันของ POS Terminal ตรงกับ selection ใน Mobile InvoiceDuplicateConfigModal แล้ว
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Storefront lot/batch fallback parity

  • Audit ซ้ำ Mobile storefront list/detail flow และ helpers เทียบกับ POS Terminal ครอบคลุม storefront list filters, invoice dedupe, accept prompt, edit permissions, cancel guard, lot/batch auto-selection, pending quantity validation, B1 submit payload, และ cancel-note validation
  • ปรับ POS Terminal storefront item press fallback ให้กรณีโหลด Lot/Batch ไม่สำเร็จแสดง fallback ไม่สามารถโหลดรายการ Lot/Batch ได้ เหมือน Mobile และไม่เปิด batch editor ต่อด้วยข้อมูล lot ที่ไม่ครบ
  • ยืนยันว่า helper permissions, submit/cancel guards, และ single-lot auto-fill behavior ของ POS Terminal ปัจจุบันตรงกับ Mobile แล้ว
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Borrow fish parity audit

  • Audit ซ้ำ Mobile borrow-fish list/detail flow เทียบกับ POS Terminal ครอบคลุม list pagination, search/clear, cancel permissions, customer-based draft creation, borrow type selection, remark editing, product picker behavior, stock validation, limit 3 รายการ/3 ชิ้น, item edit/delete, confirm, accept, complete/retry, และ print action แยก main/sub-branch
  • ยืนยันว่า POS Terminal mirror Mobile แล้วสำหรับ borrow payload, borrow-item payload, B1 processing permissions, owner-only draft editing, failed sub-borrow retry behavior, และ print guard เมื่อยังไม่มีรายการสินค้า
  • ไม่ต้องแก้ code เพิ่มใน pass นี้
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Credit note warehouse check parity

  • Audit ซ้ำ Mobile credit-note list/detail flow เทียบกับ POS Terminal ครอบคลุม return-only/status filters, delete permissions, draft-from-invoice setup, reason/item editing, image upload/delete, lot selection, และ B1 send guards
  • เพิ่ม warehouse-check controls ใน POS Terminal สำหรับ Q1, Q2, Q3, และอุณหภูมิ เพื่อให้ผู้ใช้ฝั่งคลังกรอก inspection fields ชุดเดียวกับ Mobile ก่อนส่งใบลดหนี้คืนสินค้าเข้า B1 ได้
  • คง controls เป็น read-only เมื่อใบลดหนี้อยู่สถานะ received แล้ว ให้ตรงกับ Mobile ที่ปิด inspection fields หลังจบ B1
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Deposit and expense bill parity audit

  • Audit ซ้ำ Mobile deposit list/detail flow เทียบกับ POS Terminal ครอบคลุม list pagination, search/clear, retry-only filter, delete/retry actions, create validation, invoice picker filters, selected-invoice amount/notes behavior, send-slip-later date handling, transport deposit context, และ deposit payload shape
  • Audit ซ้ำ Mobile expense bill list/detail flow เทียบกับ POS Terminal ครอบคลุม list pagination, search/clear, card tones, delete/retry actions, draft branchId = 0 update flow, accounting-only update guard, editDeliveryDate permission, vehicle search/pagination, mileage lookup, gas partner picker, send-slip-later date handling, transport bill context, และ bill payload shape
  • ยืนยันว่า POS Terminal implementation ปัจจุบันตรงกับ Mobile behavior สำหรับ deposit และ expense-bill path ที่ตรวจในรอบนี้แล้ว จึงไม่ต้องแก้ code เพิ่มใน pass นี้
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Vehicle status parity

  • Audit ซ้ำ Mobile vehicle list, status options, status colors, dedupe behavior, search, refresh, และ PATCH /vehicles/:licensePlate/vehicle-status flow เทียบกับ POS Terminal
  • ยืนยันว่า POS Terminal ใช้ vehicle endpoint, status normalization, license-plate dedupe, card status tones, และ status payload shape เดียวกับ Mobile แล้ว
  • ปรับ POS Terminal vehicle detail state ให้ reset status และ note จากรถที่เลือกทุกครั้งเมื่อ license plate/detail เปลี่ยน เพื่อให้ตรงกับ Mobile ที่ initialize status modal ใหม่ทุกครั้งที่กดรถ
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

ขนส่ง route planner parity

  • Audit ซ้ำ Mobile transport route planner sorting, Google route optimization, และ save flow เทียบกับ POS Terminal
  • ปรับ POS Terminal route optimization ให้สร้าง nextSortedCustomers แบบเดียวกับ Mobile และ block completion เมื่อไม่มี customer code เหลือหลัง optimize
  • ยืนยันว่า Terminal route planner ยังใช้ current-GPS origin, customer GPS filtering, 26-point Google Routes limit, no-GPS error, clear/save confirmations, และ save payload order ตรงกับ Mobile
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

ขนส่ง GPS address parity

  • Audit ซ้ำ Mobile transport customer GPS address loading, address selection, และ map navigation เทียบกับ POS Terminal
  • ปรับ POS Terminal ให้ block GPS address loading เมื่อ customer code หาย, แสดง no-address error แบบ Mobile เมื่อลูกค้าไม่มี address ให้เลือก, และแสดง missing customer/address error แบบ Mobile เมื่อบันทึก GPS ต่อไม่ได้
  • เพิ่ม navigation error handling แบบ Mobile เพื่อให้ Terminal แจ้ง error เมื่อเปิดแผนที่ไม่ได้ แทนการปล่อย exception หลุด
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

ขนส่ง QR and attachment parity

  • Audit ซ้ำ Mobile transport QR generation และ payment attachment upload flow เทียบกับ POS Terminal
  • ปรับ POS Terminal transport QR generation ให้ validate required context ก่อนขอ QR data, ส่ง transportId, และแนบ customer latitude/longitude ref3 ให้ตรงกับ Mobile
  • เพิ่ม warehouse-group guard แบบ Mobile ก่อนอัปโหลด transport payment photos, slips, และ signatures เพื่อให้ Terminal แสดง error กรณีไม่พบข้อมูลคลังเหมือนกัน แทนการส่ง upload metadata ที่ไม่ครบ
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

ขนส่ง payment modal reset parity

  • Audit ซ้ำ Mobile transport customer payment modal initialization เทียบกับ POS Terminal customer action modal
  • ปรับ POS Terminal ให้ reset partial-receive, not-receive, split-payment, photo, slip, signature, และ QR state ทุกครั้งที่เปิด customer payment modal ให้ตรงกับ Mobile เพื่อกัน payment attachments/flags จากลูกค้าก่อนหน้าค้าง
  • ยืนยันว่า Terminal payment UI และ submit payload ยังตรงกับ Mobile หลังรอบ payment validation parity
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

ขนส่ง payment validation parity

  • Audit ซ้ำ Mobile transport payment submit validation เทียบกับ POS Terminal transport payment validation
  • ปรับ POS Terminal payment validation ให้บังคับอัปโหลดรูปภาพทุกครั้งก่อน submit payment ให้ตรงกับ Mobile
  • เพิ่ม requirement ลายเซ็นลูกค้าแบบ Mobile สำหรับ transport payment ที่ไม่ใช่ transfer และ bill-payment
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

ขนส่ง add-shipping guard parity

  • Audit ซ้ำ Mobile transport add-shipping modal และ customer-card button guards เทียบกับ POS Terminal
  • ปรับ POS Terminal add-shipping entry points ให้เพิ่มได้เฉพาะเมื่อลูกค้ายังไม่ชำระเงิน และไม่มี shipping lines หรือ shipping line เดิมทุกแถวอยู่ในสถานะ pending cancel retry (b1CancelStatus === 0) ให้ตรงกับ Mobile
  • รีเซ็ตช่อง amount ของ Terminal add-shipping modal เป็นค่าว่างเมื่อเปิด modal ให้ตรงกับ Mobile แทนการ prefill จาก calculated shipping amount
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

ขนส่ง shipping retry action parity

  • Audit ซ้ำ Mobile transport customer shipping retry/cancel/delete actions เทียบกับ POS Terminal customer action modal
  • ปรับ POS Terminal shipping retry buttons ให้แสดงเฉพาะ B1 status 0 เหมือน Mobile แทนการแสดง retry เมื่อ status ว่างหรือไม่ใช่ 1
  • ปรับ Terminal shipping delete visibility ให้ใช้ paid-customer guard แบบ Mobile และซ่อนปุ่มลบเมื่อมี cancel-retry action pending
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Shipping route detail list search parity

  • Audit ซ้ำ Mobile shipping detail invoice/product local search เทียบกับ POS Terminal shipping-route detail lists
  • เพิ่ม local search ใน POS Terminal สำหรับ active invoice/product tab โดยใช้ searchable fields ชุดเดียวกับ Mobile: ลูกค้า invoice, เลข invoice, ผู้ขาย, ชื่อ/รหัสสินค้า, ชื่อลูกค้า, และ invoice allocation labels
  • ปรับ empty states ของ Terminal ให้แยกกรณีไม่พบผลค้นหากับรายการว่างจริง ให้ตรงกับ search behavior ของ Mobile
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Shipping route header action guard parity

  • Audit ซ้ำ Mobile shipping-route header actions สำหรับ accept, dock confirmation, loaded confirmation, และ co-picker assignment เทียบกับ POS Terminal
  • ปรับ POS Terminal header actions ให้ทุก action ถูก block เมื่อ delivery ยังไม่ถูกจัดขึ้นขนส่ง ให้ตรงกับ guard ของ Mobile แทนการ block เฉพาะ accept
  • ปรับ confirmation messages ของ Terminal ให้ตรงกับ Mobile และเพิ่ม success alert แบบ Mobile หลังลงชื่อร่วมจัดสินค้า
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Shipping route B1 status sync parity

  • Audit ซ้ำ Mobile shipping-route send-to-B1 flow เทียบกับ POS Terminal shipping-route B1 action
  • ปรับ POS Terminal shipping-route B1 send flow ให้ตรวจผลตอบกลับจาก B1, โหลด delivery detail ล่าสุด, แยก pending/failed invoices, และ patch delivery status เป็น DONE, SOME_DELIVERY_FAIL, หรือ PENDING_FOR_B1 ให้ตรงกับ Mobile
  • เพิ่ม success message แบบ Mobile สำหรับกรณีสำเร็จทั้งหมดและกรณีมีบาง invoice ผิดพลาด โดยยังคง split-panel refresh behavior ของ Terminal
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Shipping route invoice picker date parity

  • Audit ซ้ำ Mobile shipping-route invoice picker loading เทียบกับ POS Terminal available-invoice loader
  • ปรับ POS Terminal shipping-route available invoice date range ให้ใช้ local dayjs date สำหรับช่วง 180 วันเหมือน Mobile เพื่อเลี่ยง date drift จาก UTC toISOString() ใน timezone ไทย
  • ยืนยันว่า available invoice grouping, canceled-invoice filtering, existing-order exclusion, และ picker search fields ยังตรงกับ Mobile
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Shipping route invoice cancel-state parity

  • Audit ซ้ำ Mobile shipping detail invoice swipe actions เทียบกับ POS Terminal shipping-route invoice actions
  • ยืนยันว่า POS Terminal add/delete/cancel permission helpers, cancel request guards, และ send-to-B1 eligibility ยังตรงกับ Mobile
  • ปรับ POS Terminal shipping-route invoice swipe actions ให้แสดง disabled state ปฏิเสธ เมื่อคำขอยกเลิกถูก reject แล้ว ให้ตรงกับ Mobile แทนการซ่อนช่อง cancel
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Invoice manual payment list parity

  • Audit ซ้ำ Mobile invoice pending-B1/manual-payment loading เทียบกับ POS Terminal invoice split-list loading
  • ปรับ POS Terminal manual payment mode ให้ตัด invoice ที่ถูก canceled ออกจาก selectable pending-B1 list ให้ตรงกับ manual-payment fetch normalization ของ Mobile โดยไม่เปลี่ยนแท็บ pending-B1 ปกติ
  • คง manual-selection guards เดิมของ Terminal สำหรับ missing refKey, pending cancel requests, และ unpaid orders ให้ตรงกับ Mobile
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Sales order delete guard parity

  • Audit ซ้ำ Mobile sales-order retry/delete card actions เทียบกับ POS Terminal order list actions
  • ยืนยันว่า POS Terminal retry visibility และ permission handling ตรงกับกฎ owner, admin, และ override-user ของ Mobile สำหรับ pending/complete-invoice แล้ว
  • ปรับ POS Terminal sales-order delete flow ให้ draft owner ถูก block ทันทีเมื่อ order มี refKey แล้ว โดยใช้ข้อความ error กรณีสร้าง invoice แล้วแบบเดียวกับ Mobile และคงพฤติกรรม override delete เดิม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Duplicate invoice order payload parity

  • Audit ซ้ำ Mobile order duplicate-invoice creation flow เทียบกับ POS Terminal split-panel duplicate order creation flow
  • ปรับ POS Terminal duplicate invoice order payload ให้ส่ง U_BFP_Latitude และ U_BFP_Longitude จาก invoice ต้นทางเหมือน duplicate order payload ของ Mobile
  • ยืนยันว่า duplicate modal vehicleRelease/documentMove, item stock checks, step-price lookup, item creation, total recalculation, และ created-order detail loading ยังตรงกับ Mobile โดยคง in-panel progress flow ของ Terminal
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Invoice cancel approval parity audit

  • Audit ซ้ำ Mobile invoice cancel-request approval/rejection actions เทียบกับ POS Terminal invoice list swipe actions และ cancel modal behavior
  • ยืนยันว่า Terminal คง cancel action เฉพาะ default mode แบบ Mobile, owner/override-user gate, เงื่อนไขต้องมี pending cancel-note, guard ปิด action เมื่อ invoice ถูก cancel แล้ว, และ approve/reject endpoints พร้อม refresh list หลังดำเนินการ
  • ยืนยันว่า Terminal B1 send action ยัง block invoice ที่มี pending cancel request และคง paid-order/refKey guards แบบ Mobile; รอบ audit นี้ไม่ต้องแก้โค้ด
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Expense bill list identity parity

  • Audit ซ้ำ Mobile expense bill list/detail services และ retry/delete/create actions เทียบกับ POS Terminal expense bill split-list/detail behavior
  • ปรับ POS Terminal expense bill list loading ให้ dedupe rows ด้วย billId และ fallback เป็น billNo ให้ตรงกับ expense bill list normalization ของ Mobile โดยยังคง filter เฉพาะรายการที่มี billId
  • ใช้ expense bill identity handling ชุดเดียวกันทั้ง initial split-menu loading และ paged/search loading; พร้อมนำ deposit identity helper ที่มีอยู่ไปใช้กับ initial deposit split-menu loading ให้สอดคล้องกับรอบ deposit parity ก่อนหน้า
  • ยืนยันว่า expense bill retry visibility (RefKey หายและ branchId !== 0), delete action, endpoint params, transport-context save flow, และ draft branch color behavior ตรงกับ Mobile
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Deposit list and permission parity

  • Audit ซ้ำ Mobile deposit list/detail services และ retry/delete/create guards เทียบกับ POS Terminal deposit split-list/detail behavior
  • ปรับ POS Terminal deposit list loading ให้ dedupe rows ด้วย depositId และ fallback เป็น depositNo ให้ตรงกับ deposit list normalization ของ Mobile โดยยังคง filter เฉพาะรายการที่มี depositId
  • ปรับ permission สร้างรายการฝากเงินของ POS Terminal ให้ตรงกับ Mobile โดยเอา dept 21 ที่เกินออกจาก create gate
  • ยืนยันว่า retry ownership guard, delete departments, retry-only filter, deposit endpoint params, invoice selection total/notes behavior, และ transport deposit flow ตรงกับ Mobile
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Invoice duplicate order parity audit

  • Audit ซ้ำ Mobile invoice detail duplicate-order flow และ InvoiceDuplicateConfigModal เทียบกับ POS Terminal InvoicePanels duplicate-order behavior
  • ยืนยันว่า Terminal คง create-permission gate ของ Mobile, main-branch direct duplicate path, non-main branch modal ที่บังคับเลือก vehicleRelease/documentMove, option values (RELEASE/UNRELEASED, MOVE/UNMOVED), และปิดปุ่ม confirm จนกว่าจะเลือกครบทั้งสองค่า
  • ยืนยันว่า Terminal ส่ง duplicate config ที่เลือกเข้า created order payload โดยปรับ navigation flow ของ Mobile ให้เป็น Terminal split-panel order creation/progress flow; รอบ audit นี้ไม่ต้องแก้โค้ด
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Vehicle status parity audit

  • Audit ซ้ำ Mobile VehicleListScreen และ shared vehicle service behavior เทียบกับ POS Terminal vehicle split-list/detail behavior
  • ยืนยันว่า Terminal vehicle list ใช้ source getVehicles เดียวกัน, dedupe ด้วยทะเบียนรถ, normalize status (UNCHECKED/READY/NOT_READY), และ update endpoint PATCH /vehicles/:licensePlate/vehicle-status เหมือน Mobile
  • ยืนยันว่า Terminal คง status/note edit flow ของ Mobile แต่ปรับให้อยู่ใน Terminal split-panel detail form และ refresh list behavior เดิมของ Terminal; รอบ audit นี้ไม่ต้องแก้โค้ด
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Invoice list identity parity

  • Audit ซ้ำ Mobile invoice list default, pending B1, และ manual payment flows เทียบกับ POS Terminal invoice split-list/manual payment behavior
  • ยืนยันว่า Terminal manual payment mode ยังมี guard ตรง Mobile สำหรับ refKey ที่หาย, คำขอยกเลิกค้างอยู่, order ที่ยังไม่ชำระเงิน, B1 confirmation, selected-send validation, และ refresh หลังส่งข้อมูล
  • ปรับ POS Terminal invoice split-list loading ให้ต้องมี invoice identity และ dedupe rows ด้วย invoiceId/invoiceStorageId ให้ตรงกับ invoice list normalization ของ Mobile ทั้ง default, pending B1, และ manual payment modes
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Sales order review list dedupe parity

  • Audit ซ้ำ Mobile order shipping-review list และ bulk payment flow เทียบกับ POS Terminal salesOrderReview split-panel behavior
  • ยืนยันว่า Terminal bulk payment validation, การยิง payOrder ทีละใบ, partial failure messaging, selection clearing, และ refresh หลังชำระเงินตรงกับ Mobile
  • ปรับ POS Terminal order split-list loading ให้ dedupe normalized rows ด้วย orderId, ต่อด้วย orderStorageId, ต่อด้วย orderNo ให้ตรงกับ order list dedupe ของ Mobile ทั้งรายการใบสั่งขายปกติและ shipping-review list
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Shipping route list dedupe parity

  • Audit ซ้ำ Mobile shipping route list/detail helpers เทียบกับ POS Terminal shipping route split list/detail behavior
  • ปรับ POS Terminal shipping route list loading ให้กรอง record ที่ไม่มี deliveryId และ dedupe แถวด้วย deliveryId พร้อม fallback เป็น deliveryNo ให้ตรงกับ shipping list normalization ของ Mobile
  • ใช้ shipping route list dedupe ชุดเดียวกันทั้ง initial split-menu loading และ paged/search/status-filter loading
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Storefront split list parity

  • Audit ซ้ำ Mobile StorefrontListScreen, StorefrontDetailScreen, storefront detail helpers, และ storefront services เทียบกับ POS Terminal storefront split list/detail behavior
  • ยืนยันว่า storefront accept prompt, non-main accepted-user edit flow, Lot/Batch auto-select/manual validation, duplicate lot guard, submit/cancel validation, B1 stock-cut payload flow, และ Terminal split-panel refresh behavior ตรงกับ Mobile
  • ปรับ POS Terminal storefront split lists ให้ต้องมี refKey พร้อม invoiceId/invoiceStorageId ตาม valid-record filter ของ Mobile
  • เพิ่ม storefront list dedupe ด้วย invoiceId/invoiceStorageId และ fallback เป็น invoiceNo พร้อมเพิ่ม invoiceStorageId/invoiceNo เป็น normalized list id fallback สำหรับ Terminal refreshes
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Borrow fish parity audit

  • Audit ซ้ำ Mobile BorrowListScreen, BorrowDetailScreen, useBorrowProductFlow, และ borrow utilities/services เทียบกับ POS Terminal borrow split list/detail behavior
  • ยืนยันว่า borrow create/cancel/B1 permissions, list paging/search/dedupe, draft creation, customer/branch/user payload fallbacks, product duplicate edit flow, integer quantity validation, three-item/three-piece limits, stock checks, item payload shaping, และ confirm/accept/complete/retry actions ตรงกับ Mobile อยู่แล้ว
  • ยืนยันว่า Terminal ยังใช้ split-panel refresh behavior หลัง borrow mutations โดยคง semantic refresh ของ detail/list ตาม Mobile
  • รอบ audit นี้ไม่ต้องแก้โค้ด
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Transfer warehouse list dedupe parity

  • Audit ซ้ำ Mobile TransferWarehouseListScreen, TransferWarehouseDetailScreen, และ transfer-warehouse services เทียบกับ POS Terminal transfer-warehouse split list/detail behavior
  • ยืนยันว่า warehouse selection, product/batch picker flow, header creation before item save, item payload shaping, B1 preflight guard, และ Terminal split-panel refresh behavior ตรงกับ workflow ของ Mobile
  • ปรับ POS Terminal transfer-warehouse split data ให้ dedupe records ด้วย transferBranchId และ fallback เป็น transferBranchNo ตาม Mobile list behavior
  • เพิ่ม transferBranchNo เป็น normalized list item id fallback เพื่อให้ Terminal list refresh collapse duplicate transfer-warehouse rows ได้แม้ API ไม่ส่ง transferBranchId
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Transfer in batch editor parity

  • Audit ซ้ำ Mobile TransferInListScreen, TransferInDetailScreen, transfer-in helpers, และ transfer-in services เทียบกับ POS Terminal transfer-in list/detail behavior
  • ยืนยันว่า document dedupe, search fields, main/NF warehouse source handling, product company filtering, dummy-product auto batch behavior, duplicate product/batch guards, receive validation, remark handling, และ transfer-in payload shaping ตรงกับ Mobile โดยคง Terminal split-panel refresh behavior
  • ปรับ POS Terminal transfer-in Batch editor ให้ตรง Mobile โดยลบ controls แก้วันที่ Batch ออก ตอนแก้ Batch ของ transfer-in จึงแก้เฉพาะ quantity และคงวันที่เดิมจาก lot/data
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Transfer out batch editor parity

  • Audit ซ้ำ Mobile TransferOutListScreen, TransferOutDetailScreen, transfer-out helpers, และ transfer-out services เทียบกับ POS Terminal transfer-out list/detail behavior
  • ยืนยันว่า list search, duplicate document filtering, batch picker search, duplicate batch guard, pending quantity validation, submit validation, และ transfer-out payload shaping ตรงกับ Mobile อยู่แล้ว โดยคง Terminal split-panel refresh behavior
  • ปรับ POS Terminal transfer-out Batch editor ให้ตรง Mobile โดยลบ controls แก้วันที่ Batch ออก ตอนแก้ Batch ของ transfer-out จึงแก้เฉพาะ quantity และคงวันที่เดิมจาก lot/data
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Goods receipt batch default parity

  • Audit ซ้ำ Mobile GoodsReceiptListScreen, GoodsReceiptDetailScreen, goods-receipt helpers, และ goods-receipt services เทียบกับ POS Terminal goods-receipt list/detail behavior
  • ยืนยันว่า list search placeholders, duplicate document filtering, product company filtering, duplicate product guard, submit validation, stock-in payload shaping, และ Terminal duplicate-batch submit guard ตรงกับ Mobile behavior โดยคง Terminal inline batch editing
  • ปรับ POS Terminal new Batch/Lot rows ให้เริ่ม quantity เป็น 0 ตาม Mobile แทนการเติม pending receipt quantity อัตโนมัติ
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Credit note save action label parity

  • Audit ซ้ำ Mobile CreditNoteListScreen, CreditNoteDetailScreen, และ credit-note helpers เทียบกับ POS Terminal credit-note list/detail behavior
  • ยืนยันว่า return-only/status filters, delete guards, save/B1 department gates, status transitions, B1 preflight checks, และ item/location/image payload behavior ตรงกับ Mobile อยู่แล้ว โดยคง Terminal split-panel navigation
  • ปรับ POS Terminal credit-note primary save action label จาก บันทึกสถานะ เป็น บันทึก ตาม Mobile
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Employee password access parity

  • Audit ซ้ำ Mobile EmployeeDetailScreen, EmployeeProfileScreen, EmployeeTransferReceiveSettingScreen, และ getEmployeeAccess เทียบกับ POS Terminal EmployeeDetailForm
  • ยืนยันว่า employee menu/manage/reset permissions และ transfer-receive warehouse permission payloads ตรงกับ Mobile อยู่แล้ว
  • ปรับ POS Terminal password-change access ให้เปลี่ยนรหัสผ่านได้เมื่อเป็นโปรไฟล์ตัวเองหรือมีสิทธิ์จัดการ employee menu ตาม Mobile canChangeOwnPassword
  • ปรับให้ตรง Mobile profile behavior โดยเรียก logout callback หลังเปลี่ยนรหัสผ่านสำเร็จ
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Expense bill save failure parity

  • Audit ซ้ำ Mobile ExpenseBillListScreen/ExpenseBillDetailScreen เทียบกับ POS Terminal expense bill list และ split-panel detail behavior
  • ยืนยันว่า menu visibility, main-branch gating, list retry/delete actions, draft update accounting guard, validation, และ transport-context payload behavior ตรงกับ Mobile อยู่แล้ว
  • ปรับ POS Terminal ExpenseBillDetailForm failure handling ให้เมื่อ save ล้มเหลวแสดง error alert เท่านั้น และไม่เรียก saved callback ด้วย synthetic id หรือ refresh list เหมือน save สำเร็จ
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Deposit home permission parity

  • Audit ซ้ำ Mobile Home MENU_DEPOSIT/CAN_CREATE_DEPOSIT รวมถึง DepositListScreen/DepositDetailScreen permissions เทียบกับ POS Terminal deposit menu และ create action
  • คง POS Terminal deposit menu visibility ให้ตรง Mobile Home เพื่อให้ dept 21 และ 27 เปิดรายการฝากเงินได้
  • ปรับ POS Terminal deposit create action ให้รวม dept 21 ตาม Mobile Home deposit create shortcut ส่วน dept 27 ยังเป็น list-only
  • คง deposit retry owner/012265 guard, delete department guard, retry filter, invoice selection restrictions, validation, และ create payload behavior ที่ตรงกันอยู่แล้ว
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Vehicle status save action parity

  • Audit ซ้ำ Mobile VehicleListScreen status modal เทียบกับ POS Terminal VehicleDetailForm
  • ปรับ POS Terminal vehicle status save action ให้ปุ่ม บันทึก กดได้เสมอ แม้ status/note ที่เลือกจะตรงกับค่าปัจจุบัน เพื่อให้ตรงกับพฤติกรรม modal ของ Mobile
  • คง layout แบบ Terminal split panel, validation, updateVehicleStatus payload, list refresh, และ success/error messages เดิม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Sales order bulk payment microcopy parity

  • Audit ซ้ำ Mobile OrderListScreen bulk payment selection และ payment modal เทียบกับ POS Terminal sales-order review bulk payment
  • ปรับ wording ของ POS Terminal selected-order action bar ให้ตรง Mobile: ล้างข้อมูล และ ชำระเงิน (n)
  • ปรับ label ตัวเลือกโอนใน POS Terminal bulk payment จาก โอนเงิน เป็น โอน ตาม Mobile โดยคง validation, payment payload, partial-failure handling, และ list refresh behavior เดิม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Sales order retry action parity

  • Audit ซ้ำ Mobile OrderListScreen retry swipe action เทียบกับ POS Terminal sales-order split list actions
  • เพิ่ม POS Terminal sales-order left-swipe ส่งข้อมูลใหม่ สำหรับ order ที่ตรง retry state แบบ Mobile: PENDING หรือมี invoice amount แต่ยังสร้าง invoice ไม่ครบ
  • ทำสิทธิ์ retry ให้ตรง Mobile สำหรับเจ้าของใบ, admin, และ override user 012265 สำหรับ pending order; action ยืนยันด้วย ส่งข้อมูลใหม่อีกครั้ง, เรียก retryOrderInvoice, แล้ว refresh order list ปัจจุบัน
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Stock document submit label parity

  • Audit ซ้ำ Mobile TransferOutDetailScreen และ GoodsReceiptDetailScreen submit action wording เทียบกับ POS Terminal TransferOutDetailForm และ GoodsReceiptDetailForm
  • ปรับ submit labels ของ POS Terminal ให้ตรง context เอกสารแบบ Mobile: บันทึกโอนสินค้าไปสาขา สำหรับ transfer-out และ บันทึกรับสินค้าเข้าตรง สำหรับ goods receipt
  • คง validation, save payloads, และ success/error messages ที่ตรงกันอยู่แล้ว
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Transfer-in submit label parity

  • Audit ซ้ำ Mobile TransferInDetailScreen submit action wording เทียบกับ POS Terminal TransferInDetailForm
  • ปรับปุ่ม submit ของ POS Terminal transfer-in จากข้อความทั่วไป บันทึกรับสินค้า เป็นข้อความเฉพาะแบบ Mobile บันทึกรับสินค้าจากสาขา โดยคง validation และ success/error messages ที่ตรงกันอยู่แล้ว
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Transfer-out source branch fallback parity

  • Audit ซ้ำ Mobile TransferOutListScreen source-branch display เทียบกับ POS Terminal transfer-out split list normalization และ list card rendering
  • ปรับ POS Terminal transfer-out list normalization ให้เติม branchName ที่หายไปจาก selected branch whsGrpName/branch name ให้ตรงกับ Mobile ที่ใช้ sourceBranch={branchLabel} fallback
  • คง terminal card renderer เดิมไว้; raw list data ที่ enrich แล้วช่วยไม่ให้ source branch column fallback เป็น - เมื่อ transfer-out API ไม่ส่ง branchName
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Product detail add-to-order action parity

  • Audit ซ้ำ Mobile ProductDetailScreen add-to-order controls เทียบกับ POS Terminal ProductDetailForm
  • ปรับ POS Terminal product add-to-sales-order action ให้ตรงพฤติกรรมปุ่มของ Mobile: disable เมื่อจำนวนไม่มากกว่า 0 และแสดงยอดใบสั่งขายที่คำนวณแล้วใน label ของปุ่ม
  • คง terminal customer-selection/create-sales-order flow และ weight validation เดิมไว้ พร้อมปรับ visible action state ให้ตรง Mobile
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer address map-picker hint parity

  • Audit ซ้ำ Mobile customer-management address editor GPS controls เทียบกับ POS Terminal CustomerManagementDetailForm และ CustomerDetailForm
  • เพิ่ม hint fallback สำหรับ POS ตั้งโต๊ะแบบ Mobile ใต้ terminal GPS/map-picker controls เพื่ออธิบายว่าเครื่องที่ไม่มี GPS สามารถเลือกตำแหน่งจากแผนที่เพื่อเติมพิกัดได้
  • ใส่ hint ในทั้ง terminal customer draft address editing และ customer detail address editing โดยคงปุ่มดึงพิกัดจากอุปกรณ์และ map-picker workflow เดิม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Invoice manual B1 action bar parity

  • Audit ซ้ำ Mobile InvoiceListScreen manual-payment mode action rail เทียบกับ POS Terminal ListPane invoice manual mode
  • เพิ่มปุ่ม ยกเลิก ที่มองเห็นได้ใน POS Terminal invoice manual selection bar ให้ตรงกับ Mobile ที่มีปุ่มยกเลิก/ส่งข้อมูลแสดงคู่กันตลอด โดยยังคง terminal header icon เดิมเป็น shortcut
  • คง split-list selection count และ sendInvoicesToB1 submit flow ของ terminal; ปุ่มยกเลิกใหม่ reuse manual-mode reset handler เดิม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

ขนส่ง GPS address empty-state parity

  • Audit ซ้ำ Mobile TransportCustomerActionModal ขั้นตอนเลือกที่อยู่ GPS เทียบกับ POS Terminal TransportDetailForm customer action modal
  • ปรับ POS Terminal GPS-address selection ให้แสดงข้อความ empty state แบบ Mobile เมื่อไม่มีที่อยู่ลูกค้า แทนการปล่อย modal body ว่าง
  • ปรับ address card ให้ตรง Mobile มากขึ้น โดยแสดงชื่อที่อยู่/ชื่อที่อยู่ตรวจสอบเป็น title และ formatted address เป็นข้อความรอง พร้อม fallback key เมื่อ addressId ว่าง
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Shipping invoice detail navigation parity

  • Audit ซ้ำ Mobile ShippingDetail invoice-row navigation ไป InvoiceDetail เทียบกับ POS Terminal ShippingRouteDetailForm
  • เพิ่มการกด shipping invoice row ใน POS Terminal โดย validate invoiceId, ผ่าน terminal unsaved-change confirmation, โหลด getInvoiceSplitDetail, และเปิด invoice ใน terminal split-panel invoice detail view
  • คง terminal-native swipe actions เดิมสำหรับพิมพ์ใบแจ้งหนี้, ขอ/จัดการยกเลิก, และลบ โดยคืน direct invoice detail access จาก shipping detail row ให้ตรง Mobile
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

ขนส่ง deposit and expense context audit

  • Audit ซ้ำ Mobile TransportDetail cross-screen actions ไป DepositDetail และ ExpenseBillDetail เทียบกับ POS Terminal TransportDetailForm embedded deposit/expense-bill panels
  • ยืนยันว่า POS Terminal คง transport context payload update ตรง Mobile: deposit ตั้ง flagBank=1 โดยคง flagGas, expense bill ตั้ง flagGas=1 โดยคง flagBank, และทั้งสอง save path เรียก updateTransport หลังสร้างรายการที่เกี่ยวข้อง
  • ยืนยันว่า POS Terminal ตรงกับ Mobile defaults สำหรับ branch/user/company context, cash amount สำหรับ deposit, license-plate/driver/route note text, started-at date fallback, gas partner filtering, vehicle lookup, latest mileage loading, และกลับมา refresh transport detail หลัง save
  • ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer picker route-mode action parity

  • Audit ซ้ำ Mobile CustomerList modes สำหรับ booking/borrow/sales-order เทียบกับ POS Terminal CustomerPickerModal
  • ปรับ POS Terminal customer picker detail preview ให้แสดง action เฉพาะ mode ที่เปิด picker เข้ามา: สร้างใบสั่งขาย, ใบจองราคา, หรือใบเบิกดูปลา
  • ทำให้ตรงกับ Mobile route-mode primary action behavior และป้องกัน detail preview ฝั่ง terminal สลับจาก booking mode ไปสร้าง borrow ซึ่งอาจข้าม borrow create gate ได้
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Order payment current-source audit

  • Audit ซ้ำ Mobile OrderDetail, OrderPaymentScreen, และ utils/orderPayment เทียบกับ POS Terminal OrderDetailForm payment panel
  • ยืนยันว่า POS Terminal คง active-invoice filtering, duplicate invoice-prefix blocking, invoice retry action, invoice print action, cash received validation, transfer slip upload, QR generation, QR share, QR payment check, และ payment payload rule ที่ส่ง payOrder เฉพาะ non-QR channels ตาม Mobile
  • ยืนยันว่า Terminal payment panel ตั้งใจรวมขั้นตอนเปิด invoice จาก Mobile OrderDetail กับหน้า OrderPayment แยกไว้ใน panel เดียว: Terminal เปิดได้จาก NEW หรือ WAITING_PAYMENT, สร้าง/recheck invoice เมื่อจำเป็น, แล้วแสดง payment controls เดียวกันใน order detail split panel
  • ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer detail document-action current-source audit

  • Audit ซ้ำ current Mobile CustomerDetail และ CustomerManagementEdit changes เทียบกับ POS Terminal CustomerDetailForm และ CustomerManagementDetailForm
  • ยืนยันว่า POS Terminal import dbAddress กลางจาก @bsr/utils อยู่แล้ว และ normalize district, amphoe, province, zip code เป็น string สำหรับ customer address search ทั้งสอง flow
  • ยืนยันว่า customer detail document actions ของ POS Terminal ตรงกับ Mobile ปัจจุบัน: สร้างใบสั่งขาย, ใบจองราคา, และใบเบิกดูปลาจาก customer detail panel; คง active/inactive และ credit-hold blocked reason; และถามเปิดใบสั่งขายเดิมของวันนี้เมื่ออยู่สาขาหลัก
  • ยืนยันว่า permission split ตั้งใจให้ตรง context ของ Mobile: Terminal canCreateCustomerDocument ตรงกับ Mobile customer-detail getSalesOrderAccess สำหรับ customer document actions ส่วน Terminal canCreateSalesOrder ยังครอบคลุม Home/list create shortcut ที่ Mobile เปิดให้ dept 20 ด้วย
  • ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Required app update parity refresh

  • Audit ซ้ำ Mobile required app update flow เทียบกับ POS Terminal รวมถึง checkRequiredAppUpdate, native version lookup, Firestore version/vapp lookup, ข้อความ blocking modal, และจุด mount ใน login/home screen
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ forced-update hook และ modal behavior โดยคง styling ตาม theme ของ terminal
  • ปรับ Android versionCode/versionName ของ POS Terminal เป็น 422 / 0.4.22 ให้ตรงกับ metadata ปัจจุบันของ Mobile ที่ใช้ร่วมกับ forced-update contract เพื่อไม่ให้ Terminal ถูก block จาก Mobile version gate ทันทีหลังเปิดแอป
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Credit-note list and detail audit

  • Audit ซ้ำ Mobile credit-note list, return-only filter, status filter, delete permission, detail edit flow, lot/location assignment, และ send-to-B1 validation ปัจจุบันเทียบกับ POS Terminal creditNote
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ default return-only list behavior, status tabs, guarded pagination, และ list delete permission/status blocking
  • ยืนยันว่า POS Terminal credit-note detail ตรงกับ Mobile แล้วสำหรับ save status transition, owner-only item quantity editing, warehouse location editing เฉพาะ return item, required lot checks ก่อนส่ง B1, และ warehouse checklist validation ก่อนส่ง B1
  • รอบนี้ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Vehicle list and status audit

  • Audit ซ้ำ Mobile vehicle list search, vehicle status labels/colors, dedupe behavior, และ status update modal ปัจจุบันเทียบกับ POS Terminal vehicle
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ getVehicles query, license-plate dedupe, status normalization, status update payload, และ field แสดงสถานะ/หมายเหตุ/detail
  • ยืนยันว่า split-pane guarded pagination และ load-more ที่ POS Terminal เพิ่มไว้เป็นการปรับให้เข้ากับ layout terminal และไม่ขัดกับ first-page list flow ของ Mobile
  • รอบนี้ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

ขนส่ง list and trip parity refresh

  • Audit ซ้ำ Mobile transport list, create/delete permissions, new-transport draft defaults, และ start/finish trip mileage validation ปัจจุบันเทียบกับ POS Terminal transport
  • ปรับ POS Terminal new-transport draft ให้ prefill ค่า branch/user default เทียบเท่า Mobile รวมถึง shipDate, branchId, warehouse group, driver name, company code, totals, flags, และ empty item state
  • ปรับ POS Terminal trip action modal ให้ล้างค่า start/finish mileage เก่าทุกครั้งที่เปิด modal ให้ตรงกับพฤติกรรม reset ของ Mobile
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ transport list query shape, guarded pagination, owner/unstarted delete gate, start/finish mileage bounds, finalized-delivery guard, bank/oil completion guard, และ start shipping payload
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Expense-bill list and detail audit

  • Audit ซ้ำ Mobile expense-bill list, retry/delete actions, vehicle mileage loading, gas partner picker, send-slip-later option, accounting-only update path, และ transport-context save flow ปัจจุบันเทียบกับ POS Terminal expenseBill
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ /bills list query ที่ใช้ ignoreDraft, guarded pagination, field บน card, retry/delete endpoints, และ search field ของเลขที่บิล ทะเบียนรถ และผู้รับผิดชอบ
  • ยืนยันว่า POS Terminal expense-bill detail ตรงกับ Mobile แล้วสำหรับ payload shape, vehicle picker pagination, latest-mileage และ vehicle-balance lookup, gas partner filtering, edit guards, validation, และการ update transport หลังสร้างบิลน้ำมันจาก transport
  • รอบนี้ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Deposit list and detail audit

  • Audit ซ้ำ Mobile deposit list, retry-only filter, retry/delete actions, cash/bank account loading, invoice-based amount calculation, และ transport-context save flow ปัจจุบันเทียบกับ POS Terminal deposit
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ /deposits list query ที่ใช้ whs, hasRetry, page limit 200, guarded pagination, retry-only toggle, field บน card, retry/delete endpoints, และ search field ของเลขที่ฝากเงินกับข้อมูลธนาคาร
  • ยืนยันว่า POS Terminal deposit detail ตรงกับ Mobile แล้วสำหรับ payload shape, company/cash/bank account loading, การคำนวณ notes และ amount จาก invoice ที่เลือก, create-only validation, confirmation copy, และการ update transport หลังสร้างรายการฝากเงินจาก transport
  • รอบนี้ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Borrow-fish list and detail parity refresh

  • Audit ซ้ำ Mobile borrow-fish list, create/cancel permission, status labels/colors, product add/edit validation, confirm/accept/approve/retry actions, และ print actions ปัจจุบันเทียบกับ POS Terminal borrowFish
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ /borrow list query ที่ใช้ warehouse group, guarded pagination, cancel permission/status gate, สี card ตามสถานะใบเบิก, action endpoints, item CRUD endpoints, และ B1 processing permission gate
  • ปรับ POS Terminal borrow-fish product opening และ add handling ให้บังคับเลือกประเภทการเบิกก่อนเพิ่มสินค้า และกันการเปิด picker เมื่อมีสินค้าแล้ว 3 รายการ ให้ตรงกับ draft validation ก่อนเลือกสินค้าของ Mobile
  • ยืนยันว่า POS Terminal borrow-fish detail ตรงกับ Mobile แล้วสำหรับ product quantity limit, stock validation รวม edit allowance, duplicate product edit path, confirm validation, accept action, approve/retry action, และการเลือกพิมพ์ใบเบิกสาขาหลัก/ใบห้องฝาก
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Storefront list and detail audit

  • Audit ซ้ำ Mobile storefront list, status tabs, สี card, accept prompt, cancel guard, lot/batch validation, และ B1 submit sequence ปัจจุบันเทียบกับ POS Terminal shippingStorefront
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ invoice list query ที่ใช้ shippingType=2, branch/warehouse group context, การ filter refKey และ invoice id, guarded pagination, และ tab ทั้งหมด / ยังไม่ตัดสต๊อก
  • ยืนยันว่า POS Terminal storefront detail ตรงกับ Mobile แล้วสำหรับ accept permission และ prompt behavior, non-main-branch accepted-user flow, cancel restrictions สำหรับส่วนลด/เครดิตโน้ต/incoming B1, lot selection และ duplicate/quantity validation, และ flow submit delivery lot พร้อม create delivery
  • รอบนี้ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Invoice list and detail parity refresh

  • Audit ซ้ำ Mobile invoice list, pending-B1 tab, manual-payment mode, send-to-B1 guard, cancel approval/rejection flow, summary modal, และ duplicate-order detail action ปัจจุบันเทียบกับ POS Terminal invoice
  • ปรับ POS Terminal pending-B1 list loading ให้ tab รอส่ง B1 ปกติยังจำกัด user และช่วงวันเมื่อวาน/วันนี้เหมือน Mobile ส่วน dept 3 จะ query ทุก user/ทุกวันเฉพาะ manual-payment mode เท่านั้น
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ invoice service endpoints และ query parameters, guarded pagination, selectable list rules ของ manual-payment, owner/override B1 และ cancel swipe gates, send-to-B1 date guard, cancel approve/reject endpoints, sales summary query, และ modal option เปิด order ซ้ำของสาขาย่อย
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Goods-receipt list and detail audit

  • Audit ซ้ำ Mobile goods-receipt list, MST/POS service boundary, product inventory picker, dummy-product company filtering, batch validation, quantity handling, และ stock-in payload ปัจจุบันเทียบกับ POS Terminal goodsReceipt
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ /goods-receipt-po MST list query ตาม branch, local dedupe key, search fields, /stock-in submit endpoint, current branch/user payload fields, และการ sort line ด้วย lineNum
  • ยืนยันว่า POS Terminal goods-receipt detail ตรงกับ Mobile แล้วสำหรับ product duplicate guard, dummy product inclusion, warehouse code fallback, zero-quantity allowance, blank/negative quantity blocking, duplicate batch detection, batch date editing, และ submit quantity จาก calculated batch total (cal)
  • รอบนี้ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Transfer-out list and detail audit

  • Audit ซ้ำ Mobile transfer-out list, MST/POS service boundary, source-warehouse lot picker, batch validation, pending-quantity guard, และ transfer-out submit payload ปัจจุบันเทียบกับ POS Terminal transferOut
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ /transfers-out?whGrpCode=... MST list query, local dedupe key, search fields, และ /transfer-out POS submit endpoint
  • ยืนยันว่า POS Terminal transfer-out detail ตรงกับ Mobile แล้วสำหรับ lot loading จาก warehouse และ company ของ line ที่เลือก, duplicate-batch guard, กติกาจำนวนต้องมากกว่า 0, lot available-quantity guard, pending-quantity guard, all-lines-complete submit guard, current branch/user payload fields, การ sort line ด้วย lineNum, การคง document-line quantity, และ numeric batch quantities
  • รอบนี้ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Transfer-in list and detail parity refresh

  • Audit ซ้ำ Mobile transfer-in list, warehouse tabs, MST/POS service boundary, product picker, dummy-product handling, batch validation, batch quantity rollover, และ transfer-in submit payload ปัจจุบันเทียบกับ POS Terminal transferIn
  • ปรับ POS Terminal transfer-in local dedupe key ให้ตรงกับ Mobile ด้วย identity company / docEntry / docNum เพื่อไม่ให้รายการรวมของ terminal ตัดหรือคงเอกสารผิดจาก destination warehouse และ source branch แทน source document identity
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ /transfers-in?whsCode=... MST list queries ทั้ง warehouse tab ปกติและ NF-, search fields, /transfer-in POS submit endpoint, product company filtering, duplicate-product guard, dummy-product auto batch creation, batch available-quantity guard, การ rollover line quantity จาก batch totals, current branch/user payload fields, และ numeric batch quantities
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Transfer-warehouse list and detail parity refresh

  • Audit ซ้ำ Mobile transfer-warehouse list, POS service endpoints, header create/update flow, warehouse picker, product picker, batch loading, item create/update/delete flow, และ send-to-B1 guard ปัจจุบันเทียบกับ POS Terminal transferWarehouse
  • ปรับ POS Terminal transfer-warehouse product selection ให้ refresh companyCode และ companyName ของหัวเอกสารจากสินค้ารายการแรกเมื่อใบย้ายยังไม่มี item เพื่อให้ตรงกับ behavior Mobile ก่อนบันทึกหัวหรือ item แรก
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ /transfer-branches list query ตาม branch, API search, local dedupe ผ่าน normalized split id, delete endpoint, create draft behavior, warehouse option loading จาก current branch และ sub-warehouses, การบังคับเลือกคลังปลายทางก่อนเพิ่มสินค้า, batch loading จาก warehouse group ของสาขาที่ login และ company ของสินค้า, item save ผ่าน per-item endpoints, item delete, และ B1 send guard ที่ต้องมีอย่างน้อยหนึ่ง item พร้อม batch numbers
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Employee list and transfer setting parity refresh

  • Audit ซ้ำ Mobile employee list, employee detail permission editing, password reset, และ transfer-receive warehouse permission setting flow ปัจจุบันเทียบกับ POS Terminal employee
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ employee list query, guarded pagination, employee permission toggles, reset-password action, และ embedded transfer-receive warehouse permission flow
  • ยืนยันว่า transfer setting flow ตรงกับ Mobile ในส่วน branch loading, user-branch loading, warehouse/sub-warehouse mapping, permission matching ด้วย whsCode === whsGrpCode, optimistic toggle state, และ reload permissions หลังบันทึก
  • ปรับ POS Terminal shared local split-list search filter ให้รวมชื่อ, นามสกุล, อีเมล, และชื่อแผนกของพนักงาน เพื่อไม่ให้ผลลัพธ์จาก API search ด้วยข้อมูลเหล่านี้ถูก local filter ตัดทิ้งหลังโหลด
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck because the system temp volume was full.
  • Docs updated:
    • governance/change-log

Employee list, profile, and transfer setting re-audit

  • Audit ซ้ำ Mobile employee list, employee detail permission editing, employee profile password flow, และ transfer-receive warehouse setting route ปัจจุบันเทียบกับ POS Terminal employee
  • ยืนยันว่า POS Terminal ยังตรงกับ Mobile สำหรับ /users list/search query, employee dedupe ด้วย user id/user code, list/detail permission gates, permission flag payload, reset-password salt request, own-profile access fallback จาก terminal header, self-service set-new-password flow, และ embedded transfer-receive setting ที่โหลด branch, employee branch lookup, warehouse/sub-warehouse filtering, main-branch inclusion, permission matching, optimistic toggle state, และ create/update endpoints
  • รอบนี้ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Product list and detail audit

  • Audit ซ้ำ Mobile product list search, booking tab, Firestore inventory snapshot behavior, และ product detail step-price loading ปัจจุบันเทียบกับ POS Terminal product
  • ยืนยันว่า POS Terminal ครอบคลุม product search target ของ Mobile คือชื่อสินค้าและรหัสสินค้า พร้อมคง local search field ของ terminal ที่ค้น company เพิ่มได้, product dedupe ด้วย item code, positive-price filtering, booking-only filter, และการแสดงสต๊อก SAP/POS/จอง
  • ยืนยันว่า POS Terminal product detail โหลดสินค้าที่เลือกผ่าน getProductSplitDetail โดยดึง inventory detail สดและ getProductStepPrice เมื่อเปิด stepPriceFlag
  • ยืนยันว่า POS Terminal split-pane add-to-sales-order path รักษา validation จำนวน, ราคา, และน้ำหนักเหมือน Mobile โดยปรับ customer selection flow ให้เข้ากับรูปแบบ terminal
  • ตรวจซ้ำ POS Terminal product service เทียบกับ Mobile product service และยืนยันว่า branch context, main/sub inventory sync endpoints, warehouse-code variants, Firestore ordering, fresh detail lookup, step-price whGrpCode, last-products, change-price, และ top-sales helpers ยังตรงกัน
  • รอบนี้ไม่ต้องแก้ source ของ POS Terminal
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Notification token flow audit

  • Audit ซ้ำ Mobile notification permission, foreground/background handlers, FCM token refresh, clear-and-refresh action, และ login-time user fcmToken patch เทียบกับ POS Terminal
  • ยืนยันว่า POS Terminal notifications service ยังตรงกับ Firebase Messaging service ของ Mobile สำหรับ permission request, remote-message registration, token refresh, foreground handler registration, และ token deletion
  • ยืนยันว่า POS Terminal ย้าย token-debug behavior จาก Mobile NotificationsScreen มาเป็น settings modal โดยยังแสดง token และล้างโทเคนเก่า + ขอใหม่ได้เหมือนเดิมในรูปแบบ terminal
  • ยืนยันว่า POS Terminal user selection/login refresh FCM token และ patch permission fields พร้อม fcmToken กลับ user เหมือน Mobile login behavior โดยยังคง user-selection flow ของ terminal
  • รอบนี้ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer list and detail audit

  • Audit ซ้ำ Mobile default customer list และ customer detail create-document flow ปัจจุบันเทียบกับ POS Terminal customer
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ customer list query shape ทั้ง search, shipping type, route filter, guarded pagination, และ customer dedupe ด้วย normalized customer identifier
  • ยืนยันว่า POS Terminal customer detail เปิดเอกสารจากลูกค้าปัจจุบันอยู่แล้ว รวมถึง inactive/credit-hold guards และ prompt เปิดใบสั่งขายเดิมของวันนี้ก่อนสร้างใบใหม่เหมือน Mobile
  • ยืนยันว่า customer code และ phone fields ที่เพิ่มใน shared split-list search helper ครอบคลุม customer list API search ด้วยรหัสลูกค้าหรือเบอร์โทรด้วย
  • รอบนี้ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Docs updated:
    • governance/change-log

Customer-management draft request-branch parity refresh

  • Audit ซ้ำ Mobile customer-management list, draft detail approve/reject flow, และ customer edit-to-draft save behavior ปัจจุบันเทียบกับ POS Terminal customerManagement
  • ปรับ POS Terminal edit-existing-customer flow ให้ draft raw ที่สร้างจาก customer detail มี branchIdRequest จากสาขาที่ login ให้ตรงกับ payload ของ Mobile customer-management edit ที่ส่ง login branch เป็น request branch เสมอ
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ /customer-draft list query ตาม branch, guarded pagination, draft detail loading พร้อม addresses และ branches, approve/reject permissions และ endpoints, reject payload mapping, core draft validation, phone formatting, การตัด alias เมื่อแก้ลูกค้าเดิม, การสร้าง child address/branch หลังสร้าง draft ใหม่, และ split-panel refresh behavior
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer-activation list search parity refresh

  • Audit ซ้ำ Mobile customer request list และ request detail approve/reject flow ปัจจุบันเทียบกับ POS Terminal customerActivation
  • ยืนยันว่า POS Terminal ใช้ request list query shape เดียวกันผ่าน getCustomerSapList({ isRequest: true }) รวมถึง search, shipping type, route filter, guarded pagination, และ approve/reject endpoints
  • ปรับ POS Terminal local split-list search filter ให้รวมรหัสลูกค้าและเบอร์โทร เพื่อไม่ให้ผลลัพธ์จาก API search ด้วยรหัสลูกค้าหรือเบอร์โทรถูก local filter ตัดทิ้งหลังโหลด
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck because the system temp volume was full.
  • Docs updated:
    • governance/change-log

Customer-activation request re-audit

  • Audit ซ้ำ Mobile CustomerList request mode และ customer request detail approve/reject flow ปัจจุบันเทียบกับ POS Terminal customerActivation
  • ยืนยันว่า POS Terminal ยังตรงกับ Mobile สำหรับ request loading ผ่าน getCustomerSapList({ isRequest: true }), search, route และ shipping-type filters, guarded pagination, route option loading, request status labels, permission ตาม admin/department, approve และ reject endpoints, confirmation prompts, list refresh หลังตัดสินคำขอ, และ terminal-native split-panel handling
  • รอบนี้ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer address source audit

  • Audit ซ้ำ Mobile customer และ customer-management address picker ล่าสุดที่ย้าย dbAddress ไปใช้ shared export จาก @bsr/utils และ normalize ค่า address ที่เลือกเป็น string
  • ยืนยันว่า POS Terminal CustomerDetailForm และ CustomerManagementDetailForm ใช้ shared dbAddress จาก @bsr/utils อยู่แล้ว และ normalize district, amphoe, province, zipcode เป็น string แบบเดียวกัน
  • รอบนี้ไม่ต้องแก้ source ของ POS Terminal
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer-address GPS request re-audit

  • Audit ซ้ำ Mobile customer address GPS request list และ read-only map detail flow ปัจจุบันเทียบกับ POS Terminal customerAddressManagement
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ /customer-draft/address-lat-lng list query ตาม branch, guarded pagination, local dedupe ด้วย request id, card tone approved/rejected จากชื่อผู้อนุมัติ/ผู้ปฏิเสธ, detail loading ด้วย request id, การแสดงพิกัดเก่า/ใหม่, read-only Google map rendering, pending-only approve/reject actions, confirmation wording, approve/reject endpoints, และ detail/list refresh หลังตัดสินคำขอ
  • ยืนยันว่า POS Terminal gate เมนูด้วย permission surface เดียวกับ Mobile getCustomerManagementAccess().canOpenScreen โดยยังคง split-list/detail panel layout ของ terminal
  • รอบนี้ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Sales-order list audit and booking-price refresh parity

  • Audit ซ้ำ Mobile sales-order list search, filter, dedupe, shipping-review mode, และ guarded pagination behavior ปัจจุบันเทียบกับ POS Terminal salesOrder และ salesOrderReview
  • ยืนยันว่า POS Terminal ส่ง search/filter ผ่าน getOrderSplitList แล้ว และ local split-list search ครอบคลุมเลขที่ใบสั่งขายกับชื่อลูกค้าเหมือนพฤติกรรมที่ผู้ใช้เห็น
  • ปรับ POS Terminal booking-price actions ที่สร้าง, ลบ, แปลงเป็นใบสั่งขาย, หรือสร้างใบจองราคาเมื่อเพิ่มสินค้าแรก ให้ refresh ผ่าน dedicated loadBookingPriceList แทน generic split-menu refresh เพื่อรักษา search/pagination parity ของ booking-price ที่ทำไว้ก่อนหน้า
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck because the system temp volume was full.
  • Docs updated:
    • governance/change-log

Sales-order review mode parity refresh

  • Audit ซ้ำ Mobile shipping-review order list และ review payment flow ปัจจุบันเทียบกับ POS Terminal salesOrderReview
  • ปรับ POS Terminal salesOrderReview list controls ให้ซ่อน status filter ตรงกับ Mobile review mode ที่ fix order status เป็น WAITING_PAYMENT และไม่แสดง user/status toggles
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ forced current-user loading, WAITING_PAYMENT query override, post-load filter hasShipment === 0, source-count pagination guard สำหรับรายการที่ถูก filter ออก, selectable review cards, selected-order cleanup หลัง refresh list, bulk payment modal, ตัวเลือก CASH / TRANSFER, remark field, per-order payOrder payload, partial-failure messaging, และ list refresh หลัง bulk payment
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Invoice list search parity refresh

  • Audit ซ้ำ Mobile invoice list search, pending-B1 tab, manual-payment mode, selected send-to-B1 guards, และ summary/cancel actions ปัจจุบันเทียบกับ POS Terminal invoice
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วในส่วน pending-B1/manual-payment query behavior รวมถึง department 3 ที่โหลดทุก user, date guard เมื่อไม่ใช่ department 3, selected invoice guards, cancel request handling, และ guarded pagination state
  • ปรับ POS Terminal local split-list search filter ให้รวมเลขที่ใบแจ้งหนี้, เลขที่ใบสั่งขาย, และชื่อลูกค้า เพื่อไม่ให้ผลลัพธ์จาก API search ถูก local filter ตัดทิ้งหลังโหลด
  • ปรับ placeholder ค้นหา invoice ใน terminal ให้ตรงกับพฤติกรรมค้นหาใบแจ้งหนี้/ใบสั่งขาย/ลูกค้าที่ผู้ใช้เห็น
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck because the system temp volume was full.
  • Docs updated:
    • governance/change-log

Expense-bill list search parity refresh

  • Audit ซ้ำ Mobile expense-bill list search, pagination, delete/retry refresh behavior, และ card search target ปัจจุบันเทียบกับ POS Terminal expenseBill
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วในส่วน branch-scoped API search, ignoreDraft=true, pageLimit=200, full-page hasMore threshold, และ guarded in-flight pagination state
  • ปรับ POS Terminal local split-list search filter ให้รวมเลขที่บิลน้ำมันและทะเบียนรถ เพื่อไม่ให้ผลลัพธ์จาก API search ตามเลขที่บิล ทะเบียนรถ หรือผู้รับผิดชอบถูก local filter ตัดทิ้ง
  • ปรับ placeholder ค้นหา expense-bill ใน terminal ให้ตรงกับพฤติกรรมค้นหาเลขที่บิล/ทะเบียนรถ/ผู้รับผิดชอบของ Mobile
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck because the system temp volume was full.
  • Docs updated:
    • governance/change-log

Deposit list search and pagination audit

  • Audit ซ้ำ Mobile deposit list search, retry-only filter, page size, load-more stop condition, delete/retry refresh behavior, และ create/delete/retry permission gates ปัจจุบันเทียบกับ POS Terminal deposit
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วสำหรับ API-backed search target ของเลขที่ฝากเงิน, บัญชี, และผู้รับผิดชอบ ผ่าน deposit service query และ split-list search helper
  • ยืนยันว่า POS Terminal ใช้ deposit-specific pageLimit=200, retry-only filter, full-page hasMore threshold, และ guarded in-flight pagination state แบบ Mobile แล้ว
  • รอบนี้ไม่ต้องแก้ source ของ POS Terminal
  • Docs updated:
    • governance/change-log

Goods-receipt list search parity refresh

  • Audit ซ้ำ Mobile goods-receipt list loading และ local search behavior ปัจจุบันเทียบกับ POS Terminal goodsReceipt
  • ยืนยันว่า Mobile และ POS Terminal โหลด goods-receipt data จาก MST goods-receipt list โดยไม่มี API pagination หรือ API search
  • ปรับ POS Terminal local list search ให้ค้นหา card/customer name และ warehouse employee/user name ของ goods-receipt ได้ ตรงกับ target ของ Mobile GoodsReceiptList สำหรับเลขที่เอกสาร หมายเหตุ และผู้ใช้
  • ปรับ placeholder ค้นหา goods-receipt ใน terminal ให้ตรงกับพฤติกรรมค้นหาเอกสาร/หมายเหตุ/ผู้ใช้ของ Mobile
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck because the system temp volume was full.
  • Docs updated:
    • governance/change-log

Transfer-in list search parity refresh

  • Audit ซ้ำ Mobile transfer-in list loading, warehouse-tab behavior, และ local search ปัจจุบันเทียบกับ POS Terminal transferIn
  • ยืนยันว่า POS Terminal ยังคง terminal-specific merged main/NF transfer-in list ผ่าน getTransferInsForTerminal โดยตั้งใจ ขณะที่ Mobile สลับ warehouse tab ทีละตัว
  • ปรับ POS Terminal local list search ให้ค้นหา source branch name, source branch code, document number, และ comments ของ transfer-in ได้ ตรงกับ target ของ Mobile TransferInList
  • ปรับ placeholder ค้นหา transfer-in ใน terminal ให้ตรงกับพฤติกรรมค้นหาเอกสาร/สาขา/หมายเหตุของ Mobile
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck because the system temp volume was full.
  • Docs updated:
    • governance/change-log

Transfer-out list search parity refresh

  • Audit ซ้ำ Mobile transfer-out list loading และ local search behavior ปัจจุบันเทียบกับ POS Terminal transferOut
  • ยืนยันว่า Mobile และ POS Terminal โหลด transfer-out data จาก MST transfer-out list โดยไม่มี API pagination หรือ API search
  • ปรับ POS Terminal local list search ให้ค้นหา destination warehouse name, destination warehouse code, document number, และ comments ของ transfer-out ได้ ตรงกับ target ของ Mobile TransferOutList
  • ปรับ placeholder ค้นหา transfer-out ใน terminal ให้ตรงกับพฤติกรรมค้นหาเอกสาร/ปลายทาง/หมายเหตุของ Mobile
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck because the system temp volume was full.
  • Docs updated:
    • governance/change-log

Customer-management list pagination parity refresh

  • Audit ซ้ำ Mobile customer-management list loading, search, refresh, load-more pagination, และ in-flight fetch guards ปัจจุบันเทียบกับ POS Terminal customerManagement
  • เพิ่ม dedicated POS Terminal customer-management split-list loader ที่ใช้ getCustomerDrafts({ page, search }) เพื่อให้ panel 2 ไม่ fallback ไป generic first-page search: "" list
  • ผูก customer-management initial menu loading, search, clear-search, pull-to-refresh, save refresh, และ list footer load-more เข้ากับ dedicated loader
  • เก็บ next page, hasMore, และ initial-load state ใน ref เพื่อไม่ให้ onEndReached ที่เกิดเร็วหรือถี่ load more ก่อน page 1 จบ หรือ reuse page state เก่า
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck because the system temp volume was full.
  • Docs updated:
    • governance/change-log

Transfer-warehouse list search parity refresh

  • Audit ซ้ำ Mobile transfer-warehouse list loading, initialized/in-flight guards, API search, pull-to-refresh, และ delete refresh behavior ปัจจุบันเทียบกับ POS Terminal transferWarehouse
  • เพิ่ม dedicated POS Terminal transfer-warehouse split-list loader ที่ใช้ getTransferWarehouses({ page: 1, search }) เพื่อให้ panel 2 search, clear-search, initial menu loading, pull-to-refresh, และ delete refresh ไม่ fallback ไป generic search: "" list
  • คง list เป็น single-page refresh flow เพราะ Mobile TransferWarehouseList ปัจจุบันโหลด page 1 และค้นหา/filter โดยไม่มี infinite scroll
  • ปรับ terminal list search placeholder ให้ตรง target ของ Mobile transfer-warehouse สำหรับเลขที่เอกสารและพนักงานผู้รับผิดชอบ
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck because the system temp volume was full.
  • Docs updated:
    • governance/change-log

Booking-price list pagination parity refresh

  • Audit ซ้ำ Mobile booking-price list initializing, in-flight fetch, search, refresh, และ load-more behavior ปัจจุบันเทียบกับ POS Terminal bookingPrice
  • เพิ่ม dedicated POS Terminal booking-price split-list loader ที่ใช้ Mobile-compatible service getBookingPrices เพื่อให้ panel 2 ไม่หยุดอยู่ที่ generic first-page list
  • ปรับ booking-price pagination ให้เก็บ next page, hasMore, และ initial-load state ใน ref เพื่อไม่ให้ onEndReached ที่เกิดเร็วหรือถี่ load more ก่อน page 1 จบ หรือ reuse page state เก่า
  • ผูก booking-price search, clear-search, pull-to-refresh, initial menu loading, และ list footer load-more เข้ากับ dedicated loader โดยคง split-list normalization และ item-id deduplication เดิม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck because the system temp volume was full.
  • Docs updated:
    • governance/change-log

Storefront list load-more guard parity refresh

  • Audit ซ้ำ Mobile storefront list initializing และ in-flight fetch guards ปัจจุบันเทียบกับ POS Terminal shippingStorefront split-list pagination
  • ปรับ POS Terminal storefront pagination ให้เก็บ next page, hasMore, และ initial-load state ใน ref เพื่อไม่ให้ onEndReached ที่เกิดเร็วหรือถี่ load more ก่อน page 1 จบ หรือ reuse page state เก่า
  • คง invoice-status filter, storefront invoice query, และ split-list item-id deduplication เดิมของ POS Terminal
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck because the system temp volume was full.
  • Docs updated:
    • governance/change-log

Shipping-route list load-more guard parity refresh

  • Audit ซ้ำ Mobile shipping-route list initializing และ in-flight fetch guards ปัจจุบันเทียบกับ POS Terminal shippingRoute split-list pagination
  • ปรับ POS Terminal shipping-route pagination ให้เก็บ next page, hasMore, และ initial-load state ใน ref เพื่อไม่ให้ onEndReached ที่เกิดเร็วหรือถี่ load more ก่อน page 1 จบ หรือ reuse page state เก่า
  • คง delivery-status filter และ split-list item-id deduplication เดิมของ POS Terminal
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck because the system temp volume was full.
  • Docs updated:
    • governance/change-log

Expense-bill list load-more guard parity refresh

  • Audit ซ้ำ Mobile expense-bill list initializing และ in-flight fetch guards ปัจจุบันเทียบกับ POS Terminal expenseBill split-list pagination
  • ปรับ POS Terminal expense-bill pagination ให้เก็บ next page, hasMore, และ initial-load state ใน ref เพื่อไม่ให้ onEndReached ที่เกิดเร็วหรือถี่ load more ก่อน page 1 จบ หรือ reuse page state เก่า
  • คง split-list item-id deduplication และ page-limit stop condition เดิมของ POS Terminal
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Deposit list load-more guard parity refresh

  • Audit ซ้ำ Mobile deposit list initializing และ in-flight fetch guards ปัจจุบันเทียบกับ POS Terminal deposit split-list pagination
  • ปรับ POS Terminal deposit pagination ให้เก็บ next page, hasMore, และ initial-load state ใน ref เพื่อไม่ให้ onEndReached ที่เกิดเร็วหรือถี่ load more ก่อน page 1 จบ หรือ reuse page state เก่า
  • คง retry-only filter, split-list item-id deduplication, และ page-limit stop condition เดิมของ POS Terminal
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Vehicle list load-more guard parity refresh

  • Audit ซ้ำ Mobile vehicle list initializing และ in-flight fetch guards ปัจจุบันเทียบกับ POS Terminal vehicle split-list pagination
  • ปรับ POS Terminal vehicle pagination ให้เก็บ next page, hasMore, และ initial-load state ใน ref เพื่อไม่ให้ onEndReached ที่เกิดเร็วหรือถี่ load more ก่อน page 1 จบ หรือ reuse page state เก่า
  • คง vehicle status normalization, license-plate deduplication, และ PAGESIZE stop condition เดิมของ POS Terminal สำหรับ terminal split-list load-more
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer address request list load-more guard parity refresh

  • Audit ซ้ำ Mobile customer address request list initialized และ in-flight fetch guards ปัจจุบันเทียบกับ POS Terminal customerAddressManagement split-list pagination
  • ปรับ POS Terminal customer-address pagination ให้เก็บ next page, hasMore, และ initial-load state ใน ref เพื่อไม่ให้ onEndReached ที่เกิดเร็วหรือถี่ load more ก่อน page 1 จบ หรือ reuse page state เก่า
  • คง customer-address request service query, selection key behavior, และ split-list item-id deduplication เดิมของ POS Terminal
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer activation list load-more guard parity refresh

  • Audit ซ้ำ Mobile customer request list initialized และ in-flight fetch guards ปัจจุบันเทียบกับ POS Terminal customerActivation split-list pagination
  • ปรับ POS Terminal customer-activation pagination ให้เก็บ next page, hasMore, และ initial-load state ใน ref เพื่อไม่ให้ onEndReached ที่เกิดเร็วหรือถี่ load more ก่อน page 1 จบ หรือ reuse page state เก่า
  • คง route และ shipping-type filters, request-mode service query, และ split-list item-id deduplication เดิมของ POS Terminal customer-activation
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Product list load-more guard parity refresh

  • Audit ซ้ำ Mobile product inventory list subscription behavior ปัจจุบันเทียบกับ POS Terminal product split-list pagination
  • คง paged inventory sync/read strategy ของ POS Terminal สำหรับ split-list panel แต่ปรับ product pagination ให้เก็บ next page, hasMore, และ initial-load state ใน ref เพื่อไม่ให้ onEndReached ที่เกิดเร็วหรือถี่ load more ก่อน page 1 จบ หรือ reuse page state เก่า
  • คง all/booking tab, search, branch warehouse-code filtering, zero-price filtering, และ split-list item-id deduplication เดิมของ POS Terminal
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Credit-note list load-more guard parity refresh

  • Audit ซ้ำ Mobile credit-note list initializing และ in-flight fetch guards ปัจจุบันเทียบกับ POS Terminal creditNote split-list pagination
  • ปรับ POS Terminal credit-note pagination ให้เก็บ next page, hasMore, และ initial-load state ใน ref เพื่อไม่ให้ onEndReached ที่เกิดเร็วหรือถี่ load more ก่อน page 1 จบ หรือ reuse page state เก่า
  • คง status filter, return-only filter, และ split-list item-id deduplication เดิมของ POS Terminal
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Employee list load-more guard parity refresh

  • Audit ซ้ำ Mobile employee list initialized และ in-flight fetch guards ปัจจุบันเทียบกับ POS Terminal employee split-list pagination
  • ปรับ POS Terminal employee pagination ให้เก็บ next page, hasMore, และ initial-load state ใน ref เพื่อไม่ให้ onEndReached ที่เกิดเร็วหรือถี่ load more ก่อน page 1 จบ หรือ reuse page state เก่า
  • คง employee profile fallback, permission gates, และ split-list item-id deduplication เดิมของ POS Terminal
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer list load-more guard parity refresh

  • Audit ซ้ำ Mobile customer list initialized และ in-flight fetch guards ปัจจุบันเทียบกับ POS Terminal customer split-list pagination
  • ปรับ POS Terminal customer pagination ให้เก็บ next page, hasMore, และ initial-load state ใน ref เพื่อไม่ให้ onEndReached ที่เกิดเร็วหรือถี่ load more ก่อน page 1 จบ หรือ reuse page state เก่า
  • คง route และ shipping-type filters เดิมของ POS Terminal customer รวมถึง split-list item-id deduplication
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Invoice list load-more guard parity refresh

  • Audit ซ้ำ Mobile invoice list bootstrap และ in-flight fetch guards ปัจจุบันเทียบกับ POS Terminal invoice split-list pagination
  • ปรับ POS Terminal invoice pagination ให้เก็บ next page, hasMore, และ initial-load state ใน ref เพื่อไม่ให้ onEndReached ที่เกิดเร็วหรือถี่ load more ก่อน page 1 จบ หรือ reuse page state เก่า
  • คง behavior query เดิมของ POS Terminal invoice pending-B1/manual-payment รวมถึง department 3 ที่โหลดทุก user และ date guard สำหรับ user อื่น
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Sales-order list load-more guard parity refresh

  • Audit ซ้ำ Mobile order list initial-load และ in-flight fetch guards ปัจจุบันเทียบกับ POS Terminal salesOrder และ salesOrderReview split-list pagination
  • ปรับ POS Terminal sales-order pagination ให้เก็บ next page, hasMore, และ initial-load state ใน ref เพื่อไม่ให้ onEndReached ที่เกิดเร็วหรือถี่ load more ก่อน page 1 จบ หรือ reuse page state เก่า
  • คงกฎ hasMore เดิมของ salesOrderReview ที่อิง raw source count เพื่อให้ review pagination ยังไปต่อข้าม API page ที่มีแต่รายการที่ shipment แล้ว
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

ขนส่ง list initial-load guard parity refresh

  • Audit ซ้ำ Mobile transport list initial-load guard ปัจจุบันเทียบกับ POS Terminal transport split-list implementation
  • ปรับ POS Terminal transport pagination ให้เก็บ next page, hasMore, และ initial-load state ใน ref เพื่อไม่ให้ onEndReached ที่เกิดเร็วหรือถี่ load more ก่อน page 1 จบ หรือ reuse page state เก่า
  • คงการ merge รายการซ้ำเดิมของ POS Terminal ด้วย split-list item id ให้เทียบกับ duplicate-row protection ของ Mobile ในรูปแบบ terminal
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Order shipping-type preservation current-source refresh

  • Audit ซ้ำ Mobile order-detail shipping-type preservation fix ปัจจุบันเทียบกับ POS Terminal order creation และ detail update flows
  • ปรับ POS Terminal customer-to-order shortcut payload ให้ preserve shippingType ของลูกค้าโดยตรง แทนการบังคับ order ของสาขาย่อยเป็นหน้าร้าน
  • ปรับ POS Terminal order detail shipping-type change ให้ส่งค่าที่เลือกโดยตรง ตาม behavior ปัจจุบันของ Mobile normalizeShippingTypeForBranch และป้องกัน persisted delivery order ถูก rewrite เป็นหน้าร้านตอนแก้ไขภายหลัง
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Borrow list duplicate-loading parity

  • Audit ซ้ำ Mobile borrow list duplicate-loading fix ปัจจุบันเทียบกับ POS Terminal borrowFish split-list implementation
  • ปรับ POS Terminal borrow pagination ให้ตาม pattern guard แบบ ref ของ Mobile: list เก็บ next page, hasMore, และ initial-load state ใน ref เพื่อไม่ให้ onEndReached ที่ยิงเร็วติดกัน reuse page state เก่าหรือ load more ก่อน page 1 โหลดเสร็จ
  • คงการ merge รายการซ้ำเดิมของ POS Terminal ด้วย split-list item id เพื่อให้ append load ยังนิ่งแม้ API ส่ง item ซ้อนกลับมา
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

ขนส่ง Google route sorting current-source parity audit

  • Audit ซ้ำ Mobile transport Google route sorting ปัจจุบันเทียบกับ POS Terminal TransportDetailForm, ShippingSortPlannerModal, และ services/googleRoutes
  • ยืนยันว่า POS Terminal ตรงกับ Mobile ใน route optimization behavior: ใช้ GPS ปัจจุบันเป็น origin, filter ลูกค้าที่มี customer code และพิกัด, block เมื่อไม่มี GPS, จำกัด Google Routes 26 จุด, เลือกลูกค้าที่ไกลสุดเป็น destination, ส่งพิกัดที่เหลือเป็น optimized intermediates, ต่อท้ายลูกค้าที่ไม่มีพิกัดหลังกลุ่ม optimized, และบันทึกลำดับสุดท้ายผ่าน sortTransportCustomers
  • ยืนยันว่า POS Terminal คง sort-planner controls และ labels ตาม Mobile ในรูปแบบ terminal รวมถึง clear, toggle ชื่อย่อ/ชื่อเต็ม, save validation เมื่อยังมีลูกค้ายังไม่จัดเรียง, และ จัดเรียงลูกค้าตามพิกัดด้วย Google
  • รอบนี้ไม่ต้องแก้ source ของ POS Terminal
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Goods receipt quantity current-source parity audit

  • Audit ซ้ำ Mobile goods-receipt quantity rules ปัจจุบันเทียบกับ POS Terminal GoodsReceiptDetailForm
  • ยืนยันว่า POS Terminal ตรงกับ Mobile ใน zero-quantity behavior: line และ Lot/Batch quantity เป็น 0 ได้, block เฉพาะค่าว่างและค่าติดลบ, และ stock-in payload ส่งทุก line รวมถึง line ที่ received total cal เป็น 0
  • ยืนยันว่า POS Terminal ตรงกับ Mobile ใน partial/over receipt behavior โดยส่ง quantity ของแต่ละ line จาก received total cal และไม่บังคับให้ cal ต้องเท่ากับจำนวนเดิมของเอกสาร
  • รอบนี้ไม่ต้องแก้ source ของ POS Terminal
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Credit-note location current-source parity refresh

  • Audit ซ้ำ Mobile credit-note return-location behavior ปัจจุบันเทียบกับ POS Terminal CreditNoteDetailForm
  • ยืนยันว่า POS Terminal ยังตรงกับ Mobile ใน location permissions, การโหลด Lot/Batch จาก product lots, single-lot payload shape, B1 preflight ที่บังคับให้ return item มี location, และ warehouse checklist validation ก่อนส่ง return credit note ไป B1
  • ปรับ POS Terminal item action row visibility ให้ user ที่มีสิทธิ location อย่างเดียวเห็น action row เฉพาะรายการคืนสินค้า ตรงกับกฎเปิด action ของ Mobile canEditItem || (isReturn && canEditItemLocation) และไม่เหลือแถว action ว่างบนรายการลดหนี้อย่างเดียว
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Order benefit current-source parity refresh

  • Audit ซ้ำ Mobile order point, coupon, และ credit-note benefit handlers ปัจจุบันเทียบกับ POS Terminal OrderDetailForm
  • ยืนยันว่า POS Terminal ยังตรงกับ Mobile ใน credit-note OTP endpoints, validation เบอร์ 10 หลัก, refresh หลัง confirm, การ block/แสดงผล credit-note ที่ถูกใช้แล้ว, company amount validation, point OTP retry cooldown, และ remove-benefit endpoints
  • ปรับ POS Terminal coupon submission ให้ตรงกับ Mobile โดยเอา pre-submit block ที่กันการใช้ coupon เมื่อ order มี credit-note discount อยู่แล้วออก; Terminal ยังเก็บ duplicate-coupon guard และ credit-note guard เมื่อมี coupon ถูกใช้แล้วตาม Mobile
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Branch selection and startup notification parity

  • Audit ซ้ำ Mobile branch selection, selected-branch storage, tax loading, และ branch-settings navigation เทียบกับ POS Terminal BranchScreen และ app-level setup flow
  • ยืนยันว่า POS Terminal ตรงกับ Mobile ในรูปแบบ terminal: โหลด branch แบบ fallback/user-specific, filter sub warehouse, เพิ่ม main warehouse เฉพาะเมื่อ user มีสิทธิ, save selected warehouse payload, refresh tax cache, และโหลด tax แบบ best-effort หลัง state navigation ถูกอัปเดตแล้ว
  • ปรับ POS Terminal app boot ให้ request notification permission ผ่าน Firebase notification service ที่มีอยู่ ให้ตรงกับ Mobile startup behavior ก่อน login-time FCM token refresh/patch ภายหลัง
  • ปรับ startup branch gating ของ POS Terminal ให้ตัดสินจาก branch ที่เก็บไว้เท่านั้น ตรงกับ Mobile hasSelectedBranch decision และให้ tax เป็น best-effort cache แทนการบังคับเลือกสาขาใหม่เมื่อโหลด tax ไม่สำเร็จ
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Entry-flow current-source parity audit

  • Audit ซ้ำ Mobile login/header required-update, native app version, reset-password, FCM-token patch, และ alcohol-check behavior เทียบกับ POS Terminal user-selection และ home entry flows
  • ยืนยันว่า POS Terminal ยังตรงกับ Mobile ปัจจุบัน: required app update block หน้า login/home ด้วย modal copy และ version target เดียวกัน, refresh/focus check จะตรวจ update ซ้ำ, selected-user และ employee-code login path ยังมี reset-password fallback, login บันทึก token/user/login date หลังผ่าน alcohol validation, และ FCM token fields ถูก patch พร้อม permission payload เดียวกัน
  • รอบนี้ไม่ต้องแก้ POS Terminal source
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

ขนส่ง trip-action parity refresh

  • Audit ซ้ำ Mobile transport list/detail behavior เทียบกับ POS Terminal transport
  • ยืนยันว่า POS Terminal ตรงกับ Mobile ในส่วน transport list loading, create/delete permissions, branch-scoped search/pagination, delivery/customer/shipping/payment services, vehicle picker readiness guard, deposit/expense-bill context, sorting planner, และ print helpers ในรูปแบบ terminal split-panel
  • ปรับ POS Terminal transport start/finish submit handlers ให้ทำ final guards ซ้ำตาม Mobile ตอนกดยืนยันจริง รวมถึงเช็กใบจัดที่ต้องยืนยันก่อนเริ่ม, เช็กลูกค้าครบ/ฝากเงิน/เติมน้ำมันก่อนจบ, แยกข้อความ validation เลขไมล์, และแสดง success feedback หลังจบขนส่ง
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Vehicle list/status parity refresh

  • Audit ซ้ำ Mobile vehicle list และ status-edit behavior เทียบกับ POS Terminal vehicle
  • ยืนยันว่า POS Terminal ตรงกับ Mobile ในส่วน vehicle loading ผ่าน getVehicles, search, dedupe ด้วย license plate, แก้สถานะผ่าน PATCH /vehicles/:licensePlate/vehicle-status, แก้หมายเหตุสถานะ, และ terminal-native split-panel detail behavior
  • ปรับ POS Terminal vehicle list card status labels และ tones ให้ตรง Mobile: READY เป็นสีเขียว, NOT_READY เป็นสีเหลือง, UNCHECKED เป็นสีแดง, และ unknown status fallback เป็น READY
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Expense bill list/detail parity audit

  • Audit ซ้ำ Mobile expense-bill list/detail behavior เทียบกับ POS Terminal expenseBill
  • ยืนยันว่า POS Terminal ตรงกับ Mobile ในส่วน list loading ด้วย branch-scoped query ignoreDraft=true, pageLimit=200, search, pagination/dedupe, card tones สำหรับ draft/retry-ready/sent bills, delete action ที่แสดงเสมอ, และ retry ที่แสดงเฉพาะ bill ที่ไม่ใช่ draft และไม่มี RefKey
  • ยืนยันว่า POS Terminal ตรงกับ Mobile ในส่วน detail behavior สำหรับ create/update validation, company/partner/vehicle selectors, vehicle mileage lookup, สิทธิ์แก้วันที่ผ่าน editDeliveryDate หรือแผนกบัญชี, draft branchId=0 update path, send-slip-later date toggle, transport-bill context, และ split-panel refresh callbacks
  • ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Docs updated:
    • governance/change-log

Deposit list/detail parity refresh

  • Audit ซ้ำ Mobile deposit list/detail behavior เทียบกับ POS Terminal deposit
  • ยืนยันว่า POS Terminal ตรงกับ Mobile ในส่วน retry-only filtering, retry/delete permission rules, card tones สำหรับรายการ deleted/retry-ready/sent, create/detail payload mapping, การคำนวณ amount/notes จาก invoice selection, bank/cash/company selectors, transport-deposit context, และ split-panel refresh behavior
  • ปรับ POS Terminal deposit service pagination ให้ request pageLimit=200 ตรงกับ deposit-specific list page size ของ Mobile และ threshold hasMore ใน terminal split-list
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer activation request parity refresh

  • Audit ซ้ำ Mobile customer request list/detail behavior เทียบกับ POS Terminal customerActivation
  • ยืนยันว่า POS Terminal ยังตรงกับ Mobile ในส่วน request-mode loading ด้วย isRequest, search, route และ shipping-type filters, pagination/dedupe, request status cards, request permission gates, approve/reject endpoints, refresh behavior, และ terminal-native split-panel navigation
  • ปรับข้อความยืนยัน approve/reject ของ POS Terminal ให้ตรงกับ wording ล่าสุดใน Mobile customer request detail
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer address management parity audit

  • Audit Mobile customer address GPS request list/detail behavior เทียบกับ POS Terminal customerAddressManagement
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วในส่วน list loading, search, pagination/dedupe, approved/rejected card tones, request-id guards, detail maps สำหรับพิกัดเก่า/ใหม่, pending-only approve/reject actions, confirmation copy, endpoint calls, และ success/error feedback
  • ยืนยันว่า POS Terminal คง terminal-native route filter ไว้โดยไม่เปลี่ยน default list behavior ที่เทียบเท่า Mobile
  • ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Docs updated:
    • governance/change-log

Credit note list/detail parity

  • Audit Mobile credit-note list loading, return-only filtering, delete permissions, detail save/status transitions, item edit/location rules, image upload/delete, และ B1 submission guards เทียบกับ POS Terminal creditNote
  • ยืนยันว่า POS Terminal list behavior ตรงกับ Mobile แล้วในส่วน branch-scoped queries, status/search filters, default return-only filter, pagination/dedupe, status labels/colors, และ list delete permission gates
  • ปรับ POS Terminal credit-note detail permissions ให้ RECEIVED เป็น received lock แบบเดียวกับ Mobile สำหรับ item actions และ B1 visibility; APPROVED/APPROVE/CANCELED จะไม่ถูกถือเป็น received lock ใน detail screen แล้ว
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Borrow list/detail parity

  • Audit Mobile borrow list loading, cancel permissions, product add/edit guards, draft confirmation, B1 accept/complete/retry actions, และ borrow printing เทียบกับ POS Terminal borrowFish
  • ยืนยันว่า POS Terminal ตรงกับ Mobile แล้วในส่วน borrow list query และ pagination, branch warehouse-group filtering, cancel permission gates, status colors, B1 department/admin handling, detail refresh, list refresh, และ pack/storage print ที่แยกตาม branch type
  • ปรับ POS Terminal borrow product add flow ให้เพิ่มสินค้าได้ก่อนเลือก borrowType เหมือน Mobile; ยังบังคับเลือก borrowType ตอนยืนยันสร้างใบเบิก
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Booking price list/detail parity

  • Audit Mobile booking-price list deletion, list query, detail permission gates, item save/delete, header save, และ convert-to-order behavior เทียบกับ POS Terminal bookingPrice
  • ยืนยันว่า POS Terminal list loading ตรงกับ Mobile แล้วในส่วน branch context, blank userCode, blank status filter, warehouse group filter, delete permission gates, detail created-day guard, owner checks, fill-weight/edit-price overrides, และ DRAFT/NEW/DONE/CANCELED/DELETED locks
  • ปรับ POS Terminal booking-price item payload ให้ companyName fallback จาก companyCode แบบเดียวกับ Mobile shared order-item payload builder
  • ปรับ POS Terminal convert-to-order fallback error text ให้ตรงกับ Mobile โดยคง terminal-native split-panel transition ไปยังใบสั่งขายที่สร้างแล้ว
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Storefront list/detail parity

  • Audit Mobile storefront list, card state, detail accept prompt, lot submission, และ cancel request behavior เทียบกับ POS Terminal shippingStorefront
  • ยืนยันว่า POS Terminal list loading สำหรับ storefront invoice ตรงกับ Mobile แล้ว: shippingType=2, status/search tabs, refKey และ invoice-id filtering, dedupe behavior, card colors, และการ block canceled invoice ไม่ให้เปิด detail
  • ปรับ POS Terminal storefront detail cancel action ให้สาขาหลักเปิด cancel flow ได้เมื่อ Mobile menu แสดง action นี้ แล้วปล่อยให้ shared cancel business rules ตัดสินว่า request ทำได้หรือไม่
  • ปรับ POS Terminal storefront submit/cancel fallback error messages ให้ตรงกับ Mobile โดยคง flow เดิมของ add-invoice-to-delivery, add-lots, create-delivery, refresh-detail, และ refresh-list
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Invoice manual-mode query parity

  • Audit Mobile invoice manual-payment mode data loading เทียบกับ POS Terminal invoice pending-B1/manual mode list loading
  • ปรับ POS Terminal invoice pending-B1 queries ให้ normalize numeric user code เป็น 6 หลักก่อนส่งเข้า API ให้ตรงกับ Mobile invoice list behavior
  • ปรับ POS Terminal invoice pending-B1/manual mode queries ให้แผนก 3 โหลดทุก user โดยไม่ส่ง user-code filter ให้ตรงกับ Mobile manual-payment mode behavior
  • คง non-department-3 date guard เดิมสำหรับ pending-B1 invoices ช่วงเมื่อวานถึงวันนี้
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Invoice cancel swipe-state parity

  • Audit Mobile invoice cancel request swipe behavior, owner/special-user checks, และ approve/reject modal flow เทียบกับ POS Terminal invoice split-list และ cancel modal
  • ปรับ POS Terminal invoice owner checks สำหรับ B1/cancel actions ให้ normalize numeric user code เป็น 6 หลักก่อน compare ให้ตรงกับ Mobile normalizeUserCode behavior
  • ปรับ POS Terminal invoice left-swipe rendering ให้แสดง Mobile-style disabled reasons สำหรับ invoice ที่จัดการคำขอยกเลิกไม่ได้: ไม่ใช่เจ้าของ, ยังไม่มีคำขอค้างอยู่, หรือถูกยกเลิกแล้ว
  • คง approve/reject modal และ API handlers ให้ตรงกับ Mobile พร้อมป้องกัน disabled swipe actions เปิด cancel-management modal
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Invoice B1 swipe-state parity

  • Audit Mobile InvoiceListScreen send-to-B1 swipe states, date guard, manual-payment selection, และ cancel request handling เทียบกับ POS Terminal invoice split-list behavior
  • ยืนยันว่า POS Terminal single-invoice send-to-B1 handler มี Mobile date guard, ref-key guard, cancel-request guard, confirmed-order guard, confirmation alert, และ refresh behavior อยู่แล้ว
  • ปรับ POS Terminal invoice right-swipe rendering ให้ invoice ที่มี pending cancel state และ non-confirmed status แสดง disabled action “ทำรายการไม่ได้” แทน active action “ส่ง B1” ให้ตรงกับ Mobile pre-action state
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Order review bulk-payment selection parity

  • Audit Mobile OrderListScreen shipping-review bulk payment selection และ submit behavior เทียบกับ POS Terminal salesOrderReview split-list bulk payment flow
  • ยืนยันว่า POS Terminal bulk payment mirror Mobile แล้วในส่วน CASH/TRANSFER modal, per-order payOrder submission, invoice-amount fallback, partial-failure reporting, และ list refresh
  • ปรับ POS Terminal salesOrderReview selection ให้ prune selected orders หลัง visible list refresh ให้ตรงกับ Mobile behavior และป้องกัน stale selections ถูกนำไปชำระหลัง filter หรือ refresh เปลี่ยนรายการ
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Order payment QR flow parity

  • Audit Mobile OrderPaymentScreen, OrderPaymentMethodSection, order-payment utils, QR generation, invoice print, retry-invoice, และ payment submit behavior เทียบกับ POS Terminal OrderDetailForm
  • ปรับ POS Terminal order payment ให้เมื่อเลือก QR จะโหลด QR Payment อัตโนมัติเมื่อ payment section เปิดอยู่ ให้ตรงกับ Mobile auto QR generation behavior
  • ปรับ POS Terminal QR payment behavior ให้ซ่อน normal payment-submit action สำหรับ QR และ guard handleSubmitPayment ไม่ให้ submit QR เป็น cash payment; QR จะใช้ create/share/check-payment actions แบบเดียวกับ Mobile
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Employee profile settings parity audit

  • Audit Mobile EmployeeProfileScreen, HeaderHome profile navigation, employee profile password-reset flow, และ auth reset-password services เทียบกับ POS Terminal settings profile action และ EmployeeDetailForm
  • ยืนยันว่า POS Terminal map dedicated profile route ของ Mobile เป็น terminal-native settings action ที่เปิด current user ใน employee split panel พร้อมโหลด detail ล่าสุด
  • ยืนยันว่า POS Terminal ครอบคลุมข้อมูลพื้นฐานและ own-password flow ของ Mobile: ชื่อผู้ใช้, อีเมล, แผนก, user code, ขอ reset salt, แก้ salt/reset-password fields, submit new password, และ logout หลังเปลี่ยนรหัสผ่านของผู้ใช้ปัจจุบัน
  • ยืนยันว่า POS Terminal ยังรักษา employee admin permission editing และ branch/warehouse transfer-receive settings ไว้ใน employee detail panel เดียวกัน
  • ปรับ POS Terminal employee detail password policy ให้ full new-password form เปิดใช้เฉพาะโปรไฟล์ของผู้ที่ login อยู่; manager/admin ยังใช้ reset-salt action แบบ Mobile สำหรับผู้ใช้อื่น
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Notification settings parity audit

  • Audit Mobile NotificationsScreen, Home foreground-notification registration, login FCM token refresh, และ services/notifications เทียบกับ POS Terminal settings notification modal, user-selection login flow, Home foreground handler, และ notification service
  • ยืนยันว่า POS Terminal คงพฤติกรรม notification test ของ Mobile ในรูปแบบ terminal-native settings modal แทน dedicated route: refresh current FCM token, แสดง token แบบ selectable, ล้าง token เก่าแล้วขอใหม่, และ register foreground/background handlers
  • ยืนยันว่า POS Terminal login ยัง refresh และส่ง/เก็บ FCM token ไปกับ login payload data ให้ตรงกับ Mobile login behavior
  • ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Docs updated:
    • governance/change-log

Order item shortcut payload parity

  • Audit current Mobile order item creation paths สำหรับ duplicate invoice item import และ product-picker submission เทียบกับ POS Terminal Home order shortcuts
  • ปรับ POS Terminal Home order shortcuts ให้สร้าง order item payload ด้วย order-specific fields ชุดเดียวกับ Mobile และ OrderDetailForm: onHand, bookingQty, uomCode/uomName, warehouse code/group fields, company fallback, VAT group, current step price, และ editPriceBy
  • คง borrow document item creation ให้ใช้ borrow-specific payload helper เดิม เพื่อไม่กระทบ borrow flows
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer-to-document branch shipping parity

  • Audit current Mobile customer list/detail creation flows สำหรับ sales order, booking price, และ borrow documents เทียบกับ POS Terminal Home split-panel document creation
  • ปรับ POS Terminal sales-order creation จาก selected customer/product ให้ branch-specific draft payload บังคับ storefront shipping type (2) เมื่อไม่ใช่ main branch ให้ตรงกับ Mobile order draft behavior
  • ปรับ POS Terminal customer document draft helpers ให้ booking/borrow draft creation ใช้ branch shipping-type rule เดียวกัน และส่ง ShipTo latitude/longitude เข้า draft payload
  • ปรับ customer-to-order address mapping ให้ billing address fallback เป็น customer address รายการแรก และคง route data จาก shipping address ให้ใกล้กับ current Mobile draft mapping มากขึ้น
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer picker list parity

  • Audit Mobile customer list selection behavior สำหรับ sales order, booking price, และ borrow creation เทียบกับ POS Terminal CustomerPickerModal และ Home document creation handlers
  • ปรับ POS Terminal customer picker filters ให้ default เป็น shipping type ทั้งหมด และเพิ่ม chip “ทั้งหมด” ให้ตรงกับ Mobile customer list default แทนการแสดงเฉพาะลูกค้าสายส่งก่อน
  • ปรับ POS Terminal customer picker pagination ให้โหลดต่อเมื่อ API ยังส่ง row กลับมา และ dedupe customers ที่ append ด้วย customer id, id, หรือ customer code ให้ตรงกับ Mobile customer list behavior
  • คง terminal-native customer detail preview และ split-panel document creation flow เดิม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Split-list swipe interaction parity

  • Audit Mobile SwipeableFlashList row coordination และ common list load-more/refresh behavior เทียบกับ POS Terminal SwipeableRow และ Home ListPane
  • ปรับ POS Terminal SwipeableRow ให้ expose close/reset methods และ open/close callbacks เพื่อให้ parent list coordinate open swipe actions ได้แบบเดียวกับ Mobile
  • ปรับ POS Terminal ListPane ให้ปิด row ที่เปิดอยู่ก่อนหน้าเมื่อเปิด row ใหม่ และปิด swipe actions ที่เปิดอยู่เมื่อเริ่ม scroll list ให้ตรงกับ Mobile SwipeableFlashList ใน terminal split-list menus
  • คง terminal-native split-panel list controls และ per-menu swipe actions เดิม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Printing utility and print-demo parity audit

  • Audit Mobile PrintDemoScreen, core print helpers, shipping print helpers, และ print-log behavior เทียบกับ POS Terminal Home settings print demo และ printing/print utilities
  • ยืนยันว่า POS Terminal เปิด Mobile 16K sample print ผ่าน terminal settings action แทน route แยก พร้อม loading และ alert handling ตามรูปแบบ terminal
  • ยืนยันว่า POS Terminal print utilities ครอบคลุม Mobile ในส่วน order pack/storage, borrow pack/storage, invoice print พร้อม QR assets และ tax/branch/user context, shipping invoice print, shipping invoice batch template, shipping product summary, และ print-log best-effort behavior
  • ยืนยันว่า POS Terminal คง current Mobile-visible shipping invoice row print และ transport product-summary print actions โดยใช้ split-panel entry points ของ terminal
  • ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Branch setup and tax context parity audit

  • Audit Mobile branch selection, branch storage, tax storage, branch/tax service calls, และ RootNavigator branch-required flow เทียบกับ POS Terminal App, BranchScreen, storage helpers, และ auth/common services
  • ยืนยันว่า POS Terminal ตรงกับ Mobile ใน branch loading contract โดยโหลดสาขาทั้งหมดด้วย fallback user 999999 และโหลดสาขาของ user ปัจจุบันแยกกัน
  • ยืนยันว่า POS Terminal ตรงกับ Mobile ใน warehouse selection behavior: filter คลังย่อย, เพิ่มคลังหลักเฉพาะเมื่อสาขาหลักที่เลือกอยู่ใน user branches, selected warehouse payload shape, save branch ก่อนเข้า app step ถัดไป, และ fetch/save tax แบบ best-effort หลังเลือกสาขา
  • ยืนยันว่า POS Terminal คง terminal-native branch settings return path จากทั้ง user selection และ Home โดยยังรักษา branch/tax context contract เดียวกับ Mobile
  • ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Docs updated:
    • governance/change-log

Login required-update and alcohol-check parity

  • Audit Mobile login, reset-password, FCM token refresh, user permission patching, required app update, native app version, และ alcohol-check services เทียบกับ POS Terminal UserSelectionScreen, app update hook, และ entry-flow services
  • ยืนยันว่า POS Terminal ครอบคลุม Mobile ในส่วน missing-required-values reset transition ทั้ง selected-user และ employee-code login paths, password reset payload, alcohol-check department และ bypass rules, FCM token patch, และ required-update modal contract
  • ปรับ POS Terminal native app version fallback ให้ตรงกับ Mobile โดยคืน version fields เป็นค่าว่างเมื่อ native AppVersionModule ไม่ส่งค่ากลับมา เพื่อป้องกัน required-update check ใช้ versionCode=1 ที่สร้างจาก fallback
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer management parity update

  • Audit Mobile customer services, customer list/detail, customer management edit/detail, customer address GPS request list/detail, และ customer activation request behavior เทียบกับ POS Terminal customer split-list services และ detail forms
  • ยืนยันว่า POS Terminal ครอบคลุม endpoint contract ของ Mobile ในส่วน customer call logging, status updates, address creation, default-address selection, GPS update request, customer draft approve/reject, customer activation approve/reject, และ customer address GPS approve/reject
  • ปรับ POS Terminal customer management draft save ให้บังคับ required first name, last name, birthday, customer type, และ know-us validation ทั้ง create และ update ให้ตรงกับ Mobile
  • ปรับ POS Terminal customer management draft payload ให้ format เบอร์โทร 10 หลักด้วยขีด และไม่ส่ง aliasName เมื่อแก้ไข draft ที่ผูกกับ SAP customer เดิม เพื่อให้ตรงกับ Mobile save behavior
  • เพิ่ม action “เพิ่มที่อยู่จัดส่งอัตโนมัติ” ใน POS Terminal customer management address editor ให้การเพิ่ม address ใหม่สามารถสร้าง delivery address copy ได้เหมือน Mobile
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Expense bill and invoice financial-flow parity

  • Audit Mobile expense bill services, list pagination, detail form permissions, vehicle mileage loading, partner/company selectors, create/update payloads, transport update flow, delete, และ retry behavior เทียบกับ POS Terminal ExpenseBillDetailForm, split-list handlers, และ expenseBill service
  • ปรับ POS Terminal getExpenseBills ให้ request pageLimit=200 ตรงกับ Mobile และ terminal split-list hasMore threshold เพื่อให้ทุก entry point ของ expense bill ใช้ pagination contract เดียวกัน
  • Audit Mobile invoice list, pending-B1 tab, manual payment selection, summary modal, send-to-B1 guards, approve/reject cancel flow, invoice detail, duplicate-order action, และ invoice services เทียบกับ POS Terminal InvoicePanels, Home invoice handlers, split-list services, และ invoices service
  • ยืนยันว่า POS Terminal ตรงกับ Mobile ในส่วน invoice query parameters, pending-B1 200-row query, manual-selection guards สำหรับ refKey, pending cancel, และ confirmed order status, single-send date guard, selected-send action, cancel approval/reject endpoints, และ summary endpoint
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Transfer flows current-source parity audit

  • Re-audit Mobile Transfer In, Transfer Out, และ Transfer Warehouse services, list screens, detail screens, product pickers, Lot/Batch pickers, submit payloads, delete actions, และ B1 submission behavior เทียบกับ POS Terminal split-panel transfer implementations
  • ยืนยันว่า POS Terminal ตรงกับ Mobile ในส่วน Transfer In context tabs, product inventory subscription, dummy-product handling, batch quantity normalization, transfer-in submit payload, และ branch/user fallback fields
  • ยืนยันว่า POS Terminal ตรงกับ Mobile ในส่วน Transfer Out batch picker, duplicate batch guard, available-quantity guard, pending-quantity validation, complete-batch-before-submit rule, และ transfer-out submit payload
  • ยืนยันว่า POS Terminal ตรงกับ Mobile ในส่วน Transfer Warehouse list fetch/delete, header create/update, warehouse picker, item create/update/delete, batch selection, send-to-B1 guard, และ transfer-branch endpoint contract โดยคง terminal-native split-panel save model
  • ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Docs updated:
    • governance/change-log

Goods receipt current-source parity audit

  • Re-audit Mobile goods receipt list/detail, stock-in service, product picker, shared dummy-product helper, line quantity validation, Lot/Batch editing, Lot/Batch delete, และ stock-in submit payload เทียบกับ POS Terminal GoodsReceiptDetailForm และ goodsReceipts service
  • ยืนยันว่า POS Terminal ตรงกับ Mobile ในส่วน branch-scoped goods receipt fetch, product inventory subscription, company-matched product picker, duplicate product guard, generated batch code behavior, blank/negative quantity validation, batch quantity payload normalization, และ stock-in endpoint
  • ยืนยันว่า POS Terminal คง split-panel UI ตามรูปแบบ terminal และมี duplicate batch number guard เพิ่มก่อน submit โดยไม่เปลี่ยน Mobile-equivalent payload contract
  • ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Docs updated:
    • governance/change-log

Product inventory and add-to-order parity

  • Audit Mobile product list/detail, product services, step-price display, และ add-to-sales-order payload behavior เทียบกับ POS Terminal product split-list, ProductDetailForm, product services, และ Home sales-order creation handler
  • ปรับ POS Terminal inventory query ให้ใช้ warehouse-code set เดียวกับ Mobile (whsGrpCode, PC-{whsGrpCode}, และ NF-{whsGrpCode}) และกรองสินค้าราคา 0 ออกจาก product inventory list
  • ปรับ POS Terminal step-price normalization และ tier label ให้ตรงกับ Mobile ทั้ง from/From, price/Price, ไม่เกิน, และ เกิน ... ไม่เกิน
  • ปรับ company-name fallback ของ terminal add-to-order item payload ให้รองรับ lowercase comName ตรงกับ product detail display และ fallback coverage ของ Mobile
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Order payment invoice print QR parity

  • Audit Mobile OrderPaymentScreen ส่วนพิมพ์ใบแจ้งหนี้, duplicate invoice guard, retry invoice, อัปโหลดสลิป, QR payment, และ payment submit เทียบกับ POS Terminal OrderDetailForm
  • ปรับ POS Terminal payment invoice print ให้ส่ง order detail ปัจจุบันเข้า printInvoice เหมือน Mobile เพื่อให้ QR generation ใช้ยอดและส่วนลดระดับ order ทั้ง point/coupon/credit note ได้ครบ
  • คง terminal split-panel payment flow, duplicate-invoice blocking, retry refresh, และ payment payload behavior เดิม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

QR service and service-export coverage audit

  • Re-audit Mobile services/qr เทียบกับ POS Terminal services/qr รวมถึง SCB token requests, signed QR payment payloads, Firestore qrPayment cache reads/writes, claim QR generation, transport QR reference formatting, blank fallback assets, และ invoice print QR asset behavior
  • ยืนยันว่า POS Terminal ตรงกับ Mobile QR contracts โดยยังคง helper boundary เฉพาะของ terminal สำหรับคำนวณ QR amount
  • รัน current-source service export coverage audit แบบ resolve export * ครบ 30 service files ของ Mobile แล้ว POS Terminal service coverage ได้ missingCount: 0
  • ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Docs updated:
    • governance/change-log

Home menu permission current-source audit

  • Re-audit current Mobile Home menu visibility, branch gates, และ shortcut create permission sets เทียบกับ POS Terminal terminalMenus, canAccessMenu, และ list-panel create controls
  • ยืนยันว่า POS Terminal ยังตรงกับ Mobile department allowlists สำหรับ sales order, order review, booking, invoice, shipping route, storefront, borrow, stock, product, customer, transport, customer management, customer activation, credit note, employee, vehicle, deposit, expense bill, และ Home create shortcut sets
  • ยืนยันว่า POS Terminal คง non-main branch access สำหรับ stock menus และ main-branch gates สำหรับ shipping route, borrow, transport, และ expense bill ให้ตรง Mobile โดยยังใช้ split-panel create buttons ตามรูปแบบ terminal
  • ตรวจ runtime create entry points ปัจจุบันซ้ำแล้ว ยืนยันว่า ListPane ใช้ canCreateSalesOrder, canCreateShippingRoute, canCreateTransport, และ canCreateDeposit ที่ตรงกับ Mobile Home shortcut visibility; helper set เก่าที่ต่างไม่ได้ถูกใช้กับปุ่มสร้างใบจัดสายส่งที่ผู้ใช้เห็น
  • ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Notification settings utility parity audit

  • Re-audit Mobile NotificationsScreen และ notification services เทียบกับ POS Terminal settings notification modal และ notifications service
  • ยืนยันว่าทั้งสองแอปใช้ Firebase modular messaging boundary เดียวกันสำหรับ permission request, background handler registration, foreground notification handling, token refresh, และ clear-and-refresh token behavior
  • ยืนยันว่า POS Terminal คง token inspection และ clear-token utility ของ Mobile ไว้ใน terminal settings modal พร้อม loading และ alert handling ตามรูปแบบ terminal
  • Docs updated:
    • governance/change-log

Customer address source current-diff re-audit

  • Recheck current Mobile diff เรื่อง dbAddress extraction และ customer/customer-management address option normalization เทียบกับ POS Terminal CustomerDetailForm และ CustomerManagementDetailForm
  • ยืนยันว่า POS Terminal import dbAddress จาก @bsr/utils อยู่แล้ว และ normalize district, amphoe, province, zip code เป็น string สำหรับ address picker ทั้ง customer และ customer-management
  • ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck and yarn workspace @bsr/mobile tsc --noEmit.
  • Docs updated:
    • governance/change-log

Current route and service coverage re-audit

  • Rebuild Mobile route list จาก current apps/mobile/src/navigation/RootNavigator.tsx แล้ว map ทั้ง 49 routes ไปยัง POS Terminal Home split-panel menus, detail forms, branch/login screens, หรือ settings utilities
  • ยืนยันว่า current route mapping มี missingCount: 0; mobile stack screen เช่น OrderPayment, CustomerManagementEdit, Notifications, และ PrintDemo ถูกแทนด้วย terminal-native panels หรือ settings actions แล้ว
  • Re-run Mobile-vs-POS Terminal service export coverage audit ครอบคลุม Mobile service 30 ไฟล์ และยืนยันว่าไม่มี terminal service file หรือ exported service helper ที่ขาด หลังใช้ alias ชื่อไฟล์ singular/plural ของ terminal
  • ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Docs updated:
    • governance/change-log

Storefront cancel-note validation parity

  • Audit Mobile storefront list/detail, helper permissions, lot payload submission, accept flow, cancel flow, และ services เทียบกับ POS Terminal StorefrontDetailForm, StorefrontDetailHelpers, และ split-list services
  • ยืนยันว่า POS Terminal ตรงกับ Mobile ในส่วน storefront list filters, invoice detail endpoint, accept endpoint, non-main-branch accept rollout, stock-check permissions, Lot/Batch payload, submit-to-B1 sequence, และ cancel guard สำหรับ invoice ที่มีส่วนลด/Incoming
  • ปรับ POS Terminal cancel submission ให้บังคับกรอกเหตุผลก่อนเรียก cancel API เหมือน Mobile validation กรุณาระบุเหตุผลการยกเลิก และปรับข้อความ success ให้ตรงกัน
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Borrow item edit stock parity

  • Audit Mobile borrow list/detail permissions, status actions, item create/edit/delete, print actions, และ borrow services เทียบกับ POS Terminal BorrowDetailForm, Home borrow handlers, BorrowPanels, และ borrow services
  • ยืนยันว่า POS Terminal ตรงกับ Mobile ในส่วน borrow type options, create/cancel/B1 department gates, confirm/accept/complete/retry actions, item id fallback สำหรับ update/delete, จำกัด 3 รายการ, จำกัด 3 ชิ้นต่อรายการ, และ pack/storage print guards
  • ปรับ POS Terminal borrow item edit stock validation ให้บวกจำนวนเดิมของ line กลับเข้า editable stock เมื่อแก้สินค้ารายการเดิม เหมือน Mobile edit flow เพื่อไม่ให้รายการเดิมถูก block ด้วย booking quantity ของตัวเอง
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Deposit transport amount edit parity

  • Audit Mobile deposit list/detail, invoice selection, company/cash/bank account pickers, retry/delete actions, transport deposit create flow, และ deposit services เทียบกับ POS Terminal DepositDetailForm, DepositPanels, split-list handlers, และ deposit services
  • ยืนยันว่า POS Terminal ตรงกับ Mobile ในส่วน deposit filters, retry-only mode, delete/retry gates, selected-invoice amount/notes derivation, company code normalization, bank/cash account loading, transport update หลังสร้าง deposit, และ deposit pagination 200 rows
  • ปรับ POS Terminal deposit create mode ให้ช่องจำนวนเงินยังแก้ได้เมื่อเปิด deposit มาจาก transport และไม่ได้เลือก invoice เหมือน Mobile rule isCreateMode && selectedInvoices.length === 0
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Vehicle current-source parity audit

  • Re-audit Mobile VehicleListScreen และ common vehicle services เทียบกับ POS Terminal VehicleDetailForm, vehicle split-list loading, และ common vehicle services
  • ยืนยันว่า POS Terminal ตรงกับ Mobile ในส่วน vehicle search, dedupe by license plate, normalize status UNCHECKED / READY / NOT_READY, status labels/colors, updateVehicleStatus payload, status note handling, และ refresh หลังบันทึก
  • ยืนยันว่า terminal คง behavior เดิมไว้ใน split-panel detail form แทน Mobile status modal โดยไม่เปลี่ยน service contract
  • ไม่ต้องแก้ source ของ POS Terminal เพิ่ม
  • Docs updated:
    • governance/change-log

Credit note draft item payload parity

  • Audit Mobile credit-note helpers, permission gate การลบจาก list, flow สร้าง draft จาก invoice, guard save/send-to-B1, item editing, และ lot selection เทียบกับ POS Terminal CreditNoteDetailForm, list actions, และ Home handlers
  • ยืนยันว่า POS Terminal ใช้ status label, department permission set, delete rule, next-status behavior, B1 preflight checks, invoice item mapping, และ lot update payload ตรงกับ Mobile โดยยังคง split-pane workflow แบบ terminal เดิม
  • ปรับ dependency ของ item submit callback ใน POS Terminal เพื่อให้การสร้าง credit note จาก draft ใช้ header field ล่าสุด เช่น reason ที่เลือก, warehouse, company, และ branch data ตอน build initial draft payload
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer shared address data parity audit

  • Audit Mobile customer detail และ customer-management edit ที่ย้าย dbAddress ไป @bsr/utils และ normalize Thai address field เป็น string
  • ยืนยันว่า POS Terminal CustomerDetailForm และ CustomerManagementDetailForm import dbAddress จาก @bsr/utils, ใช้ type ThaiAddressRecord กลาง, และ normalize district, amphoe, province, zipcode เป็น string ก่อนเติม address picker และ payload แล้ว
  • รอบนี้ไม่ต้องแก้ POS Terminal source code เพิ่ม
  • Docs updated:
    • governance/change-log

Shared dummy product stock-picker parity audit

  • Audit การย้าย dummy product ของ Mobile ไป @bsr/utils เทียบกับ POS Terminal goods receipt, transfer-in, และ transfer-warehouse stock picker
  • ยืนยันว่า POS Terminal import buildDummyProducts จาก @bsr/utils ใน stock flow ทั้งสามจุดแล้ว, ใช้ชุด dummy BFPDB/NFF กลางเดียวกัน, เติม warehouse/company จาก branch ที่เลือกและ company ของเอกสาร, และใช้ product search behavior เดียวกันก่อนแสดงรายการใน picker
  • รอบนี้ไม่ต้องแก้ POS Terminal source code เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Service filename alias parity audit

  • รัน audit service export จาก source ปัจจุบันเทียบ Mobile กับ POS Terminal และตรวจ gap ที่เกิดจากชื่อไฟล์ singular/plural
  • ยืนยันว่า POS Terminal ครอบคลุม export ของ Mobile goodsReceipt, transferIn, transferOut, และ user ผ่านไฟล์ terminal goodsReceipts, transferIns, transferOuts, และ users แล้ว และ detail form ที่เกี่ยวข้อง import service boundary เหล่านี้โดยตรง
  • ยืนยันว่า helper เพิ่มเติม getTransferInsForTerminal ตั้งใจใช้ merge tab transfer-in ของคลังหลักและ NF- สำหรับ terminal split-list โดยยังคง endpoint Mobile getTransferIns และ createTransferIn ไว้
  • รอบนี้ไม่ต้องแก้ POS Terminal source code เพิ่ม
  • Docs updated:
    • governance/change-log

Customer address management route parity audit

  • Audit Mobile route CustomerManagementAddressList และ CustomerManagementAddressDetail เทียบกับ POS Terminal menu customerAddressManagement, split-list loader, และ CustomerAddressManagementDetailForm
  • ยืนยันว่า POS Terminal โหลด /customer-draft/address-lat-lng ด้วย page/search/branch context, dedupe list row ตอน append ตาม request id, resolve detail id จาก id หรือ customerDraftId, และใช้ approve/reject endpoint เดียวกับ Mobile
  • ยืนยันว่า terminal detail panel คงข้อมูล summary ของคำขอ, ข้อมูลลูกค้า/ที่อยู่, map preview ของพิกัดที่ขอและพิกัดปัจจุบัน, action อนุมัติ/ไม่อนุมัติเฉพาะสถานะ pending, และ refresh detail/list หลังตัดสินใจแล้ว
  • รอบนี้ไม่ต้องแก้ POS Terminal source code เพิ่ม
  • Docs updated:
    • governance/change-log

Employee transfer receive setting route parity audit

  • Audit Mobile route EmployeeTransferReceiveSetting เทียบกับ POS Terminal employee detail panel
  • ยืนยันว่า POS Terminal ยุบ route นี้เข้า EmployeeDetailForm แล้ว โดยใช้ branch loading, employee branch lookup, warehouse/sub-warehouse filtering, main-branch inclusion rule, branch warehouse permission fetch, optimistic warehouse toggle state, และ create/update endpoints ชุดเดียวกับ Mobile
  • ยืนยันว่า Terminal คง access model แบบ split-panel โดย gate การตั้งค่ารับโอนภายในสาขาหลัง employee manage permission และยังใช้ payload shape ของ warehouse permission ตรงกับ Mobile
  • ตรวจซ้ำ toggle implementation ปัจจุบันของ Terminal เทียบกับ Mobile และยืนยันว่า warehouse permission row ยัง match ด้วย whsCode === whsGrpCode, create request ส่ง whsCode, whsName, และ canApprove, update request ส่ง target canApprove state, และ reload permissions หลัง save ทุกครั้ง
  • รอบนี้ไม่ต้องแก้ POS Terminal source code เพิ่ม
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Branch selector user-branch parity

  • Audit Mobile BranchScreen เทียบกับ POS Terminal branch selector ที่เปิดจาก terminal settings
  • ปรับ POS Terminal branch loading ให้ตรง Mobile โดยโหลดสาขาที่เลือกได้ทั้งหมดด้วย fallback user 999999 และโหลด branch list ของ user ปัจจุบันแยกจาก stored userCode
  • ยังคง UI theme/settings แบบ terminal เดิม แต่ทำให้ main-warehouse inclusion rule เคารพสิทธิ์ branch ของ user เหมือน Mobile แทนการถือว่าทุก branch เป็นของ user
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Login missing-password reset parity

  • Audit Mobile LoginScreen sign-in, alcohol check, FCM token patch, reset-password, และ required-update guard เทียบกับ POS Terminal UserSelectionScreen
  • ปรับ POS Terminal login error handling ให้ error Missing required values / UnauthorizedException: Missing required values. เปิด reset-password step เดิมอัตโนมัติ เหมือน Mobile
  • ใช้พฤติกรรมนี้กับ login entry point ของ terminal ทั้งแบบเลือก sale-person แล้วกรอกรหัสผ่าน และแบบกรอกรหัสพนักงานเอง
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Expense bill selection clear-search parity

  • Audit Mobile expense-bill detail company, vehicle, partner, mileage, save, และ transport-update flow เทียบกับ POS Terminal ExpenseBillDetailForm และ expense-bill services
  • เพิ่มปุ่มล้างคำค้นหาใน POS Terminal expense-bill selection modal รวมถึง vehicle remote search ที่ล้างแล้ว reload page 1 ด้วย query ว่าง ให้ตรงกับพฤติกรรม Mobile SelectionModal
  • ยังคง modal surface แบบ terminal เดิม โดยเพิ่มเฉพาะ clear action ที่ขาด; company และ partner ล้างคำค้นใน local list ส่วน vehicle ล้างแล้ว refetch
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Vehicle status parity audit

  • Audit Mobile VehicleListScreen และ common vehicle services เทียบกับ POS Terminal VehicleDetailForm, vehicle split-list normalization, และ common vehicle endpoints
  • ยืนยันว่า POS Terminal normalize สถานะ UNCHECKED / READY / NOT_READY, dedupe ยานพาหนะตามทะเบียนรถ, ค้นหาผ่าน MST vehicle endpoint เดียวกัน, บันทึก vehicleStatus พร้อม vehicleStatusNote, patch item ที่เลือกใน list/detail, และ refresh vehicle list หลังบันทึก
  • รอบนี้ไม่ต้องแก้ source code เพิ่ม
  • Docs updated:
    • governance/change-log

Order payment flow parity audit

  • Audit Mobile OrderPaymentScreen, order payment utilities, QR generation, slip upload, และ payment submission เทียบกับ POS Terminal OrderDetailForm
  • ยืนยันว่า POS Terminal ครอบคลุม invoice bootstrap/creation, การ block ใบแจ้งหนี้ซ้ำ, ช่องทาง CASH/TRANSFER/QR, อัปโหลดและลบสลิปโอนเงิน, สร้าง/แชร์/ตรวจ QR, mapping payload QR ไปเป็น CASH, และ refresh detail/list หลัง payment action แล้ว
  • รอบนี้ไม่ต้องแก้ source code เพิ่ม
  • Docs updated:
    • governance/change-log

ขนส่ง QR payment reference parity

  • Audit Mobile services/qr transport payment QR reference payload เทียบกับ POS Terminal QR generation
  • ปรับ POS Terminal transport QR generation ให้สร้าง ref1 จาก transport id/number รวม latitude และสร้าง ref2 จาก customer code รวม longitude ให้ตรงกับการจัดการ ref3 และ customer-code normalization ของ Mobile
  • ยังคง UI ชำระเงินขนส่งแบบ terminal เดิม แต่ payload ที่ส่งไป SCB gateway ตรงกับ Mobile แล้ว
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Product detail create-order parity audit

  • Audit Mobile product detail/list order-item creation flow เทียบกับ POS Terminal ProductDetailForm, getProductSplitDetail, และ Home create-order handler
  • ยืนยันว่า POS Terminal โหลด product detail และ step price, validate จำนวนและสินค้าคุมน้ำหนัก, สร้าง sales order หลังเลือก customer, เพิ่ม product item ที่เลือก, และ update ยอด/น้ำหนักรวมของ order ด้วย flow customer picker แบบ terminal เดิม
  • ยืนยันว่า item payload ยังมี field สำคัญเทียบ Mobile เช่น product code/name, quantity, price, amount, weight, UOM, warehouse, company, VAT, weight-base flag, และ step-price flag
  • รอบนี้ไม่ต้องแก้ source code เพิ่ม
  • Docs updated:
    • governance/change-log

Employee menu and profile access parity

  • Audit Mobile getEmployeeAccess, employee list, detail, และ profile behavior เทียบกับ POS Terminal Home employee menu/profile flow
  • ปรับ POS Terminal menu filtering ให้ผู้ใช้ isAdmin เปิดเมนู ผู้ใช้ทั้งหมด ได้ แม้ dept code ไม่อยู่ใน employee allowlist เพื่อให้ตรงกับ employee access policy ของ Mobile
  • เพิ่ม fallback สำหรับ profile detail เพื่อให้ผู้ใช้เปิดโปรไฟล์ตัวเองจาก terminal settings ได้ แม้ไม่มีเมนูรายชื่อผู้ใช้ใน sidebar; ยังไม่เปิด full employee list ให้ผู้ใช้ทั่วไป
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Employee password management permission parity

  • Audit Mobile employee detail password reset/change access เทียบกับ POS Terminal EmployeeDetailForm
  • ปรับ POS Terminal ให้ผู้ที่มีสิทธิ์จัดการข้อมูลพนักงานสามารถใช้ flow ขอข้อมูลรีเซ็ต/ตั้งรหัสผ่านใหม่ให้พนักงานคนอื่นได้เหมือน policy getEmployeeAccess ของ Mobile; การเปลี่ยนรหัสของโปรไฟล์ตัวเองยังใช้ได้เหมือนเดิม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Required app update flow parity audit

  • Re-audit Mobile appUpdate, useRequiredAppUpdate, Login, และ HeaderHome เทียบกับ POS Terminal appUpdate, useRequiredAppUpdate, RequiredAppUpdateModal, UserSelectionScreen, และ HomeScreen
  • ยืนยันว่า POS Terminal ยังอ่าน Firestore version/vapp, เทียบ native versionCode กับ remote platform-aware versionNumber, และ block UI ด้วย modal ที่ปิดไม่ได้เมื่อจำเป็นต้องอัปเดต
  • ยืนยันว่า screen ฝั่ง terminal ที่เทียบกับ login ตรวจตอน mount และตอน refresh เอง ส่วน Home re-check บน navigation focus เหมือน Mobile HeaderHome
  • รอบนี้ไม่ต้องแก้ source code เพิ่ม
  • Docs updated:
    • governance/change-log

Swipeable row action-layer parity

  • Audit Mobile SwipeableFlashList custom swipe row หลัง RN upgrade เทียบกับ POS Terminal SwipeableRow
  • ปรับ POS Terminal swipe rows ให้ hidden action layers กดไม่ได้ก่อน row เปิด, action layers อยู่หลัง item ด้วย z-index/elevation pattern แบบเดียวกัน, แตะ action แล้วปิด row หลัง action ทำงาน, และแตะ overlay บน item ที่เปิดอยู่เพื่อปิด row ได้
  • พฤติกรรมนี้ตรงกับการกันปุ่ม bleed-through ของ Mobile โดยยังคง API SwipeableRow เดิมของ POS Terminal ที่ใช้ใน list card และ detail item rows
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Firebase modular API parity audit

  • Audit Mobile RNFirebase v24 modular API cleanup เทียบกับ POS Terminal Firebase usage
  • ยืนยันว่า POS Terminal ใช้ modular getApp(), getFirestore, getMessaging, collection, doc, และ helper ที่เกี่ยวข้องแล้วใน app update checks, notifications, print logs, QR payment cache, product inventory subscriptions, และ shipping route prefill checks
  • ไม่พบ namespaced firestore() หรือ messaging() ค้างใน POS Terminal source รอบนี้จึงไม่ต้องแก้โค้ดเพิ่ม
  • Docs updated:
    • governance/change-log

ขนส่ง signature modal sizing parity

  • Audit Mobile transport signature modal sizing เทียบกับ POS Terminal TransportDetailForm
  • ปรับ POS Terminal signature canvas ให้ใช้ responsive height rule เดียวกับ Mobile (min 360, max 520, 62% ของ window height) โดยยังคง modal surface แบบ terminal เดิม
  • ปรับ embedded web style ของ signature canvas ให้เป็น flex column แยก body/footer แบบ Mobile และตั้ง label ปุ่มเป็น ลบ / บันทึก
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer Tax ID parity audit

  • Audit Mobile customer Tax ID field coverage เทียบกับ POS Terminal customer และ customer-management detail flows
  • ยืนยันว่า POS Terminal มี taxID ใน customer draft edit state และ payload แล้ว, แสดง Tax ID ใน customer-management detail และ customer detail, รวมถึงแสดง Tax ID ใน customer picker detail card
  • รอบนี้ไม่ต้องแก้โค้ด POS Terminal เพิ่ม
  • Docs updated:
    • governance/change-log

Home branch-focus list refresh parity

  • Audit Mobile Home branch-focus refresh เทียบกับ POS Terminal Home focus handling
  • POS Terminal reload login date, user, และ branch จาก storage ตอน focus อยู่แล้ว; เพิ่ม branch context key ให้ Home list bootstrap effect เพื่อให้เมื่อกลับจากการเลือก branch/warehouse จะล้าง detail เก่าและ reload list ของเมนูปัจจุบันตาม warehouse ใหม่ด้วย
  • ทำให้ข้อมูล panel ใน Terminal sync เมื่อสลับระหว่างคลังหลักและคลังย่อย โดยไม่ต้องกด refresh หรือเลือกเมนูใหม่เอง
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

ขนส่ง finalize permission rollback parity

  • Audit Mobile transport detail sort/finalize permission rollback เทียบกับ POS Terminal TransportDetailForm
  • ยืนยันว่า POS Terminal transport sorting ต้องเป็นเจ้าของเอกสารอยู่แล้ว และไม่มี override 999999 ค้างอยู่
  • ปรับ finalize-all permission ให้ตรง Mobile โดยเพิ่ม canFinalizeShippingSheet ด้วย department set เดียวกัน (-2, 1, 2, 4, 7, 8, 9, 13, 16, 29, 30) แล้วใช้กับปุ่ม POS Terminal อนุมัติใบจัดทั้งหมด แทน check เดิมที่กว้างกว่า deptCode !== 0
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Shipping Lot/Batch guard-order parity audit

  • Audit Mobile shipping-detail Lot/Batch open guards เทียบกับ POS Terminal ShippingRouteDetailForm
  • ยืนยันว่า POS Terminal เช็คการจัดขึ้นขนส่งก่อน, จากนั้นเช็ค deliveryStatus ว่างด้วยข้อความ ขนส่งยังไม่ยืนยันใบจัดนี้, แล้วค่อยเช็คสิทธิ์ตรวจสินค้า ก่อนอนุญาตให้เลือก Lot/Batch ตรงกับ error priority ปัจจุบันของ Mobile
  • รอบนี้ไม่ต้องแก้โค้ด POS Terminal เพิ่ม
  • Docs updated:
    • governance/change-log

Order storage print remark parity audit

  • Audit Mobile order-detail storage print remark behavior เทียบกับ POS Terminal OrderDetailForm
  • ยืนยันว่า POS Terminal มีช่องหมายเหตุก่อนพิมพ์แบบ multiline, บล็อก storage print เมื่อ remark ว่าง, update order พร้อม remark, เลื่อน draft order เป็น NEW, reload order detail, แล้วค่อยพิมพ์ใบห้องฝากแบบมีหรือไม่มี Lots แล้ว
  • รอบนี้ไม่ต้องแก้โค้ด POS Terminal เพิ่ม
  • Docs updated:
    • governance/change-log

Customer management selector parity audit

  • Audit Mobile customer-management edit customerType และ knowus selector เทียบกับ POS Terminal CustomerManagementDetailForm
  • ยืนยันว่า POS Terminal โหลด master data ชุดเดียวกันจาก /customer-types และ /knowus ผ่าน getCustomerTypes และ getKnowUsOptions, filter picker ด้วยชื่อที่แสดง, และบันทึกทั้ง code/name ลง draft payload แล้ว
  • รอบนี้ไม่ต้องแก้โค้ด POS Terminal เพิ่ม
  • Docs updated:
    • governance/change-log

Borrow detail edit/delete product recovery parity

  • Audit Mobile borrow-detail item edit/delete behavior เทียบกับ POS Terminal borrow fish detail handling
  • ยืนยันว่า POS Terminal delete item fallback จาก itemId ไป id อยู่แล้ว ตรงกับ Mobile safe delete target resolution
  • ปรับ POS Terminal borrow item edit save ให้ใช้ inventory record ที่ recover จาก productCode เป็นฐานในการสร้าง update payload เพื่อรักษา itemCode, ชื่อสินค้า, ราคา, UOM, และ warehouse fields ปัจจุบัน แทนการพึ่ง persisted row snapshot อย่างเดียว
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Order create shipping-type preservation parity

  • Audit Mobile order-detail shipping-type preservation และ order creation payload builders เทียบกับ POS Terminal Home create flows
  • ปรับ invoice-to-order duplicate payload ของ POS Terminal ให้รักษา shippingType จาก invoice และ fallback เป็น "2" เฉพาะเมื่อค่า invoice ว่าง แทนการบังคับสาขาย่อยเป็นหน้าร้าน
  • ปรับ customer-to-order payload ให้ใช้ shippingType จาก customer โดยตรงเหมือน Mobile แทนการ rewrite order ของสาขาย่อยเป็นหน้าร้าน
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

RootNavigator route coverage audit

  • สร้างรายการ Mobile routes จาก apps/mobile/src/navigation/RootNavigator.tsx ใหม่ และ map ทั้ง 49 routes กับ POS Terminal entry points, split-panel forms, หรือ settings utilities
  • ยืนยัน missingCount: 0 หลังเพิ่ม settings utilities สำหรับ Notifications และ PrintDemo แล้ว
  • ตรวจ route-specific candidates เพิ่ม เช่น OrderPayment, CustomerManagementAddressDetail, และ invoice duplicate configuration; POS Terminal ครอบคลุมผ่าน OrderDetailForm, CustomerAddressManagementDetailForm, และ InvoicePanels แล้ว
  • Audit ซ้ำ Mobile invoice duplicate configuration modal ปัจจุบันเทียบกับ POS Terminal InvoicePanels; option values สำหรับ non-main branch, disabled confirm state, sales-order permission gate, และ mapping vehicleRelease/documentMove เข้า order payload ยังตรงกัน
  • Verified with TMPDIR=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-tmp YARN_CACHE_FOLDER=/Volumes/DMM-Storage/Works/BSR/BSR-POS-Plus/.tmp/yarn-cache yarn workspace @bsr/pos-terminal typecheck.
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log
  • Audit Mobile PrintDemoScreen เทียบกับ POS Terminal printing utilities และ settings
  • เพิ่ม settings entry ทดสอบพิมพ์ ใน POS Terminal เพื่อให้ผู้ใช้พิมพ์เอกสารตัวอย่าง 16K เดียวกับ Mobile ได้โดยไม่ออกจาก terminal layout
  • ย้าย HTML สำหรับ sample print ไปเป็น printDemoSample โดย reuse path react-native-print เดิมของ POS Terminal และ escape dynamic sample values
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Notification token utility parity

  • Audit Mobile NotificationsScreen เทียบกับ POS Terminal settings และ notification services
  • เพิ่ม settings entry การแจ้งเตือน ใน POS Terminal เพื่อเปิด modal แบบ terminal ที่แสดง FCM token ของเครื่องปัจจุบัน
  • ปรับ utility action ให้ตรง Mobile โดยให้ผู้ใช้ล้าง FCM token เดิมและขอโทเคนใหม่ผ่าน service clearAndRefreshToken ที่มีอยู่แล้ว
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal screen and endpoint audit refresh

  • Audit Mobile route/screen coverage เทียบกับ POS Terminal Home menus และ split-panel detail forms; ชุดเมนู Terminal ปัจจุบันครอบคลุม workflow หลักของ Mobile ทั้ง sales, stock, data, transport, employee, deposit, และ expense
  • เทียบ Mobile Home menu visibility, branch gates, และ create shortcuts กับ POS Terminal terminalMenus และ create handlers แล้วไม่ต้องแก้เมนูหรือ shortcut เพิ่มในรอบนี้
  • ตรวจ candidate endpoint differences จาก Mobile services รวม invoice summary และ branch tax lookup แล้ว POS Terminal มี service calls และ UI entry points ที่ตรงสำหรับ flow ที่ผู้ใช้เข้าถึงได้อยู่แล้ว
  • ตรวจ Mobile transfer-warehouse destination warehouse filtering ซ้ำ และยืนยันว่า POS Terminal ใช้กฎตัด NF-/DR- แบบ record-level ก่อน merge sub-warehouses แล้ว
  • Docs updated:
    • governance/change-log

POS Terminal parity audit refresh

  • รัน Mobile service export audit เทียบกับ POS Terminal services จาก source ปัจจุบันอีกครั้ง และยืนยันว่า missingCount: 0
  • Audit Mobile customer address dataset changes ปัจจุบัน และยืนยันว่า POS Terminal customer detail กับ customer-management detail ใช้ @bsr/utils dbAddress พร้อม normalize address fields เป็น string แล้ว
  • Audit order benefit removal/duplicate guard behavior และ Lot/Batch removal UI เทียบกับ POS Terminal order, goods receipt, transfer in/out, storefront, shipping, และ transfer warehouse detail forms; รอบนี้ไม่ต้องแก้โค้ดเพิ่ม
  • Docs updated:
    • governance/change-log

Shipping temporary action hiding parity

  • Audit การซ่อน action ชั่วคราวใน Mobile shipping-detail เทียบกับ POS Terminal shipping route detail panel
  • ปรับ POS Terminal ให้ซ่อน header action จัดเรียง เหมือน Mobile โดยยังเก็บ sort-planner modal และ handler เดิมไว้
  • ปรับ POS Terminal ให้ซ่อนปุ่มพิมพ์ทั้งหมดใน footer ของแท็บ invoice เหมือน Mobile โดยยังเก็บ handlePrintAllInvoices ไว้เพื่อเปิดกลับได้ภายหลัง
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Vehicle list parity

  • Audit พฤติกรรม Mobile Vehicle list/status เทียบกับ POS Terminal Vehicle split-list และ detail panel
  • ปรับ POS Terminal vehicle list ให้ normalize vehicleStatus เป็น UNCHECKED, READY, หรือ NOT_READY และ dedupe รายการด้วย licensePlate ก่อนสร้าง split-list item ให้ตรง Mobile
  • ปรับ load-more ของ POS Terminal Vehicle ให้ hasMore เป็น true เฉพาะเมื่อได้ข้อมูลครบ PAGESIZE เพื่อไม่ยิง request หน้าเปล่าหลังหน้าสุดท้าย
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Invoice duplicate order item-error parity

  • Audit พฤติกรรมเปิดใบสั่งขายจากใบแจ้งหนี้ของ Mobile เทียบกับ POS Terminal invoice duplicate flow
  • ปรับ POS Terminal ให้จัดการ error รายสินค้าแบบ Mobile โดยข้ามรายการที่เพิ่มไม่ได้ เช่น จำนวนไม่ถูกต้อง, ไม่พบรหัสสินค้า, stock ไม่พอ, หรือ API เพิ่มสินค้า error แล้วเพิ่มรายการถัดไปต่อ
  • ปรับ alert สำเร็จของ Terminal ให้แจ้งกรณีสำเร็จบางส่วนเมื่อมีสินค้าใน invoice ถูกข้าม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Invoice duplicate order permission parity

  • ปรับ permission gate ของ POS Terminal สำหรับเปิดใบสั่งขายจากใบแจ้งหนี้ให้ใช้ canCreateSalesOrder เหมือน Mobile แทน customer-document gate
  • ทำให้ dept 20 ยังสามารถเปิดใบสั่งขายจากใบแจ้งหนี้ได้ตาม sales-order access ของ Mobile
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer address request key parity

  • Audit Mobile customer address management list/detail เทียบกับ POS Terminal split-list/detail flow
  • ปรับ key ของรายการคำขอที่อยู่ลูกค้าใน POS Terminal ให้ใช้ id ก่อน แล้ว fallback เป็น customerDraftId เหมือน Mobile
  • ป้องกัน Terminal ทำรายการคำขอ GPS ที่ไม่มี id แต่มี customerDraftId หายจาก list และยังให้ detail load/refresh หลังอนุมัติหรือไม่อนุมัติด้วยเลขคำขอเดียวกับที่ Mobile ใช้
  • ปรับ customer-detail GPS request error behavior ให้ตรง Mobile โดยเปิด modal หมายเหตุคำขอกลับมาเมื่อส่งคำขออัปเดตพิกัดไม่สำเร็จ
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Order print guard parity

  • Audit Mobile order detail print permissions เทียบกับ POS Terminal order detail print section
  • ปรับ POS Terminal order printing ให้ disable และ block เมื่อใบสั่งขายถูกยกเลิกหรือยังไม่มีรายการสินค้า เหมือน Mobile
  • ปรับปุ่ม พิมพ์ใบจัดหน้าร้าน ให้เปิดเฉพาะใบสั่งขายหน้าร้าน (shippingType === "2") ส่วนปุ่มพิมพ์ใบเบิกยังใช้ guard การพิมพ์เอกสารทั่วไป
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Expense bill save failure navigation parity

  • Audit Mobile expense-bill save navigation เทียบกับ POS Terminal expense-bill detail panel
  • ปรับ POS Terminal ให้ปิด detail บิลน้ำมันและ refresh list เมื่อ save request ล้มเหลวหลังผ่าน validation แล้ว เหมือน Mobile ที่กลับ ExpenseBillList หลัง API flow สำเร็จหรือ fail
  • คง validation error ก่อนยิง API ให้อยู่บนฟอร์มเพื่อให้แก้ข้อมูลได้ตาม Mobile
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

ขนส่ง finalize-all feedback parity

  • Audit Mobile transport finalize-all behavior เทียบกับ POS Terminal transport detail panel
  • ปรับ POS Terminal ให้แสดง success feedback อนุมัติใบจัดทั้งหมดแล้ว หลังอนุมัติใบจัดที่ค้างทั้งหมดและ refresh transport detail สำเร็จ เหมือน Mobile
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

ขนส่ง Google sort label parity

  • Audit Mobile transport Google route sorting modal เทียบกับ POS Terminal shared sort planner modal
  • ปรับให้ modal ใช้ optimizeLabel ที่ caller ส่งมาก่อน fallback ตามขนาดจอ เหมือน Mobile
  • ทำให้ action จัดเรียงลูกค้าตามพิกัดด้วย Google ของ transport ตรงกับ Mobile ทุกขนาดจอ โดยยังคง fallback เดิมสำหรับ caller ที่ไม่ส่ง label
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Order credit-note used-card parity

  • Audit Mobile order credit-note selection เทียบกับ POS Terminal order benefit credit-note section
  • ปรับ POS Terminal ให้การ์ดเครดิตโน้ตที่ isUsed == 1 ใช้พื้นหลังและเส้นขอบแดงอ่อนเหมือน Mobile พร้อมคงปุ่มเลือกแบบ disabled เดิม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Order metadata discount summary parity

  • Audit Mobile OrderMetaDataDetail discount/remaining amount summary เทียบกับ POS Terminal order detail metadata rows
  • ปรับ POS Terminal ให้คำนวณยอดคงเหลือจากยอดสินค้าแบบ legacy ลบส่วนลดคะแนน คูปอง และเครดิตโน้ต เหมือน payment summary ของ Mobile
  • ปรับ visibility ให้ซ่อนแถวส่วนลดและยอดคงเหลือเมื่อส่วนลดรวมเป็น 0; Terminal จะแสดง ส่วนลดรวม และ ยอดคงเหลือ เฉพาะเมื่อมีส่วนลดใช้งานอยู่
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal parity audit sweep

  • Audit Mobile Credit Note list/detail, Shipping route list, Borrow list/detail และ Invoice list/manual-payment mode เทียบกับ POS Terminal split-list/detail ปัจจุบัน
  • รอบนี้ไม่ต้องแก้ code เพิ่ม: pagination stop condition, status/return filter, list dedupe, action guard หลัก และ manual-payment selection check ตรงกับพฤติกรรม Mobile ปัจจุบันใน path ที่ตรวจแล้ว
  • Docs updated:
    • governance/change-log

Storefront checked-count parity

  • Audit Mobile Storefront detail accept/submit, batch และ permission helpers เทียบกับ POS Terminal Storefront detail panel
  • ปรับ checked-item semantics ของ POS Terminal ให้ตรง Mobile โดยถือว่าสินค้าหน้าร้านตรวจครบเมื่อ cal >= qty ทั้งในตัวเลขจำนวนที่ตรวจแล้วและ validation ก่อน submit
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

ขนส่ง customer grouping parity

  • Audit Mobile Transport detail customer/payment normalization เทียบกับ POS Terminal Transport detail panel
  • ปรับ POS Terminal ให้ preserve customer row ทุกแถวที่มี customerCode เหมือน Mobile แทนการ dedupe ด้วย customerCode
  • ทำให้ยอด payment, action ใน step 2 และรายการ route planner ตรงกับ Mobile เมื่อ API ส่งลูกค้ารหัสเดียวกันมาหลายแถว
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Sales-order review pagination parity

  • Audit Mobile order list mode shipping-review เทียบกับ POS Terminal salesOrderReview
  • ปรับ load-more ของ POS Terminal review ให้ hasMore อิงจำนวน raw response จาก API WAITING_PAYMENT เหมือน Mobile แต่ยังกรองรายการที่แสดงเป็น hasShipment == 0
  • ป้องกันรายการตรวจสอบหยุดโหลดเร็วเกินไปเมื่อ API page หนึ่งมีแต่ order ที่มี shipment แล้ว แต่หน้าถัดไปยังอาจมี order ที่ต้องตรวจสอบ
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Expense bill pagination parity

  • Audit Mobile Expense Bill list pagination เทียบกับ POS Terminal Expense Bill split-list behavior
  • ปรับ stop condition ของ POS Terminal expense-bill hasMore ให้ตรง Mobile ที่ใช้ pageLimit=200 โดยจะถือว่ายังมีหน้าถัดไปเฉพาะเมื่อ server ส่งกลับมาครบ 200 รายการ
  • ลดการยิง load-more เกินจำเป็นหลังหน้าสุดท้ายที่เป็น partial page โดยคง action ส่งอีกครั้ง/ลบไว้เหมือนเดิม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Deposit pagination parity

  • Audit Mobile Deposit retry filter/list pagination เทียบกับ POS Terminal Deposit split-list behavior
  • ปรับ stop condition ของ POS Terminal deposit hasMore ให้ตรง Mobile ที่ใช้ pageLimit=200 โดยจะถือว่ายังมีหน้าถัดไปเฉพาะเมื่อ server ส่งกลับมาครบ 200 รายการ
  • ลดการยิง load-more เกินจำเป็นหลังหน้าสุดท้ายที่เป็น partial page โดยคง retry filter และ list behavior เดิมไว้
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Order payment slip alert parity

  • Audit พฤติกรรม Mobile Order Payment screen เทียบกับ POS Terminal embedded payment section
  • ปรับ alert หลัง submit payment ให้ตรง Mobile โดยแสดงข้อความ ชำระเงินสำเร็จ... เฉพาะกรณี payload ไม่มี transfer slip path
  • คงพฤติกรรม refresh และปิด payment section ของ POS Terminal หลัง submit payment สำเร็จไว้เหมือนเดิม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Order point OTP retry parity

  • Audit พฤติกรรม OTP สำหรับใช้คะแนนใน Mobile Order เทียบกับ POS Terminal order detail form ระหว่างตรวจ credit-note discount parity
  • เพิ่ม cooldown ส่ง OTP ซ้ำ 10 วินาทีแบบ Mobile ให้ POS Terminal point OTP flow พร้อม reset timer เมื่อเปลี่ยนเบอร์ที่เลือกหรือยืนยัน OTP สำเร็จ
  • ปิดปุ่มส่ง OTP ของ POS Terminal ระหว่าง cooldown และแสดงจำนวนวินาทีที่เหลือใน label ปุ่ม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Credit Note image upload parity

  • Audit การจัดการรูปแนบใน Mobile Credit Note เทียบกับ POS Terminal split-panel detail form
  • ปรับ POS Terminal Credit Note image upload ให้เลือกหลายรูปได้ในครั้งเดียว แล้วอัปโหลด asset ที่เลือกทั้งหมดก่อน refresh detail/list ครั้งเดียวหลังเสร็จ
  • คง action ลบรูปทีละไฟล์ตามรูปแบบ terminal เดิมไว้ แต่ให้พฤติกรรมเพิ่มรูปหลายไฟล์ตรงกับ Mobile
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Booking Price handler permission guard parity

  • Audit handler-level permission check ของ Mobile Booking Price เทียบกับ POS Terminal Home handlers
  • เพิ่ม shared permission calculator ฝั่ง POS Terminal สำหรับ Booking Price ตาม status, owner, เงื่อนไขแก้ได้เฉพาะวันสร้าง และสิทธิ์ override fillWeight/editPrice
  • เพิ่ม guard ใน handler ของ POS Terminal สำหรับเพิ่มสินค้า, เปิดแก้รายการ, บันทึกแก้รายการ, ลบรายการ, บันทึกเอกสาร และแปลงเป็นใบสั่งขาย เพื่อ block direct handler call ให้ตรง Mobile ไม่ใช่อาศัยแค่ UI disabled
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Booking Price permission gate parity

  • Audit สูตร permission จาก Mobile Booking Price ตาม status/owner/date เทียบกับ POS Terminal detail form
  • แยก gate ของ POS Terminal สำหรับแก้รายการ, ลบรายการ, แก้ header, บันทึก, เพิ่มสินค้า และแปลงเอกสาร แทนการใช้ save gate ร่วมกับทุก action ของรายการสินค้า
  • ปรับให้ตรง Mobile สำหรับสถานะ DRAFT/NEW, owner check, สิทธิ์ override fillWeight/editPrice, เงื่อนไขแก้ไขได้เฉพาะวันสร้าง และลบได้เฉพาะ draft owner
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Booking Price item validation parity

  • Audit validation เพิ่ม/แก้รายการสินค้าใน Mobile Booking Price เทียบกับ POS Terminal shared booking product picker
  • เพิ่มการตรวจจำนวนเป็นเลขจำนวนเต็ม และน้ำหนักมากกว่า 0 สำหรับสินค้าชั่งน้ำหนักใน path เพิ่มรายการ Booking Price ของ POS Terminal ให้ตรง Mobile
  • เพิ่ม guard ตอนแก้รายการตาม Mobile โดยห้ามเพิ่มจำนวนเกินจำนวนเดิมที่จองไว้ และห้ามจำนวนเกิน available stock ปัจจุบันบวกจำนวนเดิมของรายการนั้น
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Borrow out-of-stock add guard parity

  • Audit Mobile เทียบ POS Terminal ใน Borrow product flow ต่อหลังเพิ่ม action permission guard
  • พบว่า Mobile block การเลือกสินค้าเบิกเมื่อ available stock เป็นศูนย์ด้วยข้อความ สินค้าหมด แต่ POS Terminal ยังเปิด shared product editor ได้และตรวจเฉพาะจำนวนเกิน stock
  • เพิ่ม out-of-stock guard แบบเดียวกันใน path เพิ่มรายการสินค้า Borrow ของ POS Terminal ก่อน persist item
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Borrow action permission guard parity

  • Audit Mobile เทียบ POS Terminal ใน Borrow ต่อหลังเพิ่ม item stock guard
  • พบว่า Mobile ตรวจสิทธิ์ B1-processing ภายใน handler รับงาน/ยืนยันคืนหรือตัดสต๊อก แต่ POS Terminal อาศัยการซ่อนปุ่มใน detail action เป็นหลัก
  • เพิ่ม handler-level permission guard ให้ POS Terminal Borrow accept และ complete/retry เพื่อ block การเรียก handler โดยตรงด้วย error สิทธิ์แบบเดียวกับ Mobile
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Borrow product stock guard parity

  • Audit validation เพิ่ม/แก้สินค้าใน Mobile Borrow เทียบกับ POS Terminal borrow flow
  • พบว่า Mobile block จำนวนเบิกที่เกิน available stock (onHand - booking) เมื่อมียอด stock คงเหลือเป็นบวก แต่ POS Terminal ตรวจแค่จำนวนเต็ม, ไม่เกิน 3 ชิ้นต่อรายการ, ไม่เกิน 3 รายการต่อใบ และ borrow type
  • เพิ่ม available-stock guard แบบเดียวกันให้ POS Terminal ทั้ง path เพิ่มและแก้รายการสินค้า โดยใช้ข้อมูลสินค้าที่เลือกตอนเพิ่ม และ lookup inventory ล่าสุดตอนแก้รายการ
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Product detail add-to-order validation parity

  • Audit validation เพิ่มสินค้าเข้าใบสั่งขายจาก Mobile Product Detail เทียบ POS Terminal หลังตรวจ usage ของ inventory list ที่เหลือ
  • พบว่า Mobile ตรวจจำนวนมากกว่า 0 และน้ำหนักมากกว่า 0 สำหรับสินค้าชั่งน้ำหนัก แต่ POS Terminal ยัง block จำนวนที่มากกว่าสต๊อกขายได้เพิ่มเอง
  • นำ available-stock block ส่วนเกินออกจาก POS Terminal เพื่อให้ Product Detail add-to-sales-order ใช้ validation เดียวกับ Mobile โดยยังส่ง on-hand และ booking quantity เข้า order item payload เหมือนเดิม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Transfer-warehouse inventory picker parity

  • Audit product picker ของ Mobile Transfer Warehouse เทียบ POS Terminal หลังจากปรับ guard และ confirmation ก่อนส่งเข้า B1
  • พบว่า Mobile เปิดรายการสินค้าผ่าน branch inventory sync/subscription แต่ POS Terminal ยังโหลด inventory หน้าเดียวด้วย getProductInventoryList
  • ปรับ POS Terminal Transfer Warehouse product picker ให้ใช้ getProductBranchContext, syncProductInventory, และ subscribeProductInventory แบบ Mobile โดยคงเงื่อนไขต้องเลือกคลังปลายทางก่อน, search, dummy product และ modal รูปแบบ terminal เดิม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Transfer-in inventory picker parity

  • Audit product picker ของ Mobile Transfer In เทียบ POS Terminal หลังจากปรับ fallback warehouse ของ Transfer In
  • พบว่า Mobile เปิดรายการสินค้าผ่าน branch inventory sync/subscription แต่ POS Terminal ยังโหลด inventory หน้าเดียวด้วย getProductInventoryList
  • ปรับ POS Terminal Transfer In product picker ให้ใช้ getProductBranchContext, syncProductInventory, และ subscribeProductInventory แบบ Mobile โดยคง search, company filter, dummy product และ modal รูปแบบ terminal เดิม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Goods receipt inventory picker parity

  • Audit product picker ของ Mobile Goods Receipt เทียบ POS Terminal หลังจากปรับ validation Batch Number ซ้ำ
  • พบว่า Mobile เปิดรายการสินค้าผ่าน getProductBranchContext, syncProductInventory, และ subscribeProductInventory แต่ POS Terminal ยังโหลด inventory หน้าเดียวด้วย getProductInventoryList
  • ปรับ POS Terminal Goods Receipt product picker ให้ sync และ subscribe branch inventory snapshot แบบ Mobile โดยคง search, company filter, dummy product และ modal รูปแบบ terminal เดิม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Transfer-warehouse B1 confirmation parity

  • Audit Mobile เทียบ POS Terminal ใน Transfer Warehouse ต่อหลังเพิ่ม guard Batch ก่อนส่งเข้า B1
  • พบว่า Mobile ให้ยืนยันก่อนส่งเอกสารย้ายคลังเข้า B1 แต่ POS Terminal เรียก API ส่งเข้า B1 ทันทีหลังผ่าน guard
  • เพิ่มขั้นตอนยืนยันก่อนเรียก sendTransferWarehouseToB1 ใน POS Terminal โดยคงการ refresh และ success/error handling ของ terminal หลังยืนยันไว้
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Transfer-warehouse B1 batch guard parity

  • Audit validation ส่งเข้า B1 ของ Mobile Transfer Warehouse เทียบกับ POS Terminal split-pane transfer warehouse detail
  • พบว่า Mobile disable และ block การส่งเข้า B1 ถ้ายังไม่มีรายการสินค้า หรือมีรายการที่ยังไม่มี Batch Number แต่ POS Terminal ตรวจแค่ว่ามีรายการสินค้า
  • เพิ่ม guard และ disabled state ของปุ่มส่งเข้า B1 ใน POS Terminal ให้ส่งเอกสารย้ายคลังเข้า B1 ได้เฉพาะเมื่อทุกรายการมีข้อมูล Batch แล้ว
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Transfer-in source warehouse parity

  • Audit การส่งต่อ warehouse tab จาก Mobile Transfer In list/detail เทียบกับ POS Terminal split-pane Transfer In
  • พบว่า Mobile ส่ง whsCode ของ tab ที่เลือกเข้า detail และใช้ตอนสร้างรายการสินค้าใหม่ แต่ POS Terminal รวมข้อมูลจากสอง tab โดยไม่เก็บ source warehouse ของรายการ
  • เพิ่ม sourceWhsCode ให้รายการ Transfer In ของ POS Terminal ตาม tab ที่โหลดมา แล้วใช้ source warehouse นี้เป็น fallback ก่อน toWhsCode/branch ตอนเพิ่มสินค้าใน detail form
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Goods receipt duplicate batch validation parity

  • Audit validation Batch ของ Mobile goods receipt เทียบกับ inline batch editor ของ POS Terminal
  • พบว่า Mobile กัน Batch Number ซ้ำตอนแก้ไข Batch แต่ POS Terminal ยัง submit Batch Number ที่ไม่ว่างและซ้ำกันในสินค้าเดียวกันได้จาก inline editor
  • เพิ่ม guard ก่อน submit ของ POS Terminal goods receipt ให้ตรวจ Batch Number ซ้ำรายสินค้า ก่อนสร้าง stock-in payload
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Order detail item edit permission parity

  • Audit Mobile getOrderAccess และการแก้ไขรายการสินค้าใน order detail เทียบกับ POS Terminal OrderDetailForm
  • พบว่า POS Terminal ใช้ gate ลบรายการของเจ้าของเอกสาร DRAFT ไปคุมการเพิ่ม/แก้ไขรายการ ทำให้ผู้ใช้ที่มี flag override จาก Mobile (fillWeight หรือ editPrice) แก้รายการใน DRAFT/NEW order ผ่าน terminal ไม่ได้
  • แยก permission ของ POS Terminal ให้ add/edit item ใช้ gate override edit ตาม Mobile ส่วนการลบรายการยังจำกัดเฉพาะเจ้าของเอกสาร DRAFT
  • เพิ่ม guard แบบ Mobile ที่ห้ามแก้รายการเดิมที่มี currentStepPrice
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer document permission parity

  • Audit permission gate ของ Mobile customer list/detail และ invoice duplicate-order เทียบกับ create helper ของ POS Terminal
  • พบว่า Mobile อนุญาต dept 20 ให้สร้างใบสั่งขายจาก Home shortcut แต่ไม่อนุญาตจาก action เอกสารใน customer detail/list หรือการสร้างใบสั่งขายซ้ำจากใบแจ้งหนี้
  • แยก helper สิทธิ์ของ POS Terminal เพื่อให้ shortcut สร้างจาก Home/list ยังรวม dept 20 แต่ action เอกสารจาก customer และ invoice duplicate-order ใช้ gate ที่แคบลงตาม Mobile
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Home employee profile parity

  • เพิ่ม entry โปรไฟล์ผู้ใช้ปัจจุบันใน POS Terminal Home settings ให้ตรงกับ action profile ของ Mobile Home
  • entry โปรไฟล์จะโหลดผู้ใช้ปัจจุบันผ่าน employee detail service เดิม แล้วเปิดใน terminal split-pane employee detail form โดยคง UI profile/password-change เดิมของ terminal
  • flow จะล้าง list filter และ scope panel รายการ employee ให้เป็น profile item ปัจจุบัน เพื่อให้ยังอยู่ใน pattern layout ของ terminal
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Home settings version label parity

  • เพิ่ม native app version label ใน POS Terminal Home settings ให้ตรงกับ Mobile Home settings menu
  • ใช้ helper getAppVersionLabel เดิมของ POS Terminal และส่ง label ผ่าน component chain ของ terminal menu/settings โดยไม่เปลี่ยน behavior ของ branch, profile, logout หรือ theme
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Mobile service path compatibility parity

  • เพิ่ม compatibility re-export file ฝั่ง POS Terminal สำหรับ service path แบบ singular ที่ Mobile ใช้อยู่: goodsReceipt, transferIn, transferOut, และ user
  • ไฟล์ใหม่ re-export implementation เดิมของ POS Terminal จาก goodsReceipts, transferIns, transferOuts, และ users เพื่อคง behavior ปัจจุบันของ terminal แต่ทำให้ service boundary ตรงกับ Mobile import paths
  • รัน mobile-vs-terminal service export audit ซ้ำและยืนยันว่า missing service exports 0
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

App-version service path compatibility parity

  • เพิ่ม POS Terminal services/appVersion.ts เป็น compatibility re-export สำหรับ checkRequiredAppUpdate และ RequiredAppUpdateInfo ให้ตรงกับ service boundary services/appVersion ของ Mobile
  • รัน mobile-vs-terminal service export audit แบบ resolve re-export ซ้ำแล้ว ยืนยันว่า missingServices: [] และ diffs: []
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Shared address dataset boundary

  • ย้าย Thai address lookup dataset ไปไว้ที่ packages/utils/src/dbAddress.ts และ export dbAddress พร้อม ThaiAddressRecord จาก @bsr/utils
  • ปรับ Mobile customer address search screen ให้ import dbAddress จาก @bsr/utils โดยตรง; constants file เดิมของ Mobile คงไว้เป็น compatibility re-export
  • ปรับ POS Terminal customer detail และ customer-management draft form ให้ import dataset กลางจาก @bsr/utils แทนการ require apps/mobile/src/constants/dbAddress
  • ตรวจแล้วว่าไม่มี direct reference จาก POS Terminal ไปยังไฟล์ dbAddress ของ Mobile เหลืออยู่
  • Verified with yarn workspace @bsr/mobile tsc --noEmit and yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Sales-order create shortcut parity

  • Audit action shortcut ของ Mobile Home แล้วพบว่า POS Terminal มี create action สำหรับใบจองราคา, ใบเบิก, ใบจัดสายส่ง, ขนส่ง และฝากเงินอยู่แล้ว แต่ยังไม่มี create action ของใบสั่งขายจากหน้า list/Home
  • เพิ่มปุ่มสร้างใน POS Terminal sales-order list โดย reuse fixed create control เดิมให้เปิด CustomerPickerModal mode salesOrder ตรงกับ shortcut ของ Mobile Home ที่เริ่มสร้างใบสั่งขายจากการเลือกลูกค้า
  • ใช้ permission gate canCreateSalesOrder และ flow สร้างใบสั่งขายเดิมของ terminal
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Home shortcut create permission parity

  • เทียบ department set ของ Mobile Home CAN_CREATE_* กับ create helper ของ POS Terminal สำหรับใบสั่งขาย, ใบจัดสายส่ง, ขนส่ง และฝากเงิน
  • เพิ่ม dept 21 ให้ POS Terminal shipping-route creation และ deposit creation เพื่อให้ปุ่มสร้างของ terminal ใช้ permission ตรงกับ shortcut ของ Mobile
  • รัน create-permission parity script ซ้ำแล้ว ยืนยันว่า permission set ของ shortcut ทั้ง 4 ชุดตรงกันแล้ว
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Credit-note list delete parity

  • Audit swipe action ของ Mobile credit-note list แล้วพบว่า POS Terminal มีการลบ item/file ใน detail แต่ยังไม่มี list-level credit-note delete action
  • เพิ่ม guard ลบแบบเดียวกับ Mobile ให้ POS Terminal: credit note ที่ received/approved จะแสดง action disabled ลบไม่ได้, ผู้ใช้กลุ่ม cancel department ลบได้, เอกสาร draft/new จำกัดเฉพาะเจ้าของเอกสาร และสถานะ WAITINGCN/INVUPDATE ยังลบได้
  • ต่อ swipe delete ของ POS Terminal credit-note list เข้า deleteCreditNote, refresh list ปัจจุบัน และเคลียร์ detail ถ้าแถวที่ลบเป็นแถวที่เปิดอยู่
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Customer address request list parity

  • Audit Mobile CustomerManagementAddressList แล้วพบว่า POS Terminal มี flow approve/reject ใน detail แล้ว แต่ list คำขอแก้พิกัดที่อยู่ยังใช้ generic card
  • เพิ่ม list card body เฉพาะสำหรับ POS Terminal เมนู จัดการที่อยู่ลูกค้า ให้แสดงชื่อลูกค้า/รหัสลูกค้า, ผู้ขอ, ผู้อนุมัติ และผู้ไม่อนุมัติ ตาม Mobile
  • ปรับสี request card ให้ตรง Mobile: rejected เป็นแดง, approved เป็นเขียว และ pending ใช้โทน card ปกติของ terminal
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Transfer-warehouse list cancel parity

  • Audit Mobile TransferWarehouseList แล้วพบว่า POS Terminal มี create/detail ของ transfer warehouse แล้ว แต่ยังไม่มี list-level cancel/delete swipe action
  • เพิ่ม swipe action ใน POS Terminal transfer-warehouse list โดยใช้ label ยกเลิกใบย้าย และต่อเข้ากับ deleteTransferWarehouse
  • หลังลบสำเร็จ POS Terminal จะ refresh transfer-warehouse list และเคลียร์ detail pane ถ้าใบที่ลบเป็นใบที่เปิดอยู่
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Transfer-warehouse dummy product parity

  • Audit Mobile TransferWarehouseDetail แล้วพบว่า product picker รวม dummy products กลางตาม company ที่เลือก แต่ POS Terminal ยังแสดงเฉพาะ inventory products
  • ปรับ POS Terminal transfer-warehouse product picker ให้ merge buildDummyProducts(branch, companyCode) เข้ากับ inventory products ให้ตรงกับหน้าจอเพิ่มสินค้าของ Mobile โดยยังคง batch validation เดิมของ terminal
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Stock list card parity

  • Audit Mobile stock list cards สำหรับ goods receipt, transfer out, transfer in และ transfer warehouse เทียบกับ POS Terminal split list
  • เพิ่ม list card body เฉพาะของ POS Terminal สำหรับ stock menu ทั้ง 4 รายการ เพื่อให้ field สำคัญที่ Mobile แสดงอยู่ยังเห็นใน layout terminal: เลขที่เอกสาร, วันที่เอกสาร, หมายเหตุ, สาขา/ต้นทาง-ปลายทาง, พนักงานคลัง และสีสถานะ completed ของ transfer warehouse
  • คง list loading, detail navigation และ submit payload behavior เดิมของ terminal ไว้
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Expense-bill edit permission parity

  • Audit Mobile deposit และ expense-bill list/detail flow เทียบกับ POS Terminal รวมถึง retry/delete action, สี list card, transport-create context และ detail payload
  • พบว่า POS Terminal expense-bill date edit permission ใช้เฉพาะ auth user ที่เก็บไว้ใน storage แต่ Mobile refresh employee permission record ด้วย getUserById ก่อนตรวจ editDeliveryDate
  • ปรับ POS Terminal ExpenseBillDetailForm ให้โหลด permission record ของพนักงานปัจจุบัน และใช้ permissionUser.editDeliveryDate โดย fallback กลับไปที่ stored user เพื่อให้ draft bill update gate ตรงกับ Mobile
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Storefront action permission parity

  • Audit Mobile storefront list/detail เทียบกับ POS Terminal รวมถึง list tab, สี card, canceled invoice guard, accept flow, batch lot selection, submit-to-B1 flow และ cancel validation
  • พบว่า POS Terminal storefront action permission ยังขาด override user code 999997 ของ Mobile สำหรับ action save/submit ใน path ผู้รับงาน
  • ปรับ helper ฝั่ง POS Terminal ให้ user 999997 แก้ check และ submit stock-cut data ของ storefront ได้ผ่าน accepted-user action path เดียวกับ Mobile โดยไม่เปลี่ยน main-branch accept department gate
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Borrow print guard parity

  • Audit Mobile borrow list/detail เทียบกับ POS Terminal รวมถึง create/cancel permission, B1 accept/complete/retry action, item CRUD และ borrow print action
  • พบว่า POS Terminal borrow print handler ยังเรียกพิมพ์ pack/storage ได้แม้ใบเบิกไม่มีสินค้า แต่ Mobile จะ block ทั้งสอง action พร้อมข้อความแจ้งเตือน
  • เพิ่ม no-items guard ให้ POS Terminal borrow pack และ storage print handler ก่อนเรียก printer helper
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Invoice manual payment alert parity

  • Audit Mobile invoice list/manual payment behavior เทียบกับ POS Terminal รวมถึง pending-B1 loading, B1 send guard, cancel request handling, summary modal และ manual payment selection
  • พบว่า POS Terminal manual payment mode เงียบเมื่อกดเลือก invoice ที่มีคำขอยกเลิกค้างอยู่หรือ order ยังไม่ confirmed แต่ Mobile จะแสดง informational alert อธิบายเหตุผลที่เลือกไม่ได้
  • ปรับ POS Terminal invoice list selection ใน manual payment mode ให้แสดง alert pending-cancel และ unpaid/unconfirmed order เหมือน Mobile ก่อน block การเลือก
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Order payment QR check parity

  • Audit Mobile order payment screen เทียบกับ POS Terminal order payment panel รวมถึง invoice loading, retry invoice send, payment validation, QR creation/share และ payment submission
  • พบว่า POS Terminal สร้าง/แชร์ QR payment ได้แล้ว แต่ยังไม่มี action ตรวจสอบการชำระ แบบ Mobile สำหรับตรวจว่า QR payment ทำให้ order confirmed แล้วหรือยัง
  • เพิ่ม POS Terminal QR payment check action ให้โหลด order detail ล่าสุด, แจ้งผลว่า order เป็น CONFIRMED หรือยัง, refresh order detail และ refresh order list ปัจจุบัน
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Credit-note detail action gate parity

  • Audit Mobile credit-note detail behavior เทียบกับ POS Terminal รวมถึง save/send-B1 guard, item editing, return location selection, file upload/delete และ item delete action
  • พบว่า POS Terminal detail save/delete-item gate เปิดกว้างกว่า Mobile: save ไม่ได้จำกัดเฉพาะสถานะ DRAFT/NEW/WAITINGCN/INVUPDATE และ item/file delete ใช้ helper ลบแบบ list ที่กว้างกว่า owner-only detail rule ของ Mobile
  • ปรับ POS Terminal credit-note detail ให้ save แสดงเฉพาะสถานะที่ Mobile แก้ได้ และ detail item/file delete เป็น owner-only ขณะใบคืนสินค้ายังไม่ received
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

ขนส่ง payment and shipping guard parity

  • Audit Mobile transport detail payment/shipping behavior เทียบกับ POS Terminal รวมถึง payment payload, ยอด QR, shipping amount totals, customer GPS fields, current device coordinates และ shipping delete guards
  • พบว่า POS Terminal payment ยังส่ง customer GPS เป็นค่าว่าง, ไม่ส่ง current payment coordinates และใช้ base amount/grand amount ใน payment/QR บาง path แทน payable amount ของ Mobile ที่รวมค่าขนส่ง
  • ปรับ POS Terminal transport helper และ payment submission ให้ normalize shipping/GPS field ของลูกค้า, คำนวณ payable amount จาก grandAmount + shippingAmount/shippings, ส่ง currentLatitude/currentLongitude และ block add/delete shipping เมื่อลูกค้าชำระหรือจบงานแล้ว
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

ขนส่ง start SAP error parity

  • Audit Mobile transport start-trip response handling เทียบกับ POS Terminal
  • พบว่า Mobile แสดง startTransport SAP shipping errors หลังเริ่มขนส่ง แต่ POS Terminal refresh เงียบแม้ API คืน partial shipping errors
  • ปรับ POS Terminal start-trip handling ให้อ่าน startTransport.errors, refresh detail/customers เหมือนเดิม และแสดงสรุปรายการลูกค้า/ค่าขนส่งที่ส่งไม่สำเร็จเมื่อ API คืน errors
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Employee password action gate parity

  • Audit Mobile EmployeeProfile และ EmployeeDetail password actions เทียบกับ POS Terminal employee split-panel detail ที่รวมสอง flow อยู่ในหน้ารายละเอียดเดียว
  • พบว่า POS Terminal เปิด full change-password form ให้ manager ที่เปิด detail ของผู้ใช้อื่นได้ แต่ Mobile employee detail ของผู้ใช้อื่นมีเฉพาะ reset-salt และเก็บ full password change ไว้ในโปรไฟล์ตัวเอง
  • ปรับ POS Terminal employee detail ให้ full change-password form ใช้งานได้เฉพาะโปรไฟล์ของผู้ใช้ที่ login อยู่ ส่วน manager reset-password salt ยังใช้ action reset เดิมได้เหมือน Mobile
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Shipping service type boundary parity

  • รัน Mobile-vs-POS Terminal service export audit อีกครั้งโดย resolve re-export แล้ว
  • พบว่า POS Terminal services/shipping.ts ยังขาด exported shipping detail/list type names ของ Mobile แม้ runtime helper getShippingInvoicesWithoutDelivery มีอยู่แล้ว
  • เพิ่ม POS Terminal exports สำหรับ ShippingDeliveryStatus, ShippingListItem, ShippingDeliveryProduct, ShippingDeliveryInvoice, และ ShippingDeliveryDetail โดยไม่เปลี่ยน runtime endpoint behavior
  • รัน service export audit ซ้ำแล้วได้ missingFiles: [] และ missingExports: []
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Branch selection tax fallback parity

  • Audit Mobile branch selection เทียบกับ POS Terminal BranchScreen รวมถึง warehouse filtering และ tax loading
  • พบว่า Mobile save warehouse ที่เลือกแล้วเข้า Home ก่อน จากนั้นค่อยโหลด tax data แบบ best-effort แต่ POS Terminal ต้องให้ getTaxByBranch สำเร็จก่อนจึงจะ save branch
  • ปรับ POS Terminal branch selection ให้ clear tax, save selected warehouse, เรียก onBranchSelected แล้วค่อย fetch/save tax data ใน best-effort block เพื่อไม่ให้ tax API failure บล็อกการเลือกสาขา
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Home branch selector parity

  • เพิ่ม entry เลือกสาขาใน POS Terminal Home settings ให้ตรงกับ action "เลือกสาขา" ของ Mobile Home header
  • ต่อ flow ผ่าน App -> RootNavigator -> HomeScreen -> MenuPane -> SettingsDropdown และ reuse BranchScreen เดิมของ POS Terminal
  • คง behavior เดิมของ branch settings ก่อน login ไว้ แต่ถ้าเปิดเลือกสาขาจาก Home จะกลับเข้า Home หลังเลือกสาขาเสร็จ
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

PRD gateway service boundary parity

  • เพิ่ม POS Terminal services/prdGatewayApi.ts เพื่อ export prdPasswordApi และ prdTaxApi ให้ตรงกับ service boundary ของ Mobile
  • ปรับ auth/tax helper ฝั่ง POS Terminal ให้ import gateway client กลางแทนการสร้าง axios instance ไว้ใน auth.ts; endpoint behavior และ headers ยังเหมือนเดิม
  • รัน audit เทียบ mobile-vs-terminal service export ซ้ำแล้ว ยืนยันว่าไม่มี Mobile service export ที่ POS Terminal services ยังขาดอยู่
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Shipping invoice print-all parity

  • เพิ่ม action พิมพ์ใบแจ้งหนี้ทั้งหมดใน POS Terminal shipping detail ให้ตรงกับ flow handlePrintAllInvoices ของ Mobile
  • action ตรวจว่าใบจัดถูกจัดขึ้นรถขนส่งแล้ว, ตรวจว่ามี invoice ให้พิมพ์ และพิมพ์ invoice ทุกใบตามลำดับ route พร้อมเลข print index เหมือน Mobile
  • เพิ่มปุ่ม printer ขนาดกะทัดรัดข้าง action ล่างเดิมของ shipping detail เพื่อให้พิมพ์ทั้งหมดได้โดยไม่ต้อง swipe ทีละ invoice row
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Order invoice creation parity

  • เพิ่ม POS Terminal createInvoice order service wrapper สำหรับ endpoint /invoices เดียวกับที่ Mobile ใช้
  • ปรับ payment panel ใน order detail ให้ใบสั่งขายสถานะ NEW เปิดขั้นตอน invoice/payment ได้ โดยสร้าง invoice เมื่อยังไม่มี active invoice แล้วตรวจ invoice list ซ้ำก่อนเปิด action ชำระเงิน
  • คงพฤติกรรมเดิมของสถานะ WAITING_PAYMENT ทั้ง duplicate-invoice detection, พิมพ์ใบแจ้งหนี้, retry invoice send และ submit payment
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Shipping available-invoice service parity

  • เพิ่ม POS Terminal services/shipping.ts พร้อม getShippingInvoicesWithoutDelivery ให้ตรงกับ service boundary ของ Mobile สำหรับ /invoices/without-delivered
  • คง getShippingRouteAvailableInvoices ของ terminal split panel ไว้เหมือนเดิม แต่ให้ delegate ไปยัง shipping service ที่ตรงกับ Mobile พร้อมรักษา default 180 วันและ route-delivery ของ terminal
  • re-export ShippingAvailableInvoice จาก splitMenuData เพื่อให้ helper เดิมของ terminal ยัง import path เดิมได้
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Invoice service boundary parity

  • เพิ่ม POS Terminal services/invoices.ts พร้อม invoice helper ที่ตรงกับ Mobile สำหรับ list, pending B1 list, detail, create, send B1, retry, summary, approve/reject cancel และ cancel request
  • ปรับ terminal split-panel invoice wrapper เดิมให้ delegate ไป service ใหม่ โดยยังคง import path เดิมของ HomeScreen/ListPane ไว้
  • ปรับ order detail invoice creation flow ให้ import createInvoice จาก services/invoices เพื่อให้ตรงกับ service boundary ของ Mobile
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

Order logistics metadata edit parity

  • เพิ่ม control ใน POS Terminal order detail สำหรับแก้ pickup date/time, สถานะยืนยันบิล และสถานะใบเคลื่อนย้าย ให้ตรงกับ edit surface ของ Mobile OrderMetaDataDetail
  • ค่าที่แก้จะเก็บใน order detail state เดิมของ terminal, บันทึกผ่าน updateOrder, แล้ว refresh order detail และ list เพื่อให้ print/payment flow ใช้ metadata ล่าสุด
  • ผู้ใช้ที่แก้ไม่ได้ยังเห็น logistics metadata เป็น detail row แบบอ่านอย่างเดียว
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal

POS Terminal order service and list action parity

  • เพิ่ม POS Terminal order service exports สำหรับ deleteOrder, updateOrderShippingType, และ clearPendingBookings ให้ตรงกับ Mobile order service
  • เพิ่ม swipe action ลบใบสั่งขายในรายการ โดยใช้ permission gate เจ้าของใบ/admin/user override/department เดียวกับ Mobile และตรวจว่ามี invoice แล้วหรือไม่ก่อนลบ
  • เพิ่ม header action ของรายการใบสั่งขายสำหรับล้าง pending bookings ผ่าน /orders/return-booking-all แล้ว refresh รายการปัจจุบัน
  • เพิ่ม control เปลี่ยนประเภทขายในรายละเอียด order สำหรับเจ้าของใบ DRAFT/NEW ที่แก้ไขได้ โดยเรียก Mobile parity endpoint /orders/:id/shipping-type และ persist pickup time เมื่อเปลี่ยนเป็นหน้าร้านแต่ยังไม่มีเวลา pickup
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal borrow print log parity

  • เพิ่ม POS Terminal recordBorrowPrintLog ใน Firestore print log service ให้ตรงกับ Mobile borrow print logging API
  • ปรับ print helper ของใบเบิกและใบห้องฝากให้บันทึก print count ก่อน render template โดยยังไม่ block การพิมพ์หากเขียน print log ไม่สำเร็จ
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal common service parity

  • เพิ่ม POS Terminal getBranchesByCurrentUser เป็น wrapper โหลดสาขาจาก current user เหมือน Mobile พร้อม fallback user code 999999
  • เพิ่ม POS Terminal getListAddressPickUp สำหรับโหลด pickup addresses จาก selected branch detail endpoint
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal product inventory realtime service parity

  • เพิ่ม POS Terminal syncProductInventory, subscribeProductInventory, และ getProductInventoryDetail ให้ตรงกับ Mobile product inventory service exports
  • ใช้ logic เลือก warehouse codes ร่วมกันระหว่าง list, booking picker, realtime subscription, และ product lookup เพื่อให้สาขาหลักรวม base/PC/NF inventories ส่วนสาขาย่อยใช้ warehouse group ที่เลือก
  • ปรับ POS Terminal product list และ booking product picker service reads ให้ sync inventory จาก API ก่อนอ่าน Firestore ตาม Mobile product inventory refresh flow
  • คง one-shot list และ lookup APIs เดิมของ POS Terminal สำหรับ split-panel screens ปัจจุบัน พร้อมเปิดทางให้ใช้ Mobile-style realtime product flows ได้
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal booking price service parity

  • เพิ่ม POS Terminal getBookingPrices, getBookingPriceById, และ convertBookingPriceToOrder service exports ให้ตรงกับ Mobile booking price API surface
  • ใช้ selected-branch context สำหรับ branchId และ whGrpCode เพื่อให้ terminal booking-price list request ใช้ query shape เดียวกับ Mobile ได้
  • คง behavior ของ POS Terminal split-panel booking price เดิมไว้ พร้อมเปิด service boundary แบบ Mobile-compatible สำหรับ list/detail/convert
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal booking price convert action parity

  • เพิ่ม action ใน POS Terminal booking-price detail สำหรับแปลง persisted DRAFT booking price เป็นใบสั่งขายผ่าน Mobile-compatible endpoint convertBookingPriceToOrder
  • หลังแปลงสำเร็จ terminal จะสลับไป sales-order split pane, เปิดรายละเอียด order ที่สร้างใหม่, refresh booking-price data, และแสดง confirmation success/error flow ให้เหมือน Mobile
  • ต่อปุ่ม Save ใน footer ของ booking-price detail เข้ากับ save handler เดิมของ terminal เพื่อให้ผู้ใช้บันทึกจาก footer ได้โดยไม่ต้องพึ่ง save-before-exit เท่านั้น
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal customer list filter parity

  • เพิ่ม POS Terminal customer split-list loader ที่ใช้ query shape เดียวกับ Mobile getCustomerSapList รวมถึง shippingType และ routeCode
  • reuse controls เลือก route/type ของ terminal บนเมนู ลูกค้า ปกติ เพื่อให้ filter ลูกค้าตามเส้นทาง, สายส่ง, และหน้าร้านได้เหมือน Mobile customer list
  • ต่อ search, clear search, refresh, และ load-more ให้คง filter route/type ของลูกค้าที่เลือกไว้
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal order list filter parity

  • เพิ่ม filter รายการใบสั่งขายใน POS Terminal สำหรับสายส่งและหน้าร้าน โดยส่ง shippingType ผ่าน split-list order loader ให้ตรงกับ Mobile OrderList query behavior
  • เพิ่ม toggle เฉพาะของฉัน / ทั้งหมด สำหรับเมนูใบสั่งขายปกติ และยังบังคับ shipping-review orders ให้ดูเฉพาะของ user ปัจจุบันเหมือน Mobile
  • ต่อ order search, clear search, status changes, refresh, และ load-more ให้คง filter shipping/user ที่เลือกไว้
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal shipping-review bulk payment parity

  • เพิ่ม multi-select ใน POS Terminal shipping-review sales-order list ให้เลือกหลายใบได้เหมือน Mobile review list
  • เพิ่ม bulk payment action และ modal สำหรับ order ที่เลือก พร้อมช่องทางชำระเงินสด/โอน และหมายเหตุ optional
  • bulk payment เรียก Mobile-compatible endpoint payOrder เดิมทีละ order, แจ้งผลสำเร็จ/ล้มเหลวบางส่วน, ล้าง selection, และ refresh review list หลังทำรายการ
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal customer detail document action parity

  • เพิ่ม action ใน POS Terminal customer detail สำหรับสร้างใบสั่งขาย, ใบจองราคา, และใบเบิกดูปลาจากลูกค้าที่เลือกโดยตรง ให้ตรงกับ action surface ของ Mobile customer detail
  • การสร้างใบสั่งขายจะ seed ข้อมูลจาก customer detail, persist เป็น DRAFT order, แล้วเปิดรายละเอียด order ที่สร้างใน sales-order split pane
  • ถ้าลูกค้าที่เลือกมีใบสั่งขายของวันนี้ในสาขาหลักอยู่แล้ว POS Terminal จะแจ้งให้เลือกเปิดใบเดิมหรือสร้างใหม่ ให้ตรงกับพฤติกรรม Mobile getExistingCustomerOrderForBranch
  • แก้ action สร้างใบสั่งขายจาก POS Terminal customer picker ให้โหลด customer detail, ตรวจใบสั่งขายเดิมของวันนี้, แล้วเปิดหรือสร้าง order ต่อ แทนการปิด picker โดยไม่ทำรายการ
  • ปรับ customer-to-sales-order payload ให้ตรง Mobile: ส่ง route fields เฉพาะลูกค้าสายส่ง และ fallback ไป address ที่มี route เมื่อ ShipTo ไม่มี route
  • action ใบจองราคาและใบเบิกดูปลา reuse draft builder เดิมของ terminal ส่วนแก้ไขข้อมูลลูกค้าจะเปิด customer-management draft form ที่ seed จากลูกค้าที่เลือก
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal credit note create action parity

  • ตรวจ Mobile CreditNoteList แล้วพบว่า POS Terminal มี list/detail parity ของ credit note แล้ว แต่ยังไม่มี action สร้าง blank return credit-note draft จากหน้า list
  • เพิ่ม permission สร้าง credit note ใน POS Terminal โดยใช้ dept codes เดียวกับ Mobile canCreateCreditNoteDeptCodes
  • ต่อปุ่มสร้างใน POS Terminal credit-note list ให้เปิด DRAFT credit-note detail ที่ seed จาก branch ที่เลือก, user ปัจจุบัน, วันที่สร้าง, items/files ว่าง, และค่าเริ่มต้นของใบคืนสินค้า
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal transport service parity

  • เพิ่ม POS Terminal getTransports, deleteTransport, และ transport shipping service exports สำหรับ create, retry, retry-cancel, และ delete operations ให้ตรงกับ Mobile transport service API surface
  • เพิ่ม Mobile-compatible transport shipping types และขยาย startTransport ให้รับ optional userCode และ shippings โดยยังรักษา existing terminal start flow เดิม
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal auth and Google route service parity

  • เพิ่ม POS Terminal requestResetPassword คู่กับ salt helper เดิม เพื่อให้ auth reset service exports ตรงกับ Mobile
  • เพิ่ม POS Terminal getGoogleRouteDistanceMeters พร้อม coordinate validation และ Google Routes field mask เดียวกับที่ Mobile ใช้คำนวณระยะทางขนส่ง
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal deliveries service parity

  • เพิ่ม POS Terminal delivery list/detail/status/accept/loading/sort/delete/assign service exports และ delivery API types ให้ตรงกับ Mobile deliveries service
  • คง behavior ของ POS Terminal shipping-route และ storefront screens เดิมไว้ พร้อมเปิด Mobile-compatible delivery service boundary สำหรับ terminal flows ถัดไป
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal transport shipping amount start parity

  • ปรับ POS Terminal transport detail ให้คำนวณค่าขนส่งลูกค้าใน draft จาก Google route distance ด้วยกติกา free-distance, round-up, และ rate ต่อกิโลเมตรเดียวกับ Mobile
  • ส่ง customer shipping payloads ตอนเริ่ม transport เพื่อให้ /transports/:id/started ได้ userCode และ shippings เหมือน Mobile
  • แสดงค่าขนส่งที่คำนวณแล้วบน terminal transport customer cards ก่อนเริ่มขนส่ง
  • เพิ่ม action ใน terminal customer modal สำหรับสร้างค่าขนส่ง และจัดการ shipping invoices ที่มีอยู่ด้วย retry, retry-cancel, และ delete operations ผ่าน Mobile transport shipping endpoints
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal product picker filter service parity

  • ตรวจ Mobile shared product picker flow แล้วพบว่า POS Terminal product filters ยังพึ่งเฉพาะ flags ใน inventory item
  • เพิ่ม POS Terminal product service endpoints สำหรับสินค้าที่ซื้อล่าสุด, สินค้าที่เปลี่ยนราคา, และสินค้าขายดี ให้ตรงกับ Mobile products service
  • ปรับ POS Terminal product picker ให้โหลดและใช้ filter datasets เหล่านั้น พร้อมคง fallback จาก inventory fields สำหรับ terminal flows ที่ไม่มี customer code
  • ส่ง customerCode จาก order และ booking context ตอนเปิด picker เพื่อให้ filter ล่าสุด ใช้ /customers/:code/last-products ได้
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal deposit and expense bill service parity

  • ตรวจ Mobile deposit และ expense-bill services แล้วพบว่า POS Terminal standalone services ยังไม่มี list/delete/retry helpers ชุดเดียวกัน แม้ split-panel actions บางจุดมี API call ซ้ำอยู่แล้ว
  • เพิ่ม POS Terminal getDeposits, updateDeposit, deleteDeposit, และ retryDeposit helpers พร้อม branch/warehouse query context แบบเดียวกับ Mobile
  • เพิ่ม POS Terminal getExpenseBills, deleteExpenseBill, และ retryExpenseBill helpers พร้อม branch query context แบบเดียวกับ Mobile
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal login password reset parity

  • ตรวจ Mobile login password-reset flow แล้วพบว่า POS Terminal employee-code login ยังไม่มี self-service reset/set-new-password
  • เพิ่ม POS Terminal setNewPassword auth service สำหรับ reset login endpoint เดียวกับ Mobile
  • เพิ่ม path ลืมรหัสผ่าน ใน employee-code login modal พร้อมขอ reset salt, ยืนยันรหัสผ่านใหม่, และกลับไปหน้า login โดยคงรูปแบบ modal เดิมของ terminal
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal notification token login parity

  • ตรวจ Mobile notification handling แล้วพบว่า POS Terminal มี Firebase Messaging dependency อยู่แล้ว แต่ยังไม่ refresh/persist FCM token และยังไม่ register foreground notification handling
  • เพิ่ม POS Terminal notification service ให้เทียบเท่า Mobile สำหรับ foreground/background handlers, permission/token helpers, และ token refresh
  • ปรับ POS Terminal login completion ให้ refresh FCM token และ PATCH /users/:id ด้วย permission fields ชุดเดียวกับ mobile พร้อม fcmToken ก่อนบันทึก local session
  • register foreground notification handler เมื่อ POS Terminal Home mount
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal alcohol check login parity

  • ตรวจ Mobile login แล้วพบว่า POS Terminal ยังไม่ enforce alcohol pre-login check สำหรับแผนก 13, 12, 14, 28, และ 30
  • เพิ่ม POS Terminal alcohol-check service ให้เทียบเท่า Mobile รวมถึง UAT bypass, employee-code bypass สำหรับ 999999/999997, และการเรียก external /alcohol/check-status
  • เชื่อม check เข้ากับ shared POS Terminal login completion path ก่อน save auth/session data เพื่อให้ทั้ง selected-user login และ employee-code login ถูก gate เหมือนกัน
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal sales-order create permission parity

  • ตรวจ Mobile Home permission update สำหรับ deptCode 20 แล้วพบว่า POS Terminal menu visibility ตรงแล้ว แต่ sales-order create helper ยังไม่รวมแผนก 20
  • เพิ่ม deptCode 20 ใน POS Terminal SALES_ORDER_CREATE_DEPT_CODES เพื่อให้ order creation shortcut ตรงกับพฤติกรรม Mobile CAN_CREATE_ORDER
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal transfer warehouse destination filter parity

  • ตรวจ Mobile transfer warehouse destination selection แล้วพบว่า POS Terminal ยังแสดง sub-warehouse options ดิบอยู่
  • ปรับ POS Terminal transfer warehouse destination loading ให้กรองรหัสคลัง NF-/DR- ก่อน merge sub-warehouses เข้า picker ให้ตรงกับพฤติกรรม Mobile transfer warehouse
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal customer-management draft recovery parity

  • ตรวจ mobile customer-management draft recovery แล้วพบว่า POS Terminal ยังถือว่า create flow ล้มเหลวเมื่อสร้าง branch child ไม่สำเร็จ แม้ draft หลักถูกสร้างแล้ว
  • ปรับ POS Terminal customer-management create flow ให้เก็บ draft หลักที่สร้างสำเร็จไว้และเปิด draft นั้นใน split panel แม้ draft address หรือ branch child บางรายการบันทึกไม่สำเร็จ
  • child records จะถูกบันทึกทีละรายการ, เก็บรายการที่ fail, โหลด draft ที่สร้างแล้วกลับมา และแจ้งผู้ใช้ให้ตรวจสอบ/บันทึก child record ที่ขาดซ้ำ
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal transport invoice print pacing parity

  • ตรวจ mobile transport print-all-invoices แล้วพบว่า POS Terminal ยังยิงงานพิมพ์ใบแจ้งหนี้ต่อเนื่องทันที
  • ปรับ POS Terminal transport print-all-invoices ให้รอ React Native interactions และหน่วง 800ms ระหว่างงานพิมพ์ invoice แต่ละใบ ตาม native printer stability guard ของ Mobile
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal employee profile password parity

  • ตรวจ Mobile EmployeeProfile แล้วพบว่า POS Terminal employee detail มีเฉพาะ admin reset salt แต่ยังไม่มี self-service set-new-password flow
  • เพิ่ม section เปลี่ยนรหัสผ่านใน POS Terminal employee detail สำหรับขอ reset salt, กรอกรหัสเดิม/Reset IT, รหัสผ่านใหม่, ยืนยันรหัสผ่านใหม่ และเรียก endpoint setNewPassword เดียวกับ Mobile
  • permission ตรงกับ Mobile: พนักงานปัจจุบันเปลี่ยนรหัสตัวเองได้ และผู้มีสิทธิ์เมนู employee เปลี่ยนจาก employee detail ได้
  • เมื่อพนักงานปัจจุบันเปลี่ยนรหัสของตัวเองสำเร็จ POS Terminal จะเรียก logout flow หลังผู้ใช้ยืนยัน เหมือนพฤติกรรม Mobile profile
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal required app update parity

  • ตรวจ mobile appUpdate, useRequiredAppUpdate, Login และ Home แล้วพบว่า POS Terminal ยังมี checkRequiredAppUpdate เป็น stub ที่คืน required: false.
  • ปรับ apps/pos-terminal/src/services/appUpdate.ts ให้อ่าน Firestore version/vapp, เทียบ native versionCode กับ remote versionNumber, และรองรับ field แยก Android/iOS เหมือน mobile.
  • เพิ่ม useRequiredAppUpdate และ RequiredAppUpdateModal ฝั่ง POS Terminal แล้วเชื่อมเข้ากับ UserSelectionScreen และ HomeScreen; Home จะเช็คซ้ำเมื่อกลับมา focus.
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • workflows/login-branch-home
    • architecture/mobile-terminal
    • governance/change-log

POS Terminal sales order menu parity

  • ตรวจ mobile Home, navigation, orderListScreen, OrderListCard, และ services/orders แล้วเพิ่มเมนู POS Terminal ให้ตาม mobile สำหรับ ใบสั่งขาย และ ตรวจสอบใบสั่งขาย
  • เพิ่ม service apps/pos-terminal/src/services/orders.ts โดย mirror endpoint /orders และ /orders/:id จาก mobile พร้อม branch/warehouse context
  • เพิ่ม split menu keys salesOrder และ salesOrderReview; list mode ปกติใช้ orderStatus ว่าง ส่วน review mode ใช้ WAITING_PAYMENT และกรอง hasShipment === 0 ตาม mobile shipping-review
  • เพิ่ม panel 2 list behavior สำหรับ order: initial load, search submit/clear, status filter, pull refresh, load-more pagination, และ loading overlay ตาม pattern ของ terminal
  • เพิ่ม order list card ใน POS Terminal ให้แสดงเลขใบสั่ง, ลูกค้า, ผู้เปิดใบ, ประเภท สายส่ง/หน้าร้าน, ยอดสุทธิหลังหัก coupon/point/credit note, และสีสถานะตาม logic ของ mobile OrderListCard
  • เพิ่ม panel 3 OrderDetailForm แทน fallback detail: แสดง hero/customer/status/shipping type, ข้อมูลลูกค้า/เส้นทาง/คลัง, summary จำนวน/น้ำหนัก/ยอดสินค้า/ส่วนลด/ยอดคงเหลือ และรายการสินค้าแบบ split panel
  • เพิ่ม action ลบรายการสินค้าในใบสั่งขายสถานะ DRAFT สำหรับ owner ตาม mobile gate; หลังลบจะ PATCH totals กลับ /orders/:id, reload detail, patch panel 2 และ refresh list
  • เพิ่ม section สิทธิ์ส่วนลดที่ใช้อยู่ใน panel 3 สำหรับ point/coupon/credit note และ action ลบสิทธิ์ส่วนลดตาม mobile owner/status gate
  • เพิ่ม input ใช้คูปอง ใน panel 3 โดยเรียก POST /orders/:id/coupon ตาม mobile coupon flow และ refresh detail/list หลังสำเร็จ
  • เพิ่ม section ใช้คะแนน ใน panel 3 ตาม mobile point flow: โหลดคะแนนลูกค้าจาก /customers/:customerCode/point-balance, เลือกเบอร์, ส่ง OTP, verify OTP, กรอกยอดเงิน และ POST /orders/:id/point
  • เพิ่ม section ใช้ส่วนลดเครดิต ใน panel 3 ตาม mobile credit note discount flow: โหลด credit note discount list ของลูกค้า, validate ยอด BFP/NFF ตาม company ของ order, POST /orders/:id/credit-notes/:creditNoteId, ส่ง OTP, และ confirm OTP
  • เพิ่ม order print helper ใน POS Terminal โดยใช้ shared templates buildOrderPackTemplate/buildOrderStorageTemplate, บันทึก print log ผ่าน Firestore print, และเพิ่ม action panel 3 สำหรับพิมพ์ใบจัดหน้าร้าน/ใบเบิกไม่มี Lots/ใบเบิกมี Lots พร้อมบันทึก remark และขยับ DRAFT เป็น NEW ก่อนพิมพ์ตาม mobile flow
  • เพิ่ม core payment flow ใน panel 3 ตาม mobile OrderPayment: โหลด invoice refs จาก /orders/:orderNo/invoices, guard ใบแจ้งหนี้ prefix ซ้ำ, เลือกช่องทาง CASH/TRANSFER/QR, สร้าง QR Payment preview, validate เงินสด, และ POST /payment ด้วย payload เดียวกับ mobile
  • เพิ่ม payment advanced actions บางส่วนใน panel 3: พิมพ์ใบแจ้งหนี้รายใบผ่าน getInvoiceSplitDetail + printInvoice และส่งข้อมูลใบแจ้งหนี้ใหม่ผ่าน POST /invoices/:orderNo/retry พร้อม reload invoices/detail/list
  • เพิ่ม upload slip/share QR ใน payment section: แนบสลิปโอนเงินด้วย react-native-image-picker, upload ผ่าน /orders/:orderNo/files, ส่ง slipPath เข้า payment payload, และแชร์ QR Payment ผ่าน react-native-share
  • เพิ่ม create/edit item flow ใน panel 3 สำหรับ order DRAFT owner: ใช้ product picker เดิมของ terminal, ถ้าเลือกสินค้าที่มีอยู่จะเข้า edit mode, ถ้าเลือกสินค้าใหม่จะ POST /orders/:id/items, และแก้รายการเดิมด้วย PATCH /orders/:id/items/:itemId โดยใช้ payload shape เดียวกับ mobile buildOrderItemPayload
  • เปิด duplicate invoice/order flow ใน POS Terminal invoice detail: แสดง action เปิดใบสั่งขายจากใบแจ้งหนี้, ใช้ config vehicleRelease/documentMove สำหรับสาขาย่อย, สร้าง order draft จาก invoice, replay รายการสินค้าด้วย inventory/step price lookup, PATCH totals, แล้วเปิด order detail ที่สร้างใหม่
  • เพิ่ม progress overlay เฉพาะ duplicate invoice/order flow เพื่อแสดงขั้นตอนโหลด invoice, สร้าง order, replay สินค้ารายการต่อรายการ, สรุปยอด และเปิด order detail
  • เพิ่ม action จาก ProductDetailForm เพื่อสร้างใบสั่งขายจากสินค้า: กรอกจำนวน/ราคา/น้ำหนัก, เลือกลูกค้าผ่าน CustomerPickerModal mode salesOrder, POST /orders, POST /orders/:id/items, PATCH totals, แล้วเปิด order detail ที่สร้างใหม่ใน split panel
  • เพิ่ม service ฝั่ง POS Terminal สำหรับ POST /orders, PATCH /orders/:id, GET /orders/:orderNo/invoices, POST /payment, POST /invoices/:orderNo/retry, POST /orders/:orderNo/files, POST /orders/:id/items, PATCH /orders/:id/items/:itemId, DELETE /orders/:id/items/:itemId, POST /coupon, point balance, order OTP, validate OTP, POST /point, โหลด credit note discount, POST /credit-notes/:creditNoteId, POST /credit-notes/:creditNoteId/send-otp, POST /credit-notes/:creditNoteId/confirm-otp, DELETE /point, DELETE /coupon, และ DELETE /credit-notes/:creditNoteId
  • order detail/action parity หลักของ mobile ในรอบนี้ถูกยกเข้ารูปแบบ split panel แล้ว
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • workflows/home-menu-and-permissions
    • governance/change-log

POS Terminal customer address management parity

  • ตรวจ mobile CustomerManagementAddressList, CustomerManagementAddressDetail, และ services/customers แล้วเพิ่มเมนู POS Terminal จัดการที่อยู่ลูกค้า ใน panel 1 ด้วย permission MENU_CUSTOMER_MANAGEMENT
  • เพิ่ม service ฝั่ง POS Terminal สำหรับ /customer-draft/address-lat-lng, /customer-draft/address-lat-lng/:id, /approve, และ /reject
  • เพิ่ม split menu key customerAddressManagement พร้อม panel 2 list behavior: initial load, search, refresh, load-more pagination, และ loading overlay ตาม pattern ของ terminal
  • เพิ่ม panel 3 detail form สำหรับคำขอบันทึกพิกัดที่อยู่ลูกค้า แสดงข้อมูลผู้ขอ, ลูกค้า, หมายเหตุ, ที่อยู่เดิม, เส้นทาง, พิกัดเก่า/ใหม่ และแสดง Google Map preview ของพิกัดเก่า/ใหม่เหมือน mobile ในขนาดที่เหมาะกับ split panel
  • detail form แสดงปุ่ม อนุมัติ / ไม่อนุมัติ เฉพาะคำขอสถานะ PENDING
  • หลัง approve/reject จะ reload detail และ refresh panel 2 list เพื่อให้สถานะล่าสุดตรงกับ server
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • workflows/home-menu-and-permissions
    • governance/change-log

POS Terminal credit note list/detail parity

  • ตรวจ mobile creditNoteListScreen, creditNoteDetailScreen, creditNoteStack/helpers, และ services/creditNotes แล้วเพิ่ม service ฝั่ง POS Terminal สำหรับ /credit-notes และ /credit-notes/:id
  • ปรับเมนู POS Terminal ลดหนี้ / คืนสินค้า ให้ใช้ list loader เฉพาะตาม mobile แทน generic split list: รองรับ search, status filter, refresh, load-more pagination, และ default filter คืนสินค้าเท่านั้น (isReturn=1)
  • เพิ่ม card ใน panel 2 สำหรับ credit note ให้แสดงเลขใบลดหนี้, ลูกค้า, ใบแจ้งหนี้, สถานะภาษาไทย, ยอดลดหนี้ และสีสถานะตาม logic mobile
  • เพิ่ม panel 3 CreditNoteDetailForm สำหรับข้อมูล detail: header/status, invoice/customer/reason/warehouse/totals, จำนวนไฟล์แนบ, และรายการสินค้า/Location/Lot
  • เพิ่ม mutation action ใน panel 3 ตาม mobile permission/status gate: บันทึกสถานะ, ส่ง B1, ลบรายการสินค้า, และลบรูปแนบ พร้อม refresh detail/list หลัง API สำเร็จ
  • เพิ่ม action เพิ่มเติมใน panel 3 ตาม mobile detail: อัปโหลดรูปแนบผ่าน image picker ไป /credit-notes/:id/files, แก้ qty/amount/weight/isReturn ของรายการเดิมผ่าน PATCH /items/:itemId, และเลือก Lot/Location สำหรับสินค้าคืนผ่าน /products/lot + PATCH /items/:itemId/lots
  • เพิ่ม create credit note จาก invoice detail: ปุ่ม เปิดใบคืนสินค้า ใน panel 3 ของใบแจ้งหนี้จะเปิด draft credit note ใน split panel, prefill invoice/customer/branch/company/sale/user context, โหลดเหตุผล, เลือกรายการสินค้าจาก invoice picker, POST /credit-notes, POST /items, แล้ว refresh detail/list
  • เพิ่ม service ฝั่ง POS Terminal สำหรับ POST/PATCH/DELETE /credit-notes, POST/PATCH item, PATCH item lots, upload/delete file, และ POST /to-b1
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal vehicle status parity

  • ตรวจ mobile vehicleListScreen และ service ยานพาหนะ แล้วเพิ่ม POS Terminal vehicle list ให้ใช้ loader เฉพาะจาก /vehicles แทน generic list
  • เพิ่ม service updateVehicleStatus สำหรับ endpoint /vehicles/:licensePlate/vehicle-status พร้อม payload vehicleStatus และ vehicleStatusNote ตาม mobile
  • เพิ่ม panel 2 behavior สำหรับยานพาหนะ: initial load, search, pull refresh, load-more pagination, card สีตามสถานะ UNCHECKED / READY / NOT_READY, และแสดงทะเบียนรถ, ประเภทรถ, หมายเหตุ, น้ำหนักบรรทุก
  • เพิ่ม panel 3 VehicleDetailForm ให้แก้สถานะพร้อมใช้งานและหมายเหตุได้ในรูปแบบ split panel ของ POS Terminal; หลังบันทึกจะ patch รายการที่เลือกและ refresh list
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • governance/change-log

POS Terminal transfer warehouse parity

  • ตรวจ mobile TransferWarehouseList, TransferWarehouseDetail, และ services/transferWarehouse แล้วเพิ่ม service ฝั่ง POS Terminal สำหรับ /transfer-branches, /transfer-branches/:id, DELETE item, และ POST /to-b1
  • ปรับ list loader ของเมนู ย้ายสินค้าระหว่างคลัง ให้ใช้ service เฉพาะตาม mobile แทน generic API call เดิม โดยคงรูปแบบ split panel ของ terminal
  • เพิ่ม panel 3 TransferWarehouseDetailForm แสดงเลขที่, คลังต้นทาง/ปลายทาง, บริษัท, ผู้บันทึก, หมายเหตุ, จำนวนรวม, รายการสินค้า และ Batch
  • เพิ่ม action ส่งเข้า B1 และลบรายการสินค้าใน panel 3 พร้อม refresh detail/list หลัง API สำเร็จ
  • เพิ่ม create/edit flow ใน panel 3: สร้าง draft จากปุ่มบวกของ list pane, เลือกคลังปลายทาง, POST/PATCH header, เปิด product picker จาก inventory, เลือก Batch จาก lot API, POST/PATCH item, และ refresh detail/list หลังบันทึก
  • stock menu หลักที่ mobile อัปเดตเพิ่มแล้วถูกยกเข้า terminal แล้ว เหลือ follow-up เฉพาะ validation/UX รายละเอียด Batch ที่ต้องทดสอบกับข้อมูลจริง
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • workflows/home-menu-and-permissions
    • governance/change-log

POS Terminal goods receipt parity

  • ตรวจ mobile GoodsReceiptList, GoodsReceiptDetail, goodsReceiptStack/helpers, GoodsReceiptListCard, และ services/goodsReceipt แล้วเพิ่ม service ฝั่ง POS Terminal สำหรับ /goods-receipt-po และ POST /stock-in
  • ปรับ list loader ของเมนู รับสินค้าเข้าตรง ให้ใช้ service เฉพาะตาม mobile พร้อม branch context และ dedupe key แทน generic MST call เดิม
  • เพิ่ม panel 3 GoodsReceiptDetailForm ในรูปแบบ terminal split panel: แสดง header เอกสาร, รายการสินค้า, ยอด Batch รวม, และสถานะ Lot/Batch ต่อสินค้า
  • เพิ่ม product picker จาก inventory พร้อม dummy product ตาม company, modal ระบุจำนวน, editor แก้หมายเหตุรายการ, เพิ่ม/แก้/ลบ Batch, sync cal จากยอด Batch และลบสินค้าใหม่ก่อน submit
  • เพิ่ม date picker ใน goods receipt Batch editor สำหรับ admissionDate, manufacturingDate, และ expiryDate ตาม mobile BatchLotEditorModal
  • เพิ่ม validation จำนวนสินค้า/Batch และ submit payload shape เดียวกับ mobile ไป POST /stock-in; หลังสำเร็จ refresh list
  • Batch date picker parity ของ stock receipt/transfer หลักถูกยกเข้า terminal แล้ว เหลือ follow-up เฉพาะ UX รายละเอียด Batch ที่ต้องทดสอบกับข้อมูลจริง
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • workflows/home-menu-and-permissions
    • governance/change-log

POS Terminal transfer out parity

  • ตรวจ mobile TransferOutList, TransferOutDetail, transferOutStack/helpers, TransferOutListCard, และ services/transferOut แล้วเพิ่ม service ฝั่ง POS Terminal สำหรับ /transfers-out และ POST /transfer-out
  • ปรับ list loader ของเมนู โอนสินค้าไปสาขา ให้ใช้ service เฉพาะตาม mobile พร้อม whGrpCode context และ dedupe key แทน generic MST call เดิม
  • เพิ่ม panel 3 TransferOutDetailForm ในรูปแบบ terminal split panel: แสดง header เอกสาร ต้นทาง/ปลายทาง รายการสินค้า ยอด Batch ที่เลือก และยอดค้างเบิก
  • เพิ่ม Batch picker จาก lot API ตาม itemCode, warehouseCode, company พร้อมค้นหา Batch, ป้องกัน Batch ซ้ำ, แก้จำนวน, ลบ Batch, ตรวจยอดคงเหลือ และตรวจยอดค้างเบิก
  • เพิ่ม date picker ใน transfer out Batch editor สำหรับ admissionDate, manufacturingDate, และ expiryDate ตาม mobile BatchLotEditorModal พร้อมแสดงวันที่บน Batch card
  • เพิ่ม validation ให้ทุก line เลือก Batch ครบตามจำนวนเบิก แล้ว submit payload shape เดียวกับ mobile ไป POST /transfer-out; หลังสำเร็จ refresh list
  • follow-up ที่เหลือคือการทดสอบ UX รายละเอียด Batch กับข้อมูลจริง
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • workflows/home-menu-and-permissions
    • governance/change-log

POS Terminal transfer in parity

  • ตรวจ mobile TransferInList, TransferInDetail, transferInStack/helpers, TransferInListCard, และ services/transferIn แล้วเพิ่ม service ฝั่ง POS Terminal สำหรับ /transfers-in และ POST /transfer-in
  • ปรับ list loader ของเมนู รับสินค้าจากสาขา ให้ใช้ service เฉพาะตาม mobile โดยรวมข้อมูลจากคลังหลักและ NF- tab แล้ว dedupe เป็น list เดียวตามรูปแบบ terminal
  • เพิ่ม panel 3 TransferInDetailForm ในรูปแบบ terminal split panel: แสดง header เอกสาร สาขาต้นทาง รายการสินค้า ยอด Batch รวม และยอดค้างเบิก
  • เพิ่ม product picker จาก inventory พร้อม dummy product ตาม company, auto batch สำหรับ dummy product, editor แก้หมายเหตุรายการ, Batch picker จาก lot API, แก้/ลบ Batch, sync quantity และ cal จากยอด Batch และลบสินค้าใหม่ก่อน submit
  • เพิ่ม date picker ใน transfer in Batch editor สำหรับ admissionDate, manufacturingDate, และ expiryDate ตาม mobile BatchLotEditorModal พร้อมแสดงวันที่บน Batch card
  • เพิ่ม validation จำนวนสินค้า แล้ว submit payload shape เดียวกับ mobile ไป POST /transfer-in; หลังสำเร็จ refresh list
  • stock menu หลักที่ mobile อัปเดตเพิ่มแล้วถูกยกเข้า terminal แล้ว เหลือ follow-up เฉพาะการทดสอบ UX รายละเอียด Batch กับข้อมูลจริง
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • workflows/home-menu-and-permissions
    • governance/change-log

POS Terminal stock permission parity

  • Audit เมนู Home ของ mobile เทียบ terminalMenus แล้วพบว่า terminal มีเมนูครบชุดเดียวกับ mobile แต่ permission gate ของ stock menu ยังไม่ตรง mobile
  • ปรับ TerminalMenuItem ให้รองรับ allowNonMainBranch และตั้งค่าให้ stock menu ทั้ง 4 รายการ (goodsReceipt, transferOut, transferIn, transferWarehouse)
  • ปรับ canAccessMenu ให้สาขาย่อยผ่าน stock menu ได้เหมือน mobile (isNonMainBranch || MENU_STOCK.has(deptCode)) โดยไม่กระทบเมนูที่ต้องเป็นสาขาหลัก
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • workflows/home-menu-and-permissions
    • governance/change-log

POS Terminal customer read/detail parity

  • Audit mobile CustomerList, CustomerDetail, และ services/customers เทียบ POS Terminal แล้วพบว่าเมนู ลูกค้า ยังใช้ generic API/list detail เป็นหลัก
  • ปรับ customer list loader ให้ใช้ getCustomerSapList service เดียวกับ mobile แทน generic /customers call
  • เพิ่ม getCustomerSplitDetail สำหรับโหลดรายละเอียดผ่าน /customers/:id ก่อนเปิด panel 3
  • เพิ่ม CustomerDetailForm แสดงข้อมูลลูกค้าหลัก, ประเภทจัดส่ง, tier, เครดิต, คะแนน, ที่อยู่, เส้นทาง และสาขาที่เกี่ยวข้องในรูปแบบ terminal split panel
  • เพิ่ม action ใน CustomerDetailForm ตาม mobile customer detail: โทรลูกค้าโดยบันทึก /customers/:id/re-call ก่อนเปิด dialer, ขอเปิด/ปิดสถานะลูกค้าผ่าน /customers/:code/status, เปิด Google Maps จากพิกัดที่อยู่, ตั้งที่อยู่จัดส่งเริ่มต้นผ่าน /addresses/:addressId/default, และส่งคำขออัปเดตพิกัดที่อยู่ผ่าน /customer-draft/address-lat-lng
  • เพิ่ม service ฝั่ง POS Terminal สำหรับ updateCustomerStatus, createCustomerAddressByPass, requestCustomerAddressGpsUpdate, และ setCustomerDefaultAddress เพื่อให้ endpoint customer detail ตรงกับ mobile service
  • ต่อ refresh detail จาก Home split panel เข้า CustomerDetailForm เพื่อ reload /customers/:id หลัง action สำเร็จ
  • เพิ่มฟอร์ม เพิ่มที่อยู่ แบบ bypass ใน CustomerDetailForm: เลือก BillTo/ShipTo, กรอกข้อมูลที่อยู่, ค้นหา address จาก dbAddress, เลือกสายส่งผ่าน getRoutesByBranch, ดึงพิกัดจากอุปกรณ์, เลือกพิกัดผ่าน WebView Google Maps picker, validate route เมื่อลูกค้าเป็นสายส่ง, และ PATCH /customers/:code/addresses ผ่าน createCustomerAddressByPass
  • customer profile action หลักจาก mobile CustomerDetail ถูกยกเข้า POS Terminal split panel แล้ว; รอบ audit ถัดไปควรตรวจเมนูอื่นหรือรายละเอียด UX เฉพาะจุดที่ mobile อัปเดตเพิ่มหลังชุดลูกค้า
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • workflows/home-menu-and-permissions
    • governance/change-log

POS Terminal customer management detail parity

  • Audit mobile CustomerManagementList, CustomerManagementDetail, และ services/customers แล้วเพิ่ม service ฝั่ง POS Terminal สำหรับ getCustomerDrafts, getCustomerDraftById, draft addresses, draft branches, approve draft, และ reject draft
  • ปรับ list loader ของเมนู การจัดการลูกค้า ให้ใช้ getCustomerDrafts service เฉพาะเดียวกับ mobile แทน generic /customer-draft call
  • เพิ่ม getCustomerManagementSplitDetail เพื่อโหลด draft detail พร้อม addresses/branches ก่อนเปิด panel 3
  • เพิ่ม CustomerManagementDetailForm แสดงข้อมูล draft, ที่อยู่, สาขาที่เปิดบิลได้ และ action อนุมัติ/ไม่อนุมัติในรูปแบบ terminal split panel
  • action approve/reject ใช้ permission gate เดียวกับ mobile (isAdmin, approveCustomer, หรือ dept 7/29) และ refresh list หลัง API สำเร็จ
  • เพิ่ม service และ split-panel action สำหรับแก้ไข core customer draft fields ผ่าน PATCH /customer-draft/:id โดย mirror mobile updateCustomerDraft payload หลัก
  • modal แก้ไขข้อมูลใน POS Terminal รองรับชื่อ/นามสกุล, ฉายา, Tax ID, วันเกิด, เบอร์โทร, อีเมล, shipping type, ผู้รับผิดชอบ, สาขาหลัก, ประเภทลูกค้า และรู้จักเราจาก พร้อม validation ชื่อรวมไม่เกิน 200 ตัวอักษรตาม mobile
  • หลังบันทึก core draft สำเร็จ terminal จะ reload detail จาก /customer-draft/:id และ refresh panel 2 list เพื่อให้ข้อมูลตรงกับ server
  • เพิ่ม service ฝั่ง POS Terminal สำหรับ child records ของ customer draft: POST/PATCH/DELETE /customer-draft/:id/addresses และ POST/DELETE /customer-draft/:id/branches
  • เพิ่ม split-panel address editor ใน CustomerManagementDetailForm สำหรับเพิ่ม/แก้/ลบที่อยู่ โดยใช้ payload shape เดียวกับ mobile buildCustomerAddressPayload และ validate addressType รวมถึง U_ISS_RouteCode เมื่อ draft เป็นสายส่ง
  • เพิ่ม split-panel branch picker โดยโหลดสาขาจาก getBranchesByUserCode, ป้องกันสาขาซ้ำ, เพิ่มสาขาผ่าน /branches, และลบสาขาพร้อม guard ต้องเหลืออย่างน้อย 1 สาขาที่เปิดบิลได้ตาม mobile
  • หลัง address/branch child CRUD สำเร็จ terminal จะ reload detail และ refresh panel 2 list เพื่อให้ข้อมูลตรงกับ server
  • เพิ่มปุ่มสร้าง draft ลูกค้าใหม่ใน panel 2 ของเมนู การจัดการลูกค้า โดยเปิด panel 3 draft ใหม่แบบ terminal split panel พร้อม prefill branch/user ปัจจุบัน
  • เพิ่ม service createCustomerDraft สำหรับ POST /customer-draft และให้ CustomerManagementDetailForm สร้าง draft ใหม่เมื่อยังไม่มี customerDraftId
  • create flow validate core required fields ตาม mobile (firstname, lastname, dateOfBirth, customerTypeCode, knowusCode) และ validate ชื่อรวมไม่เกิน 200 ตัวอักษร
  • หลังสร้าง draft สำเร็จ terminal จะสร้าง branch child ตั้งต้นจาก branch ปัจจุบัน, โหลด detail ที่ server สร้างกลับมา, set selected item, และ refresh panel 2 list
  • เพิ่ม master data service ฝั่ง POS Terminal สำหรับ /customer-types และ /knowus ให้ตรงกับ mobile common service
  • เปลี่ยน core draft edit จากการกรอกรหัส customerTypeCode/knowusCode เองเป็น picker แบบ mobile พร้อม local search และบันทึกทั้ง code/name ลง payload
  • เพิ่ม route picker ใน address editor โดยโหลด /routes?branchCode=... จาก branch/warehouse group ของ draft และเติม U_ISS_RouteCode/U_ISS_RouteName ลง address payload
  • เพิ่ม address search ใน POS Terminal customer draft address editor โดย reuse dbAddress source เดียวกับ mobile, filter ด้วยข้อความค้นหา และเติมตำบล/อำเภอ/จังหวัด/รหัสไปรษณีย์ลง address form อัตโนมัติ
  • เพิ่ม action ดึงพิกัดจากอุปกรณ์ ใน address editor ด้วย react-native-geolocation-service และ Android/iOS permission flow แบบเดียวกับ mobile/terminal transport flow
  • เพิ่ม action เลือกจากแผนที่ ใน address editor ด้วย WebView Google Maps picker โดยใช้ GOOGLE_MAPS_WEB_API_KEY, รองรับค้นหาสถานที่, drag marker, click map, และเติม U_BFP_Latitude/U_BFP_Longitude เมื่อกดใช้พิกัดนี้
  • CustomerManagementEdit parity หลักของ draft create/edit, address/branch child CRUD, master-data picker, address search และ map/GPS picker ถูกยกเข้า POS Terminal split panel แล้ว
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • workflows/home-menu-and-permissions
    • governance/change-log

POS Terminal customer activation request parity

  • ตรวจ mobile CustomerList mode request, CustomerDetail request mode, customerPermissions, และ services/customers แล้วปรับ POS Terminal เมนู เปิด/ปิด สถานะลูกค้า ให้ใช้ request flow ตาม mobile
  • เพิ่ม split list loader เฉพาะจาก /customers ผ่าน getCustomerSapList({ isRequest: true }) พร้อม search, route filter, shipping type filter, refresh, load-more pagination, และ branch context เดียวกับ mobile customer list
  • เพิ่ม service ฝั่ง POS Terminal สำหรับ PATCH /customers/:customerCode/approve และ /customers/:customerCode/reject
  • เพิ่ม panel 2 card สำหรับคำขอเปิด/ปิดสถานะลูกค้า แสดงลูกค้า, รหัสลูกค้า, ผู้ร้องขอ, วันที่ร้องขอ, และสถานะคำขอ ขอเปิดการใช้งาน / ขอปิดการใช้งาน
  • เพิ่ม panel 3 CustomerActivationDetailForm ให้โหลด customer detail ล่าสุดและอนุมัติ/ปฏิเสธคำขอได้ตาม permission request menu; หลังดำเนินการจะ refresh list และปิด detail เหมือน mobile กลับหน้า list
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • workflows/home-menu-and-permissions
    • governance/change-log

POS Terminal product inventory parity

  • ตรวจ mobile ProductList, ProductDetail, ProductListCard, และ services/products แล้วปรับ POS Terminal เมนู สินค้า จาก generic MST /products มาใช้ inventory snapshot ตามสาขาเหมือน mobile
  • เพิ่ม service ฝั่ง POS Terminal สำหรับ product branch context และ inventory list จาก Firestore โดยยังคง getBookingProductList เดิมไว้สำหรับ picker/order flow
  • เพิ่ม split list/detail สำหรับสินค้า: panel 2 รองรับ search, refresh, load-more pagination, tab ทั้งหมด / ติดจอง, card สีตาม product color และแสดงราคา, SAP, POS, จอง
  • เพิ่ม panel 3 ProductDetailForm แสดง hero, stock stats, คลัง, หน่วยขาย, น้ำหนัก/หน่วย, สถานะคุมน้ำหนัก, บริษัท และ step price เมื่อสินค้ามี stepPriceFlag
  • เพิ่ม action เพิ่มสินค้าเข้าใบสั่งขายจาก mobile ProductDetail ในรูปแบบ POS Terminal: กรอกจำนวน/ราคา/น้ำหนักใน detail panel, เลือกลูกค้าผ่าน customer picker, สร้าง order draft, เพิ่ม item, ปรับ totals, และเปิดใบสั่งขายที่สร้างใหม่ทันที
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • workflows/home-menu-and-permissions
    • governance/change-log

POS Terminal employee list/detail parity

  • ตรวจ mobile EmployeeList, EmployeeDetail, EmployeeListCard, employeeStack/config, และ services/user แล้วปรับ POS Terminal เมนู ผู้ใช้ทั้งหมด จาก generic fallback ให้ใช้ /users และ /users/:id ตาม mobile
  • เพิ่ม service ฝั่ง POS Terminal สำหรับ getUsers, getUserById, patchUser, และ reset password salt endpoint พร้อม normalize response shape { data } / array ให้เหมือน mobile
  • เพิ่ม split list/detail สำหรับ employee: panel 2 รองรับ search, refresh, load-more pagination และ card แสดงชื่อผู้ใช้, อีเมล, แผนก
  • เพิ่ม panel 3 EmployeeDetailForm แสดงข้อมูลพื้นฐานและ permission flags ตาม employeePermissionOptions พร้อม action แก้ไข permission flag และบันทึกกลับ /users/:id
  • เพิ่ม action reset password ใน panel 3 โดยใช้ endpoint salt reset เดียวกับ mobile และแสดง Salt ที่ได้หลังยืนยัน
  • เพิ่ม section ตั้งค่ารับโอนสินค้าภายในสาขา ใน panel 3 ตาม mobile EmployeeTransferReceiveSetting: โหลดสาขาด้วย getBranchesByUserCode, เลือกสาขาหลัก, โหลดคลังย่อย, และ toggle สิทธิ์รับโอนผ่าน /users/:userId/branches/:branchId/warehouses
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • workflows/home-menu-and-permissions
    • governance/change-log

2026-05-21

Core

ขนส่ง OTHER payment validation

  • ปรับ validation การรับชำระลูกค้าแบบ อื่นๆ (OTHER) ใน Mobile และ POS Terminal ให้ยอด cash + transfer ต้องไม่เกิน grandAmount เสมอเมื่อไม่ใช่เคส ไม่รับสินค้า
  • เคส รับสินค้าบางรายการ ยังรับยอดต่ำกว่า grandAmount ได้ แต่ห้ามเกิน grandAmount
  • เคส แบ่งชำระ ถูกบังคับไม่ให้ยอดรวมเงินสด+โอนเกิน grandAmount
  • Verified with yarn workspace @bsr/mobile tsc --noEmit and yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • workflows/mobile-transport-and-vehicles
    • governance/change-log

Shared Lot/Batch code generation

  • เพิ่ม generateBatchCode และ normalizeBatchItemCode ใน @bsr/utils เพื่อให้ Mobile และ POS Terminal ใช้กฎสร้าง Lot/Batch code ร่วมกันได้
  • generator กลางจะตัด prefix BT- ที่นำหน้า itemCode ออกก่อนสร้าง code
  • goodsReceiptDetailScreen และ transferInDetailScreen เปลี่ยนมาใช้ generator กลางแทน helper ซ้ำในแต่ละ screen
  • Verified with yarn workspace @bsr/mobile tsc --noEmit and yarn workspace @bsr/pos-terminal typecheck.

Mobile

สิทธิ์เมนูคลังสินค้าและ storefront action

  • ปรับ Home stock menu visibility ให้ branch ที่ไม่ใช่ main (branch.isMain === false) เห็นเมนูคลังสินค้าทั้ง 4 รายการโดยไม่เช็ค deptCode
  • ตรวจแล้วว่า stock list/detail screens ไม่ได้มี deptCode gate เพิ่มสำหรับ action ที่มีอยู่
  • เพิ่ม storefront action override สำหรับ user code 999997 ให้แก้การตรวจ Lot/Batch/location ของสินค้าและส่ง B1 ได้ แม้ไม่ใช่ผู้รับงาน
  • Verified with yarn workspace @bsr/mobile tsc --noEmit.
  • Docs updated:
    • workflows/home-menu-and-permissions
    • workflows/goods-receipt-flow
    • workflows/sales-flow
    • governance/change-log

2026-05-16

Mobile

Transfer warehouse company source

  • ปรับ TransferWarehouseDetail ให้การโหลด Batch/Lot ใช้ company จากสินค้าที่เลือกโดยตรง ไม่อิง company จากคลังปลายทาง
  • เมื่อเลือกสินค้าตัวแรกของเอกสารย้ายสินค้าระหว่างคลัง ระบบจะเติม companyCode และ companyName ของ header จาก company ของสินค้านั้น เพื่อไม่ให้ payload create/update ส่ง company ว่างเมื่อ warehouse option ไม่มี field company
  • เพิ่ม diagnostic log ใน TransferWarehouseDetail สำหรับ warehouse ที่เลือก, product ที่เลือก, params ก่อนโหลด Batch/Lot, และกรณี source warehouse หรือ product company ขาดค่า
  • Docs updated:
    • workflows/login-branch-home
    • governance/change-log

ฟอร์มที่อยู่ลูกค้าและการ submit ค้นหาลูกค้า

  • เปลี่ยนฟอร์มเพิ่มที่อยู่ใน CustomerDetail จาก nested modal เป็น full-screen address form view ใน screen เดิม
  • เปลี่ยนฟอร์มเพิ่ม/แก้ไขที่อยู่ใน CustomerManagementEdit จาก modal-style overlay เป็น full-screen address editor view ใน screen เดิม
  • guard visibility ของ address search, map picker, และ route picker ให้เปิดได้เฉพาะตอน address form/editor view ทำงาน
  • guard selector ของฟอร์มหลักใน customer-management เพื่อไม่ให้ค้างหรือเปิดอยู่ระหว่าง address editor ทำงาน
  • แก้การ submit search ของ CustomerList ให้ CustomerManagementListHeader ส่งข้อความจาก TextInput submit event เข้า screen และให้ CustomerList ส่งค่านั้นเข้า getCustomerSapList โดยตรง
  • การแก้นี้ป้องกันปัญหา Thai IME timing ที่ค้นหา ขาย แล้ว customer API ได้ค่าเพียง
  • Verified with yarn workspace @bsr/mobile tsc --noEmit.
  • Docs updated:
    • workflows/mobile-borrow-and-customer-management
    • governance/change-log

ค่าขนส่งและระยะทาง Google Route ใน Mobile Order

  • เพิ่มข้อมูลพิกัดสาขาและ lookup helper กลางใน @bsr/utils เพื่อให้ Mobile และ POS Terminal ใช้ร่วมกันได้ในอนาคต
  • เพิ่มการคำนวณระยะทางตามถนนจริงใน Mobile order จากสาขาที่ user login เลือก ไปยังพิกัดลูกค้า/ใบสั่งขาย ด้วย Google Routes API และ GOOGLE_ROUTE_API_KEY
  • ใบสั่งขายสายส่งแสดง row ระยะทาง, ค่าขนส่งที่แก้ไขได้, และยอดที่ต้องชำระใน summary ของ order detail
  • ปรับ default shippingFee ของ order ใหม่เป็น 0; และเมื่อยืนยันเปลี่ยนประเภทการขายยัง reset shippingFee เป็น 0
  • ปรับ confirmation ของการเปลี่ยนประเภทการขายให้ cancel และ dismiss คงประเภทการขายเดิมและค่าขนส่งเดิม
  • เพิ่ม guard ให้ไม่เรียก Google Routes เมื่อพิกัดลูกค้าขาดค่า, ค่าไม่ใช่ตัวเลข, หรือ latitude/longitude เป็น 0
  • เพิ่มการคำนวณค่าขนส่งอัตโนมัติเมื่อระยะทางเกิน 150 กม. โดยคิด 15 บาทต่อกิโลเมตรที่เกิน
  • เพิ่มการบันทึกค่าขนส่งทันทีเมื่อ user แก้ค่าขนส่งของ order ที่มีอยู่ หรือเมื่อระบบคำนวณระยะทางแล้วทำให้ค่าขนส่งเปลี่ยน
  • invalidate request คำนวณระยะทางและบันทึกค่าขนส่งที่ค้างอยู่เมื่อเปลี่ยนประเภทการขาย เพื่อป้องกัน stale save ซ้อนกับ flow update ประเภทการขาย
  • ปรับ OrderListCard และ flow ชำระเงินหลายรายการใน order list ให้ใช้ยอด invoiceAmount + shippingFee และ fallback เป็น amount + shippingFee เมื่อไม่มี invoiceAmount
  • ใบสั่งขายที่มาจาก booking price จะเติม shipping address, route, และพิกัดจากที่อยู่ ShipTo default ของ SAP customer ก่อนคำนวณระยะทางสำหรับสายส่ง
  • Docs updated:
    • workflows/sales-flow
    • governance/change-log

2026-05-08

Core

ขนส่ง delivery finalize parity

  • ปรับ Mobile และ POS Terminal ให้ถือว่าใบจัดใน transport ยัง pending เมื่อ deliveryStatus เป็น null, undefined, ค่าว่าง, whitespace, หรือ string null
  • ปรับปุ่มอนุมัติใบจัดรายใบ, ปุ่ม อนุมัติใบจัดทั้งหมด, label กำลังเตรียมใบจัด, และ guard ก่อนเริ่มขนส่งให้ใช้ pending-status rule เดียวกัน
  • เพิ่ม deptCode 30 เข้า permission canFinalizeShippingSheet(user) เพื่อให้ user เจ้าของ transport ที่อยู่แผนก TS อนุมัติใบจัดได้
  • Verified with yarn workspace @bsr/mobile tsc --noEmit and yarn workspace @bsr/pos-terminal typecheck.

Mobile

Login, order payment, and storefront detail

  • คืน flow login ให้ตรวจแอลกอฮอล์ตามปกติหลังจากถอด temporary bypass สำหรับทดสอบ user
  • ปรับ orderPaymentScreen ให้ช่องทาง โอน ไม่บังคับแนบสลิปก่อนยืนยันการชำระ
  • orderPaymentScreen ยังคง log pay-order URL/payload ก่อนยิง API; เมื่อ API สำเร็จและไม่มี slipPath จะแสดง Sweet Alert success ว่า ชำระเงินสำเร็จ กรุณาส่ง Incoming ที่หน้าใบแจ้งหนี้; ถ้ามี slipPath จะไม่แสดง success alert
  • ปรับ storefrontDetailScreen ให้ประเมิน popup รับงานหลังโหลด detail สำเร็จแล้วเท่านั้น เพื่อไม่ให้ popup แสดงชั่วคราวจาก empty detail
  • ถอด temporary userCode 999997 storefront action override ออกแล้ว กลับไปใช้กฎ accepted user / department ตามปกติ
  • Docs updated:
    • workflows/mobile-transport-and-vehicles
    • workflows/sales-flow
    • governance/change-log

2026-05-07

Core

Borrow item payload parity

  • ปรับ create/update item payload ของใบเบิกดูปลาทั้ง Mobile และ POS Terminal ให้ใช้ field shape เดียวกัน: productCode, productName, qty, price, amount, weight, limitWeight, UOMCode, UOMName, UOMEntry, whGrpCode, whGrpName, whsCode, weightBaseFlag, companyCode, companyName, taxNo, vatGroup, stepPriceFlag, และ editPriceBy
  • editPriceBy ของใบเบิกดูปลาส่งเป็น null เสมอ เพราะ flow นี้ไม่มีการแก้ไขราคา
  • ตัด field เสริม onHand, bookingQty, uomCode, และ uomName ออกจาก payload ที่ยิง create/update borrow item API
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • workflows/mobile-borrow-and-customer-management
    • governance/change-log

2026-05-05

POS Terminal

POS Terminal Home layout และ panel action refinements

  • ย้ายปุ่มตั้งค่าของหน้า Home มาเป็นปุ่มแรกใน panel 1 และลบ title เมนู / top settings bar เดิมออก เพื่อคืนพื้นที่แนวตั้งให้ workspace
  • คง behavior dropdown เดิมสำหรับเปลี่ยนธีมและออกจากระบบ แต่ render ปุ่มตั้งค่านอก ScrollView ของเมนู เพื่อไม่ให้ dropdown ถูกตัดด้วยขอบ menu pane
  • เปลี่ยน action ของ panel 3 ใบจัดสินค้าสายส่ง (รับงาน, จัดสินค้าที่ลาน, ขึ้นรถแล้ว, ร่วมจัด) จากปุ่ม inline มาอยู่ใน dropdown ปุ่มสามจุดที่ header ข้างปุ่มปิด
  • เพิ่ม Sweet Alert รับงานอัตโนมัติใน detail ใบจัดสินค้าสายส่งของ POS Terminal เมื่อเข้าเงื่อนไขเดียวกับ Mobile: ใบจัด finished, ถูกจัดขึ้นขนส่งแล้ว, ยังไม่มี acceptedBy, และ user มีสิทธิรับงาน
  • ย้ายปุ่ม บันทึกตำแหน่ง ใน product tab ของใบจัดสินค้าสายส่งเข้าไปเป็น FlashList footer เพื่อให้ scroll ไปกับรายการสินค้า ไม่ตรึงอยู่ด้านล่าง panel 3
  • ปรับ action ของ panel 3 ขนส่งให้ปุ่ม save/start/finish/finalize-all อยู่เป็น footer ของ FlashList แทน absolute bottom bar และปรับสี dark/light mode ของ card, modal, input, และ action tile ใน transport detail
  • ปรับการ์ดเลือกทะเบียนรถใน POS Terminal ให้ตรง Mobile transport detail: แสดงทะเบียนพร้อมสถานะ, ประเภทรถ, น้ำหนักบรรทุกสูงสุด, สีตามสถานะ, guard ให้เลือกได้เฉพาะรถ READY, remote submit search, และ clear-search reload โดยยังไม่ทำ pagination เหมือน Mobile
  • ปรับ panel 2 ListPane ให้ reset ตำแหน่ง scroll ไปบนสุดเมื่อโหลดข้อมูลชุดใหม่ เช่น เปลี่ยนเมนู, invoice tab/filter, หรือ item แรกเปลี่ยน โดยยังไม่ reset ตอน load-more pagination
  • เพิ่มกลไก patch item ใน panel 2 จาก detail ล่าสุดของ panel 3 สำหรับเมนู ขนส่ง และ ใบจัดสินค้าสายส่ง เพื่อลดการ reload list ทั้งชุดหลัง update สถานะ/ข้อมูล โดยกรณี create เอกสารใหม่ยัง refresh list ใหม่เพื่อให้ item ใหม่เข้ารายการถูกต้อง
  • Verified with yarn workspace @bsr/pos-terminal typecheck.

POS Terminal deposit list/detail parity

  • เพิ่ม panel 3 DepositDetailForm.tsx สำหรับเมนู ฝากเงิน โดยอิง Mobile depositDetailScreen
  • detail form ของฝากเงินตั้งใจทำเป็น reusable component:
    • เมนูฝากเงินปกติ render ใน panel 3 โดยตรง
    • flow จากขนส่งส่ง DepositTransportContext และ render เป็น state ย่อยในขนส่ง ไม่ใช่ nested modal บน iPad/iOS
  • เพิ่ม deposit create/detail behavior:
    • โหลด deposit detail ที่บันทึกแล้วแบบ read-only
    • create mode ตั้งค่าเริ่มต้นจาก branch/user
    • โหลด companies, cash accounts, และ bank accounts
    • เปลี่ยนบริษัทแล้ว reload cash/bank accounts
    • เลือก invoice ได้เมื่อไม่ใช่ transport และไม่ใช่ deptCode 14/30
    • modal เลือก invoice ใช้ FlashList พร้อม search และ load-more pagination โดยเพิ่ม behavior เดียวกันให้ Mobile depositDetailScreen
    • ถ้าเลือก invoice แล้ว amount/notes จะถูกคำนวณจาก invoice และ lock การแก้ไขเอง
    • รองรับส่งสลิปย้อนหลังเมื่อไม่ใช่ transport
    • validate required fields และ confirm ก่อน createDeposit
    • ถ้ามี transport context จะ update transport หลัง create deposit สำเร็จ
    • หลังสร้าง deposit จากเมนูฝากเงินปกติ จะ refresh list และปิด panel 3 แทนการเลือก deposit ที่เพิ่งสร้าง เพื่อไม่ให้ยิง GET /deposits/:id โดยไม่จำเป็น
  • ปรับ flow ฝากเงินจากขนส่งทั้ง POS Terminal และ Mobile ให้ default company เป็น BFPDB; ฝั่ง POS Terminal ส่งยอดฝากจาก customerTotals.amountCash เข้า embedded deposit form และ lock ช่องจำนวนเงินเหมือน Mobile
  • ปรับ filter ใน panel 2 ของฝากเงินให้ซ่อน generic status filter และเหลือเฉพาะ filter ทั้งหมด / รอส่งใหม่ แบบ Mobile
  • Dedupe cash-account options ด้วย acctCode ทั้ง Mobile และ POS Terminal เพื่อรวมรายการบัญชีซ้ำข้าม company ให้เหลือรายการแรก
  • Refactor UI เฉพาะฝากเงินออกจาก Home files ก้อนใหญ่:
    • DepositPanels.tsx ดูแล retry filter, card body, และ swipe actions ของฝากเงิน
    • depositStyles.ts ดูแล styles ของ deposit list/detail/modal และถูก merge กลับผ่าน aggregate Home styles.ts
  • เพิ่ม service coverage ฝั่ง POS Terminal สำหรับ deposit create/detail:
    • apps/pos-terminal/src/services/deposit.ts
    • company/cash/bank account helpers ใน apps/pos-terminal/src/services/common.ts
  • งานที่ต้องตามต่อ:
    • ทดสอบ account selection, invoice selection, date picker, keyboard behavior, create/detail, retry/delete, และ transport handoff บน tablet จริงกับ API จริง

POS Terminal expense-bill list/detail parity

  • เพิ่ม panel 2 ของ POS Terminal สำหรับเมนู บิลน้ำมัน โดยอิง Mobile expenseBillListScreen:
    • สีการ์ดตาม Mobile สำหรับ draft branch row, retry/error row, และ confirmed row
    • ข้อมูลการ์ด: เลขที่บิล, วันที่บิล, ผู้รับผิดชอบ, ทะเบียนรถ, และจำนวนเงิน
    • search เลขที่บิล, ทะเบียนรถ, และผู้รับผิดชอบ
    • FlashList pagination และ refresh behavior
    • ปุ่มสร้างตาม menu permission
    • swipe ส่งอีกครั้งสำหรับ row ที่ RefKey ว่าง และ swipe delete ผ่าน /bills/:billId
  • เพิ่ม ExpenseBillDetailForm.tsx เป็น reusable form ของบิลน้ำมันฝั่ง POS Terminal:
    • เมนูบิลน้ำมันปกติ render ใน panel 3 โดยตรง
    • flow จากขนส่งส่ง ExpenseBillTransportContext และ render เป็น state ย่อยในขนส่ง ไม่ใช่ nested modal บน iPad/iOS
  • เพิ่ม expense-bill create/detail behavior:
    • โหลด bill detail ที่บันทึกแล้วใน read-only/update mode
    • create mode ตั้งค่าเริ่มต้นจาก branch/user/transport defaults
    • โหลด companies, gas partners, vehicles, old mileage, และ vehicle balance
    • รองรับเลือกบริษัท, ผู้จำหน่าย, รถ, วันที่บิล, จำนวนเงิน, เลขไมล์, ส่งสลิปย้อนหลัง, และหมายเหตุ
    • create ผ่าน POST /bills
    • update draft branch row ผ่าน PATCH /bills/:billId สำหรับ user บัญชี
    • ถ้ามี transport context จะ update transport หลัง create สำเร็จเพื่อ set flagGas
  • ปรับ flow บิลน้ำมันจากขนส่งทั้ง POS Terminal และ Mobile ให้ default company เป็น BFPDB
  • แก้ payload บิลน้ำมันทั้ง Mobile และ POS Terminal ให้ส่ง transportId เป็น number/null ไม่ใช่ string เพื่อให้ตรง validation ของ API
  • ปรับ header ของ embedded ฝากเงิน และ บิลน้ำมัน ใน panel 3 ขนส่งให้ใช้ปุ่ม icon arrow-left หน้าชื่อฟอร์มแทนข้อความ กลับ
  • เพิ่ม service coverage ฝั่ง POS Terminal สำหรับ expense bills:
    • apps/pos-terminal/src/services/expenseBill.ts
    • bill list/delete/retry helpers ใน apps/pos-terminal/src/services/splitMenuData.ts
    • gas partner helper ใน apps/pos-terminal/src/services/common.ts
  • งานที่ต้องตามต่อ:
    • ทดสอบ expense-bill list/detail, mileage loading, selection modals, retry/delete, และ transport handoff บน tablet จริงกับ API จริง

POS Terminal transport list and detail parity

  • เพิ่ม panel 2 ของ POS Terminal สำหรับเมนู ขนส่ง โดยอิง Mobile transportListScreen:
    • สีการ์ดตามสถานะ draft/started/finished
    • ข้อมูลการ์ด: เลขขนส่ง, วันที่สร้าง, ทะเบียนรถ, คนขับ, พนักงานขาย, เส้นทาง, เวลาเริ่ม/จบ, และจำนวนส่งแล้ว/ทั้งหมด
    • search เลขที่ขนส่ง
    • FlashList pagination และ refresh behavior
    • ปุ่มสร้างตาม department code เดียวกับ Mobile
    • swipe delete เฉพาะ transport ที่ยังไม่ started และเป็นของ user ปัจจุบัน
  • เพิ่ม TransportDetailForm.tsx และ TransportDetailHelpers.ts สำหรับ panel 3 create/detail ของขนส่ง โดยอิง Mobile transportDetailScreen
  • ปรับ layout panel 3 ของขนส่งเป็น FlashList-backed 2 step และเอา meta เข้า ListHeaderComponent เพื่อหลีกเลี่ยง outer nested scroll:
    • step 1: transport meta และรายการใบจัดที่อยู่ใน transport
    • step 2: customer delivery/payment list และ collection summary meta
  • เพิ่ม transport create/detail behavior:
    • create/update transport header
    • เลือกทะเบียนรถ
    • เพิ่มใบจัดเข้า transport
    • ถ้ายังไม่มี transportId จะสร้าง transport header ก่อนแล้วค่อยเพิ่มใบจัด
    • modal เพิ่มใบจัดไม่ปิดหลัง add สำเร็จ, แสดง row-level loading, กันกดซ้ำ row เดิม, และลบ row ที่ add สำเร็จออกจาก modal list
    • ลบใบจัดก่อนเริ่ม transport
    • อนุมัติใบจัดทีละใบและอนุมัติใบจัดทั้งหมด
    • โหลด customer groups
    • จัดเรียงลำดับลูกค้าใน step 2 แบบ manual ผ่าน sort planner
    • จัดเรียงลำดับลูกค้าด้วย Google Routes API โดยใช้ GPS ปัจจุบันและพิกัดลูกค้า แล้วบันทึกด้วย sortTransportCustomers
    • เริ่ม/จบ transport พร้อม mileage validation
    • customer action modal สำหรับโทร, นำทาง, บันทึก GPS, เลือกประเภทรับชำระ, payment entry, photo/slip upload, signature capture, QR generation, และ payment submit
    • skip เติมน้ำมัน/ฝากเงิน โดยอัปเดต flagGas และ flagBank
    • print ใบแจ้งหนี้ทั้งหมดและ print product summary หลังใบจัดทุกใบถูกอนุมัติแล้ว
  • ปรับ summary meta ใน step 2 ขนส่งทั้ง Mobile และ POS Terminal:
    • ยอดรวม = เงินสด + โอน/QR ที่เก็บเงินจริง
    • จำนวน เงินสด / โอน/QR นับเฉพาะลูกค้าที่เลือกประเภทนั้น แต่ยอดเงินสด/โอนรวม cash/transfer จากลูกค้า OTHER ด้วย
    • อื่นๆ แสดงจำนวนลูกค้า OTHER และยอด cash + transfer ของลูกค้า OTHER
    • ลูกค้า OTHER ที่ system note หลัง // system : มี ไม่รับสินค้า จะยังนับจำนวนใน อื่นๆ แต่ยอดเงินไม่ถูกนำไปรวม
    • ลบ meta จำนวน ใน step 2 แล้วแสดง น้ำหนัก แทน พร้อมเพิ่ม meta ไม่จ่าย จาก grandAmount - (cash + transfer) ของลูกค้า OTHER
  • ปรับ QR/payment card ใน customer action ให้แสดง QR ไม่ถูกตัดมุม, เพิ่ม step แชร์ QR Code ใน modal เดียว, แก้ back จาก share step ให้กลับ step ชำระเงินเดิม, และปรับปุ่ม รับสินค้าบางรายการ / ไม่รับสินค้า / แบ่งชำระ เป็น radio-style option
  • เพิ่ม service coverage ฝั่ง POS Terminal สำหรับ transport flow:
    • apps/pos-terminal/src/services/transport.ts
    • vehicle และ mileage helpers ใน apps/pos-terminal/src/services/common.ts
    • customer call/profile/GPS helpers ใน apps/pos-terminal/src/services/customers.ts
    • Google route optimization helper ใน apps/pos-terminal/src/services/googleRoutes.ts
    • generateTransportPaymentQrCode ใน apps/pos-terminal/src/services/qr.ts
  • งานที่ต้องตามต่อ:
    • ทดสอบ transport บน iPad/tablet จริง รวมถึง FlashList headers, modal overlays, camera/signature, GPS permission, manual/Google route sorting, swipe actions, dark mode, API calls, และ printer output
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • architecture/mobile-terminal
    • governance/change-log

2026-05-04

Core

Shared print template boundary

  • Added workspace package @bsr/printing as the shared HTML print-template boundary for Mobile and POS Terminal.
  • Moved order, borrow, invoice pack/storage, and full invoice receipt templates into packages/printing.
  • Moved LOGO_STICKER_DATA_URI into @bsr/printing so receipt templates in Mobile and POS Terminal use the same print logo asset.
  • Kept mobile print-template files as compatibility wrappers or re-exports where needed.
  • Added POS Terminal full invoice receipt printing through the shared buildInvoiceTemplate, including tax data, branch context, print count, claim QR, and QR payment generation aligned with Mobile.
  • Added Metro aliases in Mobile and POS Terminal so @bsr/printing resolves directly to packages/printing/src even before the workspace symlink exists in node_modules.
  • Verified with yarn workspace @bsr/mobile tsc --noEmit and yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • architecture/mobile-terminal
    • governance/change-log

POS Terminal

POS Terminal Home refactor

  • Started splitting the large POS terminal HomeScreen implementation into smaller files before adding more menu flows.
  • Moved pure Home helpers into apps/pos-terminal/src/screens/HomeScreen/helpers.ts, including:
    • booking/customer draft builders
    • booking-price payload builders
    • booking-price item payload builders
    • booking-price recalculation helpers
    • created-id resolvers
    • list search predicate
    • swipe/detail action definitions
  • Moved panel 3 rendering into apps/pos-terminal/src/screens/HomeScreen/DetailPane.tsx.
  • Moved panel 2 list rendering into apps/pos-terminal/src/screens/HomeScreen/ListPane.tsx, including the FlashList, search/filter controls, invoice tabs, invoice B1 swipe actions, booking-price list cards, and create-document button.
  • HomeScreen/index.tsx now keeps more of the state, effect, handler, and top-level layout responsibility instead of also owning all helper and detail-pane rendering code.
  • HomeScreen/index.tsx was reduced from roughly 3,300 lines to roughly 1,900 lines after extracting helpers, panel 2, and panel 3.
  • The next extraction target is the remaining invoice/booking handler orchestration inside HomeScreen/index.tsx, but it should wait until each menu flow has a stable service boundary.
  • Verified with yarn workspace @bsr/mobile tsc --noEmit and yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • architecture/mobile-terminal
    • governance/change-log

POS Terminal split-pane booking price parity

  • Expanded POS terminal Home into a responsive split-pane workspace:
    • panel 1: permission-gated menu
    • panel 2: selected menu list with search, filters, swipe actions, and shared loading overlay
    • panel 3: selected detail or draft document form
  • Added the terminal menu set requested for the large-screen Home surface, including booking price, invoice, shipping, stock-transfer, product, customer, transport, employee, vehicle, deposit, and expense-bill entries.
  • Applied the same broad permission gates as mobile for menu access, booking-price creation, and booking-price deletion.
  • Added unsaved-change protection for panel navigation. The shared alert now supports three actions: cancel, discard, and save-and-exit.
  • Save-and-exit for booking price now persists changes before leaving panel 3:
    • creates a booking price when no booking id exists
    • updates an existing booking price when an id exists
    • creates new item rows and updates existing item rows
  • Normalized booking-price payloads so branchId is sent as a number for POST /api/booking-price, matching the API DTO expectation.
  • Refreshes panel 2 after creating or deleting a booking price so the list reflects the latest server state.
  • Added booking-price delete support in POS terminal through DELETE /api/booking-price/{bookingPriceId} and refreshed the list after success.
  • Added booking-price item delete support through DELETE /api/booking-price/{bookingPriceId}/items/{itemId}.
  • Reworked the booking-price list card in panel 2 to match the mobile booking-price card more closely:
    • status is represented by card background color instead of a visible status chip
    • card content shows booking number, customer name, creator, and amount
    • spacing and typography were reduced for denser terminal lists
  • Preserved the new panel-2 header pattern as the shared header direction for future menu pages; the listHeaderRow spacing, including the manually added marginBottom, should not be removed when extending other lists.
  • Reworked booking-price detail in panel 3 toward mobile parity:
    • header text is รายละเอียดใบจองราคา with no space between the words
    • booking detail title uses the medium font family
    • panel 3 supports better nested scrolling and keyboard interaction
    • panel 3 no longer wraps booking-price detail in a generic outer ScrollView; booking metadata, remark, and product-list title are now the FlashList header for the product list
    • existing booking prices are editable only on the document created day, using server date from GET /api/healthz when available, matching mobile same-day edit rules
    • product rows can be edited by pressing the row and deleted by swipe action
    • product rows show mobile-style amount, quantity, weight/step-price icons, and formula text for weight-based items
  • Added a customer picker modal for booking price and borrow-fish creation that follows the mobile customer list/detail flow inside a modal:
    • searchable customer list
    • route/filter controls
    • customer detail view
    • swipe-compatible rows and pagination-oriented loading behavior
  • Reworked the booking product picker into a full-screen modal host for POS terminal:
    • product list lives in the left panel inside the modal
    • add/edit item form is rendered as an overlay inside the same modal instead of opening a nested modal, which is important for iOS compatibility
    • selecting a product that is not already in the booking/borrow document adds a new item
    • selecting a product that already exists opens the edit flow for the existing item
    • quick quantity options match mobile: 1, 5, 10, 50, 100
    • step-price loading calls the real API path through the terminal MST client
    • product list cards use product color, old price, available stock, search highlighting, and MaterialCommunityIcons for weight and step-price indicators
  • Tightened POS terminal booking-price product picker parity with mobile:
    • the add-item overlay title is the product name and does not show a price field
    • the edit-item overlay keeps the mobile-style แก้ไขรายการสินค้า header and price field
    • step-price rows use mobile labels such as ไม่เกิน X {UOM} and เกิน X ไม่เกิน Y {UOM}
    • active step-price rows use accent border and translucent accent background instead of a solid primary row
    • quick quantity changes load step price when the selected quantity requires it
  • Changed POS terminal booking-price add-item persistence to match mobile:
    • creates the booking-price header first when no bookingPriceId exists
    • posts the new item to POST /api/booking-price/{bookingPriceId}/items
    • updates booking-price totals through the booking-price update API
    • reloads detail from the API after create and refreshes panel 2 for newly created bookings
  • Changed POS terminal booking-price edit-item persistence to match mobile:
    • refreshes product inventory by productCode from Firestore before editing so available stock, booking quantity, flags, and limit weight are current
    • loads step price from the MST step-price API when editing a step-price item; currentStepPrice is used as the saved JSON payload fallback, not as the primary price source
    • patches existing booking-price items immediately through PATCH /api/booking-price/{bookingPriceId}/items/{itemId}
    • updates booking-price totals and reloads detail after item edits
  • Normalized POS terminal booking-price item payloads to match mobile:
    • weightBaseFlag and stepPriceFlag are sent as booleans
    • companyCode falls back to the product company field
    • companyName falls back through companyName, ComName, company, and comName
  • Added POS terminal type declarations for react-native-vector-icons/MaterialCommunityIcons.
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • architecture/mobile-terminal
    • workflows/sales-flow
    • governance/change-log

POS Terminal shipping-route list and detail parity

  • Added POS terminal panel-2 support for ใบจัดสินค้าสายส่ง, aligned with Mobile shippingListScreen:
    • mobile-style card colors and displayed data
    • search
    • status filter as a selection control
    • FlashList-backed list behavior and pagination
    • swipe delete
    • permission-gated create and delete actions
  • Added ShippingRouteDetailForm.tsx for panel 3 shipping-route create/detail behavior, aligned with Mobile shippingDetailScreen.
  • Matched the Mobile create flow:
    • route selection preloads available invoices into local state
    • create mode stores selected invoices locally until the delivery header exists
    • POST /api/deliveries/no creates the header and returns deliveryId
    • POST /api/deliveries/{deliveryId}/invoices attaches invoices after deliveryId exists
    • panel 2 is refreshed and panel 3 reloads the created detail
  • Reworked shipping detail layout so the route/meta block and section header are ListHeaderComponent content inside the invoice/product FlashLists, avoiding nested outer scroll views.
  • Added shipping detail actions and permission rules for:
    • accept job
    • confirm loading dock
    • confirm loaded
    • assign co-worker
    • add invoice
    • delete invoice
    • request invoice cancel
    • sort customer order
    • send B1
    • save product Lot/Batch location data
  • Added product-summary behavior:
    • group products from invoices
    • select Lot/Batch
    • auto-select the only sufficient Lot/Batch when possible
    • validate duplicate lots, available quantity, and pending quantity
    • post delivery lots and update delivery status after location save
  • Added POS terminal shipping print support:
    • visible UI matches current Mobile: print a single invoice from a shipping invoice row
    • invoice-batch and product-summary print helpers remain available but their UI entry points are hidden, matching Mobile's temporarily hidden print-all and delivery-print buttons
    • record shipping print counts in Firestore print logs
  • Adjusted shipping detail dark-mode readability by using terminal theme colors for text, cards, modals, batch editor, and sort planner content.
  • Remaining follow-up work:
    • test on real iPad/tablet hardware for swipe, modal, FlashList header, keyboard, scroll, and dark mode behavior
    • test create/add/delete/cancel/accept/dock/loaded/assign/sort/send-B1/Lot-save against real API data
    • test physical printer output for the visible shipping invoice row print action
    • refactor ShippingRouteDetailForm.tsx into smaller components after behavior is accepted
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • architecture/mobile-terminal
    • governance/change-log

2026-05-03

Core

Shared i18n and app-version boundaries

  • Added workspace package @bsr/i18n as the shared translation resource boundary for apps/mobile and apps/pos-terminal.
  • Moved the current English and Thai translation resources into packages/i18n; mobile now initializes i18n from @bsr/i18n, while its old src/locales/* files remain as compatibility re-exports.
  • Added POS terminal i18n initialization and wrapped the terminal app with I18nextProvider so the terminal app can adopt translations without changing app bootstrap later.
  • Normalized native app-version access in both apps under src/native/appVersion.ts; old src/constants/appVersion.ts files now re-export from the native boundary.
  • Split mobile required-update logic into apps/mobile/src/services/appUpdate.ts; apps/mobile/src/services/appVersion.ts remains a compatibility re-export.
  • Added apps/pos-terminal/src/services/appUpdate.ts with the same required-update contract, currently returning required: false until terminal remote-update rules are connected.
  • Verified with yarn workspace @bsr/mobile tsc --noEmit and yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • architecture/mobile-terminal
    • workflows/login-branch-home
    • governance/change-log

Shared image assets package

  • Added workspace package @bsr/assets as the shared image asset boundary for apps/mobile and apps/pos-terminal.
  • Moved mobile image assets from apps/mobile/assets/images into packages/assets/images.
  • Added grouped exports for @bsr/assets/logos, @bsr/assets/icons, @bsr/assets/menus, and @bsr/assets/utils so app code can import only the asset group it uses.
  • Kept apps/mobile/src/constants/images.ts as a compatibility re-export, while updated active mobile imports to use @bsr/assets/* directly.
  • Added @bsr/assets dependencies and TypeScript path mappings to both mobile and POS terminal workspaces.
  • Verified with yarn workspace @bsr/mobile tsc --noEmit and yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • architecture/mobile-terminal
    • governance/change-log

React Native screens version check

  • Checked react-native-screens against npm registry and GitHub releases.
  • Current workspace version is 4.24.0, which npm marks as the latest stable release as of 2026-05-03.
  • 4.25.0-beta.1 is available under the next dist-tag, with nightlies also available, but no newer stable release exists yet.
  • Recommendation: keep 4.24.0 for now; do not patch node_modules for Kotlin dependency warnings, and revisit when 4.25.x stable is released or a runtime navigation issue appears.
  • Docs updated:
    • architecture/mobile-terminal
    • governance/change-log

Mobile

Mobile shared logo usage

  • Updated mobile logo imports to use shared @bsr/assets/logos.
  • Added dark-mode logo switching on mobile login and branch screens: logos.logoBSRWhiteText in dark mode and logos.logoBSR in light mode.
  • Kept mobile QR share capture on logos.logoBSR intentionally so generated QR share images stay stable and are not theme-dependent.
  • Verified with yarn workspace @bsr/mobile tsc --noEmit.
  • Docs updated:
    • architecture/mobile-terminal
    • governance/change-log

POS Terminal

POS Terminal login session and Home navigation foundation

  • Replaced POS terminal mock password login with the POS /login API for both login entry points: selected user card login and employee-code modal login.
  • POS terminal login now stores auth_token, serialized user, and login_date in DD-MM-YYYY, matching the mobile session-date convention.
  • POS terminal startup now checks login session first: a valid token, user, and same-day login_date opens Home; stale login session data is cleared without clearing stored branch, warehouse, or tax setup data.
  • Added POS terminal HomeScreen as a blank first Home surface with left settings gear, dark/light theme choices, and logout.
  • Added apps/pos-terminal/src/navigation/RootNavigator.tsx and moved the terminal Home route under React Navigation so HomeScreen can use useFocusEffect.
  • POS terminal Home checks login_date every time it receives focus and logs out if the saved date no longer matches the current day.
  • Fixed POS terminal login modals so keyboard avoidance works on Android by using a scrollable modal body.
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • architecture/mobile-terminal
    • governance/change-log

POS Terminal brand logo and user fallback styling

  • Updated UserSelectionScreen brand block to use the shared BOONSIRI logo images from @bsr/assets/logos instead of the previous inline SVG/WebView plus text composition.
  • Added theme-aware POS terminal logo switching: normal logo in light mode and white-text logo in dark mode.
  • Tuned the POS terminal user-selection logo dimensions after visual review.
  • Updated fallback user-card typography for users without images: the card name is white, medium-weight, and smaller than the earlier bold fallback treatment, while the user code remains at its standard card size.
  • Updated the no-image login modal fallback text so the name is white and the fallback text scale is smaller.
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • architecture/mobile-terminal
    • governance/change-log

2026-05-02

Core

Shared React Native UI foundation

  • Added workspace package @bsr/rn-ui for React Native UI infrastructure shared by apps/mobile and apps/pos-terminal.
  • Moved only the durable shared boundary into the package: ThemeProvider, useTheme, useThemeMode, AlertProvider, useAlert, LoadingProvider, useLoading, shared theme types, and the font contract.
  • Kept the existing mobile src/contexts/* import paths as wrappers that re-export from @bsr/rn-ui to reduce churn in existing screens.
  • Wired POS terminal directly to the shared providers and added AsyncStorage-backed theme storage so dark/light mode can be persisted in the terminal app.
  • Boundary constraint: screen-specific layout and styling remain inside each app so mobile and POS terminal do not become tightly coupled through shared screen code.
  • Impact: behavior changes in @bsr/rn-ui loading, alert, or theme providers affect both mobile and POS terminal, so both workspaces should be checked before merging.
  • Verified with yarn workspace @bsr/mobile tsc --noEmit and yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • architecture/mobile-terminal
    • governance/change-log

Core Firebase environment files

  • Added/organized Firebase config files for the prd and uat environments across Android google-services.json and iOS GoogleService-Info*.plist.
  • Updated the mobile Firebase config files from the latest environment set so mobile and POS terminal use the shared config source.
  • Docs updated:
    • governance/change-log

POS Terminal

POS Terminal branch setup and sale-person user loading

  • Added POS terminal startup gating around local branch and tax storage: missing either value opens required BranchScreen; having both values opens UserSelectionScreen.
  • Required BranchScreen setup hides the close action and shows a settings gear for dark/light mode switching; branch setup opened from user settings still shows the close action.
  • Added terminal branch setup flow using MST APIs: GET {MST_HOST}/api/branches, GET {MST_HOST}/api/warehouses?pageLimit=40&page=1, and GET {MST_HOST}/api/warehouses/{branchCode}/sub.
  • Normalized branch payloads that use whGrpCode / whGrpName as well as the older whsGrpCode / whsGrpName names.
  • Changed branch completion so tax is fetched before setup is considered complete; branch and tax are both saved before returning to user selection.
  • Added POS terminal local storage helpers for branch, tax, and user.
  • Moved shared API config constants into @bsr/api; mobile now re-exports config from the shared package.
  • POS terminal MST requests use X_API_KEY_TERMINAL; the POS sale-person request uses X_API_KEY_TERMINAL_MAIN.
  • Updated UserSelectionScreen to load users from GET {POS_HOST}/api/users/sale-persons?whsGrpCode={storedBranch.whsGrpCode}, support pull-to-refresh, surface API response error messages in alerts, and center the horizontal user list when only a few users are returned.
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • architecture/mobile-terminal
    • governance/change-log

การเลือกผู้ใช้บน POS Terminal and mock login UI

  • Added the new UserSelectionScreen at apps/pos-terminal/src/screens/UserSelectionScreen/index.tsx and moved it from the former flat screen file path to support the /screens/UserSelectionScreen/index.tsx structure.
  • Built the user-selection screen from the reference UI: gradient background, BOONSIRI logo, horizontal FlashList at about 80% viewport width, and expanded mock user data for horizontal-scroll testing.
  • Added avatar behavior that shows the full image URL when present and falls back to firstname plus userCode when image is null or empty.
  • Added a mock login modal shown after selecting a user, including image/fallback, full name, userCode, password input, loading state, and shared alert success/error feedback without calling the API yet.
  • Added notch/status safe-area handling with SafeAreaProvider, SafeAreaView, and useSafeAreaInsets.
  • Added the app version label at the top-left and the settings button at the top-right.
  • The settings dropdown exposes Light mode and Dark mode; if the stored value is still system, the active option follows the resolved system mode, while user selection persists light or dark.
  • Added a placeholder Branch settings menu action that shows an alert until the real branch-settings flow is connected.
  • Impact: this screen still uses mock users and mock password 1234; the API integration pass must replace the data source, authentication action, and failure handling while keeping UI state/loading/alert on the shared context.
  • Verified with yarn workspace @bsr/pos-terminal typecheck.
  • Docs updated:
    • architecture/mobile-terminal
    • governance/change-log

POS Terminal app version native module and iOS build fix

  • Added a POS terminal native AppVersionModule for Android and iOS so getAppVersionLabel() reads the real native app version/build like mobile instead of relying only on fallback values.
  • Registered the Android native package through AppVersionPackage in MainApplication.
  • Added the iOS Swift/Objective-C bridge and updated the Xcode project to include the new module.
  • Updated the POS terminal iOS Podfile to apply the same style of pod fixes used by mobile for gRPC/new-architecture build issues.
  • Re-applied the existing react-native-view-shot postinstall patch to fix the iOS compile error use of undeclared identifier 'RCTScrollView'; this error was not caused by AppVersionModule.
  • Impact: POS terminal now has an additional native module, iOS setup should run pod install, and apps/pos-terminal/ios/Podfile.lock should be kept as the terminal pod source of truth.
  • Verified with the relevant Android compile, pod install, and POS terminal iOS xcodebuild.
  • Docs updated:
    • architecture/mobile-terminal
    • governance/change-log

POS Terminal Android release build setup

  • Added the main runtime and dev dependencies for @bsr/pos-terminal so the POS terminal app can start on the React Native 0.85.2 stack with navigation, Firebase, AsyncStorage, FlashList, Reanimated, Worklets, printer/share/signature/webview, and utility packages.
  • Added POS terminal build and install scripts: terminal:aab, terminal:apk, terminal:apk:install, terminal:clear:app, build:android:release:aab, build:android:release:apk, build:android:release:apk:install, clear:app, and install:app.
  • Updated POS terminal Android Gradle config to apply Google Services/Firebase Messaging when google-services.json contains a client for package th.co.boonsiri.posterminal.
  • Added the AsyncStorage v3 Android local Maven repository and moved native CMake prefab task dependencies to the project level so Reanimated/Worklets release builds run in the right order.
  • Set explicit Node and Hermes compiler paths for the POS terminal Android build so bundle/release builds use the intended local toolchain.
  • Docs updated:
    • governance/change-log

Mobile

Mobile dummy product company split

  • Removed dummy products from transferWarehouseDetailScreen; the transfer-warehouse product picker now uses only live product inventory filtered by search text.
  • Updated shared utils/dummyProducts so company BFPDB returns dummy0001 to dummy0003, while every other company returns the new nff-dummy001 to nff-dummy003 product set.
  • Impact: dummy products are still appended in goodsReceiptDetailScreen, but the transfer-warehouse flow no longer receives any dummy product rows from the shared helper.
  • Docs updated:
    • workflows/goods-receipt-flow
    • governance/change-log

2026-05-01

Mobile

Mobile order credit-note OTP

  • Updated orderDetailScreen so applying a credit-note discount can branch into an OTP confirmation step when POST /orders/:id/credit-notes/:creditNoteId returns requireOtp: true.
  • The OTP flow closes the credit-note selection modal, prompts for a 10-digit phone number, sends POST /orders/:id/credit-notes/:creditNoteId/send-otp, then confirms with POST /orders/:id/credit-notes/:creditNoteId/confirm-otp using the returned token and entered OTP code.
  • If the apply response does not require OTP, the order detail keeps the existing behavior and refreshes immediately after applying the credit note.
  • Docs updated:
    • workflows/sales-flow
    • governance/change-log

Mobile goods receipt warehouse code source

  • Updated goodsReceiptDetailScreen so products added from the picker set line warehouseCode from selectedProduct.whsCode first, then fall back to branch.BranchCode, branch.whsGrpCode, and an empty string.
  • This keeps stock-in submissions aligned with the warehouse code on the selected inventory item when it is available.
  • Docs updated:
    • workflows/goods-receipt-flow
    • governance/change-log

2026-04-30

Core

Mobile dependency and Android install notes

  • Checked package freshness with yarn outdated; docs-site had no outdated packages, while the mobile workspace had patch/minor updates plus several major upgrades that should be handled separately.
  • Documented that React Native core upgrades should use React Native Upgrade Helper as the baseline native template diff while preserving this repo's monorepo/native customizations.
  • Documented the local Android install failure INSTALL_FAILED_UPDATE_INCOMPATIBLE and the fix of uninstalling th.co.boonsiri.pos before installing a release APK signed with a different key.
  • Upgraded the mobile and POS terminal React Native core packages from 0.84.1 to 0.85.2.
  • Applied the React Native 0.85.2 template changes that apply to this repo: Gradle wrapper 9.3.1, @react-native/* package versions, and the new @react-native/jest-preset.
  • Kept the repo-specific Android and iOS native customizations instead of replacing native project files wholesale.
  • Updated compatible native packages needed by the upgrade: Reanimated 4.3.0, Worklets 0.8.1, and React Native Firebase patch versions 23.8.8.
  • Updated style usage from StyleSheet.absoluteFillObject to StyleSheet.absoluteFill because the React Native 0.85 TypeScript definitions removed absoluteFillObject.
  • Added mobile Jest setup mocks for native modules used by the app-level render test.
  • Removed stale apps/mobile lockfiles so the root Yarn workspace lockfile remains the single dependency source of truth.
  • Verified with yarn typecheck, ./gradlew app:compileDebugKotlin, and yarn workspace @bsr/mobile test --watchman=false --runInBand.
  • Docs updated:
    • setup/android-setup
    • governance/change-log

Mobile

Mobile Firebase modular app instance cleanup

  • Updated remaining mobile Firestore and Messaging calls to pass an explicit Firebase app instance from getApp().
  • Covered required app update checks, foreground/background notification handling, product inventory subscriptions, print logs, QR payment cache writes, and shipping route prefill checks.
  • This removes the RNFirebase v24 namespaced fallback path that emitted getApp(), collection, doc, and onMessage deprecation warnings at runtime.
  • Added a Jest mock for @react-native-firebase/app so modular getApp() imports work in the React Native test environment.
  • Verified with yarn workspace @bsr/mobile tsc --noEmit, yarn workspace @bsr/mobile test --watchman=false --runInBand, Android ./gradlew app:compileDebugKotlin, and iOS simulator xcodebuild -workspace BsrPosPlus.xcworkspace -scheme BsrPosPlus -configuration Debug -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' build.
  • Docs updated:
    • governance/change-log

Mobile transport list initial load guard

  • Prevented transportListScreen from loading the first transport page twice when the screen is opened.
  • The initial bootstrap load now owns the first fetch, while the focus refresh waits until initialization has completed.
  • Added an in-flight fetch guard so pagination or focus events cannot start a second getTransports request while another one is running.
  • Added a short first-page refresh cooldown so an immediate focus event after initial load does not re-fetch the same page.
  • Verified with yarn workspace @bsr/mobile tsc --noEmit and yarn workspace @bsr/mobile test --watchman=false --runInBand.
  • Docs updated:
    • governance/change-log

Mobile transport signature modal sizing

  • Reduced the customer signature pad height in transportDetailScreen so the react-native-signature-canvas footer buttons remain reachable after the v5 upgrade.
  • The signature pad now uses a responsive height capped between 360 and 520 pixels instead of filling the whole modal.
  • Added modal bottom padding and a surfaced signature pad container to keep the canvas and footer visually contained.
  • Overrode the signature WebView CSS so the canvas body and footer share the available height instead of the body pushing the footer outside the clipped container.
  • Verified with yarn workspace @bsr/mobile tsc --noEmit and yarn workspace @bsr/mobile test --watchman=false --runInBand.
  • Docs updated:
    • governance/change-log

Mobile signature canvas 5 upgrade

  • Upgraded mobile react-native-signature-canvas from 4.7.1 to 5.0.2.
  • Reviewed the current signature usage in transportDetailScreen; the existing Signature props (onOK, onEmpty, descriptionText, clearText, confirmText, webStyle, autoClear, and imageType) remain supported in v5.
  • No source changes were required. The v5 package now declares react-native-webview >=13 as a peer dependency, which the mobile app already satisfies.
  • Re-applied the existing react-native-view-shot iOS patch after yarn workspace @bsr/mobile add because dependency linking restored the upstream iOS source.
  • Verified with yarn typecheck, yarn workspace @bsr/mobile test --watchman=false --runInBand, Android ./gradlew app:compileDebugKotlin, and iOS simulator xcodebuild -workspace BsrPosPlus.xcworkspace -scheme BsrPosPlus -configuration Debug -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' build.
  • Docs updated:
    • governance/change-log

Mobile i18n major upgrade

  • Upgraded mobile i18next from 25.10.10 to 26.0.8 and react-i18next from 16.6.6 to 17.0.6.
  • Reviewed the mobile i18n setup in apps/mobile/src/i18n/index.ts; the existing compatibilityJSON: 'v4', initReactI18next, resource map, fallback language, and useSuspense: false config still works with the new major versions.
  • No source changes were required because current usage is limited to the app provider, i18n initialization, and useTranslation in the notification screen.
  • Re-applied the existing react-native-view-shot iOS patch after yarn workspace @bsr/mobile add because dependency linking restored the upstream iOS source.
  • Verified with yarn typecheck, yarn workspace @bsr/mobile test --watchman=false --runInBand, Android ./gradlew app:compileDebugKotlin, and iOS simulator xcodebuild -workspace BsrPosPlus.xcworkspace -scheme BsrPosPlus -configuration Debug -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' build.
  • Docs updated:
    • governance/change-log

Mobile bwip-js 4 upgrade

  • Upgraded mobile bwip-js from 3.3.0 to 4.10.1.
  • Confirmed the current apps/mobile/src code no longer imports bwip-js, so no runtime barcode generation code needed migration in this pass.
  • Noted the main Node/CommonJS entry in bwip-js v4 no longer exposes toDataURL; future React Native barcode usage should import the React Native entry/export that provides toDataURL.
  • Re-applied the existing react-native-view-shot iOS patch after yarn workspace @bsr/mobile add because dependency linking restored the upstream iOS source.
  • Verified with yarn typecheck, yarn workspace @bsr/mobile test --watchman=false --runInBand, Android ./gradlew app:compileDebugKotlin, and iOS simulator xcodebuild -workspace BsrPosPlus.xcworkspace -scheme BsrPosPlus -configuration Debug -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' build.
  • Docs updated:
    • governance/change-log

Mobile React Native Firebase 24 upgrade

  • Upgraded the mobile React Native Firebase package set from 23.8.8 to 24.0.0: @react-native-firebase/app, @react-native-firebase/firestore, and @react-native-firebase/messaging.
  • Ran yarn install to confirm the workspace lockfile was already aligned and to re-run the existing react-native-view-shot postinstall patch.
  • Ran pod install; iOS pods RNFBApp, RNFBFirestore, and RNFBMessaging moved to 24.0.0 while Firebase iOS SDK pods stayed on 12.10.0.
  • Migrated the mobile Firestore and Messaging runtime usage from the deprecated namespaced API to the modular API (getFirestore, collection, doc, getDocs, getDoc, onSnapshot, getMessaging, onMessage, and related helpers).
  • Updated mobile Jest Firebase mocks to support the modular Firestore/Messaging API while keeping the legacy mock shape available for any remaining tests.
  • This removes the React Native Firebase v22+ deprecation LogBox warnings from app-version checks, foreground messaging, QR payment cache, print logs, product inventory subscriptions, and shipping route lookups.
  • Verified with yarn typecheck, yarn workspace @bsr/mobile test --watchman=false --runInBand, Android ./gradlew app:compileDebugKotlin, and iOS simulator xcodebuild -workspace BsrPosPlus.xcworkspace -scheme BsrPosPlus -configuration Debug -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' build.
  • Docs updated:
    • governance/change-log

Mobile AsyncStorage 3 upgrade

  • Upgraded mobile @react-native-async-storage/async-storage from 2.2.0 to 3.0.2 as the first isolated major dependency upgrade after the React Native 0.85.2 migration.
  • Ran pod install; the iOS pod changed from RNCAsyncStorage to AsyncStorage.
  • Added the AsyncStorage v3 bundled Android local Maven repository to the mobile Android Gradle config so org.asyncstorage.shared_storage:storage-android:1.0.0 resolves during Android builds.
  • Replaced the Jest AsyncStorage mock import with a local CommonJS mock because the v3 package no longer exports the old jest/async-storage-mock path and its new jest export is ESM.
  • Verified with yarn typecheck, yarn workspace @bsr/mobile test --watchman=false --runInBand, Android ./gradlew app:compileDebugKotlin, and iOS simulator xcodebuild -workspace BsrPosPlus.xcworkspace -scheme BsrPosPlus -configuration Debug -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' build.
  • Docs updated:
    • governance/change-log

Mobile patch/minor package refresh after React Native 0.85.2

  • Updated the lower-risk mobile dependencies that still fit the React Native 0.85.2 line: @react-navigation/native, @react-navigation/native-stack, axios, dayjs, i18next, react-i18next, and react-native-gesture-handler.
  • Updated related mobile dev dependencies: @babel/core, @babel/preset-env, @babel/runtime, @react-native-community/cli, @react-native-community/cli-platform-android, @react-native-community/cli-platform-ios, @types/react, and prettier.
  • Updated @bsr/pos-terminal @types/react to keep the workspace React type version aligned.
  • Ran pod install after the dependency refresh. CocoaPods updated the generated iOS project/lockfile, including React Native 0.85.2 pods, Firebase iOS pods, React Native Firebase patch pods, Gesture Handler, Reanimated, and Worklets.
  • Re-applied the existing react-native-view-shot new-architecture patch before the iOS build because the refreshed install restored the upstream RCTScrollView code that no longer compiles cleanly on the current RN/iOS new-architecture setup.
  • Left the remaining major upgrades for a separate pass because they carry wider behavior or native risk: AsyncStorage 3, React Native Firebase 24, i18next 26, react-i18next 17, bwip-js 4, Jest 30, TypeScript 6, and similar major-only updates.
  • Verified with yarn typecheck, yarn workspace @bsr/mobile test --watchman=false --runInBand, Android ./gradlew app:compileDebugKotlin, and iOS simulator xcodebuild -workspace BsrPosPlus.xcworkspace -scheme BsrPosPlus -configuration Debug -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' build.
  • Docs updated:
    • governance/change-log

Mobile borrow list duplicate loading

  • Fixed borrowListScreen initial loading so opening the screen no longer triggers overlapping page-1 requests from initial load, navigation focus, and early onEndReached.
  • Added request guards for initial-load completion and in-flight fetches, and moved pagination tracking into refs so onEndReached does not append stale page-1 data.
  • Added append-time deduplication by borrow id/number to prevent duplicate rows if the same page is returned again.
  • Verified with yarn workspace @bsr/mobile tsc --noEmit and yarn workspace @bsr/mobile test --watchman=false --runInBand.
  • Docs updated:
    • governance/change-log

Mobile order detail shipping type preservation

  • Fixed orderDetailScreen so persisted orders preserve the server shippingType value when opened from orderListScreen.
  • The screen no longer converts an existing shippingType: "1" order into storefront state while branch context is loading or when building update payloads.
  • This prevents the UI from showing หน้าร้าน for delivery orders and prevents later updates from saving the wrong shipping type.
  • Verified with yarn workspace @bsr/mobile tsc --noEmit and yarn workspace @bsr/mobile test --watchman=false --runInBand.
  • Docs updated:
    • governance/change-log

Mobile swipeable list behavior after React Native upgrade

  • Reworked the shared SwipeableFlashList wrapper after the React Native 0.85.2 upgrade because react-native-gesture-handler swipe action rows were measuring separately from the item content on several screens.
  • Upgraded FlashList to v2, but kept swipe-enabled lists on a FlatList fallback inside the shared wrapper because the row/action layout issue reproduced with both FlashList and FlatList when using the library swipeable component directly.
  • Replaced the library swipeable row in the shared wrapper with a small custom Gesture Handler/Reanimated row: item content now provides the row height, hidden actions are absolute layers behind the content, and opening one row closes the previous open row.
  • Fixed hidden action layout so action buttons stay in the same row as the card, stretch to the row height, are slightly inset from the card edges, and are hidden with opacity while the row is closed so transparent item rows do not show the hidden buttons.
  • Adjusted the order/customer swipe action button sizing after device testing to prevent the hidden buttons from bleeding through before swipe.
  • Added/updated Jest mocks for Reanimated so the app-level render test does not load native Worklets.
  • Verified with yarn workspace @bsr/mobile tsc --noEmit and yarn workspace @bsr/mobile test --watchman=false --runInBand.
  • Docs updated:
    • governance/change-log

Mobile required app update

  • Added a shared Firestore app-version check for Login and Home.
  • The app reads native versionCode, reads Firestore version/vapp, converts both local and remote version values with Number(...), and blocks the UI when the Firestore version number is greater.
  • The blocking modal says แอปของคุณจำเป็นต้องอัปเดทเป็นเวอร์ชั่น ..., displays the Firestore versionNumber, and has no close action.
  • The implementation uses versionNumber as the main Firestore comparison field and also accepts platform-specific Android/iOS fields if they are added later.
  • Docs updated:
    • workflows/login-branch-home
    • governance/change-log

Mobile iOS build environment

  • Installed CMake on the local development machine so CocoaPods/native iOS dependencies can complete.
  • Updated apps/mobile/ios/Podfile with repo-specific post-install/post-integrate fixes for gRPC-Core.modulemap and FirebaseFirestoreInternal link issues.
  • Added a root postinstall script that patches react-native-view-shot for React Native new architecture by using RCTScrollViewComponentView.
  • Verified the mobile iOS simulator build with xcodebuild after pod install.
  • Updated machine migration docs so new machines check Xcode first launch, simulator runtime, CMake, GitHub network access, pod install, and the root postinstall patch.
  • Docs updated:
    • setup/machine-migration
    • governance/change-log

2026-04-29

Mobile

การค้นหา Lot/Batch ตามคลังบน Mobile

  • Updated storefrontDetailScreen Lot/Batch lookup so both the auto-pick flow and manual picker use item whsCode before falling back to the selected branch warehouse code.
  • Documented that shippingDetailScreen already uses product-group whsCode for its Lot/Batch lookup.
  • Updated shippingDetailScreen so transportation confirmation is checked before product-check permission when opening Lot/Batch selection; empty deliveryStatus now shows ขนส่งยังไม่ยืนยันใบจัดนี้.
  • Docs updated:
    • workflows/sales-flow
    • governance/change-log

Mobile expense bill save navigation

  • Updated expenseBillDetailScreen so after a save API call completes, the screen returns to ExpenseBillList whether the API flow succeeds or fails.
  • Validation errors that happen before the API call still keep the user on the detail screen so the form can be corrected.
  • Docs updated:
    • governance/change-log

Mobile transport Google route sorting

  • Added Google-based customer route sorting to transportDetailScreen sort planner using customer U_BFP_Latitude and U_BFP_Longitude.
  • The route sort uses the device's current GPS location as origin, sends valid customer coordinates to Google Routes with optimizeWaypointOrder: true, reads routes.optimizedIntermediateWaypointIndex, and updates the sort planner order.
  • The Google route action only updates the modal order and shows เรียงเสร็จสิ้นแล้ว; users still save through the existing sort-save action.
  • Updated the sort modal footer so close and save stay on the first action row and จัดเรียงลูกค้าตามพิกัดด้วย Google is a full-width second-row action.
  • Docs updated:
    • workflows/mobile-transport-and-vehicles
    • governance/change-log

Mobile goods receipt zero quantity submit

  • Updated goodsReceiptDetailScreen so line and Lot/Batch quantities may be 0, but blank and negative quantities are blocked before saving.
  • The stock-in submit payload now sends every goods-receipt line, including lines whose received total cal is 0, and still maps each submitted line quantity from cal.
  • Removed the prior submit behavior that filtered payload lines to only cal > 0.
  • Docs updated:
    • workflows/goods-receipt-flow
    • governance/change-log

การพิมพ์ใบเบิกจากรายละเอียดใบสั่งขายบน Mobile remark

  • Updated the orderDetailScreen storage-print modal that chooses พิมพ์ไม่มี Lots or พิมพ์มี Lots so it shows a required remark textarea matching the invoice remark modal.
  • Pressing either storage print button now updates the order with the current screen state and remark, reloads the order detail from the API, and then prints the selected storage document variant.
  • Draft orders are moved to NEW before the reload-and-print step.
  • Docs updated:
    • workflows/sales-flow
    • governance/change-log

Mobile Home branch-focus refresh

  • Updated HomeScreen so it reloads the stored user and branch through useFocusEffect whenever Home regains focus.
  • This keeps menu visibility in sync with the latest selected warehouse after changing branch/warehouse, including switching from isMain: false back to isMain: true.
  • Docs updated:
    • workflows/home-menu-and-permissions
    • governance/change-log

2026-04-28

Mobile

Mobile transport and vehicle status

  • Added the ยานพาหนะ Home menu entry in the ข้อมูล group after ผู้ใช้ทั้งหมด, using menus.menu11 and the same visibility permission as ผู้ใช้ทั้งหมด.
  • Added the VehicleList mobile route and documented the vehicle-status list flow: loading via getVehicles, search, status-colored cards, and the vehicle-status modal with vehicleStatus and vehicleStatusNote.
  • Documented that vehicle status updates call PATCH api/vehicles/{licensePlate}/vehicle-status through the same mstApi domain as getVehicles.
  • Added and documented the transport-detail bottom action อนุมัติใบจัดทั้งหมด, which is shown when at least one delivery has deliveryStatus as null or empty, asks for confirmation before API calls, finalizes all pending deliveries, and refreshes the transport detail by transportId.
  • Replaced the transport-detail header finalize-all menu with print actions for พิมพ์ใบแจ้งหนี้ทั้งหมด and พิมพ์ใบจัดสินค้า, shown only after every delivery has a non-empty deliveryStatus.
  • Added getTransportCustomerInvoices(transportId) for GET api/transports/{transportId}/invoices; the invoice print action uses that response directly with printInvoice and no longer reloads each invoice through getInvoiceDetail.
  • The transport invoice print loop now waits for React Native interactions and delays 800ms between print jobs to reduce native print instability when printing many invoices.
  • Fixed the mobile branch selection type by adding BranchCode to the local BranchOption type, which restores tsc --noEmit.
  • Moved mobile dummy product generation into shared utils/dummyProducts, reused by goods receipt and transfer warehouse, while keeping the original b1-dummy0001 to b1-dummy0003 items and adding the c1, e1, f1, and h1 dummy groups.
  • Docs updated:
    • workflows/home-menu-and-permissions
    • workflows/mobile-transport-and-vehicles
    • workflows/goods-receipt-flow
    • governance/change-log
    • index

2026-04-27

Mobile

Mobile customer tax ID field

  • Added the optional taxID customer field to CustomerManagementEdit, positioned under ฉายา and not required for saving.
  • The customer draft payload and shared customer types now include taxID.
  • CustomerManagementDetail and CustomerDetail now show Tax ID in the customer information section, with - when no value is available.
  • Docs updated:
    • governance/change-log
    • workflows/mobile-borrow-and-customer-management

2026-04-24

Mobile

Mobile goods receipt partial and over receipt

  • Updated goodsReceiptDetailScreen so รับสินค้าเข้าตรง no longer requires the received quantity on each line to match the document quantity exactly.
  • The screen now allows under receipt and over receipt through Lot/Batch entry, and submit no longer blocks when cal differs from the original line quantity.
  • The submit payload now includes only lines with actual received quantity greater than 0, and each submitted line sends quantity from the received total cal.
  • Docs updated:
    • workflows/goods-receipt-flow
    • governance/change-log
    • index

Mobile order metadata summary

  • Updated OrderMetaDataDetail so the new discount and net amount fields use the same payment-summary source as OrderPaymentHeroCard.
  • The metadata card now reads discount from getOrderDiscountTotal(detail) and remaining amount from getOrderNetAmount(detail), which keeps the numbers aligned with the payment flow.
  • Added a visibility rule so the entire row for ส่วนลด and ยอดคงเหลือ is hidden when the computed discount is 0.
  • Docs updated:
    • governance/change-log

Mobile order and borrow item warehouse payload

  • Updated the shared order item payload builder so whGrpCode and whGrpName now come from item.whGrpCode and item.whGrpName, then fall back to the selected branch values, instead of falling back through item.whsCode and item.whsName.
  • Added whsCode as a separate field in the shared order item payload, sourced directly from item.whsCode.
  • Updated the borrow item payload builder with the same separation: whsCode now comes from product.whsCode, whGrpCode comes from product.whGrpCode, and whGrpName prefers product.whGrpName before falling back to the branch-context name.
  • Added whsCode to the shared BorrowItemPayload type so the borrow helper and API payload type stay aligned.
  • Docs updated:
    • governance/change-log

Mobile invoice detail sales-order permission gate

  • Updated invoiceDetailScreen so the action เปิดใบสั่งขายจากใบแจ้งหนี้ is shown only to users who have sales-order creation permission.
  • The screen now loads the current user, checks getSalesOrderAccess(user).canCreateSalesOrder, hides the bottom action when that permission is missing, and keeps a handler-side guard to block direct invocation.
  • This aligns the invoice-detail shortcut with the same sales-order permission rule already used in other order-entry flows.
  • Docs updated:
    • governance/change-log

Mobile shipping detail temporary action hiding

  • Temporarily hid the sort entry point in shippingDetailScreen, disabled the per-invoice move controls, and hid the พิมพ์ทั้งหมด and พิมพ์ใบจัดสินค้า action buttons from the UI.
  • The underlying handlers and sort/print logic were left in place; only the current UI entry points were commented out so they can be restored quickly later.
  • Docs updated:
    • governance/change-log

Mobile transport detail permission rollback

  • Removed the temporary 999999 user-code override from transportDetailScreen.
  • The transport screen now falls back to its normal permission rules for opening the sort planner and finalizing transport deliveries, without granting special access to user 999999.
  • Docs updated:
    • governance/change-log

2026-04-23

Mobile

Mobile sub-warehouse filtering

  • Updated the mobile branchScreen and TransferWarehouseDetail flows so sub-warehouse results from getWarehousesSub(...) ignore any record whose whsCode contains NF- or DR- anywhere in the string.
  • This is a record-level exclusion, not a code rewrite. For example, a warehouse such as NF-SSK is removed from the selectable list instead of being renamed.
  • Moved the exclusion rule into the shared mobile helper apps/mobile/src/utils/warehouse.ts so both screens use the same filter and future changes only need one update point.
  • Docs updated:
    • governance/change-log

2026-04-22

Mobile

Mobile customer management draft recovery

  • Updated the customer-management edit flow so a successful createCustomerDraft is retained even when some draft addresses or draft branches fail to save afterward.
  • Documented that the screen now navigates back into the same draft with replace, carries unsaved child records as pending route params, and merges them back into the refreshed UI after loading server data.
  • This preserves unsaved addresses and branches on screen and ensures the next save updates the existing draft instead of creating a new draft.
  • Docs updated:
    • governance/change-log
    • workflows/mobile-borrow-and-customer-management

2026-04-21

Mobile

Mobile borrow detail and customer management edit

  • Updated the mobile borrow-detail flow so item editing uses a dedicated edit modal with the same visual style as add-product, but without showing the product list.
  • Documented that borrow-item edit and delete now fall back to item id when itemId is missing, which prevents silent delete failures and duplicate-item errors during edit saves.
  • Documented that borrow-item edit can load the current product by productCode when it is not present in the current inventory snapshot.
  • Fixed and documented the customer-management edit screen so customerType and knowus selectors are populated from the correct source lists instead of being swapped.
  • Docs updated:
    • governance/change-log
    • workflows/mobile-borrow-and-customer-management

2026-04-19

Mobile

Mobile branch storage and transfer-warehouse branch loading

  • Documented the current mobile branch-selection mapping and the exact payload shape saved into local storage under the branch key.
  • Clarified that branch selection stores both the owning main branch (BranchId, BranchCode) and the chosen warehouse (whsGrpCode, whsGrpName, isMain) in one object.
  • Updated the workflow notes to reflect that TransferWarehouseDetail now reloads destination warehouse options with getWarehousesSub(BranchCode) from stored branch data, while continuing to treat stored whsGrpCode as the selected source warehouse in transfer item flows.
  • Docs updated:
    • governance/change-log
    • workflows/login-branch-home

Mobile home branch gating

  • Updated the mobile Home visibility rules so several menus no longer require branch.isMain === true once the user's deptCode is allowed.
  • The affected menus are รับสินค้าเข้าตรง, โอนสินค้าไปสาขา, รับสินค้าจากสาขา, ย้ายสินค้าระหว่างคลัง, ลูกค้า, การจัดการลูกค้า, เปิด/ปิด สถานะลูกค้า, ลดหนี้ / คืนสินค้า, and ผู้ใช้ทั้งหมด.
  • isMainBranch is still enforced for ใบจัดส่งสินค้าสายส่ง, ใบเบิกยืมดูปลา, ขนส่ง, and บิลน้ำมัน.
  • Docs updated:
    • governance/change-log
    • workflows/home-menu-and-permissions

Mobile item warehouse-group payload fallback

  • Updated the shared mobile item-payload builder so whGrpCode and whGrpName now prefer item.whsCode and item.whsName before falling back to item.whGrpCode and item.whGrpName.
  • This changes the payload sent from sales-order item creation and booking-price item creation flows, because both screens use the same shared buildCommonItemPayload helper.
  • Verified that the borrow-detail flow does not use this shared fallback order; it still builds item warehouse fields from its own branch/detail context and was left unchanged.
  • Docs updated:
    • governance/change-log

2026-04-18

Mobile

Mobile employee transfer receive setting

  • Added a new mobile employee-detail action for ตั้งค่ารับโอนสินค้าภายในสาขา and linked it to a dedicated screen.
  • The new screen now loads user branch-warehouse permissions on branch selection, maps them against rendered warehouses by whsGrpCode === whsCode, and drives each PermissionToggle from canApprove.
  • Toggling a warehouse now creates or updates /users/{userId}/branches/{branchId}/warehouses, then reloads permissions from the API so the UI reflects the latest server state; the toggle flow also uses optimistic state and temporary disabling to avoid visible flip-flopping while requests are in flight.
  • Docs updated:
    • governance/change-log

Mobile booking price date handling

  • Fixed mobile booking-price detail and list flows so same-day edit checks and draft card state do not shift to the next day when createdAt is returned as a UTC timestamp such as 2026-04-18T18:33:28.777Z.
  • The mobile app now prefers the calendar date embedded in server timestamps before falling back to local parsing, which avoids false "document expired" behavior in Asia/Bangkok time.
  • Docs updated:
    • governance/change-log

Mobile home permissions

  • Added deptCode 20 to the mobile Home permission sets for MENU_ORDER_REVIEW, MENU_INVOICE, MENU_STOREFRONT, MENU_PRODUCT, MENU_CUSTOMER, and CAN_CREATE_ORDER.
  • This gives department 20 visibility to those Home menu entries and allows the order/create shortcut paths that depend on CAN_CREATE_ORDER.
  • Docs updated:
    • governance/change-log
    • workflows/home-menu-and-permissions

Mobile lot/batch deletion

  • Updated the shared BatchLotSheet UI so selected lot/batch rows show a visible trash icon on the right instead of relying on swipe-to-delete only.
  • This makes lot/batch removal discoverable across every mobile screen that already uses BatchLotSheet, including storefront, transfer in/out, goods receipt, and shipping.
  • Docs updated:
    • governance/change-log

2026-04-17

Core

Documentation platform

  • Added a Docusaurus-based wiki in docs-site with Mermaid support.
  • Added root scripts for docs install, local dev, locale-specific dev, build, and static preview.
  • Docs updated:
    • index
    • architecture/overview
    • architecture/mobile-terminal
    • setup/android-setup
    • setup/machine-migration

Governance

  • Added a wiki maintenance policy requiring workflow-related documentation updates in the same task by default.
  • Added two-language support for the wiki with en and th locales.
  • Docs updated:
    • governance/wiki-maintenance
    • governance/change-log

Mobile

Mobile credit note location selection

  • Updated CreditNoteDetail so warehouse users with location-edit permission can assign lot/location without being the document owner.
  • Changed the mobile location picker UI in CreditNoteDetail to use the same SelectionModal pattern as shipping and storefront lot/batch selection.
  • Updated order credit-note selection so only items with isUsed == 1 are blocked, and used credit-note cards now render with a light red background.
  • Updated sales-order customer blocking so user 999999 can open order-related customer flows even when the customer has outstanding credit, while inactive customers remain blocked.
  • Updated OrderDetail benefit flow so point, coupon, and credit-note benefits cannot be applied twice to the same order; users must remove the existing benefit before applying that type again.
  • Docs updated:
    • governance/change-log

Mobile startup flow

  • Documented the current login -> branch -> home startup path from the mobile app implementation.
  • Captured session validation, branch selection, and home-entry decision points from App.tsx and RootNavigator.tsx.
  • Docs updated:
    • workflows/login-branch-home

Home access and permissions

  • Documented how the mobile Home screen filters menu visibility by deptCode and isMainBranch.
  • Added the current menu-to-navigation mapping and create-shortcut rules as wiki reference material.
  • Docs updated:
    • workflows/home-menu-and-permissions