Documentation Index
Fetch the complete documentation index at: https://mintlify.com/lopiv2/invenicum/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Invenicum supports multi-currency inventory management with automatic currency conversion and real-time exchange rates. Store values in USD and display them in your preferred currency.How It Works
- Base Currency: All prices are stored in USD in the database
- Display Currency: Users can select their preferred display currency
- Automatic Conversion: Prices are converted on-the-fly using exchange rates
- Exchange Rates: Fetched from the backend and cached locally
Setting Your Currency
Select Currency
Find the Currency section and click the currency dropdown
Currently supported currencies are displayed in the dropdown menu with their symbols.
Choose Your Currency
Select your preferred currency from the list:
- USD (United States Dollar) $
- EUR (Euro) €
- GBP (British Pound) £
- JPY (Japanese Yen) ¥
- MXN (Mexican Peso) $
- And more…
Currency Configuration
User Preferences Model
Currency settings are stored in the user preferences: File:lib/data/models/user_preferences.dart:6
Exchange Rates
Exchange rates are fetched from the backend and stored locally:Price Conversion
Automatic Conversion
All price fields are automatically converted using thePreferencesProvider:
File: lib/providers/preferences_provider.dart:123-133
Display Components
Use thePriceDisplayWidget for consistent price formatting:
File: lib/widgets/ui/price_display_widget.dart:5-36
- Converts from USD to selected currency
- Applies the correct currency symbol
- Formats with 2 decimal places
Currency Symbols
Currency symbols are mapped in the preferences provider: File:lib/providers/preferences_provider.dart:195-210
| Currency Code | Symbol | Name |
|---|---|---|
| USD | $ | US Dollar |
| EUR | € | Euro |
| GBP | £ | British Pound |
| JPY | ¥ | Japanese Yen |
| CAD | C$ | Canadian Dollar |
| AUD | A$ | Australian Dollar |
| MXN | $ | Mexican Peso |
| BRL | R$ | Brazilian Real |
| CNY | ¥ | Chinese Yuan |
| INR | ₹ | Indian Rupee |
Price History & Charts
Price history charts respect the selected currency: File:lib/widgets/ui/price_history_chart_widget.dart:32-100
Custom Fields with Price Type
Custom fields of typeprice are automatically handled:
File: lib/screens/assets/local_widgets/custom_fields_section.dart:221-222
lib/screens/assets/asset_edit_screen.dart:340-346
Backend Integration
Update Currency
Currency changes are synchronized with the backend: File:lib/data/services/preferences_service.dart:37-39
PUT /api/v1/preferences/currency
Request Body:
Localization File Reference
File:lib/l10n/app_en.arb:274-433
Relevant translations:
Best Practices
Price Entry: When users enter prices, they input in their selected currency. The app converts to USD before saving to the database.
Related Components
- Preferences Provider:
lib/providers/preferences_provider.dart:17-210 - Price Display Widget:
lib/widgets/ui/price_display_widget.dart - Currency Dropdown:
lib/screens/preferences/local_widgets/currency_dropdown_widget.dart - User Preferences Model:
lib/data/models/user_preferences.dart
