Every time you hit Refresh current tab in the Arsinous sidebar, the script needs to know which date window to query. Rather than prompting you each time, Arsinous stores your preferred time period in Google’s user-scoped properties store — so your date settings persist across sessions and are completely independent of what any other user of the same spreadsheet has chosen. The top section of the sidebar exposes a dropdown of preset periods plus optional custom date pickers, giving you instant, persistent control over how far back the data pull reaches.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/arsinousltd-sudo/Arsinous-V8-Sales/llms.txt
Use this file to discover all available pages before exploring further.
How Preferences Are Stored
Date filter settings (along with inventory preferences) are persisted usingPropertiesService.getUserProperties() — Google’s per-user, per-script key-value store. Three functions in sidebar/backend.gs manage this:
Date preferences are stored per user via
PropertiesService.getUserProperties(). If multiple people share the same spreadsheet, each person’s time period and custom date range are stored separately — changing your filter has no effect on what a colleague sees when they refresh.updateProperty('timePeriod', newValue) immediately, without waiting for you to click Refresh.
The getDates() Function
All tab-refresh functions that need a date range call getDates() to compute the actual startDate and endDate strings from the stored timePeriod property:
{ startDate: "YYYY-MM-DD", endDate: "YYYY-MM-DD" }, which can be dropped directly into a MySQL WHERE clause.
Time Period Options
The sidebar’s time period dropdown (<b-select>) exposes the following options:
| Dropdown label | timePeriod value | Start date | End date |
|---|---|---|---|
| Last 2 weeks | 14 (numeric) | Today − 14 days | Today |
| This Month | "thisMonth" | 1st of the current month | Today |
| Prev Month | "prevMonth" | 1st of the previous month | Last day of the previous month |
| This Year | "thisYear" | January 1 of the current year | Today |
| Prev Year | "prevYear" | January 1 of the previous year | December 31 of the previous year |
| All Dates | "all" | January 1, 1970 | Today |
| Custom Dates | "custom" | Value of props.startDate | Value of props.endDate |
Custom Date Range
When you select Custom Dates, the From and To datepickers in the sidebar become enabled. For all other presets, the datepickers are disabled (greyed out) because the date range is computed server-side bygetDates() and the picker values are ignored.
The sidebar Vue watcher handles the toggle automatically:
disabled binding in the template:
How the Refresh Flow Works
Adjust the date controls
Select a time period from the dropdown, or choose Custom Dates and pick your From and To dates using the datepickers.
Click Refresh current tab
The sidebar calls
refreshAllProperties() server-side, serializing the entire Vue data object (including timePeriod, startDate, endDate, orderCol, and hideEmpty) as JSON to ensure the server has the latest state.Properties are saved
refreshAllProperties() writes all five keys to PropertiesService.getUserProperties() in one call.Which Tabs Respect the Date Filter
Not every tab usesgetDates(). The table below shows how each sheet handles date filtering:
| Sheet | Date filter behavior |
|---|---|
| Invoices | Uses getDates() — invoices are filtered by the chosen date range |
| P&D (Payments & Discounts) | Reads filter values from cells C1 and C2 in the P&D sheet directly; the sidebar date range is not used |
| Balance | No date filter — showTransactions() loads the full transaction history for the selected customer |
| All Balances | No date filter — shows cumulative balances across all time |
| Inventory | No date filter — controlled by hideEmpty and orderCol preferences instead |
| Products | No date filter |
| Customers | No date filter |
The P&D tab filters are driven by cell edits, not the sidebar. Changing cells C1, C2, E1, or C4 in the P&D sheet triggers
updateCustomersPayments() automatically via the onEdit trigger, independent of the sidebar date settings.Additional Inventory Properties
Two other user properties are managed alongside date settings and affect the Inventory tab refresh:| Property key | Sidebar control | Effect |
|---|---|---|
orderCol | Sort by dropdown (Id = "1", Name = "2") | Column index used by updateInventory() to sort the product list |
hideEmpty | Hide empty checkbox | When true, products with no stock (no IRS lots and no open POs) are excluded from the Inventory sheet |
refreshAllProperties() call when you click Refresh current tab.