HTKapp Logo

Settings and Configuration

This guide shows you how to configure and personalize your experience in the HtkDoli app. The settings screen lets you manage appearance options, behavior preferences, security for your active session, as well as the administration tools for the connected Dolibarr instance.

To access the settings, open the main menu and select the Settings section. Most of the settings described here are isolated per profile: they apply only to the currently connected session and not to your other Dolibarr accounts.

Appearance

This section lets you modify the visual appearance of the application:

  • Theme: You can force Light or Dark mode, or let the application follow your System theme.
    • Business behavior: The change is managed by the ThemeManager (ThemeManager.shared.userTheme) and the app instantly adjusts the overall colors according to the selected mode. The choice is stored in an isolated, per-profile way: HtkDoli saves the preference in UserDefaults keyed by the unique UUID of the session (key userTheme_{profile_UUID}). Each Dolibarr account therefore keeps its own theme.

Preferences

The preferences section controls the application's interaction with the system and your data:

  • Haptic feedback: Enable or disable the phone's light vibrations during specific interactions (e.g. a successful synchronization).
  • Notifications: Allows the application to send you system alerts via Apple's notification service (NotificationService). The first activation will ask for your system authorization. ⚠️ Enabling notifications also reveals the Dolibarr Push section described below.
  • Sync on Foreground: When this option is enabled, the app automatically starts a synchronization when you open it or bring it back to the foreground.
    • Business behavior and isolation: To guarantee strict security and confidentiality (HtkDoli's multi-profile principle), this option is stored in isolation for the active profile. HtkDoli saves this preference in UserDefaults keyed by the unique UUID of your session (e.g. syncOnForegroundEnabled_{profile_UUID}). It therefore does not apply to your other Dolibarr accounts.

Dolibarr Push

⚠️ This section appears only on iOS and only when Notifications are enabled in the Preferences section. It lets you receive an instant notification when an event occurs in Dolibarr (validated invoice, payment received, new ticket, etc.).

  • Enable event push: Turns the push mechanism on or off. Disabling it also deletes the webhook on the Dolibarr server side.
  • Relay server URL: The address of the PHP relay script (for example https://myserver.com/htk_push_relay.php) installed on your server. ⚠️ Push requires this relay script: without it, no notification can be delivered.
  • Monitored events: The list of Dolibarr events to monitor, grouped by category. You can enable or disable each event individually:
    • Invoicing: Invoice validated, Payment received, Supplier invoice validated.
    • Commercial: Quote validated, Order validated, Supplier order validated.
    • Support: New ticket.
  • Filters: Let you restrict the notifications you receive:
    • Allowed third parties only: receive push notifications only for a selected list of third parties.
    • Minimum financial threshold: receive push notifications only for amounts (incl. tax) greater than or equal to the value entered. ⚠️ Applied to invoices, orders, quotes and payments; tickets are never filtered by amount.
  • Register the webhook: Creates (or recreates) the webhook in Dolibarr pointing to your relay. Once registered, the status displays the active webhook's identifier. ⚠️ After any change to the list of events, a message prompts you to re-register the webhook to apply the changes.

Security

The security of your current session can be enhanced locally on the device.

  • Code lock (PIN): You can protect access to this specific profile with a 4-digit code.
    • Business behavior: The code is managed by a dedicated protection service (PinProtectionService). If enabled, an unlock screen appears every time the profile is reopened. If you decide to disable the code, the application immediately deletes the secure key associated with this profile (pinProtectionService.removePin(for: profile.id)).

Administration

The Administration section only appears if you have the appropriate rights on the connected Dolibarr instance. It groups the global configuration tools. In practice, it appears if you have the categorie.creer permission or if you are an administrator; the entries shown then depend on your exact rights.

Category management

Available if you have the Dolibarr categorie.creer permission. Lets you create, edit and delete the Dolibarr categories used to classify third parties, products, projects, contacts and members.

Company settings

This entry is reserved for administrators (admin = 1 in Dolibarr). It opens the complete company-setup record used on every document (quotes, invoices, shipments, etc.):

  • Identity: company name, share capital, default currency.
  • Address: street address, postcode, city, state/region, country (ISO code).
  • Contact: email, phone, fax, website.
  • Legal identifiers: SIREN (idprof1), SIRET (idprof2), NAF/APE (idprof3), RCS (idprof4), intra-Community VAT number.
  • Corporate purpose: free-form description of the company's activity.

The screen opens in read mode by default. If you are an administrator, the ••• header menu offers the Modify entry, which opens an edit sheet for all fields above. Saving triggers a PUT /setup/company call, then reloads the view with the values returned by Dolibarr.

  • Business behavior: non-admin users do not see the Company settings entry in the Administration section at all (UI-side filtering on Profile.isAdmin, which reads the admin flag from the cached permissions JSON). The server also enforces this control and will reject writes with a 401/403 status code if the API key in use does not have the required rights.

Automatic numbering

Reserved for Dolibarr administrators. Displays, for each Dolibarr module (invoices, quotes, orders, shipments, contracts, etc.), the numbering mask currently active (e.g. FA{yyyy}-{0000}). When the Dolibarr API also exposes the list of available masks for a module, tapping the row lets you switch the active mask (best-effort editing — depending on your Dolibarr version, the screen may stay read-only). See full details in Advanced settings.

Users

Reserved for Dolibarr administrators. Opens the directory in administration mode and lets you create, edit and delete users (login, identity, contact, active status, administrator rights, initial password), as well as manage group memberships. Removing a user from a group is not exposed reliably by the Dolibarr REST API, so this operation still needs to be performed from the Dolibarr web interface. See full details in Advanced settings.

About

This section displays technical information about the application:

  • Version: The public version of the application (e.g. 1.0).
  • Build: The build number of the application. This information is useful for technical support or when reporting bugs.

Screenshots

4 screenshots — click to enlarge