Dashboard
Change the Dashboard Reporting Period
Dashboard period buttons refresh the overview for one active branch, but current date boundaries use the API server clock and can be narrowed to the user's active login session.
- Menu path
- Home -> Dashboard -> Today / This Week / This Month / This Year
- Verified from
- Posnic demo and current POS source reviewed on 2026-09-08
Technical source evidence
frontend/modules/dashboard.html four period buttons and default active state, frontend/static/script/js/modules/js/dashboard.js periodLabel, loadOverview and activeInActiveFilterButtons, api/src/controllers/dashboard.controller.js getDatesBasedOnFilter and getOverview, api/src/utils/session-filter.util.js effective session start, demo.posnic.io Today dashboard observed on 2026-09-08, demo.posnic.io This Month dashboard captured on 2026-09-04
Select and Confirm a Period
- Open Home -> Dashboard and confirm the displayed outlet or branch.
- Select Today, This Week, This Month or This Year once.
- Confirm the selected button has the active style and the Totals period label changes to the same wording.
- Wait while monetary KPI values show a loading ellipsis and the overview request completes.
- Confirm Profit uses the same period label when the role can see financials, then read Best Selling Products under that same selection.
- Open a detailed report with explicit dates before exporting, reconciling, ordering stock or making an accounting decision.
Exact Current Date Boundaries
| Button | Start | End | Important detail |
|---|---|---|---|
| Today | 00:00:00.000 on the current server-calendar day. | 23:59:59.999 on that day. | The range includes the full calendar day, including an end later than the current instant. |
| This Week | Most recent Sunday at 00:00:00.000. | Current instant. | The week starts Sunday, not Monday and not a rolling seven days. |
| This Month | First day of the current month at 00:00:00.000. | Current instant. | This is month-to-date, not the previous 30 days. |
| This Year | January 1 of the current year at 00:00:00.000. | Current instant. | This is year-to-date, not the previous 12 months. |
Current Time-Zone Limitation
The dashboard controller reads the user's configured Posnic time zone and passes it to getDatesBasedOnFilter. In the current implementation that function accepts timeZone but does not use it; it creates ordinary JavaScript Date values from the API server's local clock.
- A branch time-zone setting alone does not prove that these four dashboard boundaries use that zone.
- Near midnight, a shop and its API server can disagree about which calendar day, week, month or year is active.
- The browser's clock controls the greeting text, while the API server clock currently controls dashboard date boundaries. Those are separate behaviors.
- For day-close, tax, payroll or legal reporting, use a detailed report and verify its explicit start/end timestamps rather than relying only on a dashboard label.
- Record the shop time zone, API host time zone and a boundary test around local midnight during deployment acceptance.
How Sales Session Filter Narrows the Range
When the signed-in user has access.sales.session_filter=true and an active user_sessions record with login_time, Posnic replaces the period start with whichever is later: the normal period start or that login time. The period end is left unchanged.
| Situation | Effective start | What the operator sees |
|---|---|---|
| No Sales Session Filter permission | Normal Today, Week, Month or Year start. | Full selected dashboard period for the active context. |
| Filter enabled; login happened after period start | Current session login time. | Only activity since that login can contribute. |
| Filter enabled; login predates period start | Normal period start. | The selected period remains the narrower boundary. |
| Filter enabled but no active session/login time is found | Normal period start. | The utility falls back to the original range rather than hiding everything. |
What Refreshes When a Button Is Selected
| Dashboard area | Current response to period selection |
|---|---|
| Totals | Sales, purchases, expenses, tax, UPI and cash reload from the single dashboard overview request for financially authorized users. |
| Profit | Revenue, COGS, gross profit, expenses, net profit, margin, sales count and cash-flow note rerender when financial data is returned. |
| Best Selling Products | The top-five item-name groups rerender for the effective range. |
| Customer Dues | Does not currently refresh from the period selection; its dashboard loader is disconnected. |
| Setup checklist | Does not become complete or incomplete because a reporting period changed. |
| Greeting and quick actions | Remain navigation/orientation controls; the greeting is recalculated from the browser's local hour when overview loading begins. |
Loading, Failure and Re-entry Behavior
- The clicked button becomes active before the network response finishes. An active style proves the selection, not successful data loading.
- Totals change to an ellipsis while loading. If the overview request fails or returns no data, they change to a dash rather than keeping a stale or invented amount.
- Selecting another period starts another overview request. Wait for the final selected label and values before recording evidence.
- Dashboard initialization programmatically selects day, so reopening or reinitializing the dashboard returns to Today rather than preserving the previous button.
- Currency formatting uses the shop's locally stored currency sign and two decimal places; it does not change the underlying date range.
Troubleshoot Dashboard Periods
| Symptom | Likely cause | Action |
|---|---|---|
| Week excludes Monday from the prior calendar week | This Week begins on Sunday. | Use a detailed report with explicit dates when the business week starts differently. |
| Late-night sale appears on an unexpected day | API server clock and shop time zone may differ. | Compare transaction timestamp, server zone and explicit report boundaries. |
| This Month shows only recent session activity | The user's Sales Session Filter moved the start to login time. | Review the role setting; do not remove it merely to expose management figures to a cashier. |
| Button is active but totals show a dash | The overview request failed or returned no data. | Check connectivity and detailed reports; do not record the dash as zero. |
| Customer Dues did not change | That card is not connected to the period overview loader. | Use Reports -> People -> Outstanding Customers. |
| Dashboard returned to Today | Day is selected during dashboard initialization. | Choose the intended period again and re-confirm its label. |
| Dashboard and report disagree | Branch, exact timestamps, session filtering, accepted record states or server time can differ. | Align each input and reconcile source transactions before escalating. |