Stock History Menu
Purpose
The Stock History page shows the stock card of a product for a specific warehouse and date range. You can see:
- Opening stock
- Total stock in
- Total stock out
- Closing stock
- Transaction details per date (reference & description)
Top section
Header
- Title: Stock History
- Subtitle: “Check stock card per product”
- 🏬 icon: select warehouse.
- 📅 icon: select date range.
Select product
- “Search products…” field to find product name/code.
- Voice search (🎤) to search by voice.
- When you type at least 2 characters, a dropdown appears.
- Tap a result to select the product.
- × clears the selection/search text.
Note: if you open this page from another screen, the product may be prefilled via productId/productName.
Select warehouse (🏬)
- Tap the 🏬 icon.
- A “Select Warehouse” modal appears.
- Tap the warehouse you want.
The selected warehouse becomes the reference for the stock card data.
Select date range (📅)
- Tap the 📅 icon.
- Select start and end dates.
- Tap Apply in the date picker.
The selected period is used to filter stock transactions.
How to show data
After product + warehouse + date range are set, the app loads the stock card. If data does not appear:
- Make sure the product is selected from the dropdown (not just typed).
- Change date/warehouse to trigger a refresh.
Stock card summary
When data is loaded, you will see:
- Product name
- Closing stock
- Opening: stock at the start of the period
- In: total stock-in transactions in the period
- Out: total stock-out transactions in the period
Transaction list
Each transaction row shows:
- Date & time (local).
- Reference number (if available).
- Transaction label/description.
- Values:
- In
- Out
- Stock (running balance after the transaction)
Possible states
- “No transactions in this period”
- No stock movement for the selected product in the chosen period.
- Error “Gagal memuat kartu stok” (failed to load stock card)
- Usually caused by connection issues, an expired session token, or server problems.
- “Warehouse kosong”
- Data warehouse belum tersedia dari server/config.
Tips
- Use a shorter date range (for example 1–7 days) for easier auditing.
- To trace stock changes, pay attention to reference_no and the transaction label.
- If stock looks odd, check another warehouse or extend the period to see earlier transactions.