@fayz-ai/plugin-financial 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/FinancialContext.d.ts +44 -0
  2. package/dist/FinancialContext.d.ts.map +1 -0
  3. package/dist/FinancialPage.d.ts +18 -0
  4. package/dist/FinancialPage.d.ts.map +1 -0
  5. package/dist/components/FinancialGeneralSettings.d.ts +3 -0
  6. package/dist/components/FinancialGeneralSettings.d.ts.map +1 -0
  7. package/dist/components/FinancialOnboarding.d.ts +5 -0
  8. package/dist/components/FinancialOnboarding.d.ts.map +1 -0
  9. package/dist/components/FinancialSettings.d.ts +8 -0
  10. package/dist/components/FinancialSettings.d.ts.map +1 -0
  11. package/dist/components/PaymentModal.d.ts +8 -0
  12. package/dist/components/PaymentModal.d.ts.map +1 -0
  13. package/dist/data/index.d.ts +3 -0
  14. package/dist/data/index.d.ts.map +1 -0
  15. package/dist/data/mock.d.ts +9 -0
  16. package/dist/data/mock.d.ts.map +1 -0
  17. package/dist/data/supabase.d.ts +3 -0
  18. package/dist/data/supabase.d.ts.map +1 -0
  19. package/dist/data/types.d.ts +27 -0
  20. package/dist/data/types.d.ts.map +1 -0
  21. package/dist/index.cjs +4937 -0
  22. package/dist/index.cjs.map +1 -0
  23. package/dist/index.d.ts +91 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +4930 -0
  26. package/dist/index.js.map +1 -0
  27. package/dist/lib/tenant.d.ts +3 -0
  28. package/dist/lib/tenant.d.ts.map +1 -0
  29. package/dist/locales/en.d.ts +2 -0
  30. package/dist/locales/en.d.ts.map +1 -0
  31. package/dist/locales/index.d.ts +2 -0
  32. package/dist/locales/index.d.ts.map +1 -0
  33. package/dist/locales/pt-BR.d.ts +2 -0
  34. package/dist/locales/pt-BR.d.ts.map +1 -0
  35. package/dist/registries.d.ts +3 -0
  36. package/dist/registries.d.ts.map +1 -0
  37. package/dist/store.d.ts +38 -0
  38. package/dist/store.d.ts.map +1 -0
  39. package/dist/types.d.ts +302 -0
  40. package/dist/types.d.ts.map +1 -0
  41. package/dist/views/CardsView.d.ts +3 -0
  42. package/dist/views/CardsView.d.ts.map +1 -0
  43. package/dist/views/CashRegistersView.d.ts +3 -0
  44. package/dist/views/CashRegistersView.d.ts.map +1 -0
  45. package/dist/views/CommissionsView.d.ts +3 -0
  46. package/dist/views/CommissionsView.d.ts.map +1 -0
  47. package/dist/views/InvoiceDetailView.d.ts +9 -0
  48. package/dist/views/InvoiceDetailView.d.ts.map +1 -0
  49. package/dist/views/InvoiceFormView.d.ts +13 -0
  50. package/dist/views/InvoiceFormView.d.ts.map +1 -0
  51. package/dist/views/InvoiceListView.d.ts +8 -0
  52. package/dist/views/InvoiceListView.d.ts.map +1 -0
  53. package/dist/views/PayablesView.d.ts +7 -0
  54. package/dist/views/PayablesView.d.ts.map +1 -0
  55. package/dist/views/ReceivablesView.d.ts +7 -0
  56. package/dist/views/ReceivablesView.d.ts.map +1 -0
  57. package/dist/views/StatementsView.d.ts +3 -0
  58. package/dist/views/StatementsView.d.ts.map +1 -0
  59. package/dist/views/SummaryView.d.ts +9 -0
  60. package/dist/views/SummaryView.d.ts.map +1 -0
  61. package/dist/views/dashboardWidgets.d.ts +11 -0
  62. package/dist/views/dashboardWidgets.d.ts.map +1 -0
  63. package/package.json +55 -0
  64. package/src/FinancialContext.tsx +47 -0
  65. package/src/FinancialPage.tsx +261 -0
  66. package/src/README.md +155 -0
  67. package/src/components/FinancialGeneralSettings.tsx +26 -0
  68. package/src/components/FinancialOnboarding.tsx +87 -0
  69. package/src/components/FinancialSettings.tsx +31 -0
  70. package/src/components/PaymentModal.tsx +322 -0
  71. package/src/data/index.ts +2 -0
  72. package/src/data/mock.ts +520 -0
  73. package/src/data/supabase.ts +509 -0
  74. package/src/data/types.ts +53 -0
  75. package/src/index.ts +307 -0
  76. package/src/lib/tenant.ts +3 -0
  77. package/src/locales/en.ts +331 -0
  78. package/src/locales/index.ts +7 -0
  79. package/src/locales/pt-BR.ts +331 -0
  80. package/src/migrations/001_financial_base.sql +109 -0
  81. package/src/migrations/002_chart_of_accounts.sql +28 -0
  82. package/src/migrations/003_card_brands.sql +12 -0
  83. package/src/migrations/004_order_to_cash.sql +164 -0
  84. package/src/migrations/005_seed_defaults.sql +38 -0
  85. package/src/registries.ts +305 -0
  86. package/src/store.ts +221 -0
  87. package/src/types.ts +359 -0
  88. package/src/views/CardsView.tsx +74 -0
  89. package/src/views/CashRegistersView.tsx +597 -0
  90. package/src/views/CommissionsView.tsx +18 -0
  91. package/src/views/InvoiceDetailView.tsx +595 -0
  92. package/src/views/InvoiceFormView.tsx +900 -0
  93. package/src/views/InvoiceListView.tsx +177 -0
  94. package/src/views/PayablesView.tsx +37 -0
  95. package/src/views/ReceivablesView.tsx +37 -0
  96. package/src/views/StatementsView.tsx +123 -0
  97. package/src/views/SummaryView.tsx +12 -0
  98. package/src/views/dashboardWidgets.tsx +191 -0
package/src/index.ts ADDED
@@ -0,0 +1,307 @@
1
+ import React from 'react'
2
+ import type { PluginManifest, PluginScope, VerticalId } from '@fayz-ai/core'
3
+ import type { EntityLookupMap } from '@fayz-ai/saas'
4
+ import { FinancialPage } from './FinancialPage'
5
+ import { createFinancialDashboardWidgets } from './views/dashboardWidgets'
6
+ import type { ResolvedFinancialConfig } from './FinancialContext'
7
+ import type { FinancialDataProvider } from './data/types'
8
+ import { createMockFinancialProvider } from './data/mock'
9
+ import { createSupabaseFinancialProvider } from './data/supabase'
10
+ import { createSafeDataProvider, registerTranslations } from '@fayz-ai/core'
11
+ import { createFinancialStore } from './store'
12
+
13
+ /**
14
+ * Public: a lazy supabase-or-mock financial provider. Apps use this to share one
15
+ * provider between the plugin and a cross-plugin bridge (e.g. agenda's financial
16
+ * bridge in beauty-saas). Thin wrapper over the shared createSafeDataProvider.
17
+ */
18
+ export function createSafeFinancialProvider(): FinancialDataProvider {
19
+ return createSafeDataProvider(
20
+ () => createSupabaseFinancialProvider(),
21
+ () => createMockFinancialProvider(),
22
+ )
23
+ }
24
+ import { financialRegistries } from './registries'
25
+ import { financialLocales } from './locales'
26
+ import { FinancialGeneralSettings } from './components/FinancialGeneralSettings'
27
+
28
+ // ---------------------------------------------------------------------------
29
+ // Public types
30
+ // ---------------------------------------------------------------------------
31
+
32
+ export interface FinancialPluginLabels {
33
+ pageTitle: string
34
+ pageSubtitle: string
35
+ summary: string
36
+ payables: string
37
+ payablesNew: string
38
+ payablesList: string
39
+ payablesRecurring: string
40
+ receivables: string
41
+ receivablesNew: string
42
+ receivablesList: string
43
+ cashRegisters: string
44
+ statements: string
45
+ commissions: string
46
+ commissionsOverview: string
47
+ commissionsRules: string
48
+ cards: string
49
+ cardsOverview: string
50
+ cardsReconciliation: string
51
+ }
52
+
53
+ export interface ItemTypeOption {
54
+ value: string
55
+ label: string
56
+ icon?: string
57
+ }
58
+
59
+ export interface FinancialPluginOptions {
60
+ modules?: {
61
+ payables?: boolean
62
+ receivables?: boolean
63
+ cashRegisters?: boolean
64
+ statements?: boolean
65
+ commissions?: boolean
66
+ cards?: boolean
67
+ }
68
+ labels?: Partial<FinancialPluginLabels>
69
+ currency?: {
70
+ code?: string
71
+ locale?: string
72
+ symbol?: string
73
+ }
74
+ navPosition?: number
75
+ navSection?: 'main' | 'secondary'
76
+ scope?: PluginScope
77
+ verticalId?: VerticalId
78
+
79
+ /** Data provider. Defaults to mock (in-memory) if not supplied. */
80
+ dataProvider?: FinancialDataProvider
81
+
82
+ /** Available item types for invoice lines. Default: product + service + other */
83
+ itemTypes?: ItemTypeOption[]
84
+
85
+ /** Enable service execution tracking on invoice items (default: false) */
86
+ enableServiceExecution?: boolean
87
+
88
+ /** Contact entity config — which person kind to use */
89
+ contactEntity?: { archetypeKind: string; label?: string }
90
+
91
+ /** Seed payment method types for mock provider */
92
+ paymentMethodTypes?: Array<{ name: string; transactionType?: string }>
93
+
94
+ /** Business units / locations. Unit selector only shows when 2+ locations are provided. */
95
+ locations?: Array<{ id: string; name: string; isHQ?: boolean }>
96
+
97
+ /**
98
+ * Entity lookups for cross-plugin references.
99
+ * Keys match `itemTypes` values (e.g., 'product', 'service').
100
+ * When a lookup is provided, item forms show a search selector for that type.
101
+ * When absent, users type descriptions manually.
102
+ */
103
+ entityLookups?: EntityLookupMap
104
+
105
+ /** Contact/person lookup for "Pay to" / "Receive from" fields. Queries persons archetype. */
106
+ contactLookup?: import('@fayz-ai/saas').EntityLookup
107
+
108
+ /** Callback when user clicks a booking link on an invoice. Receives the order ID. */
109
+ onBookingClick?: (orderId: string) => void
110
+ }
111
+
112
+ // ---------------------------------------------------------------------------
113
+ // Defaults
114
+ // ---------------------------------------------------------------------------
115
+
116
+ const DEFAULT_LABELS: FinancialPluginLabels = {
117
+ pageTitle: 'Financial',
118
+ pageSubtitle: 'Financial overview and cash flow management',
119
+ summary: 'Summary',
120
+ payables: 'Accounts Payable',
121
+ payablesNew: 'New',
122
+ payablesList: 'List',
123
+ payablesRecurring: 'Recurring Expenses',
124
+ receivables: 'Accounts Receivable',
125
+ receivablesNew: 'New',
126
+ receivablesList: 'List',
127
+ cashRegisters: 'Cash Registers',
128
+ statements: 'Statements',
129
+ commissions: 'Commissions',
130
+ commissionsOverview: 'Overview',
131
+ commissionsRules: 'Rules',
132
+ cards: 'Cards',
133
+ cardsOverview: 'Overview',
134
+ cardsReconciliation: 'Reconciliation',
135
+ }
136
+
137
+ const DEFAULT_CURRENCY = { code: 'BRL', locale: 'pt-BR', symbol: 'R$' }
138
+
139
+ const DEFAULT_ITEM_TYPES: ItemTypeOption[] = [
140
+ { value: 'service', label: 'Service', icon: 'Briefcase' },
141
+ { value: 'product', label: 'Product', icon: 'Package' },
142
+ { value: 'other', label: 'Other', icon: 'MoreHorizontal' },
143
+ ]
144
+
145
+ // ---------------------------------------------------------------------------
146
+ // Config resolver
147
+ // ---------------------------------------------------------------------------
148
+
149
+ function resolveConfig(options?: FinancialPluginOptions): ResolvedFinancialConfig {
150
+ return {
151
+ modules: {
152
+ payables: options?.modules?.payables !== false,
153
+ receivables: options?.modules?.receivables !== false,
154
+ cashRegisters: options?.modules?.cashRegisters !== false,
155
+ statements: options?.modules?.statements !== false,
156
+ commissions: options?.modules?.commissions !== false,
157
+ cards: options?.modules?.cards !== false,
158
+ },
159
+ labels: { ...DEFAULT_LABELS, ...options?.labels },
160
+ currency: { ...DEFAULT_CURRENCY, ...options?.currency },
161
+ itemTypes: options?.itemTypes ?? DEFAULT_ITEM_TYPES,
162
+ enableServiceExecution: options?.enableServiceExecution ?? false,
163
+ contactEntity: {
164
+ archetypeKind: options?.contactEntity?.archetypeKind ?? 'client',
165
+ label: options?.contactEntity?.label ?? 'Contact',
166
+ },
167
+ locations: options?.locations ?? [],
168
+ entityLookups: options?.entityLookups ?? {},
169
+ contactLookup: options?.contactLookup,
170
+ onBookingClick: options?.onBookingClick,
171
+ }
172
+ }
173
+
174
+ // ---------------------------------------------------------------------------
175
+ // Factory
176
+ // ---------------------------------------------------------------------------
177
+
178
+ export function createFinancialPlugin(options?: FinancialPluginOptions): PluginManifest {
179
+ const config = resolveConfig(options)
180
+ registerTranslations(financialLocales)
181
+
182
+ const provider = options?.dataProvider ?? createSafeFinancialProvider()
183
+ const store = createFinancialStore(provider)
184
+ const dashboardWidgets = createFinancialDashboardWidgets({ config, provider, store })
185
+
186
+ const PageComponent: React.FC<any> = () =>
187
+ React.createElement(FinancialPage, { config, provider, store, registries: financialRegistries })
188
+
189
+ return {
190
+ id: 'financial',
191
+ name: config.labels.pageTitle,
192
+ icon: 'DollarSign',
193
+ version: '1.0.0',
194
+ scope: options?.scope ?? 'universal',
195
+ verticalId: options?.verticalId,
196
+ defaultEnabled: true,
197
+ dependencies: [],
198
+ declaredFeatures: [
199
+ { id: 'financial', label: config.labels.pageTitle, group: config.labels.pageTitle },
200
+ ...(config.modules.receivables ? [{ id: 'financial.receivables', label: config.labels.receivables, group: config.labels.pageTitle }] : []),
201
+ ...(config.modules.payables ? [{ id: 'financial.payables', label: config.labels.payables, group: config.labels.pageTitle }] : []),
202
+ ...(config.modules.commissions ? [{ id: 'financial.commissions', label: config.labels.commissions, group: config.labels.pageTitle }] : []),
203
+ ],
204
+ navigation: [
205
+ {
206
+ section: options?.navSection ?? 'main',
207
+ position: options?.navPosition ?? 6,
208
+ label: config.labels.pageTitle,
209
+ route: '/financial',
210
+ icon: 'DollarSign',
211
+ permission: { feature: 'financial', action: 'read' as const },
212
+ },
213
+ ],
214
+ routes: [
215
+ {
216
+ path: '/financial',
217
+ component: PageComponent,
218
+ permission: { feature: 'financial', action: 'read' as const },
219
+ },
220
+ ],
221
+ widgets: [],
222
+ dashboardWidgets,
223
+ aiTools: [
224
+ {
225
+ id: 'financial.get-revenue',
226
+ name: 'getRevenue',
227
+ description: 'Returns revenue for the business in a given period.',
228
+ icon: 'DollarSign',
229
+ mode: 'read' as const,
230
+ category: 'Finance',
231
+ parameters: {
232
+ type: 'object' as const,
233
+ properties: {
234
+ period: { type: 'string' as const, description: 'today, week, month, or custom date range' },
235
+ },
236
+ },
237
+ suggestions: [
238
+ { label: 'How much did we make today?' },
239
+ { label: "What's this month's revenue?" },
240
+ { label: "Compare this week's revenue to last week" },
241
+ ],
242
+ },
243
+ {
244
+ id: 'financial.create-invoice',
245
+ name: 'createInvoice',
246
+ description: 'Creates a new invoice/payable for a contact.',
247
+ icon: 'FileText',
248
+ mode: 'persist' as const,
249
+ category: 'Finance',
250
+ parameters: {
251
+ type: 'object' as const,
252
+ properties: {
253
+ contact: { type: 'string' as const, description: 'Contact/customer name' },
254
+ amount: { type: 'number' as const, description: 'Invoice amount' },
255
+ description: { type: 'string' as const, description: 'Invoice description' },
256
+ },
257
+ required: ['contact', 'amount'],
258
+ },
259
+ suggestions: [
260
+ { label: 'Create an invoice for a new client' },
261
+ ],
262
+ permission: { feature: 'financial', action: 'create' as const },
263
+ },
264
+ {
265
+ id: 'financial.list-payables',
266
+ name: 'listPayables',
267
+ description: 'Lists outstanding payables/bills.',
268
+ icon: 'FileDown',
269
+ mode: 'read' as const,
270
+ category: 'Finance',
271
+ parameters: {
272
+ type: 'object' as const,
273
+ properties: {
274
+ status: { type: 'string' as const, enum: ['pending', 'overdue', 'paid'] },
275
+ contact: { type: 'string' as const, description: 'Filter by contact name' },
276
+ },
277
+ },
278
+ permission: { feature: 'financial', action: 'read' as const },
279
+ suggestions: [
280
+ { label: 'Show me overdue bills' },
281
+ { label: 'What bills are due this week?' },
282
+ ],
283
+ },
284
+ ],
285
+ registries: financialRegistries,
286
+ settings: [
287
+ {
288
+ id: 'financial',
289
+ label: 'Financial',
290
+ icon: 'DollarSign',
291
+ component: (() => {
292
+ const FinancialSettingsTab: React.FC = () =>
293
+ React.createElement(FinancialGeneralSettings)
294
+ FinancialSettingsTab.displayName = 'FinancialSettingsTab'
295
+ return FinancialSettingsTab as unknown as React.ComponentType<unknown>
296
+ })(),
297
+ order: 10,
298
+ permission: { feature: 'financial', action: 'read' as const },
299
+ },
300
+ ],
301
+ locales: financialLocales,
302
+ }
303
+ }
304
+
305
+ // Re-export types and factories for consumers
306
+ export type { FinancialDataProvider } from './data/types'
307
+ export type { ResolvedFinancialConfig } from './FinancialContext'
@@ -0,0 +1,3 @@
1
+ let t: string | undefined
2
+ export function setFinancialTenantId(id: string | undefined){ t = id }
3
+ export function getFinancialTenantId(): string | undefined { return t }
@@ -0,0 +1,331 @@
1
+ // financial.* — merged plugin-own + saas-core central i18n
2
+ export const en: Record<string, string> = {
3
+ "financial.cards.installment": "Installment {{current}}/{{total}}",
4
+ "financial.cards.noTransactions": "No card transactions",
5
+ "financial.cards.pending": "Pending",
6
+ "financial.cards.received": "Received",
7
+ "financial.cards.subtitle": "Credit and debit card transactions",
8
+ "financial.cards.title": "Cards",
9
+ "financial.cards.transactions": "({{count}} transactions)",
10
+ "financial.cards.transactionsAppear": "Card transactions will appear here when payments are made via credit/debit cards",
11
+ "financial.cashRegisters.addNotes": "Add notes",
12
+ "financial.cashRegisters.back": "Back",
13
+ "financial.cashRegisters.bills": "Bills",
14
+ "financial.cashRegisters.closeSession": "Close Session",
15
+ "financial.cashRegisters.closeThisSession": "Close this session",
16
+ "financial.cashRegisters.closing": "Closing...",
17
+ "financial.cashRegisters.closingBalance": "Closing Balance",
18
+ "financial.cashRegisters.closingNotes": "Closing Notes",
19
+ "financial.cashRegisters.coins": "Coins",
20
+ "financial.cashRegisters.confirmOpen": "Confirm & Open",
21
+ "financial.cashRegisters.confirmOpening": "Confirm Cash Opening",
22
+ "financial.cashRegisters.count": "Count",
23
+ "financial.cashRegisters.countBills": "Count Bills & Coins",
24
+ "financial.cashRegisters.countedTotal": "Counted Total",
25
+ "financial.cashRegisters.denominationCount": "Denomination count",
26
+ "financial.cashRegisters.differenceFromOpening": "Difference from opening",
27
+ "financial.cashRegisters.method": "Method",
28
+ "financial.cashRegisters.noCashAccounts": "No cash register accounts found. Create a bank account with type \"Cash Register\" first.",
29
+ "financial.cashRegisters.noClosedSessions": "No closed sessions yet",
30
+ "financial.cashRegisters.openAnother": "Open another register",
31
+ "financial.cashRegisters.openSession": "Open Session",
32
+ "financial.cashRegisters.openSessions": "Open Sessions",
33
+ "financial.cashRegisters.opened": "Opened",
34
+ "financial.cashRegisters.opening": "Opening...",
35
+ "financial.cashRegisters.openingBalance": "Opening Balance",
36
+ "financial.cashRegisters.quickAmount": "Quick Amount",
37
+ "financial.cashRegisters.register": "Register",
38
+ "financial.cashRegisters.sessionHistory": "Session History",
39
+ "financial.cashRegisters.subtitle": "Open, count and close cash sessions",
40
+ "financial.commissions.comingSoon": "Coming soon",
41
+ "financial.commissions.subtitle": "Team commissions",
42
+ "financial.invoice.accountsPayable": "Accounts Payable",
43
+ "financial.invoice.accountsReceivable": "Accounts Receivable",
44
+ "financial.invoice.cancelConfirm": "This action cannot be undone.",
45
+ "financial.invoice.cancelDesc": "The invoice will be marked as cancelled. All pending installments will also be cancelled. This invoice will no longer count towards totals.",
46
+ "financial.invoice.cancelInvoice": "Cancel Invoice",
47
+ "financial.invoice.cancelling": "Cancelling...",
48
+ "financial.invoice.contact": "Contact",
49
+ "financial.invoice.createFirst": "Create your first invoice",
50
+ "financial.invoice.date": "Date",
51
+ "financial.invoice.booking": "Booking",
52
+ "financial.invoice.discount": "Discount",
53
+ "financial.invoice.due": "Due:",
54
+ "financial.invoice.edit": "Edit Invoice",
55
+ "financial.invoice.fullyPaid": "Fully paid",
56
+ "financial.invoice.installments": "Installments",
57
+ "financial.invoice.invoices": "{{count}} invoices",
58
+ "financial.invoice.items": "Items",
59
+ "financial.invoice.keepInvoice": "Keep Invoice",
60
+ "financial.invoice.new": "New",
61
+ "financial.invoice.noDetails": "No additional details recorded",
62
+ "financial.invoice.noInstallments": "No installments",
63
+ "financial.invoice.noInvoices": "No invoices yet",
64
+ "financial.invoice.summaryTotal": "Total",
65
+ "financial.invoice.summaryReceived": "Received",
66
+ "financial.invoice.summaryReceivable": "Receivable",
67
+ "financial.invoice.summaryPaid": "Paid",
68
+ "financial.invoice.summaryPayable": "Payable",
69
+ "financial.invoice.notFound": "Invoice not found",
70
+ "financial.invoice.notFoundDesc": "This invoice could not be loaded.",
71
+ "financial.invoice.notes": "Notes",
72
+ "financial.invoice.paidLabel": "Paid:",
73
+ "financial.invoice.paidOn": "Paid on:",
74
+ "financial.invoice.pay": "Pay",
75
+ "financial.invoice.paymentSchedule": "Payment Schedule",
76
+ "financial.invoice.remaining": "Remaining:",
77
+ "financial.invoice.searchPlaceholder": "Search by contact or description...",
78
+ "financial.invoice.showing": "Showing {{shown}} of {{total}}",
79
+ "financial.invoice.subtotal": "Subtotal",
80
+ "financial.invoice.surcharge": "Surcharge",
81
+ "financial.invoice.total": "Total",
82
+ "financial.invoice.yesCancel": "Yes, Cancel",
83
+ "financial.invoiceForm.addFirstItem": "Add your first item",
84
+ "financial.invoiceForm.addItem": "Add Item",
85
+ "financial.invoiceForm.addItemsFirst": "Add items first",
86
+ "financial.invoiceForm.additionalNotes": "Additional notes...",
87
+ "financial.invoiceForm.cancel": "Cancel",
88
+ "financial.invoiceForm.close": "Close",
89
+ "financial.invoiceForm.creating": "Creating new invoice",
90
+ "financial.invoiceForm.date": "Date",
91
+ "financial.invoiceForm.description": "Description",
92
+ "financial.invoiceForm.discountSurcharge": "Discount / Surcharge",
93
+ "financial.invoiceForm.done": "Done",
94
+ "financial.invoiceForm.editing": "Editing invoice",
95
+ "financial.invoiceForm.fiscalNumber": "Fiscal Number (optional)",
96
+ "financial.invoiceForm.headquarters": "Headquarters",
97
+ "financial.invoiceForm.installments": "Installments",
98
+ "financial.invoiceForm.item": "Item",
99
+ "financial.invoiceForm.itemDescription": "Item description",
100
+ "financial.invoiceForm.items": "Items",
101
+ "financial.invoiceForm.noDescription": "No description",
102
+ "financial.invoiceForm.noItems": "No items added yet",
103
+ "financial.invoiceForm.noUnitsFound": "No units found",
104
+ "financial.invoiceForm.observations": "Observations",
105
+ "financial.invoiceForm.payTo": "Pay to",
106
+ "financial.invoiceForm.qty": "Qty",
107
+ "financial.invoiceForm.receiveFrom": "Receive from",
108
+ "financial.invoiceForm.save": "Save",
109
+ "financial.invoiceForm.saving": "Saving...",
110
+ "financial.invoiceForm.searchType": "Type to search...",
111
+ "financial.invoiceForm.searchUnit": "Search unit...",
112
+ "financial.invoiceForm.selectInstallments": "Select installment count above",
113
+ "financial.invoiceForm.selectItemType": "Select item type:",
114
+ "financial.invoiceForm.selectUnit": "Select unit",
115
+ "financial.invoiceForm.selectUnitTitle": "Select Unit",
116
+ "financial.invoiceForm.unit": "Unit",
117
+ "financial.invoiceForm.unitPrice": "Unit Price",
118
+ "financial.nav.cards": "Cards",
119
+ "financial.nav.cashRegisters": "Cash Registers",
120
+ "financial.nav.commissions": "Commissions",
121
+ "financial.nav.list": "List",
122
+ "financial.nav.new": "New",
123
+ "financial.nav.overview": "Overview",
124
+ "financial.nav.payables": "Accounts Payable",
125
+ "financial.nav.receivables": "Accounts Receivable",
126
+ "financial.nav.reconciliation": "Reconciliation",
127
+ "financial.nav.recurringExpenses": "Recurring Expenses",
128
+ "financial.nav.rules": "Rules",
129
+ "financial.nav.statements": "Statements",
130
+ "financial.nav.summary": "Summary",
131
+ "financial.onboarding.back": "Back",
132
+ "financial.onboarding.configureHint": "You can configure this in detail from the Settings gear icon inside the Financial module.",
133
+ "financial.onboarding.getStarted": "Get Started",
134
+ "financial.onboarding.next": "Next",
135
+ "financial.onboarding.startUsing": "Start using Financial",
136
+ "financial.onboarding.skip": "Skip setup",
137
+ "financial.onboarding.welcome": "Welcome to Financial",
138
+ "financial.onboarding.description": "Let's set up your financial module. This quick wizard will help you configure the essentials.",
139
+ "financial.onboarding.accounts.title": "Bank Accounts",
140
+ "financial.onboarding.accounts.description": "Add your bank accounts, cash registers, and credit cards. You can always add more later from Settings.",
141
+ "financial.onboarding.payments.title": "Payment Methods",
142
+ "financial.onboarding.payments.description": "Review which payment types you accept. Default types (Cash, PIX, Credit Card, etc.) are already set up.",
143
+ "financial.onboarding.chart.title": "Chart of Accounts",
144
+ "financial.onboarding.chart.description": "A default chart of accounts template has been created. You can customize it anytime from Settings.",
145
+ "financial.page.newPayable": "New Payable",
146
+ "financial.page.newPayableDesc": "Record an expense or bill to pay",
147
+ "financial.page.newReceivable": "New Receivable",
148
+ "financial.page.newReceivableDesc": "Record income or amount to receive",
149
+ "financial.page.openCash": "Open Cash Register",
150
+ "financial.page.openCashDesc": "Start a new cash session",
151
+ "financial.page.settingsSubtitle": "Preferences, payment methods, and accounts",
152
+ "financial.page.settingsTitle": "Financial Settings",
153
+ "financial.payment.amount": "Amount",
154
+ "financial.payment.bankAccount": "Bank Account",
155
+ "financial.payment.cancel": "Cancel",
156
+ "financial.payment.card": "Card",
157
+ "financial.payment.cardBrand": "Card Brand",
158
+ "financial.payment.cardInstallments": "Installments",
159
+ "financial.payment.date": "Date",
160
+ "financial.payment.installment": "Installment #{{number}}",
161
+ "financial.payment.method": "Payment Method",
162
+ "financial.payment.notes": "Notes",
163
+ "financial.payment.optionalNotes": "Optional notes...",
164
+ "financial.payment.payAmount": "Pay {{amount}}",
165
+ "financial.payment.processing": "Processing...",
166
+ "financial.payment.remaining": "{{amount}} remaining",
167
+ "financial.payment.select": "Select...",
168
+ "financial.payment.selectAccount": "Select account...",
169
+ "financial.payment.selectBrand": "Select brand...",
170
+ "financial.payment.title": "Record Payment",
171
+ "financial.settings.allowPartial": "Allow partial payments",
172
+ "financial.settings.allowPartialDesc": "Accept payments less than the full installment amount",
173
+ "financial.settings.autoClose": "Auto-close at end of day",
174
+ "financial.settings.autoCloseDesc": "Remind to close open sessions at the end of business hours",
175
+ "financial.settings.autoInstallments": "Auto-generate installments",
176
+ "financial.settings.autoInstallmentsDesc": "Automatically split invoice total into equal installments",
177
+ "financial.settings.cashRegister": "Cash Register",
178
+ "financial.settings.cashRegisterDesc": "Cash session behavior",
179
+ "financial.settings.dailySummary": "Daily financial summary",
180
+ "financial.settings.dailySummaryDesc": "Send a daily email summary of receivables and payables",
181
+ "financial.settings.invoices": "Invoices",
182
+ "financial.settings.invoicesDesc": "How invoices and payments are handled",
183
+ "financial.settings.notifications": "Notifications",
184
+ "financial.settings.notificationsDesc": "Alerts and reminders",
185
+ "financial.settings.overdueAlerts": "Overdue payment alerts",
186
+ "financial.settings.overdueAlertsDesc": "Notify when invoices pass their due date",
187
+ "financial.settings.requireDoc": "Require document number",
188
+ "financial.settings.requireDocDesc": "Make document/invoice number mandatory on payments",
189
+ "financial.settings.requireOpening": "Require opening balance",
190
+ "financial.settings.requireOpeningDesc": "Opening balance must be confirmed before starting a session",
191
+ "financial.settingsPage.subtitle": "Manage payment methods, accounts, and configurations",
192
+ "financial.settingsPage.title": "Financial Settings",
193
+ "financial.payment.noMethods": "No payment methods configured.",
194
+ "financial.payment.configureMethods": "Set up payment methods",
195
+ "financial.statements.account": "Account",
196
+ "financial.statements.from": "From",
197
+ "financial.statements.noTransactions": "No transactions in this period",
198
+ "financial.statements.selectAccount": "Select an account to view statement",
199
+ "financial.statements.selectToView": "Select an account to view statement",
200
+ "financial.statements.subtitle": "Bank account transactions and balances",
201
+ "financial.statements.title": "Statements",
202
+ "financial.statements.to": "To",
203
+ "financial.summary.allAccounts": "All accounts",
204
+ "financial.summary.cashFlow": "Cash Flow",
205
+ "financial.summary.cashFlowBreakdown": "Cash Flow Breakdown",
206
+ "financial.summary.cashFlowBreakdownSubtitle": "Receivables vs. payables this month",
207
+ "financial.summary.cashFlowSubtitle": "Monthly income vs expenses",
208
+ "financial.summary.expenses": "Expenses",
209
+ "financial.summary.income": "Income",
210
+ "financial.summary.monthlyFlow": "Monthly Flow",
211
+ "financial.summary.negativeBalance": "Negative balance",
212
+ "financial.summary.net": "Net",
213
+ "financial.summary.noOverdue": "No overdue transactions",
214
+ "financial.summary.noTransactions": "No transactions yet",
215
+ "financial.summary.overdue": "{{count}} overdue",
216
+ "financial.summary.overduePayable": "Overdue payable",
217
+ "financial.summary.overdueReceivable": "Overdue receivable",
218
+ "financial.summary.overdueTitle": "Overdue",
219
+ "financial.summary.paid": "Paid",
220
+ "financial.summary.payable": "Payable",
221
+ "financial.summary.positiveBalance": "Positive balance",
222
+ "financial.summary.receivable": "Receivable",
223
+ "financial.summary.received": "Received",
224
+ "financial.summary.recentTransactions": "Recent Transactions",
225
+ "financial.summary.totalBalance": "Total Balance",
226
+ "financial.summary.transactionsAppear": "Transactions will appear here once recorded",
227
+ "financial.summary.viewAll": "View all",
228
+ "financial.quickActions.newPayable": "New Payable",
229
+ "financial.quickActions.newPayableDesc": "Record an expense or bill to pay",
230
+ "financial.quickActions.newReceivable": "New Receivable",
231
+ "financial.quickActions.newReceivableDesc": "Record income or amount to receive",
232
+ "financial.quickActions.openCashRegister": "Open Cash Register",
233
+ "financial.quickActions.openCashRegisterDesc": "Start a new cash session",
234
+ "financial.cash.title": "Cash Registers",
235
+ "financial.cash.subtitle": "Open, count and close cash sessions",
236
+ "financial.cash.bills": "Bills",
237
+ "financial.cash.coins": "Coins",
238
+ "financial.cash.noAccounts": "No cash register accounts found. Create a bank account with type \"Cash Register\" first.",
239
+ "financial.cash.confirmOpening": "Confirm Cash Opening",
240
+ "financial.cash.register": "Register",
241
+ "financial.cash.openingBalance": "Opening Balance",
242
+ "financial.cash.method": "Method",
243
+ "financial.cash.denominationCount": "Denomination count",
244
+ "financial.cash.notes": "Notes",
245
+ "financial.cash.opening": "Opening...",
246
+ "financial.cash.confirmAndOpen": "Confirm & Open",
247
+ "financial.cash.quickAmount": "Quick Amount",
248
+ "financial.cash.countBillsCoins": "Count Bills & Coins",
249
+ "financial.cash.count": "Count",
250
+ "financial.cash.countedTotal": "Counted Total",
251
+ "financial.cash.addNotes": "Add notes",
252
+ "financial.cash.openingObservations": "Opening observations...",
253
+ "financial.cash.openSession": "Open Session",
254
+ "financial.cash.closingBalance": "Closing Balance",
255
+ "financial.cash.differenceFromOpening": "Difference from opening",
256
+ "financial.cash.closingNotes": "Closing Notes",
257
+ "financial.cash.closingObservations": "Closing observations...",
258
+ "financial.cash.closing": "Closing...",
259
+ "financial.cash.closeSession": "Close Session",
260
+ "financial.cash.openSessions": "Open Sessions",
261
+ "financial.cash.opened": "Opened",
262
+ "financial.cash.by": "by",
263
+ "financial.cash.closeThisSession": "Close this session",
264
+ "financial.cash.sessionHistory": "Session History",
265
+ "financial.cash.noClosedSessions": "No closed sessions yet",
266
+ "financial.cash.openLabel": "Open",
267
+ "financial.cash.closeLabel": "Close",
268
+ "financial.cash.diff": "Diff",
269
+ "financial.cash.openAnother": "Open another register",
270
+ "financial.invoice.statusOpen": "Open",
271
+ "financial.invoice.statusPartial": "Partial",
272
+ "financial.invoice.statusPaid": "Paid",
273
+ "financial.invoice.statusOverdue": "Overdue",
274
+ "financial.invoice.statusCancelled": "Cancelled",
275
+ "financial.invoice.statusPending": "Pending",
276
+ "financial.invoice.statusDraft": "Draft",
277
+ "financial.invoice.columnDate": "Date",
278
+ "financial.invoice.columnDescription": "Description",
279
+ "financial.invoice.columnAmount": "Amount",
280
+ "financial.invoice.columnPaid": "Paid",
281
+ "financial.invoice.columnStatus": "Status",
282
+ "financial.invoice.columnInst": "Inst.",
283
+ "financial.invoice.columnQty": "Qty",
284
+ "financial.invoice.columnUnitPrice": "Unit Price",
285
+ "financial.invoice.columnTotal": "Total",
286
+ "financial.invoice.columnNumber": "#",
287
+ "financial.invoice.invoice": "Invoice",
288
+ "financial.invoice.loading": "Loading...",
289
+ "financial.invoiceForm.cancelInvoice": "Cancel Invoice",
290
+ "financial.invoiceForm.cancelConfirm": "This action cannot be undone.",
291
+ "financial.invoiceForm.cancelDesc": "The invoice will be marked as cancelled. All pending installments will also be cancelled.",
292
+ "financial.invoiceForm.keepInvoice": "Keep Invoice",
293
+ "financial.invoiceForm.yesCancel": "Yes, Cancel",
294
+ "financial.invoiceForm.cancelling": "Cancelling...",
295
+ "financial.invoiceForm.removeAdjustments": "Remove adjustments",
296
+ "financial.invoiceForm.discount": "Discount",
297
+ "financial.invoiceForm.surcharge": "Surcharge",
298
+ "financial.invoiceForm.total": "Total:",
299
+ "financial.invoiceForm.itemCount": "{{count}} item{{plural}}",
300
+ "financial.payment.account": "Account",
301
+ "financial.payment.due": "Due:",
302
+ "financial.payment.paidAmount": "Paid:",
303
+ "financial.payment.paidOn": "Paid on:",
304
+ "financial.title": "Financial",
305
+ "financial.summary.title": "Financial Summary",
306
+ "financial.summary.revenue": "Revenue",
307
+ "financial.invoice.title": "Invoices",
308
+ "financial.invoice.create": "New Invoice",
309
+ "financial.invoice.number": "Invoice #",
310
+ "financial.invoice.client": "Client",
311
+ "financial.invoice.amount": "Amount",
312
+ "financial.invoice.status": "Status",
313
+ "financial.invoice.dueDate": "Due Date",
314
+ "financial.invoice.addItem": "Add Item",
315
+ "financial.invoice.tax": "Tax",
316
+ "financial.invoice.save": "Save Invoice",
317
+ "financial.invoice.saving": "Saving...",
318
+ "financial.invoice.markPaid": "Mark as Paid",
319
+ "financial.invoice.sendReminder": "Send Reminder",
320
+ "financial.receivable.title": "Accounts Receivable",
321
+ "financial.payable.title": "Accounts Payable",
322
+ "financial.statements.loading": "Loading...",
323
+ "financial.cards.empty": "No card transactions yet",
324
+ "financial.commissions.title": "Commissions",
325
+ "financial.cashRegister.title": "Cash Register",
326
+ "financial.cashRegister.open": "Open Register",
327
+ "financial.cashRegister.close": "Close Register",
328
+ "financial.movements.title": "Movements",
329
+ "financial.bankAccounts.title": "Bank Accounts",
330
+ "financial.settings.title": "Financial Settings",
331
+ }
@@ -0,0 +1,7 @@
1
+ import { en } from './en'
2
+ import { ptBR } from './pt-BR'
3
+
4
+ export const financialLocales: Record<string, Record<string, string>> = {
5
+ en,
6
+ 'pt-BR': ptBR,
7
+ }