This repository contains deeply linked ERPNext / Frappe / POS Awesome features.
No feature should be changed as an isolated patch.
Before making any code change, Codex must read and follow:
docs/ARCHITECTURE.mddocs/FEATURE_CONTRACTS.mddocs/CODEX_WORKFLOW.mddocs/TESTING_AND_VERIFICATION.md
If any of these files are missing, Codex must report that first before coding.
Before editing files:
- Understand the requested bug or feature.
- Identify all linked modules affected by the change.
- Read the current implementation before modifying it.
- Find the single source of truth for the logic.
- Avoid local one-file patches when the logic is shared.
- Align frontend, backend, cache, sync, print, and reports where relevant.
- Preserve existing ERPNext / POS Awesome behavior unless the task explicitly asks to change it.
- After coding, explain:
- Files changed
- Why each file changed
- Linked features affected
- What was verified
- Remaining risks
- Suggested commit message
When changing any POS feature, always check impact on:
- Item search
- Cart item row
- Pricing rules
- Discount percentage
- Discount amount
- UOM conversion
- Customer price list
- POS Profile configuration
- POS Profile price list
- POS Profile warehouse
- POS Profile payment methods
- POS Profile tax settings
- POS Profile print settings
- Stock validation
- Cart totals
- Payment screen
- Sales Invoice payload
- Backend API methods
- Offline IndexedDB/cache
- Sync logic
- Print format
- QZ Tray receipt
- Reports/dashboards
Never fix only the visible screen if the same logic is used elsewhere.
POS Profile is a central configuration source for POS behavior.
Before changing any POS feature, Codex must check whether the requested change depends on POS Profile settings.
Always consider POS Profile impact on:
- Company
- Warehouse
- Customer
- Price List
- Currency
- Taxes and Charges
- Payment Methods
- Stock validation
- Item filters
- Customer filters
- Sales Invoice defaults
- Print format
- Offline cache loading
- Opening and closing flows
- Any custom POS Profile fields
Do not hardcode behavior that should come from POS Profile.
Do not change pricing, stock, payment, printing, offline cache, or invoice payload logic without checking whether POS Profile controls that behavior.
Business logic must not be duplicated across multiple components.
Prefer shared services, composables, utilities, or stores for:
- Price calculation
- Discount calculation
- UOM conversion
- Tax calculation
- Cart totals
- Customer price list resolution
- Stock validation
- Invoice payload preparation
- Offline sync transformation
If duplicated logic exists, refactor it carefully instead of adding another copy.
- Keep changes minimal only when minimal is correct.
- Full refactoring is allowed when required for correctness and long-term maintainability.
- Do not add new dependencies unless necessary.
- Do not remove existing behavior without explaining why.
- Do not silently ignore errors.
- Add safe fallbacks for offline/cache data.
- Avoid breaking existing POS flows.
A task is complete only when:
- The requested issue is fixed.
- Linked features are checked.
- Existing behavior is not broken.
- Build/lint/test commands are run where available.
- Risks are documented.