Unit Margin Adjustment (Adj Unit Margin) Menu
Purpose
The Adj Unit Margin page is used to monitor margin (profit %) per unit for each product and adjust selling prices when needed.
With this page you can:
- View margin per unit (Base / Sell 1 / Sell 2 / Sell 3).
- Sort from low→high margin or high→low.
- Search specific products.
- Update unit selling price directly in the app (via edit modal).
Header
At the top:
- Title: Adj Unit Margin
- Subtitle: “Margin per product unit”
- Filter button
- Select unit display, margin sorting, and warehouse.
Product search
Below the header there is a field:
- “Search products…”
How to use:
- Type a product name or code.
- The list reloads automatically after a short delay.
Filter (modal)
When you tap Filter, a modal appears to configure:
- Warehouse
- Select the reference warehouse for margin calculations.
- Unit
- All units: show multiple units per product.
- Or select one: Base / Sell 1 / Sell 2 / Sell 3.
- Sort (Urutkan)
- Margin: small → large
- Margin: large → small
After applying filters, the list reloads using your selection.
Product list
Each product card shows:
- Product name
- Short info:
#ID · code(if available) - Unit cards (inside the product card)
Kartu Unit
For each unit, the card shows:
- Unit name and unit label (for example “Sell 1 · PCS”)
- Margin % (example: “12.50%”)
- Buy (purchase price/unit)
- Sell (selling price/unit)
- Profit (profit per unit)
Note:
- If a unit has no buy/sell data, it may not be shown.
Edit selling price (modal)
To change selling price:
- Tap the unit card you want to adjust.
- The “Edit Selling Price (unit name)” modal appears.
- Enter Selling Price (number > 0).
- The app shows Cost as a reference.
- Tap Save.
On success:
- Modal akan tertutup.
- Data akan refresh sehingga margin terbaru terlihat.
If selling price is empty/0:
- The app rejects with “Selling price must be > 0”.
Load More (Scroll)
The list loads progressively as you scroll down. Footer indicators:
- “Loading…” while fetching the next page.
- “Loaded X data” shows how many records have been loaded.
Refresh Data
Pull down to refresh using the current filters.
If an error occurs
If data fails to load:
- Check your connection and login status.
- Try changing filters (warehouse/unit/sort).
- Pull to refresh.
Tips
- Start with low → high margin sorting to find units with margins that are too small.
- Use search to focus on a specific product.
- When adjusting selling price, consider the Cost value so margin is not too thin or too high.