Change Log
This page tracks documentation-relevant system changes over time.
What belongs here
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
Production transport Checklist gate
- Before Mobile and POS Terminal validate starting mileage or call
POST /api/transports/{id}/started, PRD now checks the logged-in user's unfinished transportation Checklist work through the separate Checklist API. - An empty
dataarray permits the trip to start. A non-empty array blocks it with the Checklist completion alert; failed or malformed Checklist responses also stop the start flow. UAT does not make this request.
Storefront picking grouped by sales order
- Mobile and POS Terminal storefront picking lists now remove
CANCELEDinvoices and group the remaining rows byorderNo, showing all included invoice numbers on one sales-order card. - A grouped card is green only when every invoice is
CONFIRMED; mixed groups continue through the existing waiting-delivery, pending-cancel, and default color rules. - Opening a group loads every invoice and combines their products in one detail view while retaining source-invoice identity and status on each product row.
- Accept, delivery-lot save, and B1 delivery creation now run sequentially per eligible invoice. Already accepted invoices are not accepted again, and product rows from
CONFIRMEDinvoices are read-only. - Detail metadata now shows the sales order under
orderNoand all picking invoice numbers together. - Docs updated:
menus/shipping-storefrontgovernance/change-log
Low-impact changes
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
Main-branch borrow-fish limits by type
- On Mobile and POS Terminal, the main-branch limit of three product rows and three units per row now applies only to
SPEC(customer sample/inspection) borrows. - Main-branch
MARKET,VIDEO,SEMINAR,DESTROY, andLABborrows have no UI row-count or per-line quantity cap; all types still require a positive integer quantity within available stock. - Non-main branches retain the existing five-units-per-line limit for every borrow type.
2026-08-07
Core
Invoice sales summary COD metrics
- The invoice Sales Summary modal now displays
codCountandcodTotalfor each company and in the grand total asค่าธรรมเนียม COD : codCount @ codTotal. - Net remaining remains
amountTotal - discount - useCreditNote; the COD fee is shown separately and is not subtracted from that value.
Continuous item addition in sales order and borrow fish
- When a persisted
orderIdorborrowIdexists, adding an item no longer shows a blocking full-screen loading state, and the Product Picker remains available for repeated additions. - For a new borrow, the header is created first, the returned
borrowIdis used to create the first item, and the detail/list plus route are refreshed so the first item appears immediately.borrowNois not used as the item-create identity.
Booking-price remark input
- The booking-price remark textarea starts at one line and automatically grows or shrinks with its content on Mobile and POS Terminal.
2026-08-05
Core
Storefront Lot/Batch reselection
- Mobile and POS Terminal now treat invoice
items[].lots[]as initial values while allowing users to edit, delete, and select replacement Lot/Batch rows when the invoice isNEWand the user has edit permission. - Lot/Batch editing uses the same rule for main and non-main branches;
isMainis no longer used as an editing gate.
Transport evidence-file metadata and validation
- Mobile and POS Terminal now send the selected customer's
customerCode,U_BFP_Latitude, andU_BFP_Longitudetogether withfilesandwhGrpCodeinPOST /api/transports/{transportId}/files. - If any customer or coordinate field is missing or empty, the app shows an alert and stops before calling the upload API.
2026-08-04
Mobile
Inventory batch-date payload contract
- Goods Receipt, Transfer Out, Transfer In, and Transfer Warehouse now submit the receipt date under
admissionDate; the obsoleteaddmisionDatekey is no longer sent. - Submitted
admissionDateanddueDatevalues use the ISO local date-time formatYYYY-MM-DDTHH:mm:sson Mobile and POS Terminal. Existing documents using the old spelling remain readable.
Firestore inventory-index diagnostic from warehouse selection
- Long-pressing a warehouse now runs a five-second real-time inventory subscription for that warehouse without selecting it.
- When Firestore reports a missing composite index, the app logs the Firebase Console creation URL as a separate clickable DevTools entry.
2026-07-31
Core
Customer draft SAP B1 approval recovery
- Mobile now replaces a newly created customer's edit screen with its draft detail when immediate SAP B1 approval fails, preserving the draft while removing the old form from back navigation.
- Mobile and POS Terminal reload a failed draft decision before selecting actions from status:
DRAFToffers approve/reject andSAP_PARTIALoffersPOST /customer-draft/:id/retry.
Transport customer-card shipping and fee rows
- Mobile and POS Terminal customer cards now display each shipping-invoice row from its own
shippingAmount, regardless of whether the row isdocType: SHIPPINGordocType: FEEand regardless of the COD setting. Older responses withoutshippingAmountfall back to the row'samount.
2026-07-24
Core
Transport dummy vehicles
- Mobile and POS Terminal now show the shared
READYtest vehiclesdummy-001throughdummy-003above API vehicles in the transport vehicle picker. They follow the picker search query and cannot be used to start a transport; the app asks the user to select a real vehicle instead.
Sales-order create request deduplication
- Mobile and POS Terminal now coalesce duplicate
createOrdercalls for 2.65 seconds. Only the first call sendsPOST /orders; order-item requests are unchanged.
2026-07-21
Core
Product-return Location permission at non-main branches
- In Mobile and POS Terminal Credit Notes, departments
20and23can select a physical-return Location/Lot only when the selected branch hasisMain = false. Existing Location/Lot permissions for departments12,22, and28remain available at every branch.
2026-07-16
Core
Transfer list warehouse scoping and login reset entry point
- Mobile and POS Terminal now include the logged-in warehouse group's
whGrpCodein theGET /transfer-brancheslist query, alongside the existing branch filter. - The
ลืมรหัสผ่านbutton is temporarily hidden on both Login screens; the password-reset flow triggered by login validation remains available.
Entry format
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
Transport sales-later transfer amount
- Updated the Mobile and POS Terminal
Customer will transfer to Sales laterQR choice to submit the full payable amount intransfer, while retainingpaymentType: OTHER,cash: 0, and the Sales-later system note. - Updated Mobile and POS Terminal customer-card colors: every status other than
FINISHEDuses the draft light-blue color;FINISHEDcards use their payment-type color. - Opening an unfinished customer card now refreshes that customer from the transport API, matches the response by customer code and delivery coordinates, then updates the matching card before opening the modal. Zero
grandAmountsupports confirmation-onlySHIPPINGandBILL_PAYMENTflows.
2026-07-10
Core
Menu-based wiki navigation
- Reworked the wiki sidebar around the app's real menu groups: startup, app menus, permissions, deep workflows, architecture, setup, and governance.
- Added individual menu overview pages for every Mobile/POS Terminal Home menu, including Terminal-only
POS หน้าร้าน, so operations users can browse by the menu they see in the app.
Mobile and Terminal full workflow wiki
- Added end-to-end workflow documentation for Mobile and POS Terminal from app launch through login, branch/warehouse selection, Home, and Terminal-only storefront POS.
- Added a complete menu map covering every Mobile and Terminal Home menu, permission gates, Mobile shortcuts, Terminal split-pane behavior, and the Terminal-only
POS หน้าร้านroute.
Shipping route and transport workflow wiki
- Added a dedicated workflow page for
ใบจัดสินค้าสายส่งandขนส่ง, covering list fields, status meanings, action gates, API endpoints,deptCodepermissions,confirmedAtbehavior, transport prepare/start/finish guards, and Mobile/POS Terminal parity notes.
2026-06-24
Core
Android setup docs
- Added Android setup notes for running Mobile POS and POS Terminal on two connected Android devices with
ANDROID_SERIAL, direct React Native--deviceIdfallback, and per-deviceadb reverseguidance when Metro ports differ.
2026-06-16
POS Terminal
Sales order detail closer to Mobile
- Updated the POS Terminal sales order detail screen to split detail and payment views, with the primary action label switching between
สร้างใบแจ้งหนี้andชำระเงินby status like Mobile. - Added Mobile-style action state for create-invoice/payment gates: the order must have items and must not be canceled.
- Updated
isMain=falsebehavior to force storefront sales type, hide the delivery option, and show withdraw type / vehicle release / document move fields only for non-main branches. - When opening the invoice flow from a
DRAFTorder, the terminal now updates the order toNEWbefore loading or creating invoices and entering payment flow. - Moved use point / coupon / credit-note discount actions into the detail header three-dot menu near the close button.
- Changed POS Terminal point / coupon / credit-note discount flows to open modals like Mobile, including the credit-note OTP modal.
- Reduced full list reloads after POS Terminal sales order updates by patching the open detail/list item from the latest detail instead, and added an identity guard so the form does not reset when the same order is patched, avoiding panel 3 close/reopen flicker during edits.
- Changed the POS Terminal sales type update flow to use local/optimistic updates without global loading, and reduced parent patching during the API sequence to a single latest-detail patch after success.
- Prevented the parent detail loader from issuing a duplicate
GET /orders/:idwhen the same open sales order list item is patched from the form, fixing panel 3 reload after sales type changes. - Removed the POS Terminal sales order print section at the bottom of the page and moved printing into the Mobile-like action flow; non-main branches now use a modal to choose storage print with or without Lots.
- Simplified the POS Terminal sales order customer header card to show only customer name, phone, and address, with the whole card opening address selection instead of a separate button.
- Updated the POS Terminal sales order metadata header to remove document status and move delivery/storefront buttons into the order-number row instead of the old sales-type section.
- Formatted the sales order pickup date in the metadata header as
DD/MM/YYYYand tightened the metadata row spacing. - Changed POS Terminal customer-to-sales-order creation to fetch the customer detail and open panel 3 as a local draft without calling
POST /ordersor inserting a draft row into the API-backed list; the order is now created only when saving the draft or adding the first product, matching Mobile.
Core
Transport dropoff fee payment flow
- Added
GET /api/transports/{transportId}/feewrappers in Mobile and POS Terminal for cash/other transport payments. - Changed CASH and OTHER customer-payment flows to require a dropoff-fee check before showing delivery photo/signature fields and before submitting payment.
- Reset the checked dropoff fee whenever the cash amount, payment type, or other-payment flags change, and submit cash as
cash + dropoffFee. - Updated Mobile and POS Terminal to use
totalFeefrom the transport fee response as the dropoff fee amount, with the previous fields kept as fallbacks. - Rounded the transport dropoff fee in Mobile and POS Terminal before storing it, using standard
.5round-up behavior. - Added the checked dropoff fee amount to the submitted transport system note when a fee is present.
- Skipped the extra
PATCH /transports/:transportId/customers/:customerCodecall after transport payment because the payment endpoint now updates the customer state.
Delivery-order shipping fee check during order creation
- Added Google Routes distance checks in Mobile and POS Terminal when a new delivery sales order opens, or when the order is changed to delivery / a delivery address is selected.
- Reused the transport-page rule: first 150 km free, chargeable remainder rounds up from 500 m, and the rate is 15 baht/km.
- Shows a shipping-fee alert with the total route distance when a fee applies, and shows
ที่อยู่นี้ ไม่มีข้อมูลพิกัดลูกค้าwhen the selected customer address has no coordinates. - Added a POS Terminal order-detail modal for choosing customer addresses or branch pickup points, saving the selected address, route, and coordinates to the order before rerunning the shipping-fee check like Mobile.
2026-06-15
Core
Invoice print return-claim terms and non-main lots
- Updated the shared invoice print template claim QR label to include return-condition reading.
- Added the payment confirmation and return/claim acceptance text under the invoice QR payment and sticker images.
- Printed item lots on invoice rows for non-main branches using the same
Lot : lotNo (qty)format as storage/borrow prints. - Used order-detail items as a lot fallback when invoice-detail items do not include lots during invoice printing.
- Added the non-main
DEPOSITinvoice notice below the item table with a pickup deadline calculated from the invoice date plus 7 days.
Transport customer product summary
- Added a customer action in transport detail popups to load every invoice detail for that customer and open a separate popup step showing the product quantities that must be delivered.
- Merged duplicate products across customer invoices by product code, falling back to product name when no product code is available.
2026-06-13
Core
Shipping invoice retry actions
- Changed the transport-fee receipt date source to use only
createdAt. - Added shipping invoice retry actions in order payment and transport customer cards:
b1Status = 0showsส่งข้อมูลอีกครั้ง, andb1Status = 1with a populatedcollectedAtand emptypaidAtshowsส่ง Incoming อีกครั้ง. - Added
POST /api/transports/{transportId}/shipping/{shippingInvoiceId}/retry-incomingservice wrappers in Mobile and POS Terminal. - Added a transport-header action to print all shipping-fee receipts after the transport has started and at least one shipping invoice exists.
- Added shipping invoice indicators on invoice lists and shipping-fee detail sections on invoice detail screens, including paid status and retry/retry-incoming actions.
- Moved invoice detail shipping-fee rows inline under total weight so the amount, paid status, and retry action appear in the invoice metadata block.
Borrow fish customer vehicle plate
- Added
customerLicensePlateto borrow fish create/update payloads and detail state. - Added customer vehicle plate inputs to borrow fish detail screens in Mobile and POS Terminal.
- Showed customer vehicle plate and pickup date only for non-main branch
SPECborrow fish records, placed both fields in one row, and renamed the pickup label toวันที่มาเบิกสินค้า. - Added
expectedQtyto borrow fish item create/update payloads and showed aจำนวนที่คาดว่าจะซื้อinput when adding or editing items for non-main branches. - Changed borrow fish item quantity limits so main branches can borrow up to 3 pieces per item and non-main branches can borrow up to 5 pieces per item.
- Added non-main branch borrow fish guards: changing to
SPECwith existing items is blocked, pickup date changes forSPECwith existing items are blocked, and existing borrows auto-save type/date changes. - Displayed borrow fish item
expectedQtyas a small bottom line in product rows. - Displayed borrow fish item lots as one line per lot in
lotNo (qty)format. - Added borrow fish storage print details for pickup date, expected quantity, and item lots using
Lot : lotNo (qty). - Displayed order item lots for non-main branches in
Lot : lotNo (qty)format. - Printed order storage lots one line per lot with compact spacing when
includeLotsis selected.
2026-06-12
Core
Order payment shipping invoices and transport tax receipt printing
- Added unpaid shipping invoice support to order payment summaries in Mobile and POS Terminal, including shipping amount display, shipping QR generation, and paid-shipping labeling.
- Added a shared shipping receipt/tax-invoice template for transport fees. The table uses
รายการ,ระยะ,ราคา, andมูลค่า, calculates chargeable distance from shipping amount at 15 baht/km, and shows total distance as chargeable distance plus the free 150 km. - Added shipping-fee QR payment to the receipt template with
ref1 = transportNo.replace("-", "")andref2 = shippingInvoiceNo.replace("-", ""). - Replaced the previous shipping print placeholder in order payment and transport customer cards with real printing in both Mobile and POS Terminal.
2026-06-11
Core
Borrow fish pickup date and conversion
- Allowed non-main branches to open the borrow-fish menu in Mobile and POS Terminal.
- Added
dateOfPickupto borrow-fish draft/create/update payloads withnullas the default, and showed aYYYY-MM-DDpickup-date picker when the borrow type isSPEC. - Added support for borrow detail response fields
dateOfPickup,convertedOrderId, andconvertedAt. - Added
POST /borrow/{id}/convertactions in Mobile and POS Terminal for non-mainSPECborrow documents inDONEstatus; successful conversion reloads the borrow detail so the UI reflectsCONVERTED. - Added
CONVERTEDas a borrow status and mapped it to the same list color asDONE. - Docs updated:
governance/change-logworkflows/home-menu-and-permissions
Mobile loading states
- Blocked
customerDetailScreencontent behind an initial loading state until user, branch, routes, and customer details finish loading. - Kept the order product picker empty state in loading mode while initial product inventory is still syncing.
- Updated POS Terminal customer detail selection and product picker loading states to show loading immediately before detail/product data finishes loading.
Customer draft validation
- Required
aliasName(ฉายา) when creating a customer draft withoutcustomerIdin Mobile and POS Terminal.
Order withdraw type for non-main branches
- Added
withdrawTypeto Mobile and POS Terminal order create/update payloads, defaulting toNOW. - Added non-main-branch order UI radios for
NOW(เบิกทันที) andDEPOSIT(ฝากต่อ 7 วัน) using the existing order radio style.
Transport payment split QR and shipping slip
- Updated Mobile and POS Terminal transport customer payment flows to send
shippingSlipPathinPOST /transports/:transportId/payment. - Added a separate shipping slip upload field when transfer/bill-payment customers have shipping charges, and require it when a product/payment slip is attached for a customer with shipping charges.
- Split the transport payment QR into product and shipping QR codes: the product QR keeps the existing transport/customer/GPS refs with amount excluding shipping charges, while the shipping QR uses
transportNoasref1,shippingInvoiceNoasref2, and amount equal to the shipping charge. - Normalized shipping QR refs by removing hyphens from
transportNoandshippingInvoiceNobefore sending them asref1andref2. - Added clearer high-contrast labels before each QR and in shared QR images so users can distinguish product payment from shipping payment.
- Verified with
yarn workspace @bsr/pos-terminal typecheckandyarn workspace @bsr/mobile tsc --noEmit. - Docs updated:
governance/change-log
2026-06-10
POS Terminal
Login and authentication parity re-audit
- Re-audited Mobile login/reset-password behavior against POS Terminal user-selection and employee-login flows.
- Confirmed POS Terminal matches Mobile for sign-in endpoint usage, alcohol-check guard before 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, and app version label.
- No additional runtime change was needed for this audit slice.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Shipping route parity re-audit
- Re-audited Mobile shipping list/detail behavior against POS Terminal shipping route split-panel flow.
- Confirmed POS Terminal matches Mobile for delivery list query and status filtering, create/delete permissions, route prefill with 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, and currently hidden print-all/product-summary entry points.
- No additional runtime change was needed for this audit slice.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Settings, notification, branch, and profile parity
- Re-audited Mobile notification token, branch selection, auth/tax lookup, and employee profile password flows against POS Terminal settings/profile panels.
- Confirmed POS Terminal already matches Mobile for FCM permission/token refresh, foreground notification registration, clear-and-refresh token action, branch/warehouse filtering, branch save, and tax reload after branch selection.
- Added the Mobile-style
clearAllStorage()helper to POS Terminal and used it for stale boot sessions, API 401 logout, and explicit logout/profile password-change logout paths so branch/tax/theme/session data is cleared consistently with Mobile. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Booking price parity re-audit
- Re-audited Mobile booking price list/detail behavior against POS Terminal booking price split-panel flow.
- Confirmed POS Terminal matches Mobile for list query shape, create permission through the shared sales-order creation gate, delete permission overrides, detail edit locks by status/created date/owner, product picker and step-price item payloads, stock and booked-quantity validation, item edit/delete with total recalculation, save/create behavior, and convert-to-sales-order flow.
- No additional runtime change was needed for this audit slice beyond the shared permission alignment already covered by the customer permission update.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Customer permissions and address parity
- Re-audited Mobile customer list/detail, customer management, customer address request, and customer activation flows against POS Terminal split-panel flows.
- Fixed POS Terminal customer and sales-order creation permission constants to match Mobile: department 20 can still access the sales order menu, but can no longer create sales orders or open the customer menu through the Terminal-specific permission gates.
- Confirmed POS Terminal already matches Mobile for customer shipping type and route filters, customer-to-document blocked reasons, main-branch existing-order prompts, customer status change requests, address creation with route/GPS validation, default shipping address selection, customer address GPS update requests, draft customer approval/rejection, activation approval/rejection, and address GPS request approval/rejection.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Invoice manual payment parity
- Re-audited Mobile invoice list/detail behavior against POS Terminal invoice split-panel flow.
- Confirmed POS Terminal already matches Mobile for all/pending B1 tabs, send-to-B1 ownership/date/payment guards, cancel approval/rejection, invoice summary, duplicate order creation from invoice detail, credit-note draft creation, and invoice/pack/storage print actions.
- Fixed POS Terminal invoice mode switching so opening or leaving manual payment mode loads the list with the intended manual/default query rules immediately, instead of depending on pending React state.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Sales order list and payment parity re-audit
- Re-audited Mobile sales order list/detail/payment behavior against POS Terminal sales order and sales order review panels.
- Confirmed POS Terminal matches Mobile for list query filters, review-mode
WAITING_PAYMENTandhasShipmentfiltering, user-only toggle, retry/delete permission gates, invoice/refKey delete guards, clear pending bookings, review bulk payment, order item editing, benefit apply/remove flows, OTP confirmation, invoice creation fallback checks, cash/transfer/QR payment payloads, slip upload, QR share/check, invoice print, retry invoice, and pack/storage print flows. - No additional runtime change was needed for this audit slice.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Shipping route invoice sort parity
- Re-audited Mobile shipping route detail sorting against POS Terminal shipping route detail.
- Added POS Terminal invoice move controls for shipping route invoices when the current user can edit the delivery and the delivery has not been moved to transportation.
- Added reset/save sort actions that submit the ordered invoice id payload through the existing shipping route sort API.
- Kept sorting disabled while the invoice list is filtered so hidden invoices are not reordered accidentally.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Shipping route invoice delete reload parity
- Re-audited Mobile shipping route invoice deletion against POS Terminal shipping route detail.
- Added the Mobile-style post-delete detail reload loop in POS Terminal so deleted invoices are fetched until they disappear from the delivery detail response.
- Synced POS Terminal local invoice/product grouped state from the latest delivery detail before refreshing the surrounding split panels.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Storefront flow parity re-audit
- Re-audited Mobile storefront list/detail against POS Terminal storefront split-panel flow.
- Confirmed POS Terminal already matches the Mobile storefront list query shape (
/invoices,shippingType=2,invoiceStatus,refKeyfiltering, and duplicate filtering), card status colors, canceled invoice open guard, accept prompt rules, submit validation, lot payload, B1 submit, and cancel request flow. - No runtime change was needed for this audit slice.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Deposit, expense bill, and borrow parity sweep
- Re-audited Mobile deposit list retry/delete rules against POS Terminal and confirmed the retry filter, retry ownership override (
012265), delete department gate, card tones, and page limit already match. - Re-audited Mobile expense bill list retry/delete rules against POS Terminal and confirmed retry visibility, delete action, card tones, duplicate filtering, and page limit already match.
- Re-audited Mobile borrow detail/list permissions, status colors, service endpoints, item edit/delete rules, confirm/accept/approve/retry actions, and B1 department gates against POS Terminal.
- Adjusted POS Terminal borrow item payload
companyNamefallback order to match MobilebuildBorrowItemPayload(companyName,ComName,company) while keeping Terminal's additionalcomNamefallback. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Stock transfer and goods receipt parity sweep
- Re-audited Mobile transfer-out helpers, stock issue submit flow, product lot loading, and stock transfer-out service calls against POS Terminal.
- Confirmed POS Terminal transfer-out already matches Mobile for line sorting, numeric quantity conversion, batch payload conversion, branch/user fields,
numAtCard, and date fallbacks. - Re-audited Mobile transfer-in helpers, stock transfer-in submit flow, dummy product support, and service endpoints against POS Terminal.
- Confirmed POS Terminal transfer-in already matches Mobile for line sorting, batch date fallbacks, branch/user fields, generated batch codes, and context tab item scopes.
- Re-audited Mobile goods receipt helpers, stock-in submit validation, batch editing behavior, dummy product support, and service endpoints against POS Terminal.
- Confirmed POS Terminal goods receipt already matches Mobile behavior; Terminal keeps submit-time blank/duplicate batch guards because its inline batch editor can leave transient invalid rows that Mobile's modal save validation prevents earlier.
- No runtime code change was needed for this audit slice.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Transfer warehouse payload parity
- Re-audited Mobile transfer-warehouse list/detail, warehouse picker, header save, item add/edit/delete, and send-to-B1 flow against POS Terminal.
- Confirmed POS Terminal already matches Mobile for
/transfer-brancheslist/detail/delete endpoints, branch-scoped warehouse options, duplicate filtering, header payload fields, item save lifecycle, batch requirement before B1 submit, and B1 endpoint. - Updated POS Terminal transfer-warehouse item payload builder so batch quantities are normalized to numbers before submit, matching Mobile's item payload mapping.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Credit note parity re-audit
- Re-audited Mobile credit-note list filters, paging, return-only default, delete permissions, status colors, and
/credit-notesservice endpoints against POS Terminal. - Confirmed POS Terminal already matches Mobile for 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, and send-to-B1 validation.
- No runtime code change was needed for this audit slice.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Employee permissions parity re-audit
- Re-audited Mobile employee list/detail and transfer receive warehouse permission screens against POS Terminal.
- Confirmed POS Terminal already matches Mobile for
/userspaging/search/detail loading, employee permission patch payloads, reset-password request flow, branch warehouse permission endpoints, branch/sub-warehouse mapping, and can-approve toggle persistence. - Confirmed the Mobile transfer receive setting screen is represented in POS Terminal as an inline employee detail panel that keeps the same data contract while following the Terminal split-panel workflow.
- No runtime code change was needed for this audit slice.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Vehicle status parity re-audit
- Re-audited Mobile vehicle list/status modal against POS Terminal vehicle split-panel detail.
- Confirmed POS Terminal already matches Mobile for
/vehiclessearch loading, license-plate dedupe, vehicle status normalization (UNCHECKED,READY,NOT_READY), status labels, vehicle status note editing, and/vehicle-statuspatch payloads. - Confirmed POS Terminal keeps the same data contract while presenting the Mobile status modal as a split-panel detail form with list refresh after save.
- No runtime code change was needed for this audit slice.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Transport flow parity re-audit
- Re-audited Mobile transport list/detail helpers, service endpoints, trip start/finish, customer payment, shipping fee, delivery assignment, sort planner, print, GPS/map, deposit, and expense-bill shortcuts against POS Terminal.
- Confirmed POS Terminal already matches Mobile for
/transportslist/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, and transport flag updates. - Confirmed POS Terminal keeps the same data contract while adapting Mobile modal/navigation flows into split-panel detail actions, including inline deposit and expense-bill forms.
- No runtime code change was needed for this audit slice.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Product inventory and order shortcut parity re-audit
- Re-audited Mobile product inventory list/detail, Firestore inventory snapshot sync, booking tab filtering, product detail step-price loading, and add-to-order flow against POS Terminal.
- Confirmed POS Terminal already matches Mobile for product branch context,
products/sub-inventoriessync, Firestore inventory collection reads, item-code dedupe, positive-price filtering, booking-only filtering, product detail lookup, and/products/step-priceloading. - Confirmed POS Terminal keeps the Mobile add-to-order validation for quantity and weight-based products while adapting the order context into a Terminal customer-picker workflow that creates a sales order draft and adds the product item.
- No runtime code change was needed for this audit slice.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
2026-06-09
Core
Shared dummy product boundary
- Moved dummy product generation into
packages/utils/src/dummyProducts.tsand exportedbuildDummyProductsfrom@bsr/utils. - Kept the Mobile local
apps/mobile/src/utils/dummyProducts.tsas a compatibility re-export to the shared helper. - Updated POS Terminal goods receipt and transfer-in product pickers to use the shared helper instead of local hardcoded dummy product lists.
- Verified with
yarn workspace @bsr/mobile tsc --noEmitandyarn workspace @bsr/pos-terminal typecheck. - Docs updated:
workflows/goods-receipt-flowgovernance/change-log
Booking-price item warehouse payload parity
- Updated
BookingPriceItemPayloadto includewhsCode, matching the shared mobile order-item payload behavior. - Updated POS Terminal booking-price item payload creation so
whsCodeis sent separately fromwhGrpCode/whGrpName; warehouse group fields now fall back to the selected branch instead of falling back throughitem.whsCode. - Verified with
yarn workspace @bsr/mobile tsc --noEmitandyarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal
Sales order bulk payment parity re-audit
- Re-audited Mobile order-list bulk payment flow against POS Terminal
salesOrderReviewbulk payment modal. - Confirmed POS Terminal already matches Mobile for selectable order tracking by
orderNo, CASH/TRANSFER-only bulk payment channels, per-order/paymentcalls with zero discount/charge, invoice-amount fallback to order amount, partial-failure reporting, modal reset, selection clearing, and list refresh after submit. - No runtime code changes were required for this slice.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Sales order QR payment submit parity
- Re-audited Mobile order payment QR flow,
toOrderPaymentPayload, QR generation, duplicate-invoice guard, and POS Terminal order payment section. - Updated POS Terminal QR payment submission to match Mobile: QR payments can now be confirmed from the payment section, and the
/paymentpayload mapspaymentChannelfromQRtoCASH. - Confirmed Terminal still preserves Mobile's duplicate active-invoice guard, cash-received validation for cash payments only, QR image generation, QR share/check actions, and empty-slip success handling.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Sales order logistics payload parity
- Re-audited Mobile sales-order detail payload building, order meta save, shipping-type update pickup-date persistence, item total persistence, and print-before-update flows against POS Terminal
OrderDetailForm. - Updated POS Terminal order detail updates to use a Mobile-equivalent payload builder that only includes
vehicleReleaseanddocumentMovewhen the selected branch is a non-main branch. - Passed the selected branch into
OrderDetailFormfrom the Terminal split-pane so save/update/print persistence follows the same branch-scoped logistics payload rule as Mobile. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Booking and borrow customer shortcut payload parity
- Re-audited Mobile customer-to-booking-price and customer-to-borrow shortcuts against POS Terminal customer document shortcut handling.
- Updated POS Terminal customer document draft seeding so booking-price drafts use the first customer address for route code/name and latitude/longitude, matching Mobile's current booking-price initialization.
- Updated the shared customer document base so billing address no longer falls back to the first address when no
BillToaddress exists. - Confirmed borrow creation still matches Mobile's submitted payload boundary: borrow POST payloads use customer/branch/user/notes/borrow type fields and do not submit route/address fields.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Customer address GPS request parity re-audit
- Re-audited Mobile customer address management list/detail flows, address GPS request service endpoints, request card colors, detail map rendering, pending-only approve/reject actions, and POS Terminal customerAddressManagement split-pane implementation.
- Confirmed POS Terminal already matches Mobile for
/customer-draft/address-lat-lnglist parameters, branch-scoped search/paging,id ?? customerDraftIdrequest selection, detail loading by request id, old/new coordinate read-only maps, approved/rejected card tones, and approve/reject endpoints. - Confirmed Terminal uses the shared
@bsr/utilsdbAddresssource and string-normalized address search mapping like Mobile. - No runtime code changes were required for this slice.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Customer sales-order payload parity
- Re-audited Mobile customer list/detail/request flows, customer permission gates, customer activation approval/rejection, customer address actions, and POS Terminal customer/customerActivation split-pane implementations.
- Updated POS Terminal sales-order-from-customer payloads to match Mobile: non-route customers now send blank route code/name, and billing address no longer falls back to the first address when no
BillToaddress exists. - Confirmed POS Terminal already matches Mobile for customer list paging/search/dedupe, shipping type and route filters, request-mode
isRequest=1, activation approve/reject endpoints, call/status/address GPS/default-address actions, and customer document permission gates. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Deposit and expense bill parity re-audit
- Re-audited Mobile deposit and expense bill list/detail flows, service endpoints, create/update payload builders, retry/delete actions, transport-linked save behavior, account/company/vehicle/partner pickers, and permission gates against POS Terminal.
- Confirmed POS Terminal already matches Mobile for 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, and transport post-save updates.
- No runtime code changes were required for this slice.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Product and vehicle master parity re-audit
- Re-audited Mobile product list/detail and vehicle list/status-update flows against POS Terminal product and vehicle split-pane implementations.
- Confirmed POS Terminal already matches Mobile for 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, and vehicle status update payloads. - No runtime code changes were required for this slice.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Stock movement flows parity re-audit
- Re-audited Mobile goods receipt, transfer out, transfer in, and transfer warehouse list/detail flows, shared batch helpers, dummy product filtering, product/company search, stock-movement service endpoints, and submit/send-to-B1 payloads against POS Terminal.
- Confirmed POS Terminal already matches Mobile for 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, and branch/warehouse context mapping. - No runtime code changes were required for this slice.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Employee profile and transfer setting parity re-audit
- Re-audited Mobile employee list/detail/profile/password flows, employee permission options, department access gates, password reset/change services, and transfer receive branch/warehouse permission setting against POS Terminal
employee. - Confirmed POS Terminal already matches Mobile for 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, and branch-warehouse permission create/update payloads.
- No runtime code changes were required for this slice.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Customer management approval gate parity
- Re-audited Mobile customer-management detail/edit/address-request flows, shared
dbAddressmapping, customer draft save/update, draft child address/branch recovery, address GPS request decisions, and POS Terminal customer-management split-pane implementation. - Updated POS Terminal customer draft approve/reject action gating to match Mobile: approver permission is now the gate, without additionally hiding actions after an approved/rejected marker is present.
- Confirmed POS Terminal already matches Mobile for 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, and address GPS approve/reject pending-only actions.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Transport step-two item key parity
- Re-audited 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, and step-two customer/special rows against POS Terminal
transport. - Updated POS Terminal transport step-two item key generation to match Mobile's
typeData-customerCode-indexformat, preventing key collisions between customer rows and special rows such as gas and bank deposit entries. - Confirmed POS Terminal already matches Mobile for 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, and payment/customer-finished update sequence.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Shipping route create permission parity
- Re-audited Mobile shipping route list/detail, helper permissions, create-delivery flow, invoice add/delete/sort, lot/batch save, accept/loading/assign actions, invoice cancel request, and send-to-B1 status transitions against POS Terminal
shippingRoute. - Updated POS Terminal shipping route create permission to match Mobile's current create/finalize department set by adding department
30and removing department21from the create action gate. - Confirmed POS Terminal already matches Mobile for list paging/search/status filtering/dedupe, delivery creation plus invoice assignment, product lot validation,
CHECKLOCATIONsave sequence,DONE/SOME_DELIVERY_FAIL/PENDING_FOR_B1B1 status transitions, cancel-note validation, and sort payload behavior. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Borrow fish list/detail parity re-audit
- Re-audited Mobile borrow list/detail, borrow utility permissions, product picker stock handling, item add/edit/delete validation, B1 accept/approve/retry actions, and borrow print actions against POS Terminal
borrowFish. - Confirmed POS Terminal matches Mobile for list paging/search/dedupe, create/cancel permission rules, borrow type gating before adding products, maximum 3 items and 3 units per line, stock and edit-stock validation, item payload fields, confirm-before-B1 update sequence, accept/complete/retry endpoints, and branch-based print action selection.
- No runtime code change was required in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Booking price detail edit parity re-audit
- Re-audited Mobile booking-price list/detail, item add/edit/delete permissions, step-price and weight validation, totals persistence, and convert-to-order flow against POS Terminal booking-price split-pane behavior.
- Confirmed POS Terminal matches Mobile for list query parameters, delete permission override rules, header payload creation, item
whsCodepayload handling, add-item stock validation, edit-item original-quantity and available-stock guards, item delete permission, save gate, and convert-to-order API sequence. - No runtime code change was required in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Storefront accept prompt cancel parity
- Re-audited Mobile storefront list/detail screens, storefront list card colors, status tabs, accept prompt, batch/lot checking, cancel request, delivery lot submit flow, and POS Terminal storefront split-list/detail implementation.
- Confirmed POS Terminal matches Mobile for storefront invoice list parameters (
shippingType=2, status tabNEW), valid-ref filtering, dedupe, list colors, accept/save permissions, non-main branch accept rollout, batch auto-selection, duplicate batch guard, pending quantity validation, cancel guards, and delivery lot submit endpoints. - Updated POS Terminal storefront accept prompt so canceling the "รับงาน" prompt closes the detail pane, matching Mobile's
navigation.goBack()behavior when the user declines an unaccepted storefront job. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Current Mobile shared utility and service surface re-audit
- Re-audited the current Mobile worktree changes for shared
dbAddress, sharedbuildDummyProducts, customer/customer-management address search mapping, and Mobile service exports against POS Terminal. - Confirmed POS Terminal customer and customer-management address forms import
dbAddressfrom@bsr/utilsand use null-safe string mapping for district, amphoe, province, and zipcode values, matching Mobile's current shared-address boundary. - Confirmed POS Terminal goods receipt, transfer-in, and transfer-warehouse product pickers use shared
buildDummyProductsfrom@bsr/utils; dummy products participate in the same search filtering behavior as Mobile. - Re-ran a service export surface comparison with Terminal re-export aliases resolved (
goodsReceipt,transferIn,transferOut,user) and confirmed there are no Mobile service exports missing from POS Terminal. - No runtime code change was required in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Invoice duplicate order payload parity
- Re-audited Mobile invoice detail duplicate-order flow,
InvoiceDuplicateConfigModal, duplicate invoice seeding in Mobile order detail, and POS Terminal invoice split-pane duplicate order flow. - Confirmed POS Terminal already matches Mobile for the duplicate-order confirmation, non-main-branch
vehicleRelease/documentMovemodal, invoice detail reload, product inventory lookup, stock guard, step-price lookup, order item creation, totals update, and opening the created order in the sales-order pane. - Updated POS Terminal duplicate-order payload seeding so the new order uses the current branch/user context, blank remark, Mobile's
-address fallback, and only includesvehicleRelease/documentMovefor non-main branches, matching Mobile'sbuildOrderPayloadFromDetail(..., { includeLogisticsFields })behavior. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Credit note list/detail file-permission parity
- Re-audited 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, and POS Terminal split-list/detail implementations.
- Confirmed POS Terminal matches Mobile for status filtering, return-only filtering, create permissions, branch-scoped
/credit-noteslist parameters, document delete permissions, invoice-item add flow, item qty/amount validation, warehouse check requirements, lot update endpoint, and B1 send flow. - Updated POS Terminal credit-note detail image actions so existing credit notes can add/delete attached images while the document is not
RECEIVED, matching Mobile's image picker behavior instead of limiting file changes to the owner-only item-delete permission. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Expense bill list/detail parity audit
- Re-audited 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, and transport expense-bill flow against POS Terminal expense-bill split-list,
ExpenseBillDetailForm, and expense-bill services. - Confirmed POS Terminal matches Mobile for
/billslist parameters, branch scoping,ignoreDraft=true, dedupe bybillId/billNo, draft/retry/success card colors, retry only whenRefKeyis missing andbranchIdis not0, delete action, create payload, draft update by accounting users, company/vehicle/dealer loading, vehicle mileage/balance lookup, date edit permission viaeditDeliveryDateor accounting dept, required field validation, and transport callback update. - No runtime code change was required in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Deposit list/detail parity
- Re-audited Mobile deposit list/detail screens, deposit service, retry-only filter, delete/retry swipe actions, invoice picker, slip-later date behavior, and transport deposit flow against POS Terminal deposit split-list,
DepositDetailForm, and deposit services. - Confirmed POS Terminal matches Mobile for
/depositslist parameters,whsscoping,hasRetry, dedupe bydepositId/depositNo, card colors for deleted/retry/success states, retry owner override user012265, create/delete permissions, invoice date-range selection, selected-invoice amount/notes calculation, company/cash/bank account loading, create payload, and transport callback update. - Updated POS Terminal deposit create permission so dept
21no longer sees the create action, matching Mobile's currentcanCreateDepositDeptCodes. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Transport shipping draft amount parity
- Re-audited Mobile transport detail step-two customer shipping amount behavior against POS Terminal
TransportDetailForm. - Updated POS Terminal transport customer cards so draft transports can edit each customer's shipping amount inline before trip start, matching Mobile's editable step-two customer card.
- Added per-transport AsyncStorage draft caching for calculated/edited shipping amounts, keyed by customer and coordinates, so refresh/reopen keeps manual shipping amount edits until the trip starts, finishes, or is canceled.
- Preserved Terminal's existing customer action modal for 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
- Re-audited Mobile product list/detail screens, product inventory services, Firestore inventory subscription, booking tab, step-price loading, and add-to-order behavior against POS Terminal product split-list,
ProductDetailForm, and product services. - Confirmed POS Terminal matches Mobile for 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 by item/UOM, stock/booking/available display, weight-based amount preview, positive quantity and weight validation, create-sales-order permission gating, and create-order-plus-add-item workflow.
- Confirmed POS Terminal keeps the Mobile behavior in Terminal form by using paginated split-list loading and customer picker selection instead of Mobile navigation params/draft route state.
- No runtime code change was required in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Transfer warehouse list/detail parity audit
- Re-audited Mobile transfer-warehouse list/detail screens, warehouse picker, product picker, product lot picker, item CRUD, delete, and B1 submit behavior against POS Terminal
TransferWarehouseDetailForm, split-list normalization, list card, and transfer-warehouse services. - Confirmed POS Terminal matches Mobile for branch-scoped
transfer-branchesloading, search/dedupe bytransferBranchId/transferBranchNo, create/edit header payload, destination warehouse loading from current warehouse plus filtered sub-warehouses, company fields from the selected warehouse/first product, product inventory sync/subscription, dummy product fallback, batch loading by source warehouse and company, quantity-plus-batch item validation, item create/update/delete endpoints, B1 eligibility guard, B1 confirmation,to-b1endpoint, and transfer document delete behavior. - Confirmed POS Terminal preserves the Mobile item workflow in the Terminal split-pane modal layout and refreshes detail/list state after header save, item save/delete, and B1 submit.
- No runtime code change was required in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Transfer in list/detail parity audit
- Re-audited Mobile transfer-in list/detail screens, transfer-in services, warehouse-tab loading, product picker, product lot picker, dummy product handling, and submit payload against POS Terminal
TransferInDetailForm, split-list normalization, list card, and transfer-in services. - Confirmed POS Terminal matches Mobile for transfer-in context loading, per-warehouse
transfers-inqueries, local search/dedupe bycompany/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, batch quantity roll-up into line quantity, product line delete,numAtCardgeneration, destination branch/user payload fields, numeric amount/quantity conversion, andtransfer-insubmit endpoint. - Confirmed POS Terminal replaces Mobile's warehouse tab UI with Terminal split-list aggregation over every transfer-in tab and preserves the selected tab context as
sourceWhsCodefor added product lines. - No runtime code change was required in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Transfer out list/detail parity audit
- Re-audited Mobile transfer-out list/detail screens, transfer-out services, product lot picker behavior, and transfer-out helper validation against POS Terminal
TransferOutDetailForm, split-list normalization, list card, and transfer-out services. - Confirmed POS Terminal matches Mobile for branch-scoped transfer-out loading, local list search/dedupe by
company/docEntry/docNum, source-branch fallback, source-to-destination card display, product lot loading by 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,numAtCardgeneration, branch/user payload overrides, line sorting, numeric quantity conversion, andtransfer-outsubmit endpoint. - Confirmed POS Terminal keeps the Mobile batch picker workflow in the Terminal split-pane/modal interaction pattern and refreshes the current split list after saving.
- No runtime code change was required in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Goods receipt list/detail parity audit
- Re-audited Mobile goods receipt list/detail screens, goods receipt services, product inventory subscription, dummy product fallback, and batch editor behavior against POS Terminal
GoodsReceiptDetailForm, split-list normalization, list card, and goods receipt services. - Confirmed POS Terminal matches Mobile for branch-scoped goods receipt loading, local list search/dedupe by
company/docEntry/docNum, list card document/date/comment/user display, product inventory sync and subscription, company-aware product filtering, dummy product fallback, duplicate product guard, line delete for added products, 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, andstock-insubmit endpoint. - Confirmed POS Terminal preserves the Mobile batch workflow while using the Terminal inline batch editor; Terminal also keeps submit-time blank batch-number and duplicate batch-number guards so invalid inline edits cannot be submitted.
- No runtime code change was required in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Employee profile password parity audit
- Re-audited Mobile employee profile/password screen and auth password services against POS Terminal employee profile entry path,
EmployeeDetailForm, root logout handling, and auth services. - Confirmed POS Terminal matches Mobile for opening the current user's profile from the header/settings area, loading employee detail by user id, profile access rules for own profile or employee-menu users, reset-salt request, editable salt/reset-password fields, required-field validation, password confirmation validation,
setNewPasswordpayload fields, success feedback, clearing password form state, and logging out after password change success. - Confirmed POS Terminal keeps its existing session-clearing boundary by clearing auth token/login date/user and returning to user selection, while preserving Terminal branch/theme context.
- No runtime code change was required in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Vehicle list and status parity audit
- Re-audited Mobile vehicle list/status modal and common vehicle services against POS Terminal vehicle split-list, list card, detail form, and common services.
- Confirmed POS Terminal matches Mobile for vehicle loading/search endpoint parameters, license-plate deduping, status normalization (
UNCHECKED,READY,NOT_READY), status labels/colors/card tones, vehicle type and max-payload display, status-note editing, license-plate based status update endpoint, and list refresh after saving. - Confirmed POS Terminal's split-pane detail editor and paginated/load-more list keep the Terminal interaction pattern while preserving the Mobile vehicle status workflow.
- No runtime code change was required in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Employee transfer receive setting parity audit
- Re-audited Mobile employee detail and employee transfer receive setting screens against POS Terminal
EmployeeDetailFormand user/common services. - Confirmed POS Terminal matches Mobile for employee permission edit/save, reset-password action, transfer-receive branch loading with fallback user
999999, employee branch loading byuserCode, main/sub warehouse filtering, inclusion of the selected main warehouse when the employee already belongs to that branch, existing warehouse-permission lookup, optimistic pending toggles, create/update permission endpoints, and branch reset/back behavior. - No runtime code change was required in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Customer address GPS request parity audit
- Re-audited Mobile customer address GPS request list/detail screens and customer address latitude/longitude services against POS Terminal customer address management split-list and detail form.
- Confirmed POS Terminal matches Mobile for customer-management permission gating, branch-scoped list loading, search/pagination, request deduping by
id/customerDraftId, approved/rejected card tones, requester/approver/rejecter metadata, detail lookup, old/new coordinate display, read-only Google map rendering, pending-only approve/reject actions, confirmation prompts, API endpoints, and detail/list refresh after decisions. - No runtime code change was required in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Customer management edit pending child parity
- Re-audited Mobile customer management edit/detail flows against POS Terminal
CustomerManagementDetailFormand customer draft services. - Confirmed POS Terminal matches Mobile for draft core validation, name-length limit, phone formatting, customer type and know-us pickers, approve/reject permission checks, address search from shared
dbAddress, route picker, GPS/map coordinate capture, address route requirement for delivery customers, branch duplicate guard, and at-least-one-branch delete guard. - Updated POS Terminal customer-management draft creation so addresses and billing branches can be added, edited, and removed locally before the core draft is created, then posted as child records after
createCustomerDraft, matching Mobile's pending address/branch behavior. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Order detail and payment parity audit
- Re-audited Mobile order detail, order payment screen, order services, order-payment utilities, and invoice/payment helper behavior against POS Terminal
OrderDetailFormand order services. - Confirmed POS Terminal matches Mobile for order list/detail endpoints, order item CRUD endpoints, shipping-type update, pickup-date auto-fill for storefront orders, non-main-branch
documentMove/vehicleReleaseguards, shipping address/GPS validation before invoice/payment actions, and storage print remark requirements. - Confirmed POS Terminal matches Mobile for 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, and payment submit payload fields.
- Confirmed POS Terminal preserves the Mobile benefit flows for point, coupon, and credit-note discounts, including credit-note company-amount checks and OTP confirmation.
- No runtime code change was required in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Product picker and order-item validation parity
- Re-audited Mobile shared product picker/order item flow for order and booking against POS Terminal
ProductPickerModal, booking detail, and order detail flows. - Confirmed POS Terminal matches Mobile for product filters (
ALL,LASTED,CHANGEPRICE,HOT), customer last-buy data, changed-price and hot-product markers, step-price loading, quick quantity choices, duplicate item editing, booking stock validation, and borrow quantity/stock limits. - Updated POS Terminal order item add/edit validation so quantities must be whole numbers, must be greater than zero, and cannot exceed available stock; editing an existing order item now uses available stock plus the original item quantity, matching Mobile order detail behavior.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Customer list and picker parity audit
- Re-audited Mobile
CustomerListfilters, customer request mode, route lookup, pagination/dedupe behavior, customer card data, and primary document actions against POS Terminal customer list panes andCustomerPickerModal. - Confirmed POS Terminal matches Mobile for SAP customer query parameters, including
shippingType, selected branchbranchId,routeCode, and request-modeisRequest=1for customer activation/open-close requests. - Confirmed POS Terminal keeps Mobile's current route loading behavior by using the active branch code for
getRoutesByBranch, preserves separate route/shipping filters for customer and customer activation lists, and keeps the picker scoped to booking, borrow, and sales-order creation flows. - No runtime code change was required in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Printing and print-log parity
- Re-audited Mobile order, borrow, invoice, shipping invoice, shipping product summary, and Firestore print-log behavior against POS Terminal printing.
- Confirmed POS Terminal matches Mobile for print log collection
print,NoDetailcount lookup,NoPrintincrement,UserCode, non-blocking print-log failures, invoice QR assets, branch tax data usage, and shared order/borrow/invoice templates. - Updated POS Terminal invoice printing so
printIndexis passed through the invoice template options and shipping invoice printing callsprintInvoicewith that option, matching Mobile's shipping invoice sequence numbering. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Swipeable row parity
- Re-audited Mobile
SwipeableFlashListrow behavior against POS TerminalSwipeableRowand list-pane swipe actions. - Confirmed POS Terminal matches Mobile for left/right action layout, gesture thresholds, action touch enabling only while open, tap-to-close overlay, auto-close after action touch, and closing the previously opened row in list panes.
- Updated POS Terminal
SwipeableRowimperative methods to exposeopenLeftandopenRightalongsideclose/reset, matching Mobile's swipeable row method contract. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Alcohol-check login parity
- Re-audited Mobile login alcohol-check guard, reset-password fallback, FCM patch, and session save order against POS Terminal user-selection login.
- Confirmed POS Terminal matches Mobile for alcohol-check department gates, bypass user codes, UAT bypass,
/alcohol/check-statusrequest, failed-check message, missing-required-values reset flow, password reset salt, and new-password submission. - Updated POS Terminal login ordering so, after a successful sign-in and alcohol check, the auth token, user profile, and login date are saved before FCM token refresh and user patching, matching Mobile's current login sequence.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Branch selection and settings parity audit
- Re-audited Mobile branch selection and branch settings navigation against POS Terminal's branch/user/home flow.
- Confirmed POS Terminal matches Mobile for loading all branches with fallback user
999999, loading current-user branches, selecting a main branch, loading/filtering sub-warehouses, only showing the main warehouse when the user has access to that branch, and saving the selected warehouse as the active branch. - Confirmed POS Terminal matches Mobile's current app-entry rule by requiring a selected branch before login/home but treating branch tax data as best-effort after branch save, so a tax lookup failure does not block navigation.
- Confirmed POS Terminal keeps Mobile's post-login branch-changing behavior in Terminal form through the UserSelection and Home settings entry points.
- No runtime code change was required in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Notification and FCM token parity re-audit
- Re-audited Mobile notification service, Home foreground handler, login FCM token patch, and
NotificationsScreentoken tools against POS Terminal. - Confirmed POS Terminal matches Mobile for Firebase Messaging background handler registration, notification permission request, device registration, token retrieval, foreground notification handler, login-time
fcmTokenpatching, token refresh, and clear-and-refresh token helper. - Confirmed POS Terminal exposes the notification token diagnostics in the Home settings panel, preserving Mobile's
NotificationsScreentoken refresh and clear-token behavior in Terminal form. - No runtime code change was required in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Required app update gate parity audit
- Re-audited Mobile required app update flow against POS Terminal login/home flow.
- Confirmed POS Terminal matches Mobile for native app version retrieval on Android/iOS, Firestore
version/vapplookup, platform-specific remote version fields, required-update comparison, version label formatting, and the blocking update modal. - Confirmed POS Terminal wires the update gate into the Terminal-specific user-selection login screen and Home screen refresh path, preserving Mobile's login-screen check behavior in Terminal's branch/user/home flow.
- No runtime code change was required in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Shared address and dummy utility parity re-audit
- Re-audited Mobile's current
@bsr/utilsmigration fordbAddressandbuildDummyProductsagainst POS Terminal customer, customer-management, goods-receipt, transfer-in, and transfer-warehouse flows. - Confirmed POS Terminal already imports
dbAddressandbuildDummyProductsfrom@bsr/utils, matching Mobile's current shared utility boundary. - Confirmed POS Terminal customer and customer-management address search maps
district,amphoe, andprovincewith null-safe string conversion, matching Mobile's current address picker behavior. - Confirmed POS Terminal stock document product pickers continue to use the shared dummy-product builder for Mobile-compatible dummy item data.
- No runtime code change was required in this pass.
- Verified with
yarn workspace @bsr/mobile tsc --noEmitandyarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Borrow fish parity audit
- Re-audited Mobile borrow-fish list/detail and product flow against POS Terminal
borrowFishsplit-panel detail. - Confirmed POS Terminal matches Mobile for
/borrowlist loading with selected warehouse group, page size 200, search, pagination, dedupe, main-branch menu access, cancel permission guards, and delete endpoint. - Confirmed POS Terminal matches Mobile for borrow detail create/update payloads, draft persistence before adding products, product quantity and stock validation, maximum 3 items and 3 units per item, item add/edit/delete endpoints, borrow-type selection, confirm flow, accept flow, approve/retry flow, and main-branch vs storage-room print actions.
- Updated POS Terminal create permission for borrow fish to remove department
20, matching Mobile's currentcanCreateBorrowgate while keeping menu visibility unchanged. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Storefront shipping parity audit
- Re-audited Mobile storefront list/detail and stock-cut flow against POS Terminal
shippingStorefrontsplit-panel detail. - Confirmed POS Terminal matches Mobile for storefront invoice list loading through
/invoiceswith selected branch,shippingType=2, status tabs for all/NEW, search, pagination,refKeyfiltering, dedupe, and card status colors. - Confirmed POS Terminal matches Mobile for detail loading, accept prompt and permission gates, main/non-main branch handling, product check editing, batch auto-select and manual batch editor, duplicate/available/pending quantity validation, submit guards for
refKey, cancel request, and checked item count. - Confirmed POS Terminal matches Mobile for the B1 stock-cut sequence: add invoice to delivery when missing, submit delivery lots with storefront invoice lot payload, then create delivery, followed by detail/list refresh.
- Confirmed POS Terminal matches Mobile for storefront cancel guards and
POST /invoices/:id/cancelnotes payload. - No runtime code change was required in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Deposit parity audit
- Re-audited Mobile deposit list/detail and transport-to-deposit flow against POS Terminal deposit split-panel detail.
- Confirmed POS Terminal matches Mobile for
/depositslist loading with selected warehouse group,hasRetryfilter, page size 200, search, dedupe, card tones, delete permission departments, retry owner/override guard, and delete/retry endpoints. - Confirmed POS Terminal matches Mobile for 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, department
14/30invoice-selection block, send-slip-later date toggle, and transport context saving throughflagBank=1. - Confirmed POS Terminal intentionally keeps department
21on the create action because the Terminal list-pane create entry maps to Mobile Home's deposit shortcut permission, while Mobile's list floating button uses a narrower screen-local gate. - No runtime code change was required in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Credit note parity audit
- Re-audited Mobile credit note list/detail, helper permissions, item editing, lot location, image upload, and B1 submission against POS Terminal credit note split-panel detail.
- Confirmed POS Terminal matches Mobile for credit-note list loading with selected branch, status filter, default return-only filter (
isReturn=1), search, pagination, dedupe, card status labels/colors, create permission, and delete permission guards. - Confirmed POS Terminal matches Mobile for create/update payload fields, next-status rules, owner-only item add/edit/delete, department gates for quantity/location editing, warehouse check gates,
postCreditNoteToB1followed byRECEIVEDupdate, item lots payload, and image upload/delete endpoints. - Confirmed invoice-to-credit-note entry from invoice detail keeps the Mobile route behavior inside the Terminal split-panel flow.
- No runtime code change was required in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Expense bill parity audit
- Re-audited Mobile expense bill list/detail and transport-to-expense flow against POS Terminal expense bill split-panel detail.
- Confirmed POS Terminal matches Mobile for
/billslist loading with selected branch andignoreDraft=true, page size 200, search, dedupe, card colors, retry visibility whenRefKeyis empty andbranchIdis not0, delete/retry endpoints, and main-branch menu access. - Confirmed POS Terminal matches Mobile for create/update payload fields, company code normalization, gas partner loading, vehicle/mileage lookup, back-date permission using
editDeliveryDateor accounting department, draftbranchId=0accounting-only update, and transport context saving withflagGas=1. - No runtime code change was required in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Vehicle status parity audit
- Re-audited Mobile vehicle list/status modal against POS Terminal vehicle split-panel detail.
- Confirmed POS Terminal matches Mobile for vehicle list loading through
getVehicles, search, license-plate dedupe, status normalization, vehicle card status tones, andPATCH /vehicles/:licensePlate/vehicle-statuspayload withvehicleStatusandvehicleStatusNote. - Confirmed POS Terminal keeps the Mobile status modal behavior as a Terminal detail panel and refreshes the list after saving.
- No runtime code change was required in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Employee detail permission action parity
- Re-audited Mobile employee list/detail/profile and transfer receive setting screens against POS Terminal
EmployeeDetailForm. - Updated POS Terminal employee detail action buttons so saving permission changes and resetting another employee's password are disabled when the current user cannot manage employee permissions, matching Mobile's disabled action behavior.
- Confirmed POS Terminal already matches Mobile for employee list/detail loading, permission flag payloads, reset-password salt request, own-password reset flow, transfer receive branch/warehouse permission loading, and 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
- Re-audited Mobile product list/detail behavior against POS Terminal product split-panel detail.
- Updated POS Terminal product detail so the add-to-sales-order action is only wired when the current user can create sales orders, matching the Mobile create-order permission boundary used by product-to-order flows.
- Confirmed POS Terminal already matches Mobile for inventory list loading, all/booked tabs, product detail loading, step-price display, weight-based validation, and order-item payload fields.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Customer address management permission parity
- Re-audited Mobile customer address GPS request management screens against POS Terminal
customerAddressManagement. - Updated POS Terminal customer-management menu permissions so departments
14and30can open customer management and customer address management flows, matching MobilegetCustomerManagementAccess. - Confirmed POS Terminal already matches Mobile for GPS request list loading, detail loading, pending-only approve/reject actions, read-only old/new coordinate maps, and
address-lat-lng/:id/approve|rejectendpoints. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Customer activation request parity audit
- Re-audited Mobile customer request mode against POS Terminal
CustomerActivationDetailForm. - Confirmed POS Terminal matches Mobile for request-list loading with
isRequest=1, detail loading throughgetCustomerSapById, approve/reject endpoints usingcustomerCode, request permission departments[2, 4, 7, 16, 29]plus admin, confirmation prompts, success/error feedback, and returning to the list after a resolved request. - No runtime code change was required in this pass.
- Docs updated:
governance/change-log
Customer detail action permission parity
- Re-audited Mobile customer detail permissions, address actions, status requests, GPS update requests, default shipping address updates, call logging, edit entry, and customer-to-document creation actions against POS Terminal
CustomerDetailForm. - Updated POS Terminal customer-detail document action permission so department
20no longer sees sales order, booking price, and borrow creation buttons from the customer detail panel; this matches Mobile customer detail, which usesgetSalesOrderAccess().canCreateSalesOrderand does not include department20there. - Kept the broader Mobile Home shortcut/list create behavior separate from customer-detail actions.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Transport trip and payment action parity audit
- Re-audited Mobile
TransportDetailScreen, transport helpers, and transport service calls against POS TerminalTransportDetailFormandTransportDetailHelpers. - Confirmed POS Terminal matches Mobile for transport edit ownership, finalize-delivery permission, sort-planner ownership guard, start-trip guard, finalized-delivery requirement, mileage validation,
startTransportpayload with customer shipping amounts, SAP-error feedback, finish-trip guard, bank/gas completion guard, and finish mileage validation. - Confirmed POS Terminal matches Mobile for customer payment modal state, cash/transfer/other/shipping payment types, payment validation, QR generation, photo/slip/signature uploads,
payTransportpayload including current coordinates, customer status update, transport shipping create/retry/retry-cancel/delete actions, and deposit/expense bill contexts that updateflagBank/flagGas. - No runtime code change was required in this pass.
- Docs updated:
governance/change-log
Shipping action permission parity audit
- Re-audited Mobile shipping list/detail permission helpers against POS Terminal shipping route list/detail helpers.
- Confirmed POS Terminal matches Mobile shipping detail action permissions for finalize/create-route detail actions, accept work, dock/loaded confirmation, assignment, B1 submission, product checking, invoice add/delete, and invoice cancel request guards.
- Confirmed POS Terminal keeps its list-pane create entry mapped to the Mobile Home shipping shortcut permission, while detail finalize permissions match Mobile
ShippingDetailhelper behavior. - No runtime code change was required in this pass.
- Docs updated:
governance/change-log
Deposit create permission parity
- Re-audited Mobile Home
CAN_CREATE_DEPOSITshortcut permissions against POS Terminal deposit list create gate. - Updated POS Terminal deposit create permission so department
21can create deposit drafts from the Terminal list pane, matching Mobile's deposit shortcut behavior. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Customer document and borrow create permission parity
- Re-audited Mobile Home
CAN_CREATE_ORDERshortcut permissions against POS Terminal customer document and borrow create gates. - Updated POS Terminal create-shortcut/list behavior so department
20can use sales order, booking price, and borrow create flows where Terminal maps to Mobile Home shortcut behavior. - Updated POS Terminal borrow list create permission so department
20can create borrow documents from the Terminal list pane, matching Mobile's borrow shortcut behavior. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Mobile route and home shortcut coverage audit
- Re-audited Mobile
RootNavigatorroute coverage and Home shortcut navigation against POS Terminal's single-Home split-panel navigation model. - Confirmed Mobile list/detail routes for 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, and employee flows are represented by POS Terminal menu keys, split-list loaders, and detail forms.
- Confirmed Mobile standalone routes for branch settings, notifications, print demo, and employee profile are represented by POS Terminal Home settings actions/modals and employee detail profile opening.
- Confirmed Mobile Home shortcut routes are represented in Terminal through list-pane create actions and customer picker flows for sales order, booking price, borrow, shipping route, transport, and deposit drafts.
- No runtime code change was required in this pass.
- Docs updated:
governance/change-log
Mobile service export surface parity audit
- Re-audited Mobile and POS Terminal service export surfaces across
apps/mobile/src/servicesandapps/pos-terminal/src/services, resolving Terminalexport *compatibility aliases before comparing. - Confirmed POS Terminal has no missing Mobile service exports after resolving
goodsReceipt.ts->goodsReceipts.ts,transferIn.ts->transferIns.ts,transferOut.ts->transferOuts.ts, anduser.ts/users.tsservice boundaries. - Confirmed remaining service export differences are Terminal-specific helpers such as split-list loaders, Terminal product list helpers, and Terminal delivery/status helpers, not Mobile APIs missing from Terminal.
- No runtime code change was required in this pass.
- Docs updated:
governance/change-log
Shared address and dummy utility parity audit
- Re-audited the current Mobile shared utility changes for
dbAddressandbuildDummyProductsagainst POS Terminal customer address forms and stock document product pickers. - Confirmed POS Terminal already imports
dbAddressandbuildDummyProductsfrom@bsr/utils, matching Mobile's updated shared boundary instead of keeping local copies. - Confirmed POS Terminal customer and customer-management address search mappings use the same null-safe string conversion for
district,amphoe, andprovincevalues that Mobile now uses. - Confirmed POS Terminal goods receipt, transfer-in, and transfer-warehouse product pickers use the shared dummy-product builder, preserving Mobile-compatible dummy item data in Terminal stock flows.
- No runtime code change was required in this pass.
- Docs updated:
governance/change-log
Invoice list, manual payment, and detail parity audit
- Re-audited Mobile
InvoiceListScreen,InvoiceDetailScreen, and invoice service behavior against POS Terminal invoice list/detail panels. - Confirmed POS Terminal matches Mobile for invoice list/detail, pending-B1 query, sales summary, send-to-B1, retry, cancel approve/reject/cancel service endpoints, and query shapes.
- Confirmed POS Terminal matches Mobile for 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, and invoice-to-credit-note action in the split-panel layout. - No runtime code change was required in this 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
Notification and FCM token parity audit
- Re-audited Mobile notification service and login FCM refresh behavior against POS Terminal notification handling.
- Confirmed POS Terminal matches Mobile for 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, and login-time FCM token patching onto the user record.
- Confirmed POS Terminal keeps the same token refresh behavior while exposing the token inside Terminal settings/home for device troubleshooting.
- No runtime code change was required in this 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
Login and user-selection parity audit
- Re-audited Mobile
LoginScreenagainst POS Terminal'sUserSelectionScreen. - Confirmed POS Terminal matches Mobile for
POST /login, alcohol-check verification before login, auth token persistence, user persistence, login-date persistence, FCM token refresh, permission flag patching through user update, missing-required-values password reset fallback, reset salt lookup, and new password submission. - Confirmed POS Terminal keeps the same login data flow in a Terminal-specific user-selection layout by loading branch sale persons first, supporting selected-user password login, and retaining a direct employee-code login path for users not shown in the branch sale-person list.
- No runtime code change was required in this 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
Required app update gate parity audit
- Re-audited Mobile login app-version/update gate against POS Terminal's user-selection login flow.
- Confirmed POS Terminal matches Mobile for native app-version lookup, version label display, Firestore
version/vapprequired-update check, platform-specific remote version fields, forced update modal behavior, and non-blocking warning behavior when the version check fails. - Confirmed POS Terminal shows the same required-update modal on the login/user-selection surface and refreshes the update check when the user refreshes the user-selection screen.
- No runtime code change was required in this 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
Branch selection parity audit
- Re-audited Mobile
BranchScreenagainst POS Terminal'sBranchScreenand app-level branch settings flow. - Confirmed POS Terminal matches Mobile for loading all branches with fallback user
999999, loading current-user branches, selecting a main branch, loading all warehouses plus sub-warehouses, filtering main warehouse codes out of sub-warehouse choices, re-inserting the selected main warehouse when the current user can access it, saving the selected warehouse payload, clearing/saving tax data by branch, and treating tax lookup as best-effort after navigation. - Confirmed POS Terminal preserves the same branch-required and branch-settings navigation behavior through app-level
onBranchSelectedcallbacks while keeping Terminal-specific theme/settings controls. - No runtime code change was required in this 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
Order list and review bulk-payment parity audit
- Re-audited Mobile
OrderListScreendefault mode andshipping-reviewmode against POS Terminal'ssalesOrderandsalesOrderReviewsplit lists. - Confirmed POS Terminal matches Mobile for order search, shipping-type filter, status filter, user-only filter behavior, sales-order create permission, retry-pending action, delete permission overrides, and list pagination/refresh behavior.
- Confirmed POS Terminal
salesOrderReviewmatches Mobile's review mode by forcingWAITING_PAYMENT, forcing the current user's orders, filtering out orders with shipments, supporting selected-order bulk clear/payment, and posting each selected order to/paymentwith the same cash/transfer payload shape and partial-failure messaging. - No runtime code change was required in this 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
Order payment flow parity audit
- Re-audited Mobile
OrderPaymentScreen,OrderListScreenbulk payment, and order payment utilities against POS Terminal'sOrderDetailFormpayment section and sales-order bulk-payment modal. - Confirmed POS Terminal matches Mobile for loading order detail and related invoices, creating missing invoices before payment, active/canceled invoice filtering, duplicate invoice-prefix guard, cash/transfer/QR payment channels, cash-received validation, transfer slip upload through
orderUploadImage, QR generation/share/check throughgeneratePaymentQrCode, invoice retry, invoice print, andPOST /paymentpayload shape. - Confirmed POS Terminal keeps the same payment behavior in its split-panel form instead of Mobile's separate
OrderPaymentroute, and refreshes the detail/list after payment or QR confirmation. - No runtime code change was required in this 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
Transfer warehouse submit and B1 close parity
- Re-audited Mobile
TransferWarehouseListScreenandTransferWarehouseDetailScreenagainst POS Terminal'stransferWarehousesplit-list/detail form. - Confirmed POS Terminal matches Mobile for the
transfer-brancheslist/detail/create/update/delete endpoints, warehouse/sub-warehouse picker context, item create/update/delete endpoints, product and batch selection, send-to-B1 endpoint, and transfer-branch payload shape. - Updated POS Terminal Transfer Warehouse success handling so header save and send-to-B1 success confirmations close the open split-panel detail, matching Mobile's
navigation.goBack()behavior while preserving the existingonSavedpath used to patch newly created header details. - 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
- Re-audited Mobile
TransferInListScreenandTransferInDetailScreenagainst POS Terminal'stransferInsplit-list/detail form. - Confirmed POS Terminal matches Mobile for the
transfers-inlist endpoint,transfer-insubmit endpoint, warehouse context tabs, product picker, product-lot picker, duplicate batch guard, pending quantity calculation, quantity validation, and transfer-in payload shape. - Updated POS Terminal Transfer In submit success handling to close the open split-panel detail after the success confirmation, matching Mobile's
navigation.replace('TransferInList')behavior and preventing repeated submits from the same still-open 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
- Re-audited Mobile
TransferOutListScreenandTransferOutDetailScreenagainst POS Terminal'stransferOutsplit-list/detail form. - Confirmed POS Terminal matches Mobile for the
transfers-outlist endpoint,transfer-outsubmit endpoint, source-warehouse context, transfer list dedupe, pending quantity calculation, product-lot picker, duplicate batch guard, pending quantity validation, and transfer-out payload shape. - Updated POS Terminal Transfer Out submit success handling to close the open split-panel detail after the success confirmation, matching Mobile's
navigation.replace('TransferOutList')behavior and preventing repeated submits from the same still-open 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
- Re-audited Mobile
GoodsReceiptListScreenandGoodsReceiptDetailScreenagainst POS Terminal'sgoodsReceiptsplit-list/detail form. - Confirmed POS Terminal matches Mobile for the
goods-receipt-polist endpoint,stock-insubmit endpoint, company-filtered product picker, dummy product fallback, line quantity validation, batch quantity validation, duplicate batch-number guard, and stock-in payload shape. - Updated POS Terminal Goods Receipt submit success handling to close the open split-panel detail after the success confirmation, matching Mobile's
navigation.goBack()behavior and preventing repeated submits from the same still-open 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
- Re-audited Mobile
ProductListScreenandProductDetailScreenagainst POS Terminal'sproductsplit-list/detail panel. - Confirmed POS Terminal keeps the same branch inventory context, Firestore inventory source, product search, price-positive filtering, duplicate item-code filtering, and
bookingstock tab behavior throughgetProductInventoryList. - Confirmed Terminal exposes the Mobile
ทั้งหมด/ติดจองproduct tabs in the list controls and resets pagination/detail selection when switching tabs. - Confirmed Terminal product detail loads the same warehouse-scoped inventory detail by
itemCode, fetches step prices whenstepPriceFlagis present, displays stock/booking/available/price and product metadata, and supports adding the product into a new sales order through Terminal's customer-picker flow. - No runtime code change was required in this 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
Customer detail address and GPS request parity audit
- Re-audited Mobile
CustomerDetailScreenaddress management and GPS request behavior against POS Terminal's customer detail split-panel form. - Confirmed POS Terminal matches Mobile for customer address creation through
createCustomerAddressByPass, shipping-route validation for route customers, setting default ShipTo addresses, opening map/navigation actions, and refreshing detail after address mutations. - Confirmed POS Terminal sends customer address GPS requests through the same
customer-draft/address-lat-lngendpoint with current device coordinates and note text, matching Mobile's request queue behavior. - Confirmed Terminal keeps its POS-specific map picker for adding manual address coordinates while preserving the Mobile request-GPS flow for existing addresses.
- No runtime code change was required in this 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
Customer activation request parity audit
- Re-audited Mobile customer request mode (
CustomerList/CustomerDetail) against POS Terminal'scustomerActivationsplit-list/detail panel. - Confirmed POS Terminal loads only customer activation requests with
isRequest=1, while preserving search, shipping-type, and route filters through the shared customer list endpoint. - Confirmed POS Terminal uses the same
/customers/:customerCode/approveand/customers/:customerCode/rejectendpoints as Mobile, with the same request-permission department guard. - Confirmed Terminal refreshes the activation request list and closes the detail panel after approve/reject success, matching Mobile's
navigation.goBack()behavior in Terminal's split-panel format. - No runtime code change was required in this 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
Customer draft decision refresh parity
- Re-audited Mobile customer draft detail/edit approval behavior against POS Terminal's
customerManagementsplit-panel detail form. - Confirmed POS Terminal already matches Mobile for customer draft endpoints, draft detail loading with addresses/branches, create/update draft payloads, child address/branch creation, auto-create ShipTo, branch delete guard, and approve/reject endpoints.
- Updated POS Terminal customer draft approve/reject handling to refresh the open detail panel after the decision as well as the list; this keeps Terminal's split-panel state aligned with Mobile's behavior of leaving the detail screen after a decision.
- Added a Terminal-only decision guard so approve/reject buttons are hidden once the refreshed draft already has an approved or rejected marker, preventing repeated decisions from the still-open 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
- Re-audited Mobile
CustomerManagementAddressListScreenandCustomerManagementAddressDetailScreenagainst POS Terminal'scustomerAddressManagementsplit-list/detail panel. - Confirmed POS Terminal uses the same
customer-draft/address-lat-lnglist/detail endpoints and approve/reject endpoints as Mobile. - Confirmed list card colors match Mobile for approved/rejected/pending requests, including approved green and rejected red tones.
- Confirmed Terminal detail view preserves the same old/new coordinate maps, request metadata, pending-only approve/reject actions, confirmation prompts, success/error alerts, and refresh-after-decision behavior in Terminal's split-panel format.
- No runtime code change was required in this 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
Employee transfer receive setting parity audit
- Re-audited Mobile
EmployeeTransferReceiveSettingScreenagainst POS Terminal's employee detail warehouse-permission section. - Confirmed POS Terminal uses the same
/users/:userId/branches/:branchId/warehousesget/create/update endpoints and the samegetBranchesByUserCode,getWarehouses, andgetWarehousesSubdata sources as Mobile. - Confirmed branch selection, selected-user branch inclusion, sub-warehouse filtering, optimistic permission toggles, duplicate-pending guards, and reload-after-save behavior match Mobile while remaining embedded in Terminal's employee detail panel.
- Confirmed Terminal preserves employee-management permission guards before opening or changing warehouse permissions; no runtime code change was required in this 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
Print demo utility parity audit
- Re-audited Mobile
PrintDemoScreenandprinting/printhelpers against POS Terminal's settings-menu print demo action andprintDemoSample. - Confirmed POS Terminal sends the same 16K (184mm x 260mm) sample HTML through
react-native-print, with the same sample product rows and print-page sizing as Mobile. - Confirmed Terminal exposes the demo through the Home settings menu with Terminal-style loading and error alert handling, matching Mobile's dedicated
PrintDemoroute behavior in the Terminal shell format. - No runtime code change was required in this 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
Notification screen and token modal parity audit
- Re-audited Mobile
NotificationsScreenand notification service helpers against POS Terminal's Home notification settings modal andservices/notifications. - Confirmed POS Terminal uses the same Firebase Messaging permission request, foreground/background handler registration, token refresh, and clear-and-refresh token helpers as Mobile.
- Confirmed Terminal exposes the token inspection and
clearAndRefreshTokenaction through the Home settings notification modal, matching Mobile's notification screen behavior in Terminal's settings-modal format. - Confirmed Terminal also refreshes the FCM token during user login and persists it through the user update payload; no runtime code change was required in this 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 detail invoice item source parity
- Re-audited Mobile credit-note detail item-add flow against POS Terminal credit-note split-panel detail behavior.
- Updated POS Terminal persisted credit-note detail loading to fetch the linked invoice detail when
invoiceIdis present and attachsourceInvoiceItemsto the detail payload. - This keeps the Terminal add-item picker available after opening an existing credit note from the list, matching Mobile's behavior of loading invoice detail for existing credit notes before selecting invoice items.
- Confirmed the existing Terminal detail flow already mirrors Mobile for reason guard, save status transition, B1 location/check validations, item qty/amount validation, lot update, image upload/delete endpoints, item delete, and list refresh after mutations.
- 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
- Re-audited Mobile credit-note list behavior against POS Terminal credit-note split-list behavior.
- Confirmed POS Terminal already matches Mobile for the
/credit-noteslist query, default return-only filter, status filter options, delete permission/disabled logic, delete confirmation, and refresh after delete. - Updated POS Terminal credit-note card colors to match Mobile's
getCreditNoteCardColormapping:NEWnow uses draft cyan,WAITINGCNuses waiting lime,APPROVED/APPROVEuse approved purple, andCANCELEDfalls through to the error orange color. - 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
- Re-audited Mobile vehicle list/status modal behavior against POS Terminal vehicle split-list and detail form.
- Confirmed POS Terminal uses the same
/vehicleslist endpoint and/vehicles/:licensePlate/vehicle-statusupdate endpoint as Mobile. - Confirmed status normalization, labels, card background/border/status colors, search/refresh behavior, status note editing, license-plate guard, and list refresh after save match Mobile's current vehicle behavior; Terminal keeps the same behavior in split-panel form instead of Mobile's modal.
- No runtime code change was required in this 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
Deposit and expense bill detail parity audit
- Re-audited Mobile deposit detail and expense bill detail screens against POS Terminal split-panel detail forms.
- Confirmed POS Terminal deposit detail already matches Mobile's current create/read behavior for default branch/user context, company/cash/bank pickers, invoice multi-select total/notes behavior, slip-later date handling, save validation, deposit payload shape, and transport-flow update.
- Confirmed POS Terminal expense bill detail already matches Mobile's current create/update behavior for branch draft update context, accounting-only draft save guard, company/vehicle/partner pickers, vehicle mileage lookup, slip-later date handling, save validation, payload shape, and transport-flow update.
- No runtime code change was required in this 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
Deposit and expense bill list visual parity
- Re-audited Mobile deposit and expense bill list actions against POS Terminal split-list behavior.
- Confirmed retry filters, retry/delete actions, action permissions, retry ownership checks, list refreshes, and API list parameters match the current Mobile behavior.
- Updated POS Terminal deposit and expense bill list-card border colors to match Mobile status tones: deposit cards now use the same status color for border/background, and expense bill cards now use
borderDatafor draft/confirmed cards andborderOtherfor retry-error cards. - 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
- Re-audited Mobile borrow-fish list card helpers and detail action guards against POS Terminal borrow split-list/detail behavior.
- Confirmed POS Terminal already matches Mobile's current borrow behavior for list card colors, status labels, customer/borrower/approver display, cancel permissions, B1 processing permissions, accept action, complete/retry action, and confirmation messages; no runtime code change was required in this 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
Booking price server-date card parity
- Re-audited Mobile booking-price list card coloring against POS Terminal booking-price split-list cards.
- Updated POS Terminal booking-price card color selection to use the shared server date label from Home when deciding whether a DRAFT booking price was created today, matching Mobile's
serverDateLabelbehavior and avoiding device-clock drift. - 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
- Re-audited Mobile sales-order list card status colors against POS Terminal split-list order cards.
- Updated POS Terminal
RECEIVEDsales-order cards to use Mobile's received/confirmed green instead of theNEWyellow-green, so received orders are visually separated from new orders in the 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
- Re-audited Mobile manual-payment invoice card colors against POS Terminal invoice split-list cards.
- Updated POS Terminal invoice card tone selection to use Mobile's manual-payment colors: selected invoices stay green, route-delivery cash invoices are green, route-delivery transfer/bill-payment invoices are yellow, route-delivery invoices without a payment marker are red, and storefront invoices are cyan.
- 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
- Re-audited Mobile order payment/current-source flow against POS Terminal order payment panel, including invoice creation, duplicate-invoice blocking, QR generation/share/check, invoice print/retry, slip upload, payment payload shape, and benefit-discount handling.
- Updated POS Terminal payment opening to run Mobile-equivalent invoice guards before loading or creating invoices: non-main branch logistics selection, net amount after benefits, duplicate product codes, required weight for weight-based items, and 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
- Re-audited Mobile invoice list/detail flow against POS Terminal, including default and 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, and duplicate-order-from-invoice config.
- Confirmed POS Terminal already matches Mobile's current invoice behavior while preserving Terminal-only split-pane and credit-note-from-invoice extensions; no runtime code change was required in this 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
Sales order shipping coordinate parity
- Re-audited Mobile sales-order detail flow against POS Terminal order detail, including 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, and print actions.
- Updated POS Terminal order payment opening to block route-delivery orders when the shipping address is missing or the selected shipping address lacks latitude/longitude, matching Mobile's recheck before opening invoice/payment.
- Reused Mobile's missing-coordinate message so operators know to reselect/update the shipping address before continuing.
- 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
- Re-audited Mobile product list/detail flow against POS Terminal, including 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, and add-to-sales-order behavior.
- Confirmed POS Terminal already matches Mobile's current product behavior while preserving Terminal's split-pane pagination and customer-picker add-to-sales-order flow; no code change was required in this 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
Required app update parity audit
- Re-audited Mobile required app update flow against POS Terminal, including Firestore
version/vapplookup, platform-specific remote version fields, native app version code comparison, hook error handling, blocking update modal, login-screen coverage, and authenticated Home/header coverage. - Confirmed POS Terminal already matches Mobile's current required-update behavior while preserving Terminal's separate user-selection and Home surfaces; no code change was required in this 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
Login alcohol gate parity audit
- Re-audited Mobile login alcohol-check gate against POS Terminal user selection login, including UAT bypass, required department codes, bypass employee codes, alcohol API timeout, failed-check messages, and checking after
signInbut before saving token/user session data. - Moved POS Terminal alcohol-check constants into
apps/pos-terminal/src/constants/alcohol.ts, matching Mobile's constants boundary and reducing future drift while preserving the current 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
- Re-audited Mobile booking-price detail flow against POS Terminal, including list query warehouse-group filtering, created-day edit guard, owner/override permissions, item add/edit validation, item payload shape, delete behavior, and convert-to-order flow.
- Updated POS Terminal booking-price item delete to match Mobile by deleting persisted items by item id, recalculating and persisting booking totals immediately, reloading the saved detail, and clearing dirty state after the delete completes.
- 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
- Re-audited Mobile transfer-warehouse detail flow against POS Terminal, including warehouse selection, product inventory subscription, dummy products, item create/update/delete, batch loading by source warehouse/company, save-header behavior, and send-to-B1 guards.
- Updated POS Terminal transfer-warehouse batch selection so the batch picker opens only after
getProductLotssucceeds, matching Mobile and avoiding an empty picker after lot loading errors. - Updated POS Terminal transfer-warehouse item submit validation to require a real Batch number before saving an item, matching Mobile's 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
- Re-audited Mobile transfer-out detail flow against POS Terminal, including branch/user payload fields, lot loading by item/warehouse/company, duplicate batch guard, pending quantity checks, available batch quantity checks, line completion validation, and transfer-out payload shape.
- Updated POS Terminal transfer-out batch selection so the batch picker opens only after
getProductLotssucceeds, matching Mobile and avoiding an empty picker being left open when lot loading fails. - 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
- Re-audited Mobile goods-receipt detail flow against POS Terminal, including 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, and stock-in payload shape.
- Updated POS Terminal goods-receipt submit validation to block blank Lot/Batch numbers before sending stock-in payloads, matching Mobile's batch editor guard while preserving Terminal's inline batch editor.
- Confirmed the existing POS Terminal goods-receipt flow already matches Mobile's branch/user payload fields, batch date handling, duplicate-batch guard, and list refresh after 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
- Re-audited Mobile customer address GPS request list/detail against POS Terminal customer-address-management split list/detail, including permission entry, in-flight list loading guard, search, pagination, dedupe, card status tones, detail maps, approve/reject confirmations, and post-decision refresh.
- Re-audited Mobile customer detail address actions against POS Terminal customer detail, including open-map guard, default shipping address guard, current-location permission, GPS update request payload, note handling, and map-picker coordinate fallback for terminal devices without GPS.
- Confirmed POS Terminal already matches Mobile's current customer address request behavior while preserving terminal-native split-pane and map-picker UX; no code change was required in this 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
Branch and notification settings parity audit
- Re-audited Mobile branch setup against POS Terminal branch settings, including fallback/user branch loading, main-branch selection, sub-warehouse filtering, main warehouse insertion when the user has access, selected-warehouse payload shape, best-effort tax caching, retry state, and back-to-branch behavior.
- Re-audited Mobile notification screen/service against POS Terminal settings modal and notification service, including foreground/background handler registration, FCM token refresh, clear-and-refresh token action, token display, and startup/login notification hooks.
- Confirmed POS Terminal already matches Mobile's current branch and notification contracts while preserving terminal-native theme/settings UI; no code change was required in this 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
Employee profile password control parity
- Re-audited Mobile order payment current-source behavior against POS Terminal, including duplicate-invoice blocking, QR generation/share/check, invoice print, retry invoice, cash validation, transfer slip upload, and payment payload shape; no code change was required for payment in this pass.
- Re-audited Mobile employee profile password flow against POS Terminal
EmployeeDetailForm, including own-profile access, reset salt request, password validation, successful password-change logout, and reset/password fields. - Updated POS Terminal employee profile password reset and save buttons to be disabled when the current user cannot change that employee's password, matching Mobile's disabled password controls instead of only showing an error after press.
- 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
- Re-audited Mobile invoice detail duplicate-order flow against POS Terminal, including sales-order permission gating, main-branch direct duplicate behavior, non-main branch
vehicleRelease/documentMovemodal, and duplicate order payload handoff. - Updated POS Terminal invoice duplicate action to show Mobile's confirmation prompt before opening a duplicated sales order or the non-main branch configuration modal.
- Confirmed the current POS Terminal duplicate configuration modal and payload options already match Mobile's
InvoiceDuplicateConfigModalselections. - 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
- Re-audited Mobile storefront list/detail flow and helpers against POS Terminal, including storefront list filters, invoice dedupe, accept prompt, edit permissions, cancel guard, lot/batch auto-selection, pending quantity validation, B1 submit payload, and cancel-note validation.
- Updated POS Terminal storefront item press fallback so a failed Lot/Batch load shows the same
ไม่สามารถโหลดรายการ Lot/Batch ได้fallback as Mobile and does not open the batch editor with missing lot data. - Confirmed the existing POS Terminal storefront helper permissions, submit/cancel guards, and single-lot auto-fill behavior already match the current Mobile implementation.
- 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
- Re-audited Mobile borrow-fish list/detail flow against POS Terminal, including list pagination, search/clear, cancel permissions, customer-based draft creation, borrow type selection, remark editing, product picker behavior, stock validation, 3-items/3-pieces limits, item edit/delete, confirm, accept, complete/retry, and main/sub-branch print actions.
- Confirmed POS Terminal already mirrors Mobile's borrow payload, borrow-item payload, B1 processing permissions, owner-only draft editing, failed sub-borrow retry behavior, and print guard for empty item lists.
- No code change was required in this 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
- Re-audited Mobile credit-note list/detail flow against POS Terminal, including return-only/status filters, delete permissions, draft-from-invoice setup, reason/item editing, image upload/delete, lot selection, and B1 send guards.
- Added POS Terminal warehouse-check controls for
Q1,Q2,Q3, and temperature so warehouse users can complete the same inspection fields Mobile requires before sending return credit notes to B1. - Kept the controls read-only once the credit note is received, matching Mobile's disabled inspection fields after B1 completion.
- 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
- Re-audited Mobile deposit list/detail flow against POS Terminal, including 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, and deposit payload shape.
- Re-audited Mobile expense bill list/detail flow against POS Terminal, including list pagination, search/clear, card tones, delete/retry actions, draft
branchId = 0update flow, accounting-only update guard,editDeliveryDatepermission, vehicle search/pagination, mileage lookup, gas partner picker, send-slip-later date handling, transport bill context, and bill payload shape. - Confirmed the current POS Terminal implementation already matches the Mobile behavior for these audited deposit and expense-bill paths; no code change was required in this 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
- Re-audited Mobile vehicle list, status options, status colors, dedupe behavior, search, refresh, and
PATCH /vehicles/:licensePlate/vehicle-statusflow against POS Terminal. - Confirmed POS Terminal already uses the same vehicle endpoint, status normalization, license-plate dedupe, card status tones, and status payload shape as Mobile.
- Updated POS Terminal vehicle detail state to reset status and note from the selected vehicle whenever the selected license plate/detail changes, matching Mobile's status modal initialization for each tapped vehicle.
- 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
Transport route planner parity
- Re-audited Mobile transport route planner sorting, Google route optimization, and save flow against POS Terminal.
- Updated POS Terminal route optimization to build the same
nextSortedCustomerslist as Mobile and block completion when no customer codes remain after optimization. - Confirmed the Terminal route planner keeps Mobile's current-GPS origin, customer GPS filtering, 26-point Google Routes limit, no-GPS error, clear/save confirmations, and save payload 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
Transport GPS address parity
- Re-audited Mobile transport customer GPS address loading, address selection, and map navigation against POS Terminal.
- Updated POS Terminal to block GPS address loading when the customer code is missing, to show Mobile's no-address error when the customer has no selectable addresses, and to show Mobile's missing customer/address error when saving GPS cannot proceed.
- Added Mobile's navigation error handling so Terminal reports map-opening failures instead of allowing the exception to escape.
- 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
Transport QR and attachment parity
- Re-audited Mobile transport QR generation and payment attachment upload flow against POS Terminal.
- Updated POS Terminal transport QR generation to validate required context before requesting QR data, send
transportId, and include the customer latitude/longituderef3value, matching Mobile. - Added Mobile's warehouse-group guard before uploading transport payment photos, slips, and signatures so Terminal shows the same missing-warehouse errors instead of submitting incomplete 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
Transport payment modal reset parity
- Re-audited Mobile transport customer payment modal initialization against POS Terminal's customer action modal.
- Updated POS Terminal to reset partial-receive, not-receive, split-payment, photo, slip, signature, and QR state every time a customer payment modal opens, matching Mobile and preventing stale payment attachments/flags from a previous customer.
- Confirmed the Terminal payment UI and submit payload remain aligned with Mobile after the validation parity update.
- 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
Transport payment validation parity
- Re-audited Mobile transport payment submit validation against POS Terminal transport payment validation.
- Updated POS Terminal payment validation to require an uploaded photo for all payment submissions, matching Mobile.
- Added Mobile's customer signature requirement for non-transfer and non-bill-payment transport payments.
- 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
Transport add-shipping guard parity
- Re-audited Mobile transport add-shipping modal and customer-card button guards against POS Terminal.
- Updated POS Terminal add-shipping entry points to allow adding only when the customer is unpaid and has no shipping lines or every existing shipping line is pending cancel retry (
b1CancelStatus === 0), matching Mobile. - Reset the Terminal add-shipping amount field to blank when opening the modal, matching Mobile instead of pre-filling the 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
Transport shipping retry action parity
- Re-audited Mobile transport customer shipping retry/cancel/delete actions against POS Terminal's customer action modal.
- Updated POS Terminal shipping retry buttons to appear only for B1 status
0, matching Mobile instead of showing retry for blank or any non-1status. - Updated Terminal shipping delete visibility to use Mobile's paid-customer guard and to hide delete while a cancel-retry action is 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
- Re-audited Mobile shipping detail invoice/product local search against POS Terminal shipping-route detail lists.
- Added POS Terminal local search for the active invoice/product tab using Mobile's same searchable fields: invoice customer, invoice number, seller, product name/code, customer names, and invoice allocation labels.
- Updated Terminal empty states to distinguish no results from genuinely empty shipping-route lists, matching Mobile's search 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
Shipping route header action guard parity
- Re-audited Mobile shipping-route header actions for accept, dock confirmation, loaded confirmation, and co-picker assignment against POS Terminal.
- Updated POS Terminal header actions so every action is blocked when the delivery has not been marked as transportation, matching Mobile's guard instead of blocking only accept.
- Aligned the Terminal confirmation messages with Mobile and added the Mobile success alert after co-picker assignment.
- 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
- Re-audited Mobile shipping-route send-to-B1 flow against POS Terminal's shipping-route B1 action.
- Updated POS Terminal shipping-route B1 send flow to validate the B1 response, reload the latest delivery detail, classify pending and failed invoices, and patch delivery status to
DONE,SOME_DELIVERY_FAIL, orPENDING_FOR_B1, matching Mobile. - Added the Mobile success messages for full success versus partial invoice failure while preserving Terminal's 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
Shipping route invoice picker date parity
- Re-audited Mobile shipping-route invoice picker loading against POS Terminal's available-invoice loader.
- Updated POS Terminal shipping-route available invoice date range to use local
dayjsdates for the 180-day window, matching Mobile and avoiding UTCtoISOString()date drift in Thailand timezone. - Confirmed available invoice grouping, canceled-invoice filtering, existing-order exclusion, and picker search fields still match 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
- Re-audited Mobile shipping detail invoice swipe actions against POS Terminal shipping-route invoice actions.
- Confirmed POS Terminal add/delete/cancel permission helpers, cancel request guards, and send-to-B1 eligibility still match Mobile.
- Updated POS Terminal shipping-route invoice swipe actions to show the disabled
ปฏิเสธstate when a cancel request has been rejected, matching Mobile instead of hiding the cancel slot. - 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
- Re-audited Mobile invoice pending-B1/manual-payment loading against POS Terminal invoice split-list loading.
- Updated POS Terminal manual payment mode to exclude canceled invoices from the selectable pending-B1 list, matching Mobile's manual-payment fetch normalization while leaving the default pending-B1 tab unchanged.
- Kept existing Terminal manual-selection guards for missing
refKey, pending cancel requests, and unpaid orders aligned with 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
- Re-audited Mobile sales-order retry/delete card actions against POS Terminal order list actions.
- Confirmed POS Terminal retry visibility and permission handling already matches Mobile's pending/complete-invoice owner, admin, and override-user rules.
- Updated POS Terminal sales-order delete flow so draft owners are blocked immediately when the order already has
refKey, using Mobile's invoice-created error message while keeping override delete behavior unchanged. - 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
- Re-audited Mobile order duplicate-invoice creation flow against POS Terminal's split-panel duplicate order creation flow.
- Updated POS Terminal duplicate invoice order payload to carry
U_BFP_LatitudeandU_BFP_Longitudefrom the source invoice, matching Mobile's duplicate order payload. - Confirmed duplicate modal
vehicleRelease/documentMove, item stock checks, step-price lookup, item creation, total recalculation, and created-order detail loading remain aligned with Mobile while keeping Terminal's in-panel progress flow. - 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
- Re-audited Mobile invoice cancel-request approval/rejection actions against POS Terminal invoice list swipe actions and cancel modal behavior.
- Confirmed Terminal keeps Mobile's default-mode-only cancel action, owner/override-user gate, pending cancel-note requirement, canceled-invoice disable guard, and approve/reject endpoints with list refresh after completion.
- Confirmed Terminal B1 send action still blocks invoices with pending cancel requests and keeps the Mobile paid-order/refKey guards; no code changes were needed in this audit 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
Expense bill list identity parity
- Re-audited Mobile expense bill list/detail services and retry/delete/create actions against POS Terminal expense bill split-list/detail behavior.
- Updated POS Terminal expense bill list loading to dedupe rows by
billId, withbillNofallback, matching Mobile's expense bill list normalization while preserving the validbillIdfilter. - Applied the same expense bill identity handling to both initial split-menu loading and paged/search loading; also carried the existing deposit identity helper into initial deposit split-menu loading for consistency with the previous deposit parity pass.
- Confirmed expense bill retry visibility (
RefKeymissing andbranchId !== 0), delete action, endpoint params, transport-context save flow, and draft branch color behavior matched 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
- Re-audited Mobile deposit list/detail services and retry/delete/create guards against POS Terminal deposit split-list/detail behavior.
- Updated POS Terminal deposit list loading to dedupe rows by
depositId, withdepositNofallback, matching Mobile's deposit list normalization while preserving the existing validdepositIdfilter. - Aligned POS Terminal deposit create permission departments with Mobile by removing the extra dept
21from the Terminal create gate. - Confirmed retry ownership guard, delete departments, retry-only filter, deposit endpoint params, invoice selection total/notes behavior, and transport deposit flow matched Mobile's 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
Invoice duplicate order parity audit
- Re-audited Mobile invoice detail duplicate-order flow and
InvoiceDuplicateConfigModalagainst POS TerminalInvoicePanelsduplicate-order behavior. - Confirmed Terminal keeps Mobile's create-permission gate, main-branch direct duplicate path, non-main branch
vehicleRelease/documentMovemodal requirement, option values (RELEASE/UNRELEASED,MOVE/UNMOVED), and disabled confirm until both values are selected. - Confirmed Terminal carries the selected duplicate config into the created order payload while adapting Mobile's navigation flow into the Terminal split-panel order creation/progress flow; no code changes were needed in this audit 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
- Re-audited Mobile
VehicleListScreenand shared vehicle service behavior against POS Terminal vehicle split-list/detail behavior. - Confirmed Terminal vehicle list uses the same
getVehiclessource, license-plate dedupe, status normalization (UNCHECKED/READY/NOT_READY), and status update endpointPATCH /vehicles/:licensePlate/vehicle-status. - Confirmed Terminal keeps the Mobile status/note edit flow while adapting it into the existing Terminal split-panel detail form and list refresh behavior; no code changes were needed in this audit 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
Invoice list identity parity
- Re-audited Mobile invoice list default, pending B1, and manual payment flows against POS Terminal invoice split-list/manual payment behavior.
- Confirmed Terminal manual payment mode keeps Mobile guards for missing
refKey, pending cancel requests, unpaid orders, B1 confirmation, selected-send validation, and post-send refresh. - Updated POS Terminal invoice split-list loading to require an invoice identity and dedupe rows by
invoiceId/invoiceStorageId, matching Mobile's invoice list normalization for default, pending B1, and 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
- Re-audited Mobile order shipping-review list and bulk payment flow against POS Terminal
salesOrderReviewsplit-panel behavior. - Confirmed Terminal bulk payment validation, per-order
payOrdersubmission, partial failure messaging, selection clearing, and post-payment refresh matched Mobile. - Updated POS Terminal order split-list loading to dedupe normalized rows by
orderId, thenorderStorageId, thenorderNo, matching Mobile's order list dedupe behavior for both normal sales orders and shipping-review lists. - 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
- Re-audited Mobile shipping route list/detail helpers against POS Terminal shipping route split list/detail behavior.
- Updated POS Terminal shipping route list loading to filter records with missing
deliveryIdand dedupe loaded rows bydeliveryId, withdeliveryNofallback, matching Mobile's shipping list normalization. - Applied the same shipping route list dedupe to both initial split-menu loading and 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
- Re-audited Mobile
StorefrontListScreen,StorefrontDetailScreen, storefront detail helpers, and storefront services against POS Terminal storefront split list/detail behavior. - Confirmed 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, and Terminal split-panel refresh behavior matched Mobile.
- Updated POS Terminal storefront split lists to require
refKeyplusinvoiceId/invoiceStorageId, matching Mobile's valid-record filter. - Added storefront list dedupe by
invoiceId/invoiceStorageIdwithinvoiceNofallback, and addedinvoiceStorageId/invoiceNoas normalized list id fallbacks for 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
- Re-audited Mobile
BorrowListScreen,BorrowDetailScreen,useBorrowProductFlow, and borrow utilities/services against POS Terminal borrow split list/detail behavior. - Confirmed 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, and confirm/accept/complete/retry actions already matched Mobile.
- Confirmed Terminal keeps its split-panel refresh behavior after borrow mutations while preserving Mobile's successful detail/list refresh semantics.
- No code change was required for this audit round.
- 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
- Re-audited Mobile
TransferWarehouseListScreen,TransferWarehouseDetailScreen, and transfer-warehouse services against POS Terminal transfer-warehouse split list/detail behavior. - Confirmed warehouse selection, product/batch picker flow, header creation before item save, item payload shaping, B1 preflight guard, and Terminal split-panel refresh behavior aligned with Mobile's workflow.
- Updated POS Terminal transfer-warehouse split data to dedupe records by
transferBranchIdwithtransferBranchNofallback, matching Mobile list behavior. - Added
transferBranchNoas a normalized list item id fallback so Terminal list refreshes can collapse duplicate transfer-warehouse rows even when the API omitstransferBranchId. - 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
- Re-audited Mobile
TransferInListScreen,TransferInDetailScreen, transfer-in helpers, and transfer-in services against POS Terminal transfer-in list/detail behavior. - Confirmed 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, and transfer-in payload shaping matched Mobile while preserving Terminal split-panel refresh behavior.
- Updated POS Terminal transfer-in Batch editor to match Mobile by removing editable batch date controls; transfer-in batch edits now only change quantity while preserving existing batch dates from the selected 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
- Re-audited Mobile
TransferOutListScreen,TransferOutDetailScreen, transfer-out helpers, and transfer-out services against POS Terminal transfer-out list/detail behavior. - Confirmed list search, duplicate document filtering, batch picker search, duplicate batch guard, pending quantity validation, submit validation, and transfer-out payload shaping already matched Mobile while preserving Terminal split-panel refresh behavior.
- Updated POS Terminal transfer-out Batch editor to match Mobile by removing editable batch date controls; transfer-out batch edits now only change quantity while preserving existing batch dates from the selected 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
- Re-audited Mobile
GoodsReceiptListScreen,GoodsReceiptDetailScreen, goods-receipt helpers, and goods-receipt services against POS Terminal goods-receipt list/detail behavior. - Confirmed list search placeholders, duplicate document filtering, product company filtering, duplicate product guard, submit validation, stock-in payload shaping, and Terminal duplicate-batch submit guard align with Mobile behavior while preserving Terminal inline batch editing.
- Updated POS Terminal new Batch/Lot rows to start with Mobile's default quantity
0instead of auto-filling the 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
- Re-audited Mobile
CreditNoteListScreen,CreditNoteDetailScreen, and credit-note helpers against POS Terminal credit-note list/detail behavior. - Confirmed return-only/status filters, delete guards, save/B1 department gates, status transitions, B1 preflight checks, and item/location/image payload behavior already matched Mobile while preserving Terminal split-panel navigation.
- Updated POS Terminal credit-note primary save action label from
บันทึกสถานะto Mobile'sบันทึก. - 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
- Re-audited Mobile
EmployeeDetailScreen,EmployeeProfileScreen,EmployeeTransferReceiveSettingScreen, andgetEmployeeAccessagainst POS TerminalEmployeeDetailForm. - Confirmed employee menu/manage/reset permissions and transfer-receive warehouse permission payloads already matched Mobile.
- Updated POS Terminal password-change access so users can change a password when they are editing their own profile or when they have employee-menu management access, matching Mobile
canChangeOwnPassword. - Matched Mobile profile behavior by calling the logout callback after a successful password change.
- 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
- Re-audited Mobile
ExpenseBillListScreen/ExpenseBillDetailScreenagainst POS Terminal expense bill list and split-panel detail behavior. - Confirmed menu visibility, main-branch gating, list retry/delete actions, draft update accounting guard, validation, and transport-context payload behavior already matched Mobile.
- Updated POS Terminal
ExpenseBillDetailFormfailure handling so a failed save only shows the error alert and no longer calls the saved callback with a synthetic id or refreshes the list as if the save succeeded. - 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
- Re-audited Mobile Home
MENU_DEPOSIT/CAN_CREATE_DEPOSITplusDepositListScreen/DepositDetailScreenpermissions against POS Terminal deposit menu and create action. - Kept POS Terminal deposit menu visibility aligned with Mobile Home so department
21and27can open the deposit list. - Updated POS Terminal deposit create action to include department
21, matching Mobile Home's deposit create shortcut, while department27remains list-only. - Preserved the already-matching deposit retry owner/
012265guard, delete department guard, retry filter, invoice selection restrictions, validation, and 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
- Re-audited Mobile
VehicleListScreenstatus modal against POS TerminalVehicleDetailForm. - Updated POS Terminal vehicle status save action so
บันทึกremains available even when the selected status/note matches the current values, matching Mobile's always-save modal behavior. - Kept the existing Terminal split-panel detail layout, validation,
updateVehicleStatuspayload, list refresh, and 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
- Re-audited Mobile
OrderListScreenbulk payment selection and payment modal against POS Terminal sales-order review bulk payment. - Updated POS Terminal selected-order action bar wording to match Mobile:
ล้างข้อมูลandชำระเงิน (n). - Updated the POS Terminal bulk payment transfer option label from
โอนเงินto Mobile'sโอน, while preserving the existing validation, payment payload, partial-failure handling, and 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
- Re-audited Mobile
OrderListScreenretry swipe action against POS Terminal sales-order split list actions. - Added POS Terminal sales-order left-swipe
ส่งข้อมูลใหม่action for orders that match Mobile's retry state:PENDINGorders or orders with invoice amount but incomplete invoice creation. - Matched Mobile retry permissions for the order owner, admin users, and the
012265pending-order override user; the action confirms withส่งข้อมูลใหม่อีกครั้ง, callsretryOrderInvoice, and refreshes the current 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
- Re-audited Mobile
TransferOutDetailScreenandGoodsReceiptDetailScreensubmit action wording against POS TerminalTransferOutDetailFormandGoodsReceiptDetailForm. - Updated POS Terminal submit labels to match Mobile's explicit document context:
บันทึกโอนสินค้าไปสาขาfor transfer-out andบันทึกรับสินค้าเข้าตรงfor goods receipt. - Preserved the already-matching validation, save payloads, and 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
- Re-audited Mobile
TransferInDetailScreensubmit action wording against POS TerminalTransferInDetailForm. - Updated the POS Terminal transfer-in submit button from the generic
บันทึกรับสินค้าto Mobile's explicitบันทึกรับสินค้าจากสาขา, while preserving the already-matching validation and 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
- Re-audited Mobile
TransferOutListScreensource-branch display against POS Terminal transfer-out split list normalization and list card rendering. - Updated POS Terminal transfer-out list normalization to fill a missing
branchNamefrom the selected branch'swhsGrpName/branch name, matching Mobile'ssourceBranch={branchLabel}fallback. - Kept the terminal card renderer unchanged; enriched raw list data now prevents the source branch column from falling back to
-when the transfer-out API omitsbranchName. - 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
- Re-audited Mobile
ProductDetailScreenadd-to-order controls against POS TerminalProductDetailForm. - Updated the POS Terminal product add-to-sales-order action to mirror Mobile's button behavior: disable when quantity is not greater than zero and show the computed order amount directly in the button label.
- Kept the existing terminal customer-selection/create-sales-order flow and weight validation while aligning the visible action state with 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
- Re-audited Mobile customer-management address editor GPS controls against POS Terminal
CustomerManagementDetailFormandCustomerDetailForm. - Added Mobile's POS-desktop fallback hint under the terminal GPS/map-picker controls, explaining that devices without GPS can choose a location from the map to fill coordinates.
- Applied the hint to both terminal customer draft address editing and customer detail address editing while preserving the existing device GPS button and 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
- Re-audited Mobile
InvoiceListScreenmanual-payment mode action rail against POS TerminalListPaneinvoice manual mode. - Added a visible
ยกเลิกaction directly inside the POS Terminal invoice manual selection bar, matching Mobile's always-visible cancel/send controls while keeping the existing terminal header icon as a shortcut. - Preserved the terminal split-list selection count and
sendInvoicesToB1submit flow; the new cancel action reuses the existing 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
Transport GPS address empty-state parity
- Re-audited Mobile
TransportCustomerActionModalGPS-address selection step against POS TerminalTransportDetailFormcustomer action modal. - Updated POS Terminal GPS-address selection to show Mobile's empty-state message when no customer addresses are available instead of rendering a blank modal body.
- Matched Mobile's address card structure by showing the address/check-address name as the title and the formatted address as secondary text, with a safe fallback key when
addressIdis missing. - 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
- Re-audited Mobile
ShippingDetailinvoice-row navigation intoInvoiceDetailagainst POS TerminalShippingRouteDetailForm. - Added POS Terminal shipping invoice row press handling that validates
invoiceId, respects the terminal unsaved-change confirmation, loadsgetInvoiceSplitDetail, and opens the invoice in the terminal split-panel invoice detail view. - Kept the existing terminal-native swipe actions for shipping invoice print, cancel request, and delete while restoring Mobile's direct invoice detail access from the shipping detail row.
- 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
Transport deposit and expense context audit
- Re-audited Mobile
TransportDetailcross-screen actions intoDepositDetailandExpenseBillDetailagainst POS TerminalTransportDetailFormembedded deposit and expense-bill panels. - Confirmed POS Terminal preserves Mobile's transport context payload updates: deposit sets
flagBank=1while preservingflagGas, expense bill setsflagGas=1while preservingflagBank, and both save paths callupdateTransportafter creating the related record. - Confirmed POS Terminal matches Mobile defaults for branch/user/company context, cash amount for deposit, license-plate/driver/route note text, started-at date fallback, gas partner filtering, vehicle lookup, latest mileage loading, and returning to refreshed transport detail after save.
- No additional POS Terminal source changes were required.
- 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
- Re-audited Mobile
CustomerListbooking/borrow/sales-order modes against POS TerminalCustomerPickerModal. - Updated POS Terminal customer picker detail preview so it only exposes the action for the picker mode that opened it: sales order, booking price, or borrow-fish.
- This matches Mobile's route-mode primary action behavior and prevents the terminal detail preview from switching from booking mode into borrow creation, which could bypass the 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
- Re-audited Mobile
OrderDetail,OrderPaymentScreen, andutils/orderPaymentagainst POS TerminalOrderDetailFormpayment panel. - Confirmed POS Terminal preserves Mobile's 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, and the payment payload rule that only non-QR channels submit through
payOrder. - Confirmed the Terminal payment panel intentionally combines Mobile's
OrderDetailinvoice-opening step with the separateOrderPaymentscreen: Terminal can open fromNEWorWAITING_PAYMENT, creates/rechecks invoices when needed, then exposes the same payment controls inside the order detail split panel. - No additional POS Terminal source changes were required.
- 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
- Re-audited the current Mobile
CustomerDetailandCustomerManagementEditchanges against POS TerminalCustomerDetailFormandCustomerManagementDetailForm. - Confirmed POS Terminal already imports shared
dbAddressfrom@bsr/utilsand string-normalizes district, amphoe, province, and zip code values for both customer address search flows. - Confirmed POS Terminal customer detail document actions match Mobile's current behavior: create sales order, booking price, and borrow-fish drafts from the customer detail panel; preserve the active/inactive and credit-hold blocked reason; and prompt to open today's existing order on main branches.
- Confirmed the permission split is intentional and matches Mobile contexts: Terminal
canCreateCustomerDocumentmirrors Mobile customer-detailgetSalesOrderAccessfor customer document actions, while TerminalcanCreateSalesOrderremains broader for Home/list create shortcuts where Mobile also exposes dept20. - No additional POS Terminal source changes were required.
- 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
- Re-audited Mobile required app update flow against POS Terminal, including
checkRequiredAppUpdate, native version lookup, Firestoreversion/vapplookup, blocking modal copy, and login/home screen mounting points. - Confirmed POS Terminal already matches Mobile's forced-update hook and modal behavior while keeping terminal-native theme styling.
- Updated POS Terminal Android
versionCode/versionNameto422/0.4.22, matching the current Mobile metadata used by the shared forced-update contract so Terminal is not blocked by the Mobile version gate immediately after startup. - 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
- Re-audited the current Mobile credit-note list, return-only filter, status filter, delete permission, detail edit flow, lot/location assignment, and send-to-B1 validation against POS Terminal
creditNote. - Confirmed POS Terminal already matches Mobile's default return-only list behavior, status tabs, guarded pagination, and list delete permission/status blocking.
- Confirmed POS Terminal credit-note detail already matches Mobile's save status transition, owner-only item quantity editing, warehouse location editing for return items, required lot checks before B1, and warehouse checklist validation before B1.
- No additional POS Terminal source changes were needed in this 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 list and status audit
- Re-audited the current Mobile vehicle list search, vehicle status labels/colors, dedupe behavior, and status update modal against POS Terminal
vehicle. - Confirmed POS Terminal already matches Mobile's
getVehiclesquery, license-plate dedupe, status normalization, status update payload, and visible status/note/detail fields. - Confirmed POS Terminal's additional split-pane guarded pagination and load-more behavior is a terminal layout adaptation and does not conflict with Mobile's first-page list flow.
- No additional POS Terminal source changes were needed in this 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
Transport list and trip parity refresh
- Re-audited the current Mobile transport list, create/delete permissions, new-transport draft defaults, and start/finish trip mileage validation against POS Terminal
transport. - Updated POS Terminal new-transport drafts to prefill Mobile-equivalent branch and user defaults, including
shipDate,branchId, warehouse group, driver name, company code, totals, flags, and empty item state. - Updated POS Terminal trip action modal opening to clear stale start/finish mileage fields each time, matching Mobile's start/finish modal reset behavior.
- Confirmed POS Terminal already matches Mobile's transport list query shape, guarded pagination, owner/unstarted delete gate, start/finish mileage bounds, finalized-delivery guard, bank/oil completion guard, and 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
- Re-audited the current Mobile expense-bill list, retry/delete actions, vehicle mileage loading, gas partner picker, send-slip-later option, accounting-only update path, and transport-context save flow against POS Terminal
expenseBill. - Confirmed POS Terminal already matches Mobile's
/billslist query withignoreDraft, guarded pagination, local card fields, retry/delete endpoints, and search fields for bill number, license plate, and responsible user. - Confirmed POS Terminal expense-bill detail already matches Mobile's payload shape, vehicle picker pagination, latest-mileage and vehicle-balance lookup, gas partner filtering, edit guards, validation, and transport update after creating a transport oil bill.
- No additional POS Terminal source changes were needed in this 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
Deposit list and detail audit
- Re-audited the current Mobile deposit list, retry-only filter, retry/delete actions, cash/bank account loading, invoice-based amount calculation, and transport-context save flow against POS Terminal
deposit. - Confirmed POS Terminal already matches Mobile's
/depositslist query withwhs,hasRetry, page limit 200, guarded pagination, retry-only toggle, local card fields, retry/delete endpoints, and search fields for deposit number and bank information. - Confirmed POS Terminal deposit detail already matches Mobile's payload shape, company/cash/bank account loading, selected-invoice note and amount calculation, create-only validation, confirmation copy, and transport update after creating a transport bank-deposit record.
- No additional POS Terminal source changes were needed in this 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
Borrow-fish list and detail parity refresh
- Re-audited the current Mobile borrow-fish list, create/cancel permissions, status labels/colors, product add/edit validation, confirm/accept/approve/retry actions, and print actions against POS Terminal
borrowFish. - Confirmed POS Terminal already matches Mobile's
/borrowlist query with warehouse group, guarded pagination, cancel permission/status gate, borrow status card colors, action endpoints, item CRUD endpoints, and B1 processing permission gate. - Updated POS Terminal borrow-fish product opening and add handling to require a borrow type before adding products and to block opening the picker after three items, matching Mobile's draft validation before product selection.
- Confirmed POS Terminal borrow-fish detail already matches Mobile's product quantity limit, stock validation including edit allowance, duplicate product edit path, confirm validation, accept action, approve/retry action, and main-branch/storage print selection.
- 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
- Re-audited the current Mobile storefront list, status tabs, card colors, accept prompt, cancel guard, lot/batch validation, and B1 submit sequence against POS Terminal
shippingStorefront. - Confirmed POS Terminal already matches Mobile's invoice list query with
shippingType=2, branch/warehouse group context,refKeyand invoice-id filtering, guarded pagination, andทั้งหมด/ยังไม่ตัดสต๊อกtabs. - Confirmed POS Terminal storefront detail already matches Mobile's accept permission and prompt behavior, non-main-branch accepted-user flow, cancel restrictions for discounts/credit notes/incoming B1, lot selection and duplicate/quantity validation, and delivery lot plus delivery creation submit flow.
- No additional POS Terminal source changes were needed in this 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
Invoice list and detail parity refresh
- Re-audited the current Mobile invoice list, pending-B1 tab, manual-payment mode, send-to-B1 guard, cancel approval/rejection flow, summary modal, and duplicate-order detail action against POS Terminal
invoice. - Updated POS Terminal pending-B1 list loading so the normal
รอส่ง B1tab keeps Mobile's user and yesterday/today date limits, while department 3 only gets the all-user/all-date query in manual-payment mode. - Confirmed POS Terminal already matches Mobile's invoice service endpoints and query parameters, guarded pagination, manual-payment selectable list rules, owner/override B1 and cancel swipe gates, send-to-B1 date guard, cancel approve/reject endpoints, sales summary query, and non-main-branch duplicate-order option 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
Goods-receipt list and detail audit
- Re-audited the current Mobile goods-receipt list, MST/POS service boundary, product inventory picker, dummy-product company filtering, batch validation, quantity handling, and stock-in payload against POS Terminal
goodsReceipt. - Confirmed POS Terminal already matches Mobile's
/goods-receipt-poMST list query by branch, local dedupe key, search fields,/stock-insubmit endpoint, current branch/user payload fields, and line sorting bylineNum. - Confirmed POS Terminal goods-receipt detail already matches Mobile's product duplicate guard, dummy product inclusion, warehouse code fallback, zero-quantity allowance, blank/negative quantity blocking, duplicate batch detection, batch date editing, and submit quantity from calculated batch total (
cal). - No additional POS Terminal source changes were needed in this 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
Transfer-out list and detail audit
- Re-audited the current Mobile transfer-out list, MST/POS service boundary, source-warehouse lot picker, batch validation, pending-quantity guard, and transfer-out submit payload against POS Terminal
transferOut. - Confirmed POS Terminal already matches Mobile's
/transfers-out?whGrpCode=...MST list query, local dedupe key, search fields, and/transfer-outPOS submit endpoint. - Confirmed POS Terminal transfer-out detail already matches Mobile's lot loading from the selected line warehouse and company, duplicate-batch guard, quantity greater-than-zero rule, lot available-quantity guard, pending-quantity guard, all-lines-complete submit guard, current branch/user payload fields, line sorting by
lineNum, document-linequantitypreservation, and numeric batch quantities. - No additional POS Terminal source changes were needed in this 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
Transfer-in list and detail parity refresh
- Re-audited the current Mobile transfer-in list, warehouse tabs, MST/POS service boundary, product picker, dummy-product handling, batch validation, batch quantity rollover, and transfer-in submit payload against POS Terminal
transferIn. - Updated POS Terminal's transfer-in local dedupe key to match Mobile's
company/docEntry/docNumidentity so the combined terminal list does not collapse or retain documents based on destination warehouse and source branch instead of the source document identity. - Confirmed POS Terminal already matches Mobile's
/transfers-in?whsCode=...MST list queries across the normal andNF-warehouse tabs, search fields,/transfer-inPOS submit endpoint, product company filtering, duplicate-product guard, dummy-product auto batch creation, batch available-quantity guard, line quantity rollover from batch totals, current branch/user payload fields, and 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
- Re-audited the current Mobile transfer-warehouse list, POS service endpoints, header create/update flow, warehouse picker, product picker, batch loading, item create/update/delete flow, and send-to-B1 guard against POS Terminal
transferWarehouse. - Updated POS Terminal transfer-warehouse product selection so the header
companyCodeandcompanyNameare refreshed from the first selected product when the transfer has no items, matching Mobile's current header-company behavior before the header or first item is saved. - Confirmed POS Terminal already matches Mobile's
/transfer-brancheslist query by branch, API search, local dedupe by normalized split id, delete endpoint, create draft behavior, warehouse option loading from current branch and sub-warehouses, required destination warehouse before adding products, batch loading from the logged-in branch warehouse group and product company, item save through per-item endpoints, item delete, and B1 send guard requiring at least one item with 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
- Re-audited the current Mobile employee list, employee detail permission editing, password reset, and transfer-receive warehouse permission setting flow against POS Terminal
employee. - Confirmed POS Terminal already matches Mobile's employee list query, guarded pagination, employee permission toggles, reset-password action, and embedded transfer-receive warehouse permission flow.
- Confirmed the transfer setting flow matches Mobile's branch loading, user-branch loading, warehouse/sub-warehouse mapping,
whsCode === whsGrpCodepermission matching, optimistic toggle state, and permission reload after save. - Updated POS Terminal's shared local split-list search filter to include employee first name, last name, email, and department name so API search results by those fields are not filtered out locally after 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 typecheckbecause the system temp volume was full. - Docs updated:
governance/change-log
Employee list, profile, and transfer setting re-audit
- Re-audited the current Mobile employee list, employee detail permission editing, employee profile password flow, and transfer-receive warehouse setting route against POS Terminal
employee. - Confirmed POS Terminal still matches Mobile's
/userslist/search query, employee dedupe by user id/user code, list/detail permission gates, permission flag payload, reset-password salt request, own-profile access fallback from the terminal header, self-service set-new-password flow, and embedded transfer-receive setting with branch loading, user-branch lookup, warehouse/sub-warehouse filtering, main-branch inclusion, permission matching, optimistic toggle state, and create/update endpoints. - No additional POS Terminal source changes were needed in this 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
Product list and detail audit
- Re-audited the current Mobile product list search, booking tab, Firestore inventory snapshot behavior, and product detail step-price loading against POS Terminal
product. - Confirmed POS Terminal covers Mobile's product search target for product name and product code while retaining the terminal's broader company-field local search, product dedupe by item code, positive-price filtering, booking-only filter, and SAP/POS/booked stock display.
- Confirmed POS Terminal product detail reloads the selected product through
getProductSplitDetail, including fresh inventory detail andgetProductStepPricewhenstepPriceFlagis enabled. - Confirmed POS Terminal's split-pane add-to-sales-order path preserves Mobile's quantity, price, and weight validation while adapting the customer selection flow to the terminal layout.
- Rechecked the current POS Terminal product service against Mobile's product service and confirmed branch context, main/sub inventory sync endpoints, warehouse-code variants, Firestore ordering, fresh detail lookup, step-price
whGrpCode, last-products, change-price, and top-sales helpers remain aligned. - No POS Terminal source changes were needed in this 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
Notification token flow audit
- Re-audited Mobile notification permission, foreground/background handlers, FCM token refresh, clear-and-refresh action, and login-time user
fcmTokenpatch against POS Terminal. - Confirmed POS Terminal
notificationsservice remains functionally aligned with Mobile's Firebase Messaging service for permission requests, remote-message registration, token refresh, foreground handler registration, and token deletion. - Confirmed POS Terminal exposes the Mobile
NotificationsScreentoken-debug behavior as a settings modal, preserving token display and clear-and-refresh behavior in the terminal layout. - Confirmed POS Terminal user selection/login refreshes the FCM token and patches the same user permission fields plus
fcmToken, matching Mobile login behavior while preserving terminal user-selection flow. - No POS Terminal source changes were needed in this 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
Customer list and detail audit
- Re-audited the current Mobile default customer list and customer detail create-document flow against POS Terminal
customer. - Confirmed POS Terminal already matches Mobile's customer list query shape for search, shipping type, route filter, guarded pagination, and customer dedupe by the normalized customer identifier.
- Confirmed POS Terminal customer detail already opens documents for the currently selected customer, including the same inactive/credit-hold guards and same-day existing-order prompt before creating a new sales order.
- Confirmed the customer code and phone fields added to the shared split-list search helper also preserve customer list API search results by customer code or phone.
- No additional POS Terminal source changes were needed in this pass.
- Docs updated:
governance/change-log
Customer-management draft request-branch parity refresh
- Re-audited the current Mobile customer-management list, draft detail approve/reject flow, and customer edit-to-draft save behavior against POS Terminal
customerManagement. - Updated POS Terminal's edit-existing-customer flow so draft raw data created from a customer detail now carries
branchIdRequestfrom the logged-in branch, matching Mobile's customer-management edit payload that always sends the login branch as the request branch. - Confirmed POS Terminal already matches Mobile's
/customer-draftlist query by branch, guarded pagination, draft detail loading with addresses and branches, approve/reject permissions and endpoints, reject payload mapping, core draft validation, phone formatting, alias removal when editing an existing customer, child address/branch creation after new draft creation, and 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
- Re-audited the current Mobile customer request list and request detail approve/reject flow against POS Terminal
customerActivation. - Confirmed POS Terminal already uses the same request list query shape through
getCustomerSapList({ isRequest: true }), including search, shipping type, route filter, guarded pagination, and approve/reject endpoints. - Updated POS Terminal's local split-list search filter to include customer code and phone fields so API search results by customer code or phone are not filtered out locally after 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 typecheckbecause the system temp volume was full. - Docs updated:
governance/change-log
Customer-activation request re-audit
- Re-audited the current Mobile
CustomerListrequest mode and customer request detail approve/reject flow against POS TerminalcustomerActivation. - Confirmed POS Terminal still matches Mobile's
getCustomerSapList({ isRequest: true })request loading, search, route and shipping-type filters, guarded pagination, route option loading, request status labels, admin/department request permissions, approve and reject endpoints, confirmation prompts, list refresh after decision, and terminal-native split-panel handling. - No additional POS Terminal source changes were needed in this 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
Customer address source audit
- Re-audited the latest Mobile customer and customer-management address picker change that moved
dbAddressto the shared@bsr/utilsexport and normalizes selected address fields as strings. - Confirmed POS Terminal
CustomerDetailFormandCustomerManagementDetailFormalready use the shared@bsr/utilsdbAddressexport and string-normalize district, amphoe, province, and zipcode values in the same way. - No POS Terminal source changes were needed in this 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
Customer-address GPS request re-audit
- Re-audited the current Mobile customer address GPS request list and read-only map detail flow against POS Terminal
customerAddressManagement. - Confirmed POS Terminal already matches Mobile's
/customer-draft/address-lat-lnglist query by branch, guarded pagination, local dedupe by request id, approved/rejected card tones from approver/rejecter names, detail loading by request id, old/new coordinate display, read-only Google map rendering, pending-only approve/reject actions, confirmation wording, approve/reject endpoints, and detail/list refresh after decision. - Confirmed POS Terminal gates the menu with the same customer-management permission surface as Mobile
getCustomerManagementAccess().canOpenScreen, while preserving the terminal split-list/detail panel layout. - No additional POS Terminal source changes were needed in this 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
Sales-order list audit and booking-price refresh parity
- Re-audited the current Mobile sales-order list search, filter, dedupe, shipping-review mode, and guarded pagination behavior against POS Terminal
salesOrderandsalesOrderReview. - Confirmed POS Terminal already sends search/filter values through
getOrderSplitListand keeps local split-list search aligned for order number and customer name. - Updated POS Terminal booking-price actions that create, delete, convert, or create-on-first-item so they refresh through the dedicated
loadBookingPriceListloader instead of the generic split-menu refresh, preserving the booking-price search/pagination parity added earlier. - 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 typecheckbecause the system temp volume was full. - Docs updated:
governance/change-log
Sales-order review mode parity refresh
- Re-audited the current Mobile shipping-review order list and review payment flow against POS Terminal
salesOrderReview. - Updated POS Terminal
salesOrderReviewlist controls to hide the status filter, matching Mobile review mode where order status is fixed toWAITING_PAYMENTand the user/status toggles are not shown. - Confirmed POS Terminal already matches Mobile's forced current-user loading,
WAITING_PAYMENTquery override, post-loadhasShipment === 0filtering, source-count pagination guard for filtered-out rows, selectable review cards, selected-order cleanup after list refresh, bulk payment modal,CASH/TRANSFERoptions, remark field, per-orderpayOrderpayload, partial-failure messaging, and list refresh after 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
- Re-audited the current Mobile invoice list search, pending-B1 tab, manual-payment mode, selected send-to-B1 guards, and summary/cancel actions against POS Terminal
invoice. - Confirmed POS Terminal already matches Mobile's pending-B1/manual-payment query behavior, including department-3 all-user loading, yesterday-through-today date guards for other users, selected invoice guards, cancel request handling, and guarded pagination state.
- Updated POS Terminal's local split-list search filter to include invoice number, order number, and customer name so API search results are not filtered out locally after loading.
- Updated the terminal invoice search placeholder to match the visible invoice/order/customer search 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 typecheckbecause the system temp volume was full. - Docs updated:
governance/change-log
Expense-bill list search parity refresh
- Re-audited the current Mobile expense-bill list search, pagination, delete/retry refresh behavior, and card search target against POS Terminal
expenseBill. - Confirmed POS Terminal already matches Mobile's branch-scoped API search,
ignoreDraft=true,pageLimit=200, full-pagehasMorethreshold, and guarded in-flight pagination state. - Updated POS Terminal's local split-list search filter to include expense-bill number and license plate so API search results for bill number, vehicle plate, or responsible user are not filtered out locally.
- Updated the terminal expense-bill search placeholder to match Mobile's bill/vehicle/responsible-user search 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 typecheckbecause the system temp volume was full. - Docs updated:
governance/change-log
Deposit list search and pagination audit
- Re-audited the current Mobile deposit list search, retry-only filter, page size, load-more stop condition, delete/retry refresh behavior, and create/delete/retry permission gates against POS Terminal
deposit. - Confirmed POS Terminal already matches Mobile's API-backed search target for deposit number, account, and responsible user through the deposit service query and split-list search helper.
- Confirmed POS Terminal already uses Mobile's deposit-specific
pageLimit=200, retry-only filter, full-pagehasMorethreshold, and guarded in-flight pagination state. - No POS Terminal source changes were needed in this pass.
- Docs updated:
governance/change-log
Goods-receipt list search parity refresh
- Re-audited the current Mobile goods-receipt list loading and local search behavior against POS Terminal
goodsReceipt. - Confirmed both Mobile and POS Terminal load goods-receipt data from the MST goods-receipt list without API pagination or API search.
- Updated POS Terminal local list search to include goods-receipt card/customer name and warehouse employee/user name, matching Mobile's
GoodsReceiptListsearch target for document number, remark, and user. - Updated the terminal goods-receipt search placeholder to match Mobile's document/remark/user search 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 typecheckbecause the system temp volume was full. - Docs updated:
governance/change-log
Transfer-in list search parity refresh
- Re-audited the current Mobile transfer-in list loading, warehouse-tab behavior, and local search against POS Terminal
transferIn. - Confirmed POS Terminal intentionally keeps the terminal-specific merged main/NF transfer-in list through
getTransferInsForTerminal, while Mobile switches warehouse tabs one at a time. - Updated POS Terminal local list search to include transfer-in source branch name, source branch code, document number, and comments, matching Mobile's
TransferInListsearch target. - Updated the terminal transfer-in search placeholder to match Mobile's document/branch/remark search 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 typecheckbecause the system temp volume was full. - Docs updated:
governance/change-log
Transfer-out list search parity refresh
- Re-audited the current Mobile transfer-out list loading and local search behavior against POS Terminal
transferOut. - Confirmed both Mobile and POS Terminal load transfer-out data from the MST transfer-out list without API pagination or API search.
- Updated POS Terminal local list search to include transfer-out destination warehouse name, destination warehouse code, document number, and comments, matching Mobile's
TransferOutListsearch target. - Updated the terminal transfer-out search placeholder to match Mobile's document/destination/remark search 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 typecheckbecause the system temp volume was full. - Docs updated:
governance/change-log
Customer-management list pagination parity refresh
- Re-audited the current Mobile customer-management list loading, search, refresh, load-more pagination, and in-flight fetch guards against POS Terminal
customerManagement. - Added a dedicated POS Terminal customer-management split-list loader backed by
getCustomerDrafts({ page, search })so panel 2 no longer falls back to the generic first-pagesearch: ""list. - Wired customer-management initial menu loading, search, clear-search, pull-to-refresh, save refresh, and list footer load-more to the dedicated loader.
- Kept next page,
hasMore, and initial-load state in refs so early or rapidonEndReachedevents cannot load more before page 1 finishes or reuse stale 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 typecheckbecause the system temp volume was full. - Docs updated:
governance/change-log
Transfer-warehouse list search parity refresh
- Re-audited the current Mobile transfer-warehouse list loading, initialized/in-flight guards, API search, pull-to-refresh, and delete refresh behavior against POS Terminal
transferWarehouse. - Added a dedicated POS Terminal transfer-warehouse split-list loader backed by
getTransferWarehouses({ page: 1, search })so panel 2 search, clear-search, initial menu loading, pull-to-refresh, and delete refresh no longer fall back to the genericsearch: ""list. - Kept the list as a single-page refresh flow because Mobile
TransferWarehouseListcurrently loads page 1 and filters/searches without infinite scroll. - Updated the terminal list search placeholder to match Mobile's transfer-warehouse search target for document number and responsible user.
- 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 typecheckbecause the system temp volume was full. - Docs updated:
governance/change-log
Booking-price list pagination parity refresh
- Re-audited the current Mobile booking-price list initializing, in-flight fetch, search, refresh, and load-more behavior against POS Terminal
bookingPrice. - Added a dedicated POS Terminal booking-price split-list loader backed by the Mobile-compatible
getBookingPricesservice so panel 2 no longer stops at the generic first-page list. - Updated booking-price pagination to keep the next page,
hasMore, and initial-load state in refs so early or rapidonEndReachedevents cannot load more before page 1 finishes or reuse stale page state. - Wired booking-price search, clear-search, pull-to-refresh, initial menu loading, and list footer load-more to the dedicated loader while preserving split-list normalization and 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 typecheckbecause the system temp volume was full. - Docs updated:
governance/change-log
Storefront list load-more guard parity refresh
- Re-audited the current Mobile storefront list initializing and in-flight fetch guards against POS Terminal
shippingStorefrontsplit-list pagination. - Updated POS Terminal storefront pagination to keep the next page,
hasMore, and initial-load state in refs so early or rapidonEndReachedevents cannot load more before page 1 finishes or reuse stale page state. - Preserved the existing POS Terminal invoice-status filter, storefront invoice query, and split-list 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 typecheckbecause the system temp volume was full. - Docs updated:
governance/change-log
Shipping-route list load-more guard parity refresh
- Re-audited the current Mobile shipping-route list initializing and in-flight fetch guards against POS Terminal
shippingRoutesplit-list pagination. - Updated POS Terminal shipping-route pagination to keep the next page,
hasMore, and initial-load state in refs so early or rapidonEndReachedevents cannot load more before page 1 finishes or reuse stale page state. - Preserved the existing POS Terminal delivery-status filter and split-list 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 typecheckbecause the system temp volume was full. - Docs updated:
governance/change-log
Expense-bill list load-more guard parity refresh
- Re-audited the current Mobile expense-bill list initializing and in-flight fetch guards against POS Terminal
expenseBillsplit-list pagination. - Updated POS Terminal expense-bill pagination to keep the next page,
hasMore, and initial-load state in refs so early or rapidonEndReachedevents cannot load more before page 1 finishes or reuse stale page state. - Preserved the existing POS Terminal split-list item-id deduplication and page-limit stop condition.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Deposit list load-more guard parity refresh
- Re-audited the current Mobile deposit list initializing and in-flight fetch guards against POS Terminal
depositsplit-list pagination. - Updated POS Terminal deposit pagination to keep the next page,
hasMore, and initial-load state in refs so early or rapidonEndReachedevents cannot load more before page 1 finishes or reuse stale page state. - Preserved the existing POS Terminal retry-only filter, split-list item-id deduplication, and page-limit stop condition.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Vehicle list load-more guard parity refresh
- Re-audited the current Mobile vehicle list initializing and in-flight fetch guards against POS Terminal
vehiclesplit-list pagination. - Updated POS Terminal vehicle pagination to keep the next page,
hasMore, and initial-load state in refs so early or rapidonEndReachedevents cannot load more before page 1 finishes or reuse stale page state. - Preserved the existing POS Terminal vehicle status normalization, license-plate deduplication, and
PAGESIZEstop condition for 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
- Re-audited the current Mobile customer address request list initialized and in-flight fetch guards against POS Terminal
customerAddressManagementsplit-list pagination. - Updated POS Terminal customer-address pagination to keep the next page,
hasMore, and initial-load state in refs so early or rapidonEndReachedevents cannot load more before page 1 finishes or reuse stale page state. - Preserved the existing POS Terminal customer-address request service query, selection key behavior, and split-list item-id deduplication.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Customer activation list load-more guard parity refresh
- Re-audited the current Mobile customer request list initialized and in-flight fetch guards against POS Terminal
customerActivationsplit-list pagination. - Updated POS Terminal customer-activation pagination to keep the next page,
hasMore, and initial-load state in refs so early or rapidonEndReachedevents cannot load more before page 1 finishes or reuse stale page state. - Preserved the existing POS Terminal customer-activation route and shipping-type filters, request-mode service query, and split-list item-id deduplication.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Product list load-more guard parity refresh
- Re-audited the current Mobile product inventory list subscription behavior against POS Terminal
productsplit-list pagination. - Kept POS Terminal's paged inventory sync/read strategy for the split-list panel, but updated product pagination to keep the next page,
hasMore, and initial-load state in refs so early or rapidonEndReachedevents cannot load more before page 1 finishes or reuse stale page state. - Preserved the existing POS Terminal all/booking tab, search, branch warehouse-code filtering, zero-price filtering, and split-list item-id deduplication.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Credit-note list load-more guard parity refresh
- Re-audited the current Mobile credit-note list initializing and in-flight fetch guards against POS Terminal
creditNotesplit-list pagination. - Updated POS Terminal credit-note pagination to keep the next page,
hasMore, and initial-load state in refs so early or rapidonEndReachedevents cannot load more before page 1 finishes or reuse stale page state. - Preserved the existing POS Terminal status filter, return-only filter, and split-list item-id deduplication.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Employee list load-more guard parity refresh
- Re-audited the current Mobile employee list initialized and in-flight fetch guards against POS Terminal
employeesplit-list pagination. - Updated POS Terminal employee pagination to keep the next page,
hasMore, and initial-load state in refs so early or rapidonEndReachedevents cannot load more before page 1 finishes or reuse stale page state. - Preserved the existing POS Terminal employee profile fallback, permission gates, and split-list item-id deduplication.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Customer list load-more guard parity refresh
- Re-audited the current Mobile customer list initialized and in-flight fetch guards against POS Terminal
customersplit-list pagination. - Updated POS Terminal customer pagination to keep the next page,
hasMore, and initial-load state in refs so early or rapidonEndReachedevents cannot load more before page 1 finishes or reuse stale page state. - Preserved the existing POS Terminal customer route and shipping-type filters plus 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
- Re-audited the current Mobile invoice list bootstrap and in-flight fetch guards against POS Terminal
invoicesplit-list pagination. - Updated POS Terminal invoice pagination to keep the next page,
hasMore, and initial-load state in refs so early or rapidonEndReachedevents cannot load more before page 1 finishes or reuse stale page state. - Preserved the existing POS Terminal invoice pending-B1/manual-payment query behavior, including department-3 all-user loading and date guards for other users.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Sales-order list load-more guard parity refresh
- Re-audited the current Mobile order list initial-load and in-flight fetch guards against POS Terminal
salesOrderandsalesOrderReviewsplit-list pagination. - Updated POS Terminal sales-order pagination to keep the next page,
hasMore, and initial-load state in refs so early or rapidonEndReachedevents cannot load more before page 1 finishes or reuse stale page state. - Preserved the existing
salesOrderReviewhasMorerule based on the raw source count, so review pagination still continues across API pages that contain only already-shipped rows. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Transport list initial-load guard parity refresh
- Re-audited the current Mobile transport list initial-load guard against the POS Terminal
transportsplit-list implementation. - Updated POS Terminal transport pagination to keep the next page,
hasMore, and initial-load state in refs so early or rapidonEndReachedevents cannot load more before page 1 finishes or reuse stale page state. - Kept the existing POS Terminal duplicate item merge by split-list item id, matching Mobile's duplicate-row protection in terminal form.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Order shipping-type preservation current-source refresh
- Re-audited the current Mobile order-detail shipping-type preservation fix against POS Terminal order creation and detail update flows.
- Updated POS Terminal customer-to-order shortcut payload creation to preserve the customer's
shippingTypedirectly instead of forcing non-main branch orders to storefront. - Updated POS Terminal order detail shipping-type changes to send the selected value directly, matching Mobile's current
normalizeShippingTypeForBranchbehavior and preventing persisted delivery orders from being rewritten to storefront during later edits. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Borrow list duplicate-loading parity
- Re-audited the current Mobile borrow list duplicate-loading fix against the POS Terminal
borrowFishsplit-list implementation. - Updated POS Terminal borrow pagination to mirror Mobile's ref-based guard pattern: the list now keeps the next page,
hasMore, and initial-load state in refs so rapidonEndReachedevents cannot reuse stale page state or load more before page 1 finishes. - Kept the existing POS Terminal duplicate item merge by split-list item id, so append loads remain stable if the API returns an overlapping item.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Transport Google route sorting current-source parity audit
- Re-audited current Mobile transport Google route sorting against POS Terminal
TransportDetailForm,ShippingSortPlannerModal, andservices/googleRoutes. - Confirmed POS Terminal matches Mobile route optimization behavior: uses current GPS as origin, filters customers with valid customer codes and coordinates, blocks empty GPS lists, enforces the 26-point Google Routes limit, chooses the farthest customer as destination, sends remaining coordinates as optimized intermediates, appends customers without coordinates after optimized customers, and saves the final sequence through
sortTransportCustomers. - Confirmed POS Terminal keeps the Mobile sort-planner controls and labels in terminal form, including clear, toggle shortened/full names, save validation for unsorted customers, and
จัดเรียงลูกค้าตามพิกัดด้วย Google. - No POS Terminal source change was needed in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Goods receipt quantity current-source parity audit
- Re-audited current Mobile goods-receipt quantity rules against POS Terminal
GoodsReceiptDetailForm. - Confirmed POS Terminal matches Mobile zero-quantity behavior: line and Lot/Batch quantities may be
0, blank and negative quantities are blocked, and the stock-in payload includes every line including lines whose received totalcalis0. - Confirmed POS Terminal matches Mobile partial/over receipt behavior by sending each submitted line
quantityfrom received totalcalwithout requiringcalto equal the original document quantity. - No POS Terminal source change was needed in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Credit-note location current-source parity refresh
- Re-audited current Mobile credit-note return-location behavior against POS Terminal
CreditNoteDetailForm. - Confirmed POS Terminal still matches Mobile location permissions, Lot/Batch loading from product lots, single-lot payload shape, B1 preflight requiring return-item locations, and warehouse checklist validation before sending return credit notes to B1.
- Updated POS Terminal item action row visibility so location-only users only see an action row for return items, matching Mobile's
canEditItem || (isReturn && canEditItemLocation)action-opening rule and avoiding empty action rows on non-return discount-only items. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Order benefit current-source parity refresh
- Re-audited current Mobile order point, coupon, and credit-note benefit handlers against POS Terminal
OrderDetailForm. - Confirmed POS Terminal still matches Mobile credit-note OTP endpoints, 10-digit phone validation, confirmation refresh, used credit-note blocking/visual state, company amount validation, point OTP retry cooldown, and remove-benefit endpoints.
- Aligned POS Terminal coupon submission with Mobile by removing the extra pre-submit block that rejected coupon usage when a credit-note discount was already present; Terminal still keeps Mobile's duplicate-coupon guard and the Mobile credit-note guard when a coupon is already used.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Branch selection and startup notification parity
- Re-audited Mobile branch selection, selected-branch storage, tax loading, and branch-settings navigation against POS Terminal
BranchScreenand app-level setup flow. - Confirmed POS Terminal matches Mobile branch behavior in terminal form: fallback/user-specific branch loading, warehouse-sub filtering, main-warehouse permission insertion, selected warehouse payload storage, tax cache refresh, and best-effort tax loading after navigation state is updated.
- Updated POS Terminal app boot to request notification permission through the existing Firebase notification service, matching Mobile startup behavior before later login-time FCM token refresh and patching.
- Updated POS Terminal startup branch gating to depend on the stored branch only, matching Mobile's
hasSelectedBranchdecision and keeping tax as a best-effort cache instead of forcing branch re-selection when tax loading failed. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Entry-flow current-source parity audit
- Re-audited Mobile login/header required-update, native app version, reset-password, FCM-token patch, and alcohol-check behavior against POS Terminal user-selection and home entry flows.
- Confirmed POS Terminal still matches the current Mobile app behavior: required app updates block login/home with the same modal copy and version target, refresh/focus checks re-run update validation, selected-user and employee-code login paths preserve reset-password fallback, login saves token/user/login date after alcohol validation, and FCM token fields are patched with the same permission payload.
- No POS Terminal source change was needed in this pass.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Transport trip-action parity refresh
- Re-audited Mobile transport list/detail behavior against POS Terminal
transport. - Confirmed POS Terminal matches 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, and print helpers in terminal split-panel form.
- Updated POS Terminal transport start/finish submit handlers to repeat Mobile's final guards at submit time, including finalized-delivery checks before starting, completed-customer/deposit/oil checks before finishing, distinct mileage validation messages, and success feedback after finishing a trip.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Vehicle list/status parity refresh
- Re-audited Mobile vehicle list and status-edit behavior against POS Terminal
vehicle. - Confirmed POS Terminal matches Mobile vehicle loading through
getVehicles, search, dedupe by license plate, status edit throughPATCH /vehicles/:licensePlate/vehicle-status, status-note editing, and terminal-native split-panel detail behavior. - Aligned POS Terminal vehicle list card status labels and tones with Mobile:
READYis green,NOT_READYis amber,UNCHECKEDis red, and unknown statuses fall back toREADY. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Expense bill list/detail parity audit
- Re-audited Mobile expense-bill list/detail behavior against POS Terminal
expenseBill. - Confirmed POS Terminal matches Mobile list loading with branch-scoped
ignoreDraft=truequeries,pageLimit=200, search, pagination/dedupe, card tones for draft/retry-ready/sent bills, always-visible delete action, and retry visibility only for non-draft bills withoutRefKey. - Confirmed POS Terminal matches Mobile detail behavior for create/update validation, company/partner/vehicle selectors, vehicle mileage lookup, editable date permission through
editDeliveryDateor accounting department, draftbranchId=0update path, send-slip-later date toggle, transport-bill context, and split-panel refresh callbacks. - No additional POS Terminal source changes were required.
- Docs updated:
governance/change-log
Deposit list/detail parity refresh
- Re-audited Mobile deposit list/detail behavior against POS Terminal
deposit. - Confirmed POS Terminal matches Mobile retry-only filtering, retry/delete permission rules, card tones for deleted/retry-ready/sent deposits, create/detail payload mapping, invoice selection amount/notes calculation, bank/cash/company selectors, transport-deposit context, and split-panel refresh behavior.
- Updated POS Terminal deposit service pagination to request
pageLimit=200, matching Mobile's deposit-specific list page size and the terminal split-listhasMorethreshold. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Customer activation request parity refresh
- Re-audited Mobile customer request list/detail behavior against POS Terminal
customerActivation. - Confirmed POS Terminal still matches Mobile request-mode loading with
isRequest, search, route and shipping-type filters, pagination/dedupe, request status cards, request permission gates, approve/reject endpoints, refresh behavior, and terminal-native split-panel navigation. - Aligned POS Terminal approve/reject confirmation messages with the current Mobile customer request detail wording.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Customer address management parity audit
- Audited Mobile customer address GPS request list/detail behavior against POS Terminal
customerAddressManagement. - Confirmed POS Terminal matches Mobile list loading, search, pagination/dedupe, approved/rejected card tones, request-id guards, detail maps for old/new coordinates, pending-only approve/reject actions, confirmation copy, endpoint calls, and success/error feedback.
- Confirmed POS Terminal keeps a terminal-native route filter without changing the Mobile-equivalent default list behavior.
- No additional POS Terminal source changes were required.
- Docs updated:
governance/change-log
Credit note list/detail parity
- Audited Mobile credit-note list loading, return-only filtering, delete permissions, detail save/status transitions, item edit/location rules, image upload/delete, and B1 submission guards against POS Terminal
creditNote. - Confirmed POS Terminal already matches Mobile list behavior for branch-scoped queries, status/search filters, default return-only filter, pagination/dedupe, status labels/colors, and list delete permission gates.
- Updated POS Terminal credit-note detail permissions so
RECEIVEDis the only Mobile-style received lock for item actions and B1 visibility;APPROVED/APPROVE/CANCELEDno longer get treated as the received lock in the detail screen. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Borrow list/detail parity
- Audited Mobile borrow list loading, cancel permissions, product add/edit guards, draft confirmation, B1 accept/complete/retry actions, and borrow printing against POS Terminal
borrowFish. - Confirmed POS Terminal already matches Mobile borrow list query and pagination, branch warehouse-group filtering, cancel permission gates, status colors, B1 department/admin handling, detail refresh, list refresh, and pack/storage print split by branch type.
- Updated POS Terminal borrow product add flow so users can add products before choosing
borrowType, matching Mobile;borrowTypeis still required when confirming the borrow document. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Booking price list/detail parity
- Audited Mobile booking-price list deletion, list query, detail permission gates, item save/delete, header save, and convert-to-order behavior against POS Terminal
bookingPrice. - Confirmed POS Terminal already matches Mobile list loading with branch context, blank
userCode, blank status filter, warehouse group filter, delete permission gates, detail created-day guard, owner checks, fill-weight/edit-price overrides, and DRAFT/NEW/DONE/CANCELED/DELETED locks. - Updated POS Terminal booking-price item payloads so
companyNamefalls back fromcompanyCodethe same way Mobile's shared order-item payload builder does. - Aligned POS Terminal convert-to-order fallback error text with Mobile while keeping the terminal-native split-panel transition into the created sales order.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Storefront list/detail parity
- Audited Mobile storefront list, card state, detail accept prompt, lot submission, and cancel request behavior against POS Terminal
shippingStorefront. - Confirmed POS Terminal already matches Mobile list loading for storefront invoices:
shippingType=2, status/search tabs,refKeyand invoice-id filtering, dedupe behavior, card colors, and blocking canceled invoices from opening detail. - Updated POS Terminal storefront detail cancel action so main branches can open the cancel flow whenever the Mobile menu would show it, letting the shared cancel business rules decide whether the request is allowed.
- Aligned POS Terminal storefront submit/cancel fallback error messages with Mobile while keeping the same add-invoice-to-delivery, add-lots, create-delivery, refresh-detail, and refresh-list flow.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Invoice manual-mode query parity
- Audited Mobile invoice manual-payment mode data loading against POS Terminal invoice pending-B1/manual mode list loading.
- Updated POS Terminal invoice pending-B1 queries to normalize numeric user codes to six digits before sending them to the API, matching Mobile invoice list behavior.
- Updated POS Terminal invoice pending-B1/manual mode queries so department
3loads all users without a user-code filter, matching Mobile manual-payment mode behavior. - Kept the existing non-department-3 date guard for yesterday-through-today pending-B1 invoices.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Invoice cancel swipe-state parity
- Audited Mobile invoice cancel request swipe behavior, owner/special-user checks, and approve/reject modal flow against POS Terminal invoice split-list and cancel modal.
- Updated POS Terminal invoice owner checks for B1/cancel actions to normalize numeric user codes to six digits before comparison, matching Mobile's
normalizeUserCodebehavior. - Updated POS Terminal invoice left-swipe rendering to show Mobile-style disabled reasons for invoices that cannot manage cancel requests: non-owner, no pending cancel request, or already canceled.
- Kept approve/reject modal and API handlers aligned with Mobile while ensuring disabled swipe actions do not open the cancel-management modal.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Invoice B1 swipe-state parity
- Audited Mobile
InvoiceListScreensend-to-B1 swipe states, date guard, manual-payment selection, and cancel request handling against POS Terminal invoice split-list behavior. - Confirmed POS Terminal single-invoice send-to-B1 handler already applies the Mobile date guard, ref-key guard, cancel-request guard, confirmed-order guard, confirmation alert, and refresh behavior.
- Updated POS Terminal invoice right-swipe rendering so invoices with a pending cancel state and non-confirmed status show a disabled “ทำรายการไม่ได้” action instead of an active “ส่ง B1” action, matching Mobile's pre-action state.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Order review bulk-payment selection parity
- Audited Mobile
OrderListScreenshipping-review bulk payment selection and submit behavior against POS TerminalsalesOrderReviewsplit-list bulk payment flow. - Confirmed POS Terminal bulk payment already mirrors Mobile's CASH/TRANSFER modal, per-order
payOrdersubmission, invoice-amount fallback, partial-failure reporting, and list refresh. - Updated POS Terminal
salesOrderReviewselection to prune selected orders after the visible list refreshes, matching Mobile's behavior and preventing stale selections from being paid after filters or refreshes change the list. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Order payment QR flow parity
- Audited Mobile
OrderPaymentScreen,OrderPaymentMethodSection, order-payment utils, QR generation, invoice print, retry-invoice, and payment submit behavior against POS TerminalOrderDetailForm. - Updated POS Terminal order payment so selecting
QRautomatically loads QR Payment when the payment section is open, matching Mobile's auto QR generation behavior. - Updated POS Terminal QR payment behavior to hide the normal payment-submit action for
QRand guardhandleSubmitPaymentfrom submitting QR as a cash payment; QR now uses create/share/check-payment actions like Mobile. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Employee profile settings parity audit
- Audited Mobile
EmployeeProfileScreen,HeaderHomeprofile navigation, employee profile password-reset flow, and auth reset-password services against POS Terminal settings profile action andEmployeeDetailForm. - Confirmed POS Terminal maps the Mobile dedicated profile route into a terminal-native settings action that opens the current user in the employee split panel with live detail loading.
- Confirmed POS Terminal covers Mobile profile basics and own-password flow: user name, email, department, user code, request reset salt, edit salt/reset-password fields, submit new password, and logout after changing the current user's password.
- Confirmed POS Terminal additionally preserves employee admin permission editing and branch/warehouse transfer-receive settings in the same employee detail panel.
- Updated POS Terminal employee detail password policy so the full new-password form is enabled only for the logged-in user's own profile; managers/admins still use the Mobile-equivalent reset-salt action for other users.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Notification settings parity audit
- Audited Mobile
NotificationsScreen, Home foreground-notification registration, login FCM token refresh, andservices/notificationsagainst POS Terminal settings notification modal, user-selection login flow, Home foreground handler, and notification service. - Confirmed POS Terminal keeps the Mobile notification test behavior in a terminal-native settings modal instead of a dedicated route: refresh current FCM token, show a selectable token, clear the old token and request a new one, and register foreground/background handlers.
- Confirmed POS Terminal login still refreshes and stores the FCM token with login payload data, matching Mobile login behavior.
- No additional POS Terminal source changes were required.
- Docs updated:
governance/change-log
Order item shortcut payload parity
- Audited current Mobile order item creation paths for duplicate invoice item import and product-picker submission against POS Terminal Home order shortcuts.
- Updated POS Terminal Home order shortcuts to build order item payloads with the same order-specific fields used by Mobile and
OrderDetailForm:onHand,bookingQty,uomCode/uomName, warehouse code/group fields, company fallback, VAT group, current step price, andeditPriceBy. - Kept borrow document item creation on the existing borrow-specific payload helper so borrow flows remain unchanged.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Customer-to-document branch shipping parity
- Audited current Mobile customer list/detail creation flows for sales order, booking price, and borrow documents against POS Terminal Home split-panel document creation.
- Updated POS Terminal sales-order creation from a selected customer/product so branch-specific draft payloads now force storefront shipping type (
2) outside the main branch, matching Mobile order draft behavior. - Updated POS Terminal customer document draft helpers so booking/borrow draft creation uses the same branch shipping-type rule and carries ShipTo latitude/longitude into the draft payload.
- Updated customer-to-order address mapping to fall back billing address to the first customer address and to keep route data from the shipping address, matching current Mobile draft mapping more closely.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Customer picker list parity
- Audited Mobile customer list selection behavior for sales order, booking price, and borrow creation against POS Terminal
CustomerPickerModaland Home document creation handlers. - Updated POS Terminal customer picker filters to default to all shipping types and added the “ทั้งหมด” shipping filter chip, matching Mobile's customer list default instead of showing only delivery-route customers first.
- Updated POS Terminal customer picker pagination to keep loading while the API returns rows and to deduplicate appended customers by customer id, id, or customer code, matching Mobile customer list behavior.
- Kept terminal-native customer detail preview and split-panel document creation flow unchanged.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Split-list swipe interaction parity
- Audited Mobile
SwipeableFlashListrow coordination and common list load-more/refresh behavior against POS TerminalSwipeableRowand HomeListPane. - Updated POS Terminal
SwipeableRowto expose close/reset methods and open/close callbacks so parent lists can coordinate open swipe actions the same way Mobile does. - Updated POS Terminal
ListPaneto close the previously opened row when another row opens and to close open swipe actions when list scrolling begins, matching Mobile'sSwipeableFlashListbehavior across terminal split-list menus. - Kept terminal-native split-panel list controls and per-menu swipe actions unchanged.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Printing utility and print-demo parity audit
- Audited Mobile
PrintDemoScreen, core print helpers, shipping print helpers, and print-log behavior against POS Terminal Home settings print demo andprinting/printutilities. - Confirmed POS Terminal exposes the Mobile 16K sample print as a terminal settings action instead of a separate route, with terminal-native loading and alert handling.
- Confirmed POS Terminal print utilities cover Mobile's order pack/storage, borrow pack/storage, invoice print with QR assets and tax/branch/user context, shipping invoice print, shipping invoice batch template, shipping product summary, and print-log best-effort behavior.
- Confirmed POS Terminal preserves the current Mobile-visible shipping invoice row print and transport product-summary print actions while keeping terminal-specific split-panel entry points.
- No additional POS Terminal source changes were required.
- 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
- Audited Mobile branch selection, branch storage, tax storage, branch/tax service calls, and RootNavigator branch-required flow against POS Terminal
App,BranchScreen, storage helpers, and auth/common services. - Confirmed POS Terminal matches Mobile's branch loading contract by fetching all selectable branches with fallback user
999999and the current user's branch list separately. - Confirmed POS Terminal matches Mobile's warehouse selection behavior: sub-warehouse filtering, main-warehouse inclusion only when the selected main branch is in the current user's branches, selected warehouse payload shape, branch save before moving to the next app step, and best-effort tax fetch/save after branch selection.
- Confirmed POS Terminal preserves the terminal-native branch settings return path from both user selection and Home while keeping the same branch/tax context contract as Mobile.
- No additional POS Terminal source changes were required.
- Docs updated:
governance/change-log
Login required-update and alcohol-check parity
- Audited Mobile login, reset-password, FCM token refresh, user permission patching, required app update, native app version, and alcohol-check services against POS Terminal
UserSelectionScreen, app update hook, and entry-flow services. - Confirmed POS Terminal covers Mobile's missing-required-values reset transition in both selected-user and employee-code login paths, password reset payload, alcohol-check department and bypass rules, FCM token patch, and required-update modal contract.
- Updated POS Terminal native app version fallback to match Mobile by returning blank version fields when the native
AppVersionModuledoes not return values, preventing required-update checks from using a syntheticversionCode=1. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Customer management parity update
- Audited Mobile customer services, customer list/detail, customer management edit/detail, customer address GPS request list/detail, and customer activation request behavior against POS Terminal customer split-list services and detail forms.
- Confirmed POS Terminal covers Mobile's customer call logging, status updates, address creation, default-address selection, GPS update request, customer draft approve/reject, customer activation approve/reject, and customer address GPS approve/reject endpoint contracts.
- Updated POS Terminal customer management draft saves to enforce the same required first name, last name, birthday, customer type, and know-us validation for both create and update as Mobile.
- Updated POS Terminal customer management draft payloads to format 10-digit phone numbers with hyphens and omit
aliasNamewhen editing a draft tied to an existing SAP customer, matching Mobile save behavior. - Added the Mobile-equivalent “auto-create ShipTo” action to the POS Terminal customer management address editor so adding a new address can also create the delivery address copy.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Expense bill and invoice financial-flow parity
- Audited Mobile expense bill services, list pagination, detail form permissions, vehicle mileage loading, partner/company selectors, create/update payloads, transport update flow, delete, and retry behavior against POS Terminal
ExpenseBillDetailForm, split-list handlers, andexpenseBillservice. - Updated POS Terminal
getExpenseBillsto requestpageLimit=200, matching Mobile and the terminal split-listhasMorethreshold, so all expense-bill entry points share the same pagination contract. - Audited Mobile invoice list, pending-B1 tab, manual payment selection, summary modal, send-to-B1 guards, approve/reject cancel flow, invoice detail, duplicate-order action, and invoice services against POS Terminal
InvoicePanels, Home invoice handlers, split-list services, andinvoicesservice. - Confirmed POS Terminal matches Mobile's invoice query parameters, pending-B1 200-row query, manual-selection guards for
refKey, pending cancel, and confirmed order status, single-send date guard, selected-send action, cancel approval/reject endpoints, and summary endpoint. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Transfer flows current-source parity audit
- Re-audited Mobile Transfer In, Transfer Out, and Transfer Warehouse services, list screens, detail screens, product pickers, Lot/Batch pickers, submit payloads, delete actions, and B1 submission behavior against the POS Terminal split-panel transfer implementations.
- Confirmed POS Terminal matches Mobile's Transfer In context tabs, product inventory subscription, dummy-product handling, batch quantity normalization, transfer-in submit payload, and branch/user fallback fields.
- Confirmed POS Terminal matches Mobile's Transfer Out batch picker, duplicate batch guard, available-quantity guard, pending-quantity validation, complete-batch-before-submit rule, and transfer-out submit payload.
- Confirmed POS Terminal matches Mobile's Transfer Warehouse list fetch/delete, header create/update, warehouse picker, item create/update/delete, batch selection, send-to-B1 guard, and transfer-branch endpoint contract while preserving the terminal-native split-panel save model.
- No additional POS Terminal source changes were required.
- Docs updated:
governance/change-log
Goods receipt current-source parity audit
- Re-audited Mobile goods receipt list/detail, stock-in service, product picker, shared dummy-product helper, line quantity validation, Lot/Batch editing, Lot/Batch delete, and stock-in submit payload against POS Terminal
GoodsReceiptDetailFormandgoodsReceiptsservice. - Confirmed POS Terminal matches Mobile's 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, and stock-in endpoint.
- Confirmed POS Terminal keeps a terminal-native split-panel UI and additionally guards duplicate batch numbers before submit without changing the Mobile-equivalent payload contract.
- No additional POS Terminal source changes were required.
- Docs updated:
governance/change-log
Product inventory and add-to-order parity
- Audited Mobile product list/detail, product services, step-price display, and add-to-sales-order payload behavior against POS Terminal product split-list,
ProductDetailForm, product services, and Home sales-order creation handler. - Updated POS Terminal inventory queries to use the same warehouse-code set as Mobile (
whsGrpCode,PC-{whsGrpCode}, andNF-{whsGrpCode}) and to filter out zero-price products in the product inventory list. - Aligned POS Terminal step-price normalization and tier labels with Mobile's
from/From,price/Price,ไม่เกิน, andเกิน ... ไม่เกินbehavior. - Updated the terminal add-to-order item payload company-name fallback to include lowercase
comName, matching the product detail display and Mobile payload fallback coverage. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Order payment invoice print QR parity
- Audited Mobile
OrderPaymentScreeninvoice print, duplicate invoice guard, retry invoice, slip upload, QR payment, and payment submit behavior against POS TerminalOrderDetailForm. - Updated POS Terminal payment invoice printing to pass the current order detail into
printInvoice, matching Mobile's invoice print context so QR generation can use order-level amount and point/coupon/credit-note discounts. - Kept the terminal split-panel payment flow, duplicate-invoice blocking, retry refresh, and payment payload behavior unchanged.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
QR service and service-export coverage audit
- Re-audited Mobile
services/qragainst POS Terminalservices/qr, including SCB token requests, signed QR payment payloads, FirestoreqrPaymentcache reads/writes, claim QR generation, transport QR reference formatting, blank fallback assets, and invoice print QR asset behavior. - Confirmed POS Terminal matches the Mobile QR contracts while keeping the terminal-specific helper boundary for QR amount calculation.
- Re-ran a current-source service export coverage audit with
export *resolution across all 30 Mobile service files and confirmed POS Terminal service coverage hasmissingCount: 0. - No additional POS Terminal source changes were required.
- Docs updated:
governance/change-log
Home menu permission current-source audit
- Re-audited current Mobile Home menu visibility, branch gates, and shortcut create permission sets against POS Terminal
terminalMenus,canAccessMenu, and list-panel create controls. - Confirmed POS Terminal still matches Mobile department allowlists for 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, and the Home create shortcut sets.
- Confirmed POS Terminal preserves Mobile-equivalent non-main branch access for stock menus and main-branch gates for shipping route, borrow, transport, and expense bill while keeping terminal-native split-panel create buttons.
- Rechecked the current runtime create entry points and confirmed
ListPaneusescanCreateSalesOrder,canCreateShippingRoute,canCreateTransport, andcanCreateDepositsets that match Mobile Home shortcut visibility; no stale helper set is used by the visible shipping-route create button. - No additional POS Terminal source changes were required.
- 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-audited Mobile
NotificationsScreenand notification services against the POS Terminal settings notification modal andnotificationsservice. - Confirmed both apps use the same Firebase modular messaging boundary for permission requests, background handler registration, foreground notification handling, token refresh, and clear-and-refresh token behavior.
- Confirmed POS Terminal preserves Mobile's token inspection and clear-token utility inside the terminal settings modal, with terminal-specific loading and alert handling.
- Docs updated:
governance/change-log
Customer address source current-diff re-audit
- Rechecked the current Mobile diff for
dbAddressextraction and customer/customer-management address option normalization against POS TerminalCustomerDetailFormandCustomerManagementDetailForm. - Confirmed POS Terminal already imports
dbAddressfrom@bsr/utilsand string-normalizes district, amphoe, province, and zip code values for both customer and customer-management address pickers. - No additional POS Terminal source changes were required.
- Verified with
yarn workspace @bsr/pos-terminal typecheckandyarn workspace @bsr/mobile tsc --noEmit. - Docs updated:
governance/change-log
Current route and service coverage re-audit
- Rebuilt the Mobile route list from the current
apps/mobile/src/navigation/RootNavigator.tsxand mapped all 49 routes to POS Terminal Home split-panel menus, detail forms, branch/login screens, or settings utilities. - Confirmed the current route mapping has
missingCount: 0; Mobile-only stack screens such asOrderPayment,CustomerManagementEdit,Notifications, andPrintDemoare represented by terminal-native panels or settings actions. - Re-ran the Mobile-vs-POS Terminal service export coverage audit across 30 Mobile service files and confirmed no missing terminal service files or missing exported service helpers after applying the terminal singular/plural filename aliases.
- No additional POS Terminal source changes were required.
- Docs updated:
governance/change-log
Storefront cancel-note validation parity
- Audited Mobile storefront list/detail, helper permissions, lot payload submission, accept flow, cancel flow, and services against POS Terminal
StorefrontDetailForm,StorefrontDetailHelpers, and split-list services. - Confirmed POS Terminal matches Mobile's storefront list filters, invoice detail endpoint, accept endpoint, non-main-branch accept rollout, stock-check permissions, Lot/Batch payload, submit-to-B1 sequence, and cancel guard for discounted/Incoming invoices.
- Updated POS Terminal cancel submission to require a non-empty cancel reason before calling the cancel API, matching Mobile's
กรุณาระบุเหตุผลการยกเลิกvalidation, and aligned the success message. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Borrow item edit stock parity
- Audited Mobile borrow list/detail permissions, status actions, item create/edit/delete, print actions, and borrow services against POS Terminal
BorrowDetailForm, Home borrow handlers,BorrowPanels, and borrow services. - Confirmed POS Terminal matches Mobile's borrow type options, create/cancel/B1 department gates, confirm/accept/complete/retry actions, item id fallback for update/delete, max 3 items, max 3 pieces per item, and pack/storage print guards.
- Updated POS Terminal borrow item edit stock validation to add the original line quantity back into editable stock when editing the same product, matching Mobile's edit flow so an existing borrow item is not blocked by its own booking quantity.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Deposit transport amount edit parity
- Audited Mobile deposit list/detail, invoice selection, company/cash/bank account pickers, retry/delete actions, transport deposit create flow, and deposit services against POS Terminal
DepositDetailForm,DepositPanels, split-list handlers, and deposit services. - Confirmed POS Terminal matches Mobile's deposit filters, retry-only mode, delete/retry gates, selected-invoice amount and notes derivation, company code normalization, bank/cash account loading, transport update after deposit creation, and 200-row deposit pagination.
- Updated POS Terminal deposit create mode so the amount field remains editable in transport-originated deposits when no invoices are selected, matching Mobile's
isCreateMode && selectedInvoices.length === 0rule. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Vehicle current-source parity audit
- Re-audited Mobile
VehicleListScreenandcommonvehicle services against POS TerminalVehicleDetailForm, vehicle split-list loading, andcommonvehicle services. - Confirmed POS Terminal matches Mobile's vehicle search, dedupe-by-license-plate behavior,
UNCHECKED/READY/NOT_READYnormalization, status labels and colors,updateVehicleStatuspayload, status note handling, and refresh-after-save behavior. - Confirmed the terminal keeps the behavior in a split-panel detail form instead of Mobile's status modal without changing the service contract.
- No POS Terminal source changes were required.
- Docs updated:
governance/change-log
Credit note draft item payload parity
- Audited Mobile credit-note helpers, list delete permission gates, create-from-invoice draft flow, save/send-to-B1 guards, item editing, and lot selection against POS Terminal
CreditNoteDetailForm, list actions, and Home handlers. - Confirmed POS Terminal uses the same status labels, department permission sets, delete rules, next-status behavior, B1 preflight checks, invoice item mapping, and lot update payload as Mobile while preserving the terminal split-pane workflow.
- Updated POS Terminal item submit callback dependencies so creating a credit note from a draft uses the latest edited header fields, including selected reason, warehouse, company, and branch data, when building the initial draft payload.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Customer shared address data parity audit
- Audited Mobile customer detail and customer-management edit updates that moved
dbAddressto@bsr/utilsand string-normalized Thai address fields. - Confirmed POS Terminal
CustomerDetailFormandCustomerManagementDetailFormalready importdbAddressfrom@bsr/utils, use the sharedThaiAddressRecordtype, and normalize district, amphoe, province, and zipcode values to strings before filling address pickers and payloads. - No POS Terminal code changes were needed in this pass.
- Docs updated:
governance/change-log
Shared dummy product stock-picker parity audit
- Audited Mobile dummy product extraction to
@bsr/utilsagainst POS Terminal goods receipt, transfer-in, and transfer-warehouse stock pickers. - Confirmed POS Terminal already imports
buildDummyProductsfrom@bsr/utilsin the same three stock flows, keeps the shared BFPDB/NFF dummy item sets, fills warehouse/company fields from the selected branch and document company, and applies the same product search behavior before showing picker rows. - No POS Terminal code changes were needed in this 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
Service filename alias parity audit
- Re-ran a Mobile-vs-POS Terminal service export audit from current source and reviewed apparent gaps caused by singular/plural service filenames.
- Confirmed POS Terminal covers Mobile
goodsReceipt,transferIn,transferOut, anduserexports through the terminal filesgoodsReceipts,transferIns,transferOuts, andusers, and the relevant Home detail forms import those terminal service boundaries directly. - Confirmed the extra
getTransferInsForTerminalhelper intentionally merges the main warehouse andNF-transfer-in tabs for the terminal split-list while preserving the MobilegetTransferInsandcreateTransferInendpoints. - No POS Terminal code changes were needed in this pass.
- Docs updated:
governance/change-log
Customer address management route parity audit
- Audited Mobile
CustomerManagementAddressListandCustomerManagementAddressDetailroutes against POS TerminalcustomerAddressManagementmenu, split-list loader, andCustomerAddressManagementDetailForm. - Confirmed POS Terminal loads
/customer-draft/address-lat-lngwith page/search/branch context, deduplicates appended list rows by request id, resolves detail ids fromidorcustomerDraftId, and uses the same approve/reject endpoints as Mobile. - Confirmed the terminal detail panel preserves Mobile's request summary, customer/address fields, requested and current coordinate map previews, pending-only approve/reject actions, and refreshes both detail and list after a decision.
- No POS Terminal code changes were needed in this pass.
- Docs updated:
governance/change-log
Employee transfer receive setting route parity audit
- Audited Mobile
EmployeeTransferReceiveSettingroute against the POS Terminal employee detail panel. - Confirmed POS Terminal folds the route into
EmployeeDetailFormwith the same branch loading, employee branch lookup, warehouse/sub-warehouse filtering, main-branch inclusion rule, branch warehouse permission fetch, optimistic warehouse toggle state, and create/update endpoints. - Confirmed Terminal keeps the split-panel access model by gating the embedded transfer receive setting behind employee manage permission while preserving the Mobile warehouse permission payload shape.
- Rechecked the current Terminal toggle implementation against Mobile and confirmed warehouse permission rows still match by
whsCode === whsGrpCode, create requests sendwhsCode,whsName, andcanApprove, update requests send the targetcanApprovestate, and permissions reload after each save. - No POS Terminal code changes were needed in this 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
Branch selector user-branch parity
- Audited Mobile
BranchScreenagainst the POS Terminal branch selector used from terminal settings. - Updated POS Terminal branch loading to match Mobile by loading all selectable branches with fallback user
999999and separately loading the current user's branch list from storeduserCode. - This keeps the terminal's existing theme/settings UI while making the main-warehouse inclusion rule respect the same user branch access as Mobile instead of treating every branch as user-owned.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Login missing-password reset parity
- Audited Mobile
LoginScreensign-in, alcohol check, FCM token patch, reset-password, and required-update guards against POS TerminalUserSelectionScreen. - Updated POS Terminal login error handling so
Missing required values/UnauthorizedException: Missing required values.opens the existing reset-password step, matching Mobile's automatic reset transition. - Applied the behavior to both terminal login entry points: selected sale-person password login and manual employee-code login.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Expense bill selection clear-search parity
- Audited Mobile expense-bill detail company, vehicle, partner, mileage, save, and transport-update flow against POS Terminal
ExpenseBillDetailFormand expense-bill services. - Added clear-search controls to the POS Terminal expense-bill selection modal, including vehicle remote search clearing that reloads page 1 with an empty query, matching Mobile
SelectionModalbehavior. - Reused the terminal modal surface and added only the missing clear action; company and partner searches clear locally while vehicle search clears and refetches.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Vehicle status parity audit
- Audited Mobile
VehicleListScreenandcommonvehicle services against POS TerminalVehicleDetailForm, vehicle split-list normalization, and common vehicle endpoints. - Confirmed POS Terminal normalizes
UNCHECKED/READY/NOT_READYstatuses, deduplicates vehicles by license plate, searches via the same MST vehicle endpoint, savesvehicleStatusplusvehicleStatusNote, patches the selected list/detail item, and refreshes the vehicle list after saving. - No code changes were needed in this pass.
- Docs updated:
governance/change-log
Order payment flow parity audit
- Audited Mobile
OrderPaymentScreen, order payment utilities, QR generation, slip upload, and payment submission against POS TerminalOrderDetailForm. - Confirmed POS Terminal covers invoice bootstrap/creation, duplicate invoice blocking, CASH/TRANSFER/QR payment channels, transfer slip upload and clearing, QR generate/share/check behavior,
QRtoCASHpayment payload mapping, and detail/list refresh after payment actions. - No code changes were needed in this pass.
- Docs updated:
governance/change-log
Transport QR payment reference parity
- Audited Mobile
services/qrtransport payment QR reference payload against POS Terminal QR generation. - Updated POS Terminal transport QR generation to build
ref1from transport id/number plus latitude andref2from customer code plus longitude, matching Mobile'sref3coordinate handling and customer-code normalization. - This keeps the existing terminal transport payment UI while aligning the QR payload sent to the SCB gateway.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Product detail create-order parity audit
- Audited Mobile product detail/list order-item creation flow against POS Terminal
ProductDetailForm,getProductSplitDetail, and Home create-order handler. - Confirmed POS Terminal loads product detail and step prices, validates quantity and weight-based items, creates the sales order after customer selection, adds the selected product item, and updates order amount/weight totals with the terminal-specific customer picker flow.
- Confirmed the item payload keeps Mobile-critical fields such as product code/name, quantity, price, amount, weight, UOM, warehouse, company, VAT, weight-base flag, and step-price flag.
- No code changes were needed in this pass.
- Docs updated:
governance/change-log
Employee menu and profile access parity
- Audited Mobile
getEmployeeAccess, employee list, detail, and profile behavior against POS Terminal Home employee menu/profile flow. - Updated POS Terminal menu filtering so
isAdminusers can open theผู้ใช้ทั้งหมดmenu even when their department code is outside the employee allowlist, matching Mobile's employee access policy. - Added a profile detail fallback so users can open their own profile from terminal settings even when the employee list menu is not visible to them; this preserves Mobile's self-profile access without exposing the full employee list.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Employee password management permission parity
- Audited Mobile employee detail password reset/change access against POS Terminal
EmployeeDetailForm. - Updated POS Terminal so users who can manage employee records can also use the inline reset/change-password flow for other employees, matching Mobile's
getEmployeeAccesspolicy; own-profile password changes remain available. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Required app update flow parity audit
- Re-audited Mobile
appUpdate,useRequiredAppUpdate, Login, and HeaderHome against POS TerminalappUpdate,useRequiredAppUpdate,RequiredAppUpdateModal,UserSelectionScreen, andHomeScreen. - Confirmed POS Terminal still reads Firestore
version/vapp, compares nativeversionCodewith the remote platform-awareversionNumber, and blocks the UI with a non-dismissible modal when an update is required. - Confirmed the terminal login-equivalent screen checks on mount and manual refresh, while Home re-checks on navigation focus like Mobile HeaderHome.
- No code changes were needed in this pass.
- Docs updated:
governance/change-log
Swipeable row action-layer parity
- Audited Mobile
SwipeableFlashListpost-RN-upgrade custom swipe row behavior against POS TerminalSwipeableRow. - Updated POS Terminal swipe rows so hidden action layers are not touchable before a row opens, action layers sit behind the item with the same z-index/elevation pattern, tapping an action closes the row after the action fires, and tapping the opened item overlay closes the row.
- This matches Mobile's bleed-through prevention behavior while preserving the existing POS Terminal
SwipeableRowAPI used by list cards and detail item rows. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Firebase modular API parity audit
- Audited Mobile RNFirebase v24 modular API cleanup against POS Terminal Firebase usage.
- Confirmed POS Terminal already uses modular
getApp(),getFirestore,getMessaging,collection,doc, and related helpers in app update checks, notifications, print logs, QR payment cache, product inventory subscriptions, and shipping route prefill checks. - No namespaced
firestore()ormessaging()calls remain in POS Terminal source, so no code changes were needed in this pass. - Docs updated:
governance/change-log
Transport signature modal sizing parity
- Audited Mobile transport signature modal sizing against POS Terminal
TransportDetailForm. - Updated the POS Terminal signature canvas to use the same responsive height rule as Mobile (
min 360,max 520,62%of window height), keeping the existing terminal modal surface. - Matched Mobile's signature canvas footer layout by switching the embedded web style to a flex column body/footer split and setting the clear/save button labels to
ลบandบันทึก. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Customer Tax ID parity audit
- Audited Mobile customer Tax ID field coverage against POS Terminal customer and customer-management detail flows.
- Confirmed POS Terminal already includes
taxIDin customer draft edit state and payloads, shows Tax ID in customer-management detail and customer detail, and exposes Tax ID in the customer picker detail card. - No POS Terminal code changes were needed in this pass.
- Docs updated:
governance/change-log
Home branch-focus list refresh parity
- Audited Mobile Home branch-focus refresh against POS Terminal Home focus handling.
- POS Terminal already reloads the stored login date, user, and branch on focus; added a branch context key to the Home list bootstrap effect so returning from branch/warehouse selection also clears stale detail state and reloads the current menu list for the newly selected warehouse.
- This keeps Terminal panel data aligned when switching between main and non-main warehouses without requiring a manual refresh or menu reselection.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Transport finalize permission rollback parity
- Audited Mobile transport detail sort/finalize permission rollback against POS Terminal
TransportDetailForm. - Confirmed POS Terminal transport sorting already requires the transport owner and has no
999999override. - Matched Mobile's finalize-all permission by adding
canFinalizeShippingSheetwith the same department set (-2, 1, 2, 4, 7, 8, 9, 13, 16, 29, 30) and using it for POS Terminalอนุมัติใบจัดทั้งหมดinstead of the broaderdeptCode !== 0check. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Shipping Lot/Batch guard-order parity audit
- Audited Mobile shipping-detail Lot/Batch open guards against POS Terminal
ShippingRouteDetailForm. - Confirmed POS Terminal already checks transportation assignment first, then blank
deliveryStatuswithขนส่งยังไม่ยืนยันใบจัดนี้, then product-check permission before allowing Lot/Batch selection, matching Mobile's current error priority. - No POS Terminal code changes were needed in this pass.
- Docs updated:
governance/change-log
Order storage print remark parity audit
- Audited Mobile order-detail storage print remark behavior against POS Terminal
OrderDetailForm. - Confirmed POS Terminal already shows a multiline print remark field, blocks storage prints when the remark is blank, updates the order with the remark, promotes draft orders to
NEW, reloads the order detail, and then prints the selected storage document variant with or without Lots. - No POS Terminal code changes were needed in this pass.
- Docs updated:
governance/change-log
Customer management selector parity audit
- Audited Mobile customer-management edit
customerTypeandknowusselector behavior against POS TerminalCustomerManagementDetailForm. - Confirmed POS Terminal already loads the same
/customer-typesand/knowusmaster data throughgetCustomerTypesandgetKnowUsOptions, filters picker rows by the display name, and saves both code and name fields into the draft payload. - No POS Terminal code changes were needed in this pass.
- Docs updated:
governance/change-log
Borrow detail edit/delete product recovery parity
- Audited Mobile borrow-detail item edit/delete behavior against POS Terminal borrow fish detail handling.
- Confirmed POS Terminal item delete already falls back from
itemIdtoid, matching Mobile's safe delete target resolution. - Updated POS Terminal borrow item edit saves to reuse the inventory record recovered by
productCodewhen building the update payload, preserving the current productitemCode, name, price, UOM, and warehouse fields instead of relying only on the persisted row snapshot. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Order create shipping-type preservation parity
- Audited Mobile order-detail shipping-type preservation and order creation payload builders against POS Terminal Home create flows.
- Matched Mobile's invoice-to-order duplicate payload by preserving the invoice
shippingTypeand falling back to"2"only when the invoice value is blank, instead of forcing non-main branches to storefront. - Matched Mobile's customer-to-order payload by using the customer
shippingTypedirectly instead of rewriting non-main branch orders to storefront. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
RootNavigator route coverage audit
- Rebuilt the Mobile route list from
apps/mobile/src/navigation/RootNavigator.tsxand mapped all 49 routes to POS Terminal entry points, split-panel forms, or settings utilities. - Confirmed
missingCount: 0after the recent Notifications and PrintDemo settings utilities were added. - Rechecked route-specific candidates including
OrderPayment,CustomerManagementAddressDetail, and invoice duplicate configuration; POS Terminal already covers them throughOrderDetailForm,CustomerAddressManagementDetailForm, andInvoicePanels. - Re-audited the current Mobile invoice duplicate configuration modal against POS Terminal
InvoicePanels; non-main-branch option values, disabled confirm state, sales-order permission gate, andvehicleRelease/documentMoveorder payload mapping remain aligned. - 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
Print demo utility parity
- Audited Mobile
PrintDemoScreenagainst POS Terminal printing utilities and settings. - Added a POS Terminal settings entry for
ทดสอบพิมพ์so users can print the same 16K sample document without leaving the terminal layout. - Moved the sample print HTML into
printDemoSample, reusing POS Terminal's existingreact-native-printpath and escaping dynamic sample values. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Notification token utility parity
- Audited Mobile
NotificationsScreenagainst POS Terminal settings and notification services. - Added a POS Terminal settings entry for
การแจ้งเตือนthat opens a terminal-style modal showing the current device FCM token. - Matched Mobile's token utility action by letting users clear the existing FCM token and request a fresh one through the existing
clearAndRefreshTokenservice. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal screen and endpoint audit refresh
- Audited Mobile route/screen coverage against POS Terminal Home menus and split-panel detail forms; the current Terminal menu set covers the main Mobile sales, stock, data, transport, employee, deposit, and expense workflows.
- Compared Mobile Home menu visibility, branch gates, and create shortcuts with POS Terminal
terminalMenusand create handlers; no additional menu or shortcut changes were needed. - Checked candidate endpoint differences from Mobile services, including invoice summary and branch tax lookup, and confirmed POS Terminal already has matching service calls and UI entry points where those flows are user-facing.
- Rechecked Mobile transfer-warehouse destination warehouse filtering and confirmed POS Terminal also applies the
NF-/DR-record-level exclusion before merging sub-warehouses. - Docs updated:
governance/change-log
POS Terminal parity audit refresh
- Re-ran the Mobile service export audit against current POS Terminal services and confirmed
missingCount: 0. - Audited current Mobile customer address dataset changes and confirmed POS Terminal customer detail and customer-management detail already use
@bsr/utilsdbAddresswith string-normalized address fields. - Audited order benefit removal/duplicate guard behavior and Lot/Batch removal UI against POS Terminal order, goods receipt, transfer in/out, storefront, shipping, and transfer warehouse detail forms; no additional code changes were needed in this pass.
- Docs updated:
governance/change-log
Shipping temporary action hiding parity
- Audited Mobile shipping-detail temporary action hiding against the POS Terminal shipping route detail panel.
- Matched Mobile's hidden sort-planner entry point by disabling the POS Terminal
จัดเรียงheader action while keeping the underlying sort-planner modal and handler in place. - Matched Mobile's hidden print-all footer action by hiding the POS Terminal invoice footer print button while keeping
handlePrintAllInvoicesavailable for later restoration. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Vehicle list parity
- Audited Mobile Vehicle list/status behavior against POS Terminal Vehicle split-list and detail panel behavior.
- Matched Mobile's vehicle list normalization by normalizing
vehicleStatustoUNCHECKED,READY, orNOT_READYand deduplicating rows bylicensePlatebefore building POS Terminal split-list items. - Adjusted POS Terminal Vehicle load-more behavior so
hasMoreremains true only when a fullPAGESIZEpage is returned, preventing extra empty-page requests after the final vehicle page. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Invoice duplicate order item-error parity
- Audited Mobile invoice-to-order duplicate behavior against POS Terminal invoice duplicate flow.
- Matched Mobile's per-item duplicate handling by letting POS Terminal skip invoice items that cannot be added, such as invalid quantities, missing product codes, insufficient stock, or item API errors, while continuing to add the remaining items.
- Updated the terminal success alert to report partial success when one or more invoice items were skipped.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Invoice duplicate order permission parity
- Matched Mobile's invoice-to-order duplicate permission gate by using POS Terminal
canCreateSalesOrderinstead of the broader customer-document gate. - This keeps department
20able to open sales orders from invoices, consistent with Mobile sales-order access. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Customer address request key parity
- Audited Mobile customer address management list/detail against the POS Terminal split-list/detail flow.
- Matched Mobile's address-request selection key by using
idfirst and falling back tocustomerDraftIdfor POS Terminal customer-address management rows. - This prevents Terminal from dropping address GPS requests that do not include
idbut still includecustomerDraftId, while keeping detail loading and post-decision detail refresh tied to the same request identifier Mobile uses. - Matched Mobile's customer-detail GPS request error behavior by reopening the request-note modal when submitting a location update request fails.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Order print guard parity
- Audited Mobile order detail print permissions against the POS Terminal order detail print section.
- Matched Mobile's print guard by disabling and blocking POS Terminal order printing when an order is canceled or has no items.
- Matched Mobile's storefront print guard by enabling POS Terminal
พิมพ์ใบจัดหน้าร้านonly for storefront orders (shippingType === "2"), while storage print buttons continue to use the general order print guard. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Expense bill save failure navigation parity
- Audited Mobile expense-bill save navigation against the POS Terminal expense-bill detail panel.
- Matched Mobile's post-API error behavior by closing the POS Terminal expense-bill detail and refreshing the list when a save request fails after validation has passed.
- Kept pre-API validation errors on the form so users can correct required fields, consistent with Mobile.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Transport finalize-all feedback parity
- Audited Mobile transport finalize-all behavior against the POS Terminal transport detail panel.
- Matched Mobile's success feedback by showing
อนุมัติใบจัดทั้งหมดแล้วafter POS Terminal finalizes all pending delivery sheets and refreshes the transport detail. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Transport Google sort label parity
- Audited Mobile transport Google route sorting modal against the POS Terminal shared sort planner modal.
- Matched Mobile's explicit optimize action label by honoring the caller-provided
optimizeLabelbefore applying responsive fallback text. - This keeps the transport sort action label
จัดเรียงลูกค้าตามพิกัดด้วย Googleconsistent across desktop/tablet widths while preserving the generic fallback for callers that do not pass a label. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Order credit-note used-card parity
- Audited Mobile order credit-note selection against the POS Terminal order benefit credit-note section.
- Matched Mobile's used credit-note visual state by rendering
isUsed == 1credit-note cards with the same light red background and border while keeping the existing disabled select action. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Order metadata discount summary parity
- Audited Mobile
OrderMetaDataDetaildiscount/remaining amount summary against the POS Terminal order detail metadata rows. - Matched Mobile's payment-summary source by calculating the order net amount from the legacy item-total amount minus point, coupon, and credit-note discounts.
- Matched Mobile's visibility rule by hiding discount and remaining amount rows when the computed discount total is
0; POS Terminal now shows a combinedส่วนลดรวมrow plusยอดคงเหลือonly when a discount is active. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal parity audit sweep
- Audited Mobile Credit Note list/detail, Shipping route list, Borrow list/detail, and Invoice list/manual-payment mode against the current POS Terminal split-list/detail implementations.
- Confirmed no additional code changes were needed in this sweep: pagination stop conditions, status/return filters, list dedupe, main action guards, and manual-payment selection checks already match the current Mobile behavior for the audited paths.
- Docs updated:
governance/change-log
Storefront checked-count parity
- Audited Mobile Storefront detail accept/submit, batch, and permission helpers against the POS Terminal Storefront detail panel.
- Matched Mobile's checked-item semantics by treating a storefront item as checked when
cal >= qtyfor both the visible checked count and submit validation. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Transport customer grouping parity
- Audited Mobile Transport detail customer/payment normalization against the POS Terminal Transport detail panel.
- Matched Mobile's transport customer handling by preserving every API customer row with a
customerCodeinstead of deduplicating rows bycustomerCodein POS Terminal. - This keeps payment totals, step-two customer actions, and route-planner entries aligned when the transport API returns multiple rows for the same customer code.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Sales-order review pagination parity
- Audited Mobile shipping-review order list mode against POS Terminal
salesOrderReview. - Matched Mobile's load-more behavior by keeping POS Terminal review
hasMorebased on the rawWAITING_PAYMENTAPI response count while still filtering displayed rows tohasShipment == 0. - This prevents the review list from stopping early when an API page contains only already-shipped orders but later pages may still contain reviewable orders.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Expense bill pagination parity
- Audited Mobile Expense Bill list pagination against POS Terminal Expense Bill split-list behavior.
- Matched Mobile's
pageLimit=200pagination stop condition by keeping POS Terminal expense-billhasMoretrue only when a full 200-row page is returned. - This prevents unnecessary load-more requests after the final partial expense-bill page while preserving retry/delete actions.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Deposit pagination parity
- Audited Mobile Deposit retry filter/list pagination against POS Terminal Deposit split-list behavior.
- Matched Mobile's
pageLimit=200pagination stop condition by keeping POS Terminal deposithasMoretrue only when a full 200-row page is returned. - This prevents unnecessary load-more requests after the final partial deposit page while preserving the existing retry filter and list behavior.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Order payment slip alert parity
- Audited Mobile Order Payment screen behavior against the POS Terminal embedded payment section.
- Matched Mobile's payment-submit alert behavior by showing the "payment successful" alert only when the payment payload has no transfer slip path.
- Kept the existing POS Terminal refresh and close-payment-section behavior after successful payment submission.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Order point OTP retry parity
- Audited Mobile Order point-usage OTP behavior against the POS Terminal order detail form while checking credit-note discount parity.
- Added the Mobile 10-second OTP resend cooldown to POS Terminal point OTP flow, including timer reset when the selected phone changes or OTP verification succeeds.
- Disabled the POS Terminal send-OTP button during the cooldown and displayed the remaining retry seconds in the button label.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Credit Note image upload parity
- Audited Mobile Credit Note image handling against the POS Terminal split-panel detail form.
- Updated POS Terminal Credit Note image upload to allow selecting multiple photos in one picker session, then upload each selected asset and refresh the detail/list once after completion.
- Kept the existing terminal-style individual delete action for attached files while matching Mobile's multi-image add behavior.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Booking Price handler permission guard parity
- Audited Mobile Booking Price handler-level permission checks against POS Terminal Home handlers.
- Added a shared POS Terminal permission calculator for Booking Price status, owner, same-day edit, and
fillWeight/editPriceoverride behavior. - Guarded POS Terminal Booking Price add, edit-open, edit-save, delete-item, save-document, and convert-to-order handlers so direct handler calls are blocked the same way as Mobile, not only the disabled UI controls.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Booking Price permission gate parity
- Audited Mobile Booking Price status/owner/date permission formulas against the POS Terminal detail form.
- Split POS Terminal item edit, item delete, header edit, save, add, and convert gates instead of reusing the save gate for all item actions.
- Matched Mobile behavior for
DRAFT/NEWitems, owner checks,fillWeight/editPriceoverride checks, same-day edit limits, and delete-only-on-draft-owner behavior. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Booking Price item validation parity
- Audited Mobile Booking Price add/edit item validation against the POS Terminal shared booking product picker.
- Added the Mobile integer-quantity and weight-based positive-weight checks to the POS Terminal Booking Price add-item path.
- Added the Mobile edit-item guards that prevent increasing an existing booking line above the originally booked quantity and prevent quantities above the current available stock plus the original line quantity.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Borrow out-of-stock add guard parity
- Continued the Mobile-vs-POS Terminal Borrow product-flow audit after the action permission guard update.
- Found Mobile blocks selecting a borrow product when available stock is zero with
สินค้าหมด, while POS Terminal could still open the shared product editor and only validated upper quantity bounds. - Added the same out-of-stock guard to the POS Terminal borrow add-item path before persisting the borrow item.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Borrow action permission guard parity
- Continued the Mobile-vs-POS Terminal Borrow audit after the item stock guard update.
- Found Mobile checks B1-processing permission inside Borrow accept/complete handlers, while POS Terminal relied on the detail action visibility only.
- Added handler-level permission guards for POS Terminal Borrow accept and complete/retry actions so direct handler calls are blocked with the same permission errors.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Borrow product stock guard parity
- Audited Mobile Borrow product add/edit validation against the POS Terminal borrow flow.
- Found Mobile blocks borrow item quantities that exceed available stock (
onHand - booking) when a positive available-stock value is known, while POS Terminal only checked integer quantity, 3 pieces per item, 3 items per borrow, and borrow type. - Added the same available-stock guard to POS Terminal borrow add and edit item paths, using the selected product data for add and latest inventory lookup for edit.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Product detail add-to-order validation parity
- Audited Mobile Product Detail add-to-order validation against POS Terminal after checking remaining inventory list usage.
- Found Mobile validates positive quantity and positive weight for weight-based products, while POS Terminal also blocked quantities greater than available stock.
- Removed the extra POS Terminal available-stock block so Product Detail add-to-sales-order follows Mobile's validation while still passing on-hand and booking quantities into the order item payload.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Transfer-warehouse inventory picker parity
- Audited Mobile Transfer Warehouse product picker against POS Terminal after the B1 send guard and confirmation updates.
- Found Mobile opens products through branch inventory sync/subscription, while POS Terminal still loaded a single inventory page with
getProductInventoryList. - Updated POS Terminal Transfer Warehouse product picker to use
getProductBranchContext,syncProductInventory, andsubscribeProductInventorylike Mobile, preserving the destination-warehouse prerequisite, terminal search, dummy products, and split-pane modal behavior. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Transfer-in inventory picker parity
- Audited Mobile Transfer In product picker against POS Terminal after the Transfer In source warehouse fallback update.
- Found Mobile opens Transfer In products through branch inventory sync/subscription, while POS Terminal still loaded a single inventory page with
getProductInventoryList. - Updated POS Terminal Transfer In product picker to use
getProductBranchContext,syncProductInventory, andsubscribeProductInventorylike Mobile, preserving terminal search, company filtering, dummy products, and split-pane modal behavior. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Goods receipt inventory picker parity
- Audited Mobile Goods Receipt product picker against POS Terminal after the duplicate Batch Number validation update.
- Found Mobile opens Goods Receipt products through
getProductBranchContext,syncProductInventory, andsubscribeProductInventory, while POS Terminal still loaded a single inventory page withgetProductInventoryList. - Updated POS Terminal Goods Receipt product picker to sync and subscribe to the branch inventory snapshot like Mobile, preserving terminal search, company filtering, dummy products, and split-pane modal behavior.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Transfer-warehouse B1 confirmation parity
- Continued the Mobile-vs-POS Terminal Transfer Warehouse audit after the B1 batch guard update.
- Found Mobile asks for confirmation before sending a transfer-warehouse document to B1, while POS Terminal called the B1 API immediately after the guard passed.
- Added the same confirmation step before POS Terminal
sendTransferWarehouseToB1, while preserving the terminal refresh and success/error handling after confirmation. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Transfer-warehouse B1 batch guard parity
- Audited Mobile Transfer Warehouse send-to-B1 validation against the POS Terminal split-pane transfer warehouse detail.
- Found Mobile disables and blocks B1 submission unless there is at least one item and every item has a non-empty Batch Number, while POS Terminal only checked that items existed.
- Added the same POS Terminal B1 guard and disabled button state so transfer-warehouse documents cannot be sent to B1 until every item has Batch data.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Transfer-in source warehouse parity
- Audited Mobile Transfer In list/detail handoff against the POS Terminal split-pane Transfer In flow.
- Found Mobile passes the selected warehouse tab (
whsCode) into detail and uses it when building newly added product lines, while POS Terminal merged both terminal tabs without preserving the source warehouse. - Tagged POS Terminal Transfer In list items with
sourceWhsCodeas they are loaded from each tab, then used that source warehouse as the fallback beforetoWhsCode/branch when adding products in the detail form. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Goods receipt duplicate batch validation parity
- Audited Mobile goods receipt batch validation against the POS Terminal inline batch editor.
- Found Mobile blocks duplicate Batch Numbers while editing, but POS Terminal could still submit duplicate non-empty batch numbers from the inline editor.
- Added a POS Terminal goods receipt submit-time duplicate Batch Number guard per product line before building the stock-in payload.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Order detail item edit permission parity
- Audited Mobile
getOrderAccessand order detail item editing against POS TerminalOrderDetailForm. - Found POS Terminal used the draft-owner delete gate for item add/edit, so users with Mobile override flags
fillWeightoreditPricecould not edit DRAFT/NEW order items in the terminal flow. - Split POS Terminal order item permissions so add/edit follows Mobile's override edit gate, while item deletion remains restricted to the DRAFT owner.
- Added the Mobile guard that prevents editing an existing item with
currentStepPrice. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Customer document permission parity
- Audited Mobile customer list/detail and invoice duplicate-order permission gates against POS Terminal create helpers.
- Found Mobile allows department
20to create sales orders from the Home shortcut, but not from customer detail/list document actions or invoice duplicate-order creation. - Split the POS Terminal permission helpers so Home/list create shortcuts keep department
20, while customer document actions and invoice duplicate-order creation use the narrower Mobile customer-document gate. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Home employee profile parity
- Added a POS Terminal Home settings entry for the current employee profile, matching Mobile's Home profile action.
- The profile entry loads the current user through the existing employee detail service and opens it in the terminal split-pane employee detail form, preserving the existing terminal profile/password-change UI.
- The flow clears list filters and scopes the employee list pane to the current profile item so users can return to the normal employee menu without losing the terminal layout pattern.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Home settings version label parity
- Added the native app version label to POS Terminal Home settings, matching Mobile's Home settings menu.
- Reused the existing POS Terminal
getAppVersionLabelhelper and passed the label through the terminal menu/settings component chain without changing branch, profile, logout, or theme behavior. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Mobile service path compatibility parity
- Added POS Terminal compatibility re-export files for Mobile service paths that use singular filenames:
goodsReceipt,transferIn,transferOut, anduser. - The new files re-export the existing POS Terminal implementations from
goodsReceipts,transferIns,transferOuts, andusers, preserving current terminal behavior while making the service boundary match Mobile import paths. - Re-ran the mobile-vs-terminal service export audit and confirmed
missing service exports 0. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
App-version service path compatibility parity
- Added POS Terminal
services/appVersion.tsas a compatibility re-export forcheckRequiredAppUpdateandRequiredAppUpdateInfo, matching Mobile'sservices/appVersionboundary. - Re-ran the mobile-vs-terminal service export audit with re-export resolution and confirmed
missingServices: []anddiffs: []. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Shared address dataset boundary
- Moved the Thai address lookup dataset into
packages/utils/src/dbAddress.tsand exporteddbAddressplusThaiAddressRecordfrom@bsr/utils. - Updated Mobile customer address search screens to import
dbAddressdirectly from@bsr/utils; the old Mobile constants file now remains as a compatibility re-export. - Updated POS Terminal customer detail and customer-management draft forms to import the shared dataset from
@bsr/utilsinstead of requiringapps/mobile/src/constants/dbAddress. - Verified there are no remaining POS Terminal direct references to Mobile's
dbAddressfile. - Verified with
yarn workspace @bsr/mobile tsc --noEmitandyarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Sales-order create shortcut parity
- Audited Mobile Home shortcut actions and found POS Terminal already had create actions for booking price, borrow, shipping route, transport, and deposit, but not the Home/list create action for sales orders.
- Added the POS Terminal sales-order list create button by routing the existing fixed create control through
CustomerPickerModalmodesalesOrder, matching Mobile's Home shortcut that starts a sales order from customer selection. - Reused the existing
canCreateSalesOrderpermission gate and existing terminal sales-order creation flow. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Home shortcut create permission parity
- Compared Mobile Home
CAN_CREATE_*department sets with POS Terminal create helpers for sales order, shipping route, transport, and deposit. - Added dept
21to POS Terminal shipping-route creation and deposit creation so terminal create buttons follow Mobile shortcut permissions. - Re-ran the create-permission parity script and confirmed all four Mobile shortcut create permission sets now match POS Terminal helpers.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Credit-note list delete parity
- Audited Mobile credit-note list swipe actions and found POS Terminal had credit-note detail item/file deletion but no list-level credit-note delete action.
- Added the same list delete guard to POS Terminal: received/approved credit notes show a disabled
ลบไม่ได้action, cancel-department users can delete, draft/new documents are owner-only, andWAITINGCN/INVUPDATEremain deletable. - Wired POS Terminal credit-note list swipe delete to
deleteCreditNote, refreshes the current credit-note list, and clears the open detail when the deleted row was selected. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Customer address request list parity
- Audited Mobile
CustomerManagementAddressListand found POS Terminal had the approve/reject detail flow but still rendered address-GPS requests with a generic list card. - Added a dedicated POS Terminal list card body for
จัดการที่อยู่ลูกค้า, showing customer name/code, requester, approver, and rejecter like Mobile. - Matched Mobile request-card tones: rejected requests use red, approved requests use green, and pending requests use the terminal neutral card tone.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Transfer-warehouse list cancel parity
- Audited Mobile
TransferWarehouseListand found POS Terminal had transfer-warehouse create/detail parity but no list-level cancel/delete swipe action. - Added a POS Terminal transfer-warehouse list swipe action labeled
ยกเลิกใบย้าย, wired todeleteTransferWarehouse. - After delete, POS Terminal refreshes the transfer-warehouse list and clears the detail pane when the deleted transfer was selected.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Transfer-warehouse dummy product parity
- Audited Mobile
TransferWarehouseDetailand found its product picker includes shared dummy products for the selected company, while POS Terminal only listed inventory products. - Updated the POS Terminal transfer-warehouse product picker to merge
buildDummyProducts(branch, companyCode)with inventory products, matching the Mobile add-item surface while keeping the existing terminal batch validation. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Stock list card parity
- Audited Mobile stock list cards for goods receipt, transfer out, transfer in, and transfer warehouse against the POS Terminal split list.
- Added dedicated POS Terminal list card bodies for the four stock menus so key Mobile list fields are visible in the terminal layout: document number, document date, comments, branch/source-destination, warehouse employee, and transfer-warehouse completion tone.
- Kept existing terminal list loading, detail navigation, and submit payload behavior unchanged.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Expense-bill edit permission parity
- Audited Mobile deposit and expense-bill list/detail flows against POS Terminal, including retry/delete actions, list card tones, transport-create context, and detail payloads.
- Found POS Terminal expense-bill date edit permission used only the stored auth user, while Mobile refreshes the employee permission record with
getUserByIdbefore checkingeditDeliveryDate. - Updated POS Terminal
ExpenseBillDetailFormto fetch the current employee permission record and usepermissionUser.editDeliveryDatewith the stored user as fallback, matching Mobile's draft bill update gate. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Storefront action permission parity
- Audited Mobile storefront list/detail against POS Terminal, including list tabs, card tones, canceled invoice guard, accept flow, batch lot selection, submit-to-B1 flow, and cancel validation.
- Found POS Terminal storefront action permission was missing Mobile's override user code
999997for accepted-user save/submit actions. - Updated POS Terminal storefront helpers so user
999997can edit checks and submit storefront stock-cut data through the same accepted-user action path as Mobile, without changing main-branch accept department gates. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Borrow print guard parity
- Audited Mobile borrow list/detail against POS Terminal, including create/cancel permissions, B1 accept/complete/retry actions, item CRUD, and borrow print actions.
- Found POS Terminal borrow print handlers could call pack/storage printing even when the borrow had no product items, while Mobile blocks both print actions with a clear error.
- Added the same no-items guard to POS Terminal borrow pack and storage print handlers before calling the printer helpers.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Invoice manual payment alert parity
- Audited Mobile invoice list/manual payment behavior against POS Terminal, including pending-B1 loading, B1 send guards, cancel request handling, summary modal, and manual payment selection.
- Found POS Terminal manual payment mode silently ignored invoices with pending cancel requests or unconfirmed orders, while Mobile shows an informational alert explaining why the invoice cannot be selected.
- Updated POS Terminal invoice list selection in manual payment mode to show the same pending-cancel and unpaid/unconfirmed order alerts as Mobile before blocking selection.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Order payment QR check parity
- Audited Mobile order payment screen against the POS Terminal order payment panel, including invoice loading, retry invoice send, payment validation, QR creation/share, and payment submission.
- Found POS Terminal could create/share QR payment codes but did not expose Mobile's
ตรวจสอบการชำระaction for checking whether QR payment had already confirmed the order. - Added a POS Terminal QR payment check action that reloads the latest order detail, reports whether the order is
CONFIRMED, refreshes the order detail, and refreshes the current order list. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Credit-note detail action gate parity
- Audited Mobile credit-note detail behavior against POS Terminal, including save/send-B1 guards, item editing, return location selection, file upload/delete, and item delete actions.
- Found POS Terminal detail save/delete-item gates were broader than Mobile: save was not restricted to
DRAFT/NEW/WAITINGCN/INVUPDATE, and item/file delete followed the broader list delete helper instead of Mobile's owner-only detail rule. - Updated POS Terminal credit-note detail so save is available only for the same editable statuses as Mobile and detail item/file delete is owner-only while the credit note is not received.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Transport payment and shipping guard parity
- Audited Mobile transport detail payment/shipping behavior against POS Terminal, including payment payload, QR amount, shipping amount totals, customer GPS fields, current device coordinates, and shipping delete guards.
- Found POS Terminal payment still sent blank customer GPS fields, omitted current payment coordinates, and used the customer base amount/grand amount in several payment and QR paths instead of Mobile's payable amount that includes shipping charges.
- Updated POS Terminal transport helpers and payment submission to normalize customer shipping/GPS fields, calculate payable amount from
grandAmount + shippingAmount/shippings, sendcurrentLatitude/currentLongitude, and block add/delete shipping when the customer is already paid or finished. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Transport start SAP error parity
- Audited Mobile transport start-trip response handling against POS Terminal.
- Found Mobile surfaces
startTransportSAP shipping errors after starting the trip, while POS Terminal refreshed silently even if the API returned partial shipping errors. - Updated POS Terminal start-trip handling to inspect
startTransport.errors, refresh the detail/customers as before, and show a terminal-friendly summary of failed customer shipping rows when errors are returned. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Employee password action gate parity
- Audited Mobile
EmployeeProfileandEmployeeDetailpassword actions against POS Terminal's combined employee split-panel detail. - Found POS Terminal exposed the full change-password form for managers viewing another employee, while Mobile employee detail only exposes reset-salt for other users and keeps full password change on the user's own profile.
- Updated POS Terminal employee detail so the full change-password form is enabled only for the logged-in user's own profile; manager reset-password salt remains available through the existing reset action.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Shipping service type boundary parity
- Re-ran the Mobile-vs-POS Terminal service export audit with re-export resolution.
- Found POS Terminal
services/shipping.tsstill missed Mobile's exported shipping detail/list type names even though the runtimegetShippingInvoicesWithoutDeliveryhelper was already present. - Added POS Terminal exports for
ShippingDeliveryStatus,ShippingListItem,ShippingDeliveryProduct,ShippingDeliveryInvoice, andShippingDeliveryDetailwithout changing runtime endpoint behavior. - Re-ran the service export audit and confirmed
missingFiles: []andmissingExports: []. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Branch selection tax fallback parity
- Audited Mobile branch selection against POS Terminal
BranchScreen, including warehouse filtering and tax loading. - Found Mobile saves the selected warehouse and continues to Home before loading tax data as best-effort, while POS Terminal required
getTaxByBranchto succeed before saving the branch. - Updated POS Terminal branch selection to clear tax, save the selected warehouse, continue through
onBranchSelected, and then fetch/save tax data in a best-effort block so tax API failures no longer block branch selection. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Home branch selector parity
- Added a POS Terminal Home settings entry for branch selection, matching Mobile's Home header "เลือกสาขา" action.
- Wired the branch-selection entry through
App -> RootNavigator -> HomeScreen -> MenuPane -> SettingsDropdownand reused the existing POS TerminalBranchScreen. - Preserved the existing pre-login branch settings behavior while returning users back to Home when branch selection is launched from Home.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
PRD gateway service boundary parity
- Added POS Terminal
services/prdGatewayApi.tsexportingprdPasswordApiandprdTaxApi, matching Mobile's PRD gateway service boundary. - Updated POS Terminal auth/tax helpers to import the shared gateway clients instead of keeping local axios instances in
auth.ts; endpoint behavior and headers remain unchanged. - Re-ran the mobile-vs-terminal service export audit and confirmed there are no Mobile service exports missing from POS Terminal services.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Shipping invoice print-all parity
- Added the POS Terminal shipping detail print-all invoice action to match Mobile's
handlePrintAllInvoicesflow. - The action now validates that the shipping route has been moved to transportation, checks that invoices exist, and prints each invoice in route order with the same print index sequence as Mobile.
- Added a compact printer button beside the existing shipping detail bottom action so users can print all invoices without swiping each invoice row.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Order invoice creation parity
- Added the POS Terminal
createInvoiceorder service wrapper for the same/invoicesendpoint used by Mobile. - Updated the order detail payment panel so
NEWsales orders can open the invoice/payment step by creating an invoice when no active invoice exists, then rechecking the invoice list before enabling payment actions. - Kept existing
WAITING_PAYMENTbehavior intact, including duplicate-invoice detection, invoice printing, retry invoice send, and payment submission. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Shipping available-invoice service parity
- Added POS Terminal
services/shipping.tswithgetShippingInvoicesWithoutDelivery, matching Mobile's shipping service boundary for/invoices/without-delivered. - Kept terminal
getShippingRouteAvailableInvoicesas the existing split-panel wrapper, now delegating to the Mobile-compatible shipping service while preserving the terminal 180-day route-delivery defaults. - Re-exported
ShippingAvailableInvoicefromsplitMenuDataso existing terminal helpers keep their current import path. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Invoice service boundary parity
- Added POS Terminal
services/invoices.tswith Mobile-compatible invoice helpers for list, pending B1 list, detail, create, send B1, retry, summary, approve/reject cancel, and cancel request. - Updated existing terminal split-panel invoice wrappers to delegate to the new invoice service while keeping their current import paths for HomeScreen/ListPane.
- Updated the order detail invoice creation flow to import
createInvoicefromservices/invoices, matching Mobile's service boundary. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
Order logistics metadata edit parity
- Added POS Terminal order-detail controls for pickup date/time, vehicle release status, and document-move status to match Mobile's
OrderMetaDataDetailedit surface. - Changes are stored in the existing terminal order detail state, saved through
updateOrder, then refresh the order detail and list so printing/payment flows use the latest metadata. - Read-only users still see the same logistics metadata as detail rows.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal
POS Terminal order service and list action parity
- Added POS Terminal order service exports for
deleteOrder,updateOrderShippingType, andclearPendingBookingsto match the Mobile order service. - Added sales-order list swipe deletion with the same owner/admin/override/department permission gate used by Mobile, including an invoice-exists guard before deletion.
- Added the sales-order header action to clear pending bookings through
/orders/return-booking-alland refresh the current order list. - Added editable order detail shipping-type controls for eligible draft/new order owners, backed by the Mobile
/orders/:id/shipping-typeendpoint and pickup-time persistence for storefront orders without pickup time. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal borrow print log parity
- Added POS Terminal
recordBorrowPrintLogto the Firestore print log service, matching Mobile's borrow print logging API. - Updated POS Terminal borrow pack and borrow storage print helpers to record borrow print counts before rendering templates, while keeping printing non-blocking when print-log writes fail.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal common service parity
- Added POS Terminal
getBranchesByCurrentUseras the same current-user branch wrapper used by Mobile, including fallback user code999999. - Added POS Terminal
getListAddressPickUpto load pickup addresses from the selected branch detail endpoint. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal product inventory realtime service parity
- Added POS Terminal
syncProductInventory,subscribeProductInventory, andgetProductInventoryDetailto match Mobile's product inventory service exports. - Shared the terminal inventory warehouse-code selection between list, booking picker, realtime subscription, and product lookup paths so main branches include base/PC/NF inventories while non-main branches use their selected warehouse group.
- Updated POS Terminal product list and booking product picker service reads to sync inventory from the API before reading Firestore, matching Mobile's product inventory refresh flow.
- Kept existing POS Terminal one-shot list and lookup APIs intact for current split-panel screens while enabling Mobile-style realtime product flows.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal booking price service parity
- Added POS Terminal
getBookingPrices,getBookingPriceById, andconvertBookingPriceToOrderservice exports to match Mobile's booking price API surface. - Reused selected-branch context for
branchIdandwhGrpCodeso terminal booking-price list requests can use the same query shape as Mobile. - Kept existing POS Terminal split-panel booking price behavior intact while exposing the Mobile-compatible list/detail/convert service boundary.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal booking price convert action parity
- Added the POS Terminal booking-price detail action to convert a persisted DRAFT booking price into a sales order through the Mobile-compatible
convertBookingPriceToOrderendpoint. - After conversion, the terminal switches to the sales-order split pane, opens the created order detail, refreshes booking-price data, and shows the same success/error confirmation flow as Mobile.
- Wired the booking-price footer Save button to the existing terminal save handler so users can save from the detail footer instead of relying only on save-before-exit.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal customer list filter parity
- Added a POS Terminal customer split-list loader backed by the Mobile-compatible
getCustomerSapListquery shape, includingshippingTypeandrouteCode. - Reused the terminal route/type filter controls on the normal Customer menu so users can filter customers by route, route delivery, and storefront delivery like Mobile's customer list.
- Wired search, clear search, refresh, and load-more to preserve the selected customer route/type filters.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal order list filter parity
- Added POS Terminal sales-order list filters for route delivery and storefront delivery, passing
shippingTypethrough the split-list order loader to match Mobile'sOrderListquery behavior. - Added a terminal "my orders/all orders" toggle for the normal sales-order menu while keeping shipping-review orders scoped to the current user like Mobile.
- Wired order search, clear search, status changes, refresh, and load-more to preserve the selected order shipping/user filters.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal shipping-review bulk payment parity
- Added multi-select behavior to the POS Terminal shipping-review sales-order list, matching Mobile's selectable review list.
- Added a bulk payment action and modal for selected review orders with cash/transfer payment channel and optional remark.
- Bulk payment calls the existing Mobile-compatible
payOrderendpoint for each selected order, reports full or partial failures, clears selection, and refreshes the review list after completion. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal customer detail document action parity
- Added customer-detail actions in POS Terminal for creating a sales order, booking price, and borrow-fish document directly from the selected customer, matching Mobile's customer detail action surface.
- Sales-order creation now seeds the order from the customer detail, persists a DRAFT order, and opens the created order detail in the sales-order split pane.
- When the selected customer already has today's order on the main branch, POS Terminal now prompts to open the existing order or create a new one, matching Mobile's
getExistingCustomerOrderForBranchbehavior. - Fixed the POS Terminal customer picker sales-order action so selecting a customer from the main create flow loads customer detail, checks for today's existing order, and then opens or creates the order instead of closing the picker without action.
- Aligned the customer-to-sales-order payload route behavior with Mobile: route fields are only sent for route-delivery customers and fallback to any routed address when the ShipTo address has no route.
- Booking-price and borrow-fish actions reuse the existing terminal draft builders, while customer edit opens the customer-management draft form seeded from the selected customer.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal credit note create action parity
- Audited Mobile
CreditNoteListand found POS Terminal had credit-note list/detail parity but no list-level create action for a blank return credit-note draft. - Added POS Terminal credit-note create permission using Mobile's
canCreateCreditNoteDeptCodes. - Wired the POS Terminal credit-note list create button to open a DRAFT credit-note detail seeded with selected branch, current user, created date, empty items/files, and default return-note fields.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal transport service parity
- Added POS Terminal
getTransports,deleteTransport, and transport shipping service exports for create, retry, retry-cancel, and delete operations to match Mobile's transport service API surface. - Added Mobile-compatible transport shipping types and extended
startTransportto accept optionaluserCodeandshippingswhile preserving the 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
- Added POS Terminal
requestResetPasswordalongside the existing salt helper so auth reset service exports match Mobile. - Added POS Terminal
getGoogleRouteDistanceMeterswith the same coordinate validation and Google Routes field mask used by Mobile transport distance calculations. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal deliveries service parity
- Added POS Terminal delivery list/detail/status/accept/loading/sort/delete/assign service exports and delivery API types to match Mobile's
deliveriesservice. - Kept existing POS Terminal shipping-route and storefront screen behavior intact while exposing the Mobile-compatible delivery service boundary for future terminal flows.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal transport shipping amount start parity
- Updated POS Terminal transport detail to calculate draft customer shipping amounts from Google route distance using the same free-distance, round-up, and per-kilometer rate rules as Mobile.
- Included customer shipping payloads when starting a transport so
/transports/:id/startedreceivesuserCodeandshippingslike Mobile. - Displayed computed shipping amount on terminal transport customer cards before trip start.
- Added terminal customer-modal actions to create shipping charges and manage existing shipping invoices with retry, retry-cancel, and delete operations using the Mobile transport shipping endpoints.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal product picker filter service parity
- Audited Mobile shared product picker flow and found POS Terminal product filters still depended only on inventory item flags.
- Added POS Terminal product service endpoints for last purchased products, changed-price products, and top-sales products to match Mobile's
productsservice. - Updated the POS Terminal product picker to load and apply those filter datasets, while retaining the existing inventory-field fallback for terminal flows without a customer code.
- Passed
customerCodefrom order and booking contexts when opening the picker so theล่าสุดfilter can use/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
- Audited Mobile deposit and expense-bill services and found POS Terminal standalone services did not expose the same list/delete/retry helpers, even though some split-panel actions had duplicated API calls.
- Added POS Terminal
getDeposits,updateDeposit,deleteDeposit, andretryDeposithelpers with the same branch/warehouse query context as Mobile. - Added POS Terminal
getExpenseBills,deleteExpenseBill, andretryExpenseBillhelpers with the same branch query context as Mobile. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal login password reset parity
- Audited Mobile login password-reset flow and found POS Terminal employee-code login did not provide self-service reset/set-new-password behavior.
- Added POS Terminal
setNewPasswordauth service for the same reset login endpoint used by Mobile. - Extended the employee-code login modal with a
ลืมรหัสผ่านpath, reset salt request, new-password confirmation, and return-to-login flow while keeping the existing terminal modal pattern. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal notification token login parity
- Audited Mobile notification handling and found POS Terminal had the Firebase Messaging dependency but did not refresh/persist FCM tokens or register foreground notification handling.
- Added POS Terminal notification service parity with Mobile for foreground/background handlers, permission/token helpers, and token refresh.
- Updated POS Terminal login completion to refresh the FCM token and patch
/users/:idwith the same permission fields plusfcmTokenbefore saving the local session. - Registered the foreground notification handler when POS Terminal Home mounts.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal alcohol check login parity
- Audited Mobile login and found POS Terminal did not enforce the alcohol pre-login check for departments
13,12,14,28, and30. - Added POS Terminal alcohol-check service parity with Mobile, including UAT bypass, employee-code bypass for
999999/999997, and the external/alcohol/check-statuslookup. - Wired the check into the shared POS Terminal login completion path before saving auth/session data, so both selected-user login and employee-code login are gated consistently.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal sales-order create permission parity
- Audited Mobile Home permission updates for
deptCode20and found POS Terminal menu visibility already matched, but the sales-order create helper still excluded department20. - Added
deptCode20to POS TerminalSALES_ORDER_CREATE_DEPT_CODESso order creation shortcuts match Mobile'sCAN_CREATE_ORDERbehavior. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal transfer warehouse destination filter parity
- Audited Mobile transfer warehouse destination selection and found POS Terminal was still showing raw sub-warehouse options.
- Updated POS Terminal transfer warehouse destination loading to filter excluded
NF-/DR-warehouse codes before merging sub-warehouses into the picker, matching Mobile's transfer warehouse behavior. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal customer-management draft recovery parity
- Audited mobile customer-management draft recovery and found POS Terminal still treated branch child creation failures as a failed create flow after the main draft had already been created.
- Updated POS Terminal customer-management create flow so the main draft is retained and opened even when some draft address or branch child records fail to save.
- Child records are now attempted one by one; failures are collected, the created draft is loaded through the split panel, and the user is told to review and save missing child records again.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal transport invoice print pacing parity
- Audited mobile transport print-all-invoices behavior and found POS Terminal printed invoice jobs back-to-back.
- Updated POS Terminal transport print-all-invoices to wait for React Native interactions and delay
800msbetween invoice print jobs, matching Mobile's native printer stability guard. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal employee profile password parity
- Audited Mobile
EmployeeProfileand found POS Terminal employee detail only supported admin reset salt, not the self-service set-new-password flow. - Added a POS Terminal employee password section that requests reset salt, accepts reset/current password plus new password confirmation, and calls the same
setNewPasswordendpoint as Mobile. - Permission follows Mobile's rule: the current employee can change their own password, and employee-menu managers can change passwords from employee detail.
- When the current employee changes their own password successfully, POS Terminal now invokes the normal logout flow after confirmation, matching Mobile profile behavior.
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
governance/change-log
POS Terminal required app update parity
- Audited mobile
appUpdate,useRequiredAppUpdate, Login, and Home, and found that POS Terminal still hadcheckRequiredAppUpdatestubbed to returnrequired: false. - Updated
apps/pos-terminal/src/services/appUpdate.tsto read Firestoreversion/vapp, compare nativeversionCodewith remoteversionNumber, and support Android/iOS platform fields like mobile. - Added POS Terminal
useRequiredAppUpdateandRequiredAppUpdateModal, then wired them intoUserSelectionScreenandHomeScreen; Home reruns the check when it regains focus. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
workflows/login-branch-homearchitecture/mobile-terminalgovernance/change-log
2026-05-21
Core
Transport OTHER payment validation
- Updated Mobile and POS Terminal customer payment validation for
อื่นๆ(OTHER) socash + transfermust never exceedgrandAmountwhen the case is notไม่รับสินค้า. รับสินค้าบางรายการcan still collect less thangrandAmount, but it can no longer collect more thangrandAmount.แบ่งชำระnow blocks cash+transfer totals abovegrandAmount.- Verified with
yarn workspace @bsr/mobile tsc --noEmitandyarn workspace @bsr/pos-terminal typecheck. - Docs updated:
workflows/mobile-transport-and-vehiclesgovernance/change-log
Shared Lot/Batch code generation
- Added
generateBatchCodeandnormalizeBatchItemCodeto@bsr/utilsso Mobile and POS Terminal can share the same auto Lot/Batch code rule. - The shared generator removes a leading
BT-prefix fromitemCodebefore building the code. goodsReceiptDetailScreenandtransferInDetailScreennow use the shared generator instead of local duplicate helpers.- Verified with
yarn workspace @bsr/mobile tsc --noEmitandyarn workspace @bsr/pos-terminal typecheck.
Mobile
Stock menus and storefront action permissions
- Updated Home stock menu visibility so non-main branches (
branch.isMain === false) can see all four stock menus without checkingdeptCode. - Confirmed the stock list/detail screens do not add extra
deptCodegates for their existing actions. - Added storefront action override for user code
999997, allowing that user to edit storefront product Lot/Batch/location checks and send B1 even when they are not the accepted worker. - Verified with
yarn workspace @bsr/mobile tsc --noEmit. - Docs updated:
workflows/home-menu-and-permissionsworkflows/goods-receipt-flowworkflows/sales-flowgovernance/change-log
2026-05-16
Mobile
Customer address forms and customer search submit
- Changed
CustomerDetailaddress creation from a nested modal to a full-screen address form view inside the screen. - Changed
CustomerManagementEditaddress add/edit from a modal-style overlay to a full-screen address editor view inside the screen. - Guarded address search, map picker, and route picker visibility so these pickers only open while the address form/editor view is active.
- Guarded customer-management main-form selectors so they do not remain visible while the address editor is active.
- Fixed
CustomerListsearch submit soCustomerManagementListHeaderpasses the submittedTextInputtext to the screen, andCustomerListsends that exact value togetCustomerSapList. - This prevents Thai IME submit timing issues where a search such as
ขายcould reach the customer API as onlyข. - Verified with
yarn workspace @bsr/mobile tsc --noEmit. - Docs updated:
workflows/mobile-borrow-and-customer-managementgovernance/change-log
Mobile order shipping fee and Google route distance
- Added shared branch coordinate data and lookup helpers in
@bsr/utilsfor Mobile and future POS Terminal reuse. - Added Mobile order road-distance calculation from the selected login branch to the order/customer coordinates with Google Routes API and
GOOGLE_ROUTE_API_KEY. - Delivery orders now show distance, editable shipping fee, and total amount due rows in the order detail summary.
- Changed new order
shippingFeedefault to0; confirmed shipping-type changes still resetshippingFeeto0. - Guarded shipping-type confirmation so cancel and dismiss keep the previous shipping type and existing shipping fee.
- Guarded Google route distance calculation so missing, invalid, or zero customer coordinates do not call Google Routes.
- Added auto shipping fee calculation for routes over 150 km at 15 baht per kilometer above 150 km.
- Persisted shipping fee immediately when a user edits it on an existing order or when route distance calculation changes it on an existing order.
- Invalidated pending route-distance and shipping-fee save requests when shipping type changes, preventing stale saves from overlapping the shipping-type update flow.
- Updated
OrderListCardand order-list bulk payment to useinvoiceAmount + shippingFee, falling back toamount + shippingFeewheninvoiceAmountis missing. - Booking-price sourced orders now fill missing shipping address, route, and coordinates from the SAP customer default
ShipTobefore delivery distance calculation. - Docs updated:
workflows/sales-flowgovernance/change-log
2026-05-05
POS Terminal
POS Terminal Home layout and panel action refinements
- Moved the Home settings button into the first menu position in panel 1 and removed the separate
เมนูtitle/top settings bar to reclaim vertical workspace. - Kept the existing theme/logout dropdown behavior, but render the settings button outside the menu ScrollView so the dropdown is not clipped by the menu pane.
- Changed shipping-route panel-3 document actions (
รับงาน,จัดสินค้าที่ลาน,ขึ้นรถแล้ว,ร่วมจัด) from inline action buttons to the panel header three-dot dropdown beside the close button. - Added an automatic accept-work Sweet Alert in POS terminal shipping-route detail when the same Mobile accept condition is met: finished delivery, assigned to transportation, no
acceptedBy, and the user can accept shipping work. - Moved the shipping-route product-tab
บันทึกตำแหน่งaction into the FlashList footer so it scrolls with the product list instead of staying fixed at the bottom of panel 3. - Updated transport panel-3 actions so save/start/finish/finalize-all actions are rendered as FlashList footer content instead of an absolute bottom bar, and improved dark/light mode readability for transport detail cards, modals, inputs, and action tiles.
- Matched POS terminal vehicle selection cards to Mobile transport detail: license plate plus status, vehicle type, max payload, status color, ready-only selection guard, remote submit search, and clear-search reload. Vehicle selection remains non-paginated, matching Mobile.
- Verified with
yarn workspace @bsr/pos-terminal typecheck.
POS Terminal deposit list/detail parity
- Added POS terminal panel-3
DepositDetailForm.tsxforฝากเงิน, aligned with MobiledepositDetailScreen. - The deposit detail form is reusable by design:
- normal menu mode renders it directly in panel 3
- transport mode passes
DepositTransportContextand renders it as an embedded transport state instead of a nested modal on iPad/iOS
- Added deposit create/detail behavior:
- load persisted deposit detail in read-only mode
- initialize create mode from branch/user defaults
- load companies, cash accounts, and bank accounts
- reload cash/bank accounts when the selected company changes
- support invoice selection outside transport, except department codes 14 and 30
- invoice selection modal uses FlashList with search and load-more pagination; Mobile
depositDetailScreennow has the same pagination behavior - derive amount/notes from selected invoices and lock manual editing when invoices are selected
- support send-slip-later outside transport
- validate required fields and confirm before
createDeposit - update transport after create when a transport context is supplied
- after normal deposit create, refresh the deposit list and close panel 3 instead of selecting the newly created deposit, avoiding an unnecessary
GET /deposits/:id
- Adjusted deposit panel-2 filtering so the menu hides the generic status filter and keeps only the Mobile-style
ทั้งหมด/รอส่งใหม่retry filter. - Dedupe cash-account options by
acctCodein both Mobile and POS Terminal common services so duplicated company rows collapse to the first account item. - Refactored deposit-specific terminal UI out of the large Home files:
DepositPanels.tsxnow owns the deposit retry filter, card body, and swipe actionsdepositStyles.tsnow owns deposit list/detail/modal styles and is merged by the aggregate Homestyles.ts
- Added POS terminal service coverage for deposit create/detail:
apps/pos-terminal/src/services/deposit.ts- company/cash/bank account helpers in
apps/pos-terminal/src/services/common.ts
- Remaining follow-up work:
- test account selection, invoice selection, date picker, keyboard behavior, create/detail, retry/delete, and transport handoff on real tablet hardware and real API data
POS Terminal expense-bill list/detail parity
- Added POS terminal panel-2 support for
บิลน้ำมัน, aligned with MobileexpenseBillListScreen:- mobile-style card colors for draft branch rows, retry/error rows, and confirmed rows
- displayed fields for bill number, bill date, responsible user, license plate, and amount
- search by bill number, license plate, and responsible user
- FlashList-backed pagination and refresh behavior
- permission-gated create action using the menu access rule
- swipe retry for empty
RefKeyrows and swipe delete through/bills/:billId
- Added
ExpenseBillDetailForm.tsxas the reusable POS terminal expense-bill form:- normal menu mode renders it directly in panel 3
- transport mode passes
ExpenseBillTransportContextand renders it as an embedded transport state instead of a nested modal on iPad/iOS
- Added expense-bill create/detail behavior:
- load persisted bill detail in read-only/update mode
- initialize create mode from branch/user/transport defaults
- load companies, gas partners, vehicles, old mileage, and vehicle balance
- support company, dealer, vehicle, bill-date, amount, mileage, send-slip-later, and notes fields
- create through
POST /bills - update draft branch rows through
PATCH /bills/:billIdfor accounting users - update transport after create when a transport context is supplied so
flagGasis set
- Added POS terminal service coverage for expense bills:
apps/pos-terminal/src/services/expenseBill.ts- bill list/delete/retry helpers in
apps/pos-terminal/src/services/splitMenuData.ts - gas partner helper in
apps/pos-terminal/src/services/common.ts
- Remaining follow-up work:
- test expense-bill list/detail, mileage loading, selection modals, retry/delete, and transport handoff on real tablet hardware and real API data
POS Terminal transport list and detail parity
- Added POS terminal panel-2 support for
ขนส่ง, aligned with MobiletransportListScreen:- mobile-style card colors based on draft/started/finished state
- displayed fields for transport number, created date, license plate, driver, salesperson, route, start/finish time, and finished/total count
- search by transport number
- FlashList-backed pagination and refresh behavior
- permission-gated create action using the Mobile transport create department codes
- swipe delete only when the transport has not started and belongs to the current user
- Added
TransportDetailForm.tsxandTransportDetailHelpers.tsfor panel 3 transport create/detail behavior aligned with MobiletransportDetailScreen. - Reworked panel 3 transport layout into two FlashList-backed steps with meta rendered as
ListHeaderComponentcontent, avoiding nested outer scroll views:- step 1: transport meta plus delivery sheets attached to the transport
- step 2: customer delivery/payment list plus collection summary meta
- Added transport create/detail behavior:
- create/update transport header
- select vehicle/license plate
- add delivery sheets to a transport
- create the transport header first when adding a delivery before
transportIdexists - keep the add-delivery modal open after row add, show row-level loading, prevent duplicate row presses, and remove added rows from the modal list
- remove delivery sheets before transport starts
- finalize individual delivery sheets and finalize all pending delivery sheets
- load customer groups
- sort delivery customers manually in the step 2 sort planner
- optimize delivery customer order with Google Routes API using current GPS location and customer coordinates, then save with
sortTransportCustomers - start/finish transport with mileage validation
- customer action modal for call, navigation, GPS save, payment type selection, payment entry, photo/slip upload, signature capture, QR generation, and payment submit
- skip oil/deposit steps by updating
flagGasandflagBank - print all invoices and print product summary after all delivery sheets are finalized
- Added POS terminal service coverage for the transport flow:
apps/pos-terminal/src/services/transport.ts- vehicle and mileage helpers in
apps/pos-terminal/src/services/common.ts - customer call/profile/GPS helpers in
apps/pos-terminal/src/services/customers.ts - Google route optimization helper in
apps/pos-terminal/src/services/googleRoutes.ts generateTransportPaymentQrCodeinapps/pos-terminal/src/services/qr.ts
- Remaining follow-up work:
- test transport behavior on real iPad/tablet hardware, including FlashList headers, modal overlays, camera/signature, GPS permission, manual/Google route sorting, swipe actions, dark mode, API calls, and printer output
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
architecture/mobile-terminalgovernance/change-log
2026-05-04
Core
Shared print template boundary
- Added workspace package
@bsr/printingas 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_URIinto@bsr/printingso 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/printingresolves directly topackages/printing/srceven before the workspace symlink exists innode_modules. - Verified with
yarn workspace @bsr/mobile tsc --noEmitandyarn workspace @bsr/pos-terminal typecheck. - Docs updated:
architecture/mobile-terminalgovernance/change-log
POS Terminal
POS Terminal Home refactor
- Started splitting the large POS terminal
HomeScreenimplementation 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.tsxnow 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.tsxwas 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 --noEmitandyarn workspace @bsr/pos-terminal typecheck. - Docs updated:
architecture/mobile-terminalgovernance/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
branchIdis sent as a number forPOST /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
listHeaderRowspacing, including the manually addedmarginBottom, 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/healthzwhen 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
- header text is
- 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
MaterialCommunityIconsfor 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
bookingPriceIdexists - 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
- creates the booking-price header first when no
- Changed POS terminal booking-price edit-item persistence to match mobile:
- refreshes product inventory by
productCodefrom 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;
currentStepPriceis 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
- refreshes product inventory by
- Normalized POS terminal booking-price item payloads to match mobile:
weightBaseFlagandstepPriceFlagare sent as booleanscompanyCodefalls back to the productcompanyfieldcompanyNamefalls back throughcompanyName,ComName,company, andcomName
- Added POS terminal type declarations for
react-native-vector-icons/MaterialCommunityIcons. - Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
architecture/mobile-terminalworkflows/sales-flowgovernance/change-log
POS Terminal shipping-route list and detail parity
- Added POS terminal panel-2 support for
ใบจัดสินค้าสายส่ง, aligned with MobileshippingListScreen:- 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.tsxfor panel 3 shipping-route create/detail behavior, aligned with MobileshippingDetailScreen. - 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/nocreates the header and returnsdeliveryIdPOST /api/deliveries/{deliveryId}/invoicesattaches invoices afterdeliveryIdexists- panel 2 is refreshed and panel 3 reloads the created detail
- Reworked shipping detail layout so the route/meta block and section header are
ListHeaderComponentcontent 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.tsxinto smaller components after behavior is accepted
- Verified with
yarn workspace @bsr/pos-terminal typecheck. - Docs updated:
architecture/mobile-terminalgovernance/change-log
2026-05-03
Core
Shared i18n and app-version boundaries
- Added workspace package
@bsr/i18nas the shared translation resource boundary forapps/mobileandapps/pos-terminal. - Moved the current English and Thai translation resources into
packages/i18n; mobile now initializes i18n from@bsr/i18n, while its oldsrc/locales/*files remain as compatibility re-exports. - Added POS terminal i18n initialization and wrapped the terminal app with
I18nextProviderso the terminal app can adopt translations without changing app bootstrap later. - Normalized native app-version access in both apps under
src/native/appVersion.ts; oldsrc/constants/appVersion.tsfiles now re-export from the native boundary. - Split mobile required-update logic into
apps/mobile/src/services/appUpdate.ts;apps/mobile/src/services/appVersion.tsremains a compatibility re-export. - Added
apps/pos-terminal/src/services/appUpdate.tswith the same required-update contract, currently returningrequired: falseuntil terminal remote-update rules are connected. - Verified with
yarn workspace @bsr/mobile tsc --noEmitandyarn workspace @bsr/pos-terminal typecheck. - Docs updated:
architecture/mobile-terminalworkflows/login-branch-homegovernance/change-log
Shared image assets package
- Added workspace package
@bsr/assetsas the shared image asset boundary forapps/mobileandapps/pos-terminal. - Moved mobile image assets from
apps/mobile/assets/imagesintopackages/assets/images. - Added grouped exports for
@bsr/assets/logos,@bsr/assets/icons,@bsr/assets/menus, and@bsr/assets/utilsso app code can import only the asset group it uses. - Kept
apps/mobile/src/constants/images.tsas a compatibility re-export, while updated active mobile imports to use@bsr/assets/*directly. - Added
@bsr/assetsdependencies and TypeScript path mappings to both mobile and POS terminal workspaces. - Verified with
yarn workspace @bsr/mobile tsc --noEmitandyarn workspace @bsr/pos-terminal typecheck. - Docs updated:
architecture/mobile-terminalgovernance/change-log
React Native screens version check
- Checked
react-native-screensagainst 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.1is available under thenextdist-tag, with nightlies also available, but no newer stable release exists yet.- Recommendation: keep
4.24.0for now; do not patchnode_modulesfor Kotlin dependency warnings, and revisit when4.25.xstable is released or a runtime navigation issue appears. - Docs updated:
architecture/mobile-terminalgovernance/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.logoBSRWhiteTextin dark mode andlogos.logoBSRin light mode. - Kept mobile QR share capture on
logos.logoBSRintentionally so generated QR share images stay stable and are not theme-dependent. - Verified with
yarn workspace @bsr/mobile tsc --noEmit. - Docs updated:
architecture/mobile-terminalgovernance/change-log
POS Terminal
POS Terminal login session and Home navigation foundation
- Replaced POS terminal mock password login with the POS
/loginAPI for both login entry points: selected user card login and employee-code modal login. - POS terminal login now stores
auth_token, serializeduser, andlogin_dateinDD-MM-YYYY, matching the mobile session-date convention. - POS terminal startup now checks login session first: a valid token, user, and same-day
login_dateopens Home; stale login session data is cleared without clearing stored branch, warehouse, or tax setup data. - Added POS terminal
HomeScreenas a blank first Home surface with left settings gear, dark/light theme choices, and logout. - Added
apps/pos-terminal/src/navigation/RootNavigator.tsxand moved the terminal Home route under React Navigation soHomeScreencan useuseFocusEffect. - POS terminal Home checks
login_dateevery 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-terminalgovernance/change-log
POS Terminal brand logo and user fallback styling
- Updated
UserSelectionScreenbrand block to use the shared BOONSIRI logo images from@bsr/assets/logosinstead 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-terminalgovernance/change-log
2026-05-02
Core
Shared React Native UI foundation
- Added workspace package
@bsr/rn-uifor React Native UI infrastructure shared byapps/mobileandapps/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-uito 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-uiloading, 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 --noEmitandyarn workspace @bsr/pos-terminal typecheck. - Docs updated:
architecture/mobile-terminalgovernance/change-log
Core Firebase environment files
- Added/organized Firebase config files for the
prdanduatenvironments across Androidgoogle-services.jsonand iOSGoogleService-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
branchandtaxstorage: missing either value opens requiredBranchScreen; having both values opensUserSelectionScreen. - Required
BranchScreensetup 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, andGET {MST_HOST}/api/warehouses/{branchCode}/sub. - Normalized branch payloads that use
whGrpCode/whGrpNameas well as the olderwhsGrpCode/whsGrpNamenames. - Changed branch completion so tax is fetched before setup is considered complete;
branchandtaxare both saved before returning to user selection. - Added POS terminal local storage helpers for
branch,tax, anduser. - 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 usesX_API_KEY_TERMINAL_MAIN. - Updated
UserSelectionScreento load users fromGET {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-terminalgovernance/change-log
POS Terminal user selection and mock login UI
- Added the new
UserSelectionScreenatapps/pos-terminal/src/screens/UserSelectionScreen/index.tsxand moved it from the former flat screen file path to support the/screens/UserSelectionScreen/index.tsxstructure. - 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
imageURL when present and falls back tofirstnameplususerCodewhenimageisnullor 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, anduseSafeAreaInsets. - Added the app version label at the top-left and the settings button at the top-right.
- The settings dropdown exposes
Light modeandDark mode; if the stored value is stillsystem, the active option follows the resolved system mode, while user selection persistslightordark. - Added a placeholder
Branch settingsmenu 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-terminalgovernance/change-log
POS Terminal app version native module and iOS build fix
- Added a POS terminal native
AppVersionModulefor Android and iOS sogetAppVersionLabel()reads the real native app version/build like mobile instead of relying only on fallback values. - Registered the Android native package through
AppVersionPackageinMainApplication. - 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-shotpostinstall patch to fix the iOS compile erroruse of undeclared identifier 'RCTScrollView'; this error was not caused byAppVersionModule. - Impact: POS terminal now has an additional native module, iOS setup should run
pod install, andapps/pos-terminal/ios/Podfile.lockshould be kept as the terminal pod source of truth. - Verified with the relevant Android compile,
pod install, and POS terminal iOSxcodebuild. - Docs updated:
architecture/mobile-terminalgovernance/change-log
POS Terminal Android release build setup
- Added the main runtime and dev dependencies for
@bsr/pos-terminalso the POS terminal app can start on the React Native0.85.2stack 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, andinstall:app. - Updated POS terminal Android Gradle config to apply Google Services/Firebase Messaging when
google-services.jsoncontains a client for packageth.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/dummyProductssocompanyBFPDBreturnsdummy0001todummy0003, while every other company returns the newnff-dummy001tonff-dummy003product 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-flowgovernance/change-log
2026-05-01
Mobile
Mobile order credit-note OTP
- Updated
orderDetailScreenso applying a credit-note discount can branch into an OTP confirmation step whenPOST /orders/:id/credit-notes/:creditNoteIdreturnsrequireOtp: 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 withPOST /orders/:id/credit-notes/:creditNoteId/confirm-otpusing 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-flowgovernance/change-log
Mobile goods receipt warehouse code source
- Updated
goodsReceiptDetailScreenso products added from the picker set linewarehouseCodefromselectedProduct.whsCodefirst, then fall back tobranch.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-flowgovernance/change-log
2026-04-30
Core
Mobile dependency and Android install notes
- Checked package freshness with
yarn outdated;docs-sitehad 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_INCOMPATIBLEand the fix of uninstallingth.co.boonsiri.posbefore installing a release APK signed with a different key. - Upgraded the mobile and POS terminal React Native core packages from
0.84.1to0.85.2. - Applied the React Native
0.85.2template changes that apply to this repo: Gradle wrapper9.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, Worklets0.8.1, and React Native Firebase patch versions23.8.8. - Updated style usage from
StyleSheet.absoluteFillObjecttoStyleSheet.absoluteFillbecause the React Native0.85TypeScript definitions removedabsoluteFillObject. - Added mobile Jest setup mocks for native modules used by the app-level render test.
- Removed stale
apps/mobilelockfiles so the root Yarn workspace lockfile remains the single dependency source of truth. - Verified with
yarn typecheck,./gradlew app:compileDebugKotlin, andyarn workspace @bsr/mobile test --watchman=false --runInBand. - Docs updated:
setup/android-setupgovernance/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, andonMessagedeprecation warnings at runtime. - Added a Jest mock for
@react-native-firebase/appso modulargetApp()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 simulatorxcodebuild -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
transportListScreenfrom 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
getTransportsrequest 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 --noEmitandyarn workspace @bsr/mobile test --watchman=false --runInBand. - Docs updated:
governance/change-log
Mobile transport signature modal sizing
- Reduced the customer signature pad height in
transportDetailScreenso thereact-native-signature-canvasfooter 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 --noEmitandyarn workspace @bsr/mobile test --watchman=false --runInBand. - Docs updated:
governance/change-log
Mobile signature canvas 5 upgrade
- Upgraded mobile
react-native-signature-canvasfrom4.7.1to5.0.2. - Reviewed the current signature usage in
transportDetailScreen; the existingSignatureprops (onOK,onEmpty,descriptionText,clearText,confirmText,webStyle,autoClear, andimageType) remain supported in v5. - No source changes were required. The v5 package now declares
react-native-webview >=13as a peer dependency, which the mobile app already satisfies. - Re-applied the existing
react-native-view-shotiOS patch afteryarn workspace @bsr/mobile addbecause 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 simulatorxcodebuild -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
i18nextfrom25.10.10to26.0.8andreact-i18nextfrom16.6.6to17.0.6. - Reviewed the mobile i18n setup in
apps/mobile/src/i18n/index.ts; the existingcompatibilityJSON: 'v4',initReactI18next, resource map, fallback language, anduseSuspense: falseconfig still works with the new major versions. - No source changes were required because current usage is limited to the app provider, i18n initialization, and
useTranslationin the notification screen. - Re-applied the existing
react-native-view-shotiOS patch afteryarn workspace @bsr/mobile addbecause 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 simulatorxcodebuild -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-jsfrom3.3.0to4.10.1. - Confirmed the current
apps/mobile/srccode no longer importsbwip-js, so no runtime barcode generation code needed migration in this pass. - Noted the main Node/CommonJS entry in
bwip-jsv4 no longer exposestoDataURL; future React Native barcode usage should import the React Native entry/export that providestoDataURL. - Re-applied the existing
react-native-view-shotiOS patch afteryarn workspace @bsr/mobile addbecause 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 simulatorxcodebuild -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.8to24.0.0:@react-native-firebase/app,@react-native-firebase/firestore, and@react-native-firebase/messaging. - Ran
yarn installto confirm the workspace lockfile was already aligned and to re-run the existingreact-native-view-shotpostinstall patch. - Ran
pod install; iOS podsRNFBApp,RNFBFirestore, andRNFBMessagingmoved to24.0.0while Firebase iOS SDK pods stayed on12.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 simulatorxcodebuild -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-storagefrom2.2.0to3.0.2as the first isolated major dependency upgrade after the React Native0.85.2migration. - Ran
pod install; the iOS pod changed fromRNCAsyncStoragetoAsyncStorage. - Added the AsyncStorage v3 bundled Android local Maven repository to the mobile Android Gradle config so
org.asyncstorage.shared_storage:storage-android:1.0.0resolves 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-mockpath and its newjestexport is ESM. - Verified with
yarn typecheck,yarn workspace @bsr/mobile test --watchman=false --runInBand, Android./gradlew app:compileDebugKotlin, and iOS simulatorxcodebuild -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.2line:@react-navigation/native,@react-navigation/native-stack,axios,dayjs,i18next,react-i18next, andreact-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, andprettier. - Updated
@bsr/pos-terminal@types/reactto keep the workspace React type version aligned. - Ran
pod installafter the dependency refresh. CocoaPods updated the generated iOS project/lockfile, including React Native0.85.2pods, Firebase iOS pods, React Native Firebase patch pods, Gesture Handler, Reanimated, and Worklets. - Re-applied the existing
react-native-view-shotnew-architecture patch before the iOS build because the refreshed install restored the upstreamRCTScrollViewcode 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 Firebase24, i18next26, react-i18next17, bwip-js4, Jest30, TypeScript6, and similar major-only updates. - Verified with
yarn typecheck,yarn workspace @bsr/mobile test --watchman=false --runInBand, Android./gradlew app:compileDebugKotlin, and iOS simulatorxcodebuild -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
borrowListScreeninitial loading so opening the screen no longer triggers overlapping page-1 requests from initial load, navigation focus, and earlyonEndReached. - Added request guards for initial-load completion and in-flight fetches, and moved pagination tracking into refs so
onEndReacheddoes 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 --noEmitandyarn workspace @bsr/mobile test --watchman=false --runInBand. - Docs updated:
governance/change-log
Mobile order detail shipping type preservation
- Fixed
orderDetailScreenso persisted orders preserve the servershippingTypevalue when opened fromorderListScreen. - 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 --noEmitandyarn workspace @bsr/mobile test --watchman=false --runInBand. - Docs updated:
governance/change-log
Mobile swipeable list behavior after React Native upgrade
- Reworked the shared
SwipeableFlashListwrapper after the React Native0.85.2upgrade becausereact-native-gesture-handlerswipe action rows were measuring separately from the item content on several screens. - Upgraded FlashList to v2, but kept swipe-enabled lists on a
FlatListfallback 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 --noEmitandyarn 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 Firestoreversion/vapp, converts both local and remote version values withNumber(...), and blocks the UI when the Firestore version number is greater. - The blocking modal says
แอปของคุณจำเป็นต้องอัปเดทเป็นเวอร์ชั่น ..., displays the FirestoreversionNumber, and has no close action. - The implementation uses
versionNumberas the main Firestore comparison field and also accepts platform-specific Android/iOS fields if they are added later. - Docs updated:
workflows/login-branch-homegovernance/change-log
Mobile iOS build environment
- Installed CMake on the local development machine so CocoaPods/native iOS dependencies can complete.
- Updated
apps/mobile/ios/Podfilewith repo-specific post-install/post-integrate fixes forgRPC-Core.modulemapandFirebaseFirestoreInternallink issues. - Added a root
postinstallscript that patchesreact-native-view-shotfor React Native new architecture by usingRCTScrollViewComponentView. - Verified the mobile iOS simulator build with
xcodebuildafterpod 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-migrationgovernance/change-log
2026-04-29
Mobile
Mobile Lot/Batch warehouse lookup
- Updated
storefrontDetailScreenLot/Batch lookup so both the auto-pick flow and manual picker use itemwhsCodebefore falling back to the selected branch warehouse code. - Documented that
shippingDetailScreenalready uses product-groupwhsCodefor its Lot/Batch lookup. - Updated
shippingDetailScreenso transportation confirmation is checked before product-check permission when opening Lot/Batch selection; emptydeliveryStatusnow showsขนส่งยังไม่ยืนยันใบจัดนี้. - Docs updated:
workflows/sales-flowgovernance/change-log
Mobile expense bill save navigation
- Updated
expenseBillDetailScreenso after a save API call completes, the screen returns toExpenseBillListwhether 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
transportDetailScreensort planner using customerU_BFP_LatitudeandU_BFP_Longitude. - The route sort uses the device's current GPS location as
origin, sends valid customer coordinates to Google Routes withoptimizeWaypointOrder: true, readsroutes.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
จัดเรียงลูกค้าตามพิกัดด้วย Googleis a full-width second-row action. - Docs updated:
workflows/mobile-transport-and-vehiclesgovernance/change-log
Mobile goods receipt zero quantity submit
- Updated
goodsReceiptDetailScreenso line and Lot/Batch quantities may be0, 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
calis0, and still maps each submitted linequantityfromcal. - Removed the prior submit behavior that filtered payload lines to only
cal > 0. - Docs updated:
workflows/goods-receipt-flowgovernance/change-log
Mobile order detail storage print remark
- Updated the
orderDetailScreenstorage-print modal that choosesพิมพ์ไม่มี Lotsorพิมพ์มี Lotsso 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
NEWbefore the reload-and-print step. - Docs updated:
workflows/sales-flowgovernance/change-log
Mobile Home branch-focus refresh
- Updated
HomeScreenso it reloads the stored user and branch throughuseFocusEffectwhenever Home regains focus. - This keeps menu visibility in sync with the latest selected warehouse after changing branch/warehouse, including switching from
isMain: falseback toisMain: true. - Docs updated:
workflows/home-menu-and-permissionsgovernance/change-log
2026-04-28
Mobile
Mobile transport and vehicle status
- Added the
ยานพาหนะHome menu entry in theข้อมูลgroup afterผู้ใช้ทั้งหมด, usingmenus.menu11and the same visibility permission asผู้ใช้ทั้งหมด. - Added the
VehicleListmobile route and documented the vehicle-status list flow: loading viagetVehicles, search, status-colored cards, and the vehicle-status modal withvehicleStatusandvehicleStatusNote. - Documented that vehicle status updates call
PATCH api/vehicles/{licensePlate}/vehicle-statusthrough the samemstApidomain asgetVehicles. - Added and documented the transport-detail bottom action
อนุมัติใบจัดทั้งหมด, which is shown when at least one delivery hasdeliveryStatusasnullor empty, asks for confirmation before API calls, finalizes all pending deliveries, and refreshes the transport detail bytransportId. - Replaced the transport-detail header finalize-all menu with print actions for
พิมพ์ใบแจ้งหนี้ทั้งหมดandพิมพ์ใบจัดสินค้า, shown only after every delivery has a non-emptydeliveryStatus. - Added
getTransportCustomerInvoices(transportId)forGET api/transports/{transportId}/invoices; the invoice print action uses that response directly withprintInvoiceand no longer reloads each invoice throughgetInvoiceDetail. - The transport invoice print loop now waits for React Native interactions and delays
800msbetween print jobs to reduce native print instability when printing many invoices. - Fixed the mobile branch selection type by adding
BranchCodeto the localBranchOptiontype, which restorestsc --noEmit. - Moved mobile dummy product generation into shared
utils/dummyProducts, reused by goods receipt and transfer warehouse, while keeping the originalb1-dummy0001tob1-dummy0003items and adding thec1,e1,f1, andh1dummy groups. - Docs updated:
workflows/home-menu-and-permissionsworkflows/mobile-transport-and-vehiclesworkflows/goods-receipt-flowgovernance/change-logindex
2026-04-27
Mobile
Mobile customer tax ID field
- Added the optional
taxIDcustomer field toCustomerManagementEdit, positioned underฉายาand not required for saving. - The customer draft payload and shared customer types now include
taxID. CustomerManagementDetailandCustomerDetailnow showTax IDin the customer information section, with-when no value is available.- Docs updated:
governance/change-logworkflows/mobile-borrow-and-customer-management
2026-04-24
Mobile
Mobile goods receipt partial and over receipt
- Updated
goodsReceiptDetailScreensoรับสินค้าเข้าตรง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
caldiffers from the original line quantity. - The submit payload now includes only lines with actual received quantity greater than
0, and each submitted line sendsquantityfrom the received totalcal. - Docs updated:
workflows/goods-receipt-flowgovernance/change-logindex
Mobile order metadata summary
- Updated
OrderMetaDataDetailso the newdiscountandnet amountfields use the same payment-summary source asOrderPaymentHeroCard. - The metadata card now reads discount from
getOrderDiscountTotal(detail)and remaining amount fromgetOrderNetAmount(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 is0. - Docs updated:
governance/change-log
Mobile order and borrow item warehouse payload
- Updated the shared order item payload builder so
whGrpCodeandwhGrpNamenow come fromitem.whGrpCodeanditem.whGrpName, then fall back to the selected branch values, instead of falling back throughitem.whsCodeanditem.whsName. - Added
whsCodeas a separate field in the shared order item payload, sourced directly fromitem.whsCode. - Updated the borrow item payload builder with the same separation:
whsCodenow comes fromproduct.whsCode,whGrpCodecomes fromproduct.whGrpCode, andwhGrpNameprefersproduct.whGrpNamebefore falling back to the branch-context name. - Added
whsCodeto the sharedBorrowItemPayloadtype so the borrow helper and API payload type stay aligned. - Docs updated:
governance/change-log
Mobile invoice detail sales-order permission gate
- Updated
invoiceDetailScreenso 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
999999user-code override fromtransportDetailScreen. - 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
branchScreenandTransferWarehouseDetailflows so sub-warehouse results fromgetWarehousesSub(...)ignore any record whosewhsCodecontainsNF-orDR-anywhere in the string. - This is a record-level exclusion, not a code rewrite. For example, a warehouse such as
NF-SSKis removed from the selectable list instead of being renamed. - Moved the exclusion rule into the shared mobile helper
apps/mobile/src/utils/warehouse.tsso 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
createCustomerDraftis 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-logworkflows/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
idwhenitemIdis missing, which prevents silent delete failures and duplicate-item errors during edit saves. - Documented that borrow-item edit can load the current product by
productCodewhen it is not present in the current inventory snapshot. - Fixed and documented the customer-management edit screen so
customerTypeandknowusselectors are populated from the correct source lists instead of being swapped. - Docs updated:
governance/change-logworkflows/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
branchkey. - 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
TransferWarehouseDetailnow reloads destination warehouse options withgetWarehousesSub(BranchCode)from stored branch data, while continuing to treat storedwhsGrpCodeas the selected source warehouse in transfer item flows. - Docs updated:
governance/change-logworkflows/login-branch-home
Mobile home branch gating
- Updated the mobile Home visibility rules so several menus no longer require
branch.isMain === trueonce the user'sdeptCodeis allowed. - The affected menus are
รับสินค้าเข้าตรง,โอนสินค้าไปสาขา,รับสินค้าจากสาขา,ย้ายสินค้าระหว่างคลัง,ลูกค้า,การจัดการลูกค้า,เปิด/ปิด สถานะลูกค้า,ลดหนี้ / คืนสินค้า, andผู้ใช้ทั้งหมด. isMainBranchis still enforced forใบจัดส่งสินค้าสายส่ง,ใบเบิกยืมดูปลา,ขนส่ง, andบิลน้ำมัน.- Docs updated:
governance/change-logworkflows/home-menu-and-permissions
Mobile item warehouse-group payload fallback
- Updated the shared mobile item-payload builder so
whGrpCodeandwhGrpNamenow preferitem.whsCodeanditem.whsNamebefore falling back toitem.whGrpCodeanditem.whGrpName. - This changes the payload sent from sales-order item creation and booking-price item creation flows, because both screens use the same shared
buildCommonItemPayloadhelper. - 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 eachPermissionTogglefromcanApprove. - 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
createdAtis returned as a UTC timestamp such as2026-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
deptCode20to the mobile Home permission sets forMENU_ORDER_REVIEW,MENU_INVOICE,MENU_STOREFRONT,MENU_PRODUCT,MENU_CUSTOMER, andCAN_CREATE_ORDER. - This gives department
20visibility to those Home menu entries and allows the order/create shortcut paths that depend onCAN_CREATE_ORDER. - Docs updated:
governance/change-logworkflows/home-menu-and-permissions
Mobile lot/batch deletion
- Updated the shared
BatchLotSheetUI 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-sitewith Mermaid support. - Added root scripts for docs install, local dev, locale-specific dev, build, and static preview.
- Docs updated:
indexarchitecture/overviewarchitecture/mobile-terminalsetup/android-setupsetup/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
enandthlocales. - Docs updated:
governance/wiki-maintenancegovernance/change-log
Mobile
Mobile credit note location selection
- Updated
CreditNoteDetailso warehouse users with location-edit permission can assign lot/location without being the document owner. - Changed the mobile location picker UI in
CreditNoteDetailto use the sameSelectionModalpattern as shipping and storefront lot/batch selection. - Updated order credit-note selection so only items with
isUsed == 1are blocked, and used credit-note cards now render with a light red background. - Updated sales-order customer blocking so user
999999can open order-related customer flows even when the customer has outstanding credit, while inactive customers remain blocked. - Updated
OrderDetailbenefit 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 -> homestartup path from the mobile app implementation. - Captured session validation, branch selection, and home-entry decision points from
App.tsxandRootNavigator.tsx. - Docs updated:
workflows/login-branch-home
Home access and permissions
- Documented how the mobile Home screen filters menu visibility by
deptCodeandisMainBranch. - Added the current menu-to-navigation mapping and create-shortcut rules as wiki reference material.
- Docs updated:
workflows/home-menu-and-permissions