@dainamite/billing 0.17.0
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.
- package/CHANGELOG.md +658 -0
- package/LICENSE +21 -0
- package/README.md +77 -0
- package/dist/modules/billing/acl.js +20 -0
- package/dist/modules/billing/acl.js.map +7 -0
- package/dist/modules/billing/api/accounts/route.js +182 -0
- package/dist/modules/billing/api/accounts/route.js.map +7 -0
- package/dist/modules/billing/api/export/account/[id]/route.js +170 -0
- package/dist/modules/billing/api/export/account/[id]/route.js.map +7 -0
- package/dist/modules/billing/api/invoices/[id]/route.js +85 -0
- package/dist/modules/billing/api/invoices/[id]/route.js.map +7 -0
- package/dist/modules/billing/api/invoices/add-line/route.js +69 -0
- package/dist/modules/billing/api/invoices/add-line/route.js.map +7 -0
- package/dist/modules/billing/api/invoices/edit-line/route.js +78 -0
- package/dist/modules/billing/api/invoices/edit-line/route.js.map +7 -0
- package/dist/modules/billing/api/invoices/post/route.js +74 -0
- package/dist/modules/billing/api/invoices/post/route.js.map +7 -0
- package/dist/modules/billing/api/invoices/remove-line/route.js +69 -0
- package/dist/modules/billing/api/invoices/remove-line/route.js.map +7 -0
- package/dist/modules/billing/api/invoices/route.js +109 -0
- package/dist/modules/billing/api/invoices/route.js.map +7 -0
- package/dist/modules/billing/api/items/bulk/route.js +74 -0
- package/dist/modules/billing/api/items/bulk/route.js.map +7 -0
- package/dist/modules/billing/api/items/route.js +224 -0
- package/dist/modules/billing/api/items/route.js.map +7 -0
- package/dist/modules/billing/api/openapi.js +25 -0
- package/dist/modules/billing/api/openapi.js.map +7 -0
- package/dist/modules/billing/api/run-outcomes/route.js +122 -0
- package/dist/modules/billing/api/run-outcomes/route.js.map +7 -0
- package/dist/modules/billing/api/runs/retry-failed/route.js +70 -0
- package/dist/modules/billing/api/runs/retry-failed/route.js.map +7 -0
- package/dist/modules/billing/api/runs/route.js +143 -0
- package/dist/modules/billing/api/runs/route.js.map +7 -0
- package/dist/modules/billing/api/test-invoices/wipe/route.js +65 -0
- package/dist/modules/billing/api/test-invoices/wipe/route.js.map +7 -0
- package/dist/modules/billing/api/usage/route.js +138 -0
- package/dist/modules/billing/api/usage/route.js.map +7 -0
- package/dist/modules/billing/backend/billing/accounts/[id]/page.js +402 -0
- package/dist/modules/billing/backend/billing/accounts/[id]/page.js.map +7 -0
- package/dist/modules/billing/backend/billing/accounts/[id]/page.meta.js +25 -0
- package/dist/modules/billing/backend/billing/accounts/[id]/page.meta.js.map +7 -0
- package/dist/modules/billing/backend/billing/accounts/create/page.js +82 -0
- package/dist/modules/billing/backend/billing/accounts/create/page.js.map +7 -0
- package/dist/modules/billing/backend/billing/accounts/create/page.meta.js +25 -0
- package/dist/modules/billing/backend/billing/accounts/create/page.meta.js.map +7 -0
- package/dist/modules/billing/backend/billing/accounts/page.js +173 -0
- package/dist/modules/billing/backend/billing/accounts/page.js.map +7 -0
- package/dist/modules/billing/backend/billing/accounts/page.meta.js +18 -0
- package/dist/modules/billing/backend/billing/accounts/page.meta.js.map +7 -0
- package/dist/modules/billing/backend/billing/invoices/[id]/page.js +500 -0
- package/dist/modules/billing/backend/billing/invoices/[id]/page.js.map +7 -0
- package/dist/modules/billing/backend/billing/invoices/[id]/page.meta.js +25 -0
- package/dist/modules/billing/backend/billing/invoices/[id]/page.meta.js.map +7 -0
- package/dist/modules/billing/backend/billing/invoices/page.js +187 -0
- package/dist/modules/billing/backend/billing/invoices/page.js.map +7 -0
- package/dist/modules/billing/backend/billing/invoices/page.meta.js +18 -0
- package/dist/modules/billing/backend/billing/invoices/page.meta.js.map +7 -0
- package/dist/modules/billing/backend/billing/items/[id]/page.js +265 -0
- package/dist/modules/billing/backend/billing/items/[id]/page.js.map +7 -0
- package/dist/modules/billing/backend/billing/items/[id]/page.meta.js +25 -0
- package/dist/modules/billing/backend/billing/items/[id]/page.meta.js.map +7 -0
- package/dist/modules/billing/backend/billing/items/create/page.js +90 -0
- package/dist/modules/billing/backend/billing/items/create/page.js.map +7 -0
- package/dist/modules/billing/backend/billing/items/create/page.meta.js +25 -0
- package/dist/modules/billing/backend/billing/items/create/page.meta.js.map +7 -0
- package/dist/modules/billing/backend/billing/items/page.js +208 -0
- package/dist/modules/billing/backend/billing/items/page.js.map +7 -0
- package/dist/modules/billing/backend/billing/items/page.meta.js +18 -0
- package/dist/modules/billing/backend/billing/items/page.meta.js.map +7 -0
- package/dist/modules/billing/backend/billing/runs/[id]/page.js +293 -0
- package/dist/modules/billing/backend/billing/runs/[id]/page.js.map +7 -0
- package/dist/modules/billing/backend/billing/runs/[id]/page.meta.js +21 -0
- package/dist/modules/billing/backend/billing/runs/[id]/page.meta.js.map +7 -0
- package/dist/modules/billing/backend/billing/runs/page.js +341 -0
- package/dist/modules/billing/backend/billing/runs/page.js.map +7 -0
- package/dist/modules/billing/backend/billing/runs/page.meta.js +18 -0
- package/dist/modules/billing/backend/billing/runs/page.meta.js.map +7 -0
- package/dist/modules/billing/backend/billing/usage/create/page.js +100 -0
- package/dist/modules/billing/backend/billing/usage/create/page.js.map +7 -0
- package/dist/modules/billing/backend/billing/usage/create/page.meta.js +25 -0
- package/dist/modules/billing/backend/billing/usage/create/page.meta.js.map +7 -0
- package/dist/modules/billing/ce.js +56 -0
- package/dist/modules/billing/ce.js.map +7 -0
- package/dist/modules/billing/cli.js +67 -0
- package/dist/modules/billing/cli.js.map +7 -0
- package/dist/modules/billing/commands/accounts.js +157 -0
- package/dist/modules/billing/commands/accounts.js.map +7 -0
- package/dist/modules/billing/commands/index.js +6 -0
- package/dist/modules/billing/commands/index.js.map +7 -0
- package/dist/modules/billing/commands/invoices.js +401 -0
- package/dist/modules/billing/commands/invoices.js.map +7 -0
- package/dist/modules/billing/commands/items.js +317 -0
- package/dist/modules/billing/commands/items.js.map +7 -0
- package/dist/modules/billing/commands/runs.js +123 -0
- package/dist/modules/billing/commands/runs.js.map +7 -0
- package/dist/modules/billing/commands/usage.js +88 -0
- package/dist/modules/billing/commands/usage.js.map +7 -0
- package/dist/modules/billing/components/AccountForm.js +420 -0
- package/dist/modules/billing/components/AccountForm.js.map +7 -0
- package/dist/modules/billing/components/DetailFields.js +37 -0
- package/dist/modules/billing/components/DetailFields.js.map +7 -0
- package/dist/modules/billing/components/ItemForm.js +440 -0
- package/dist/modules/billing/components/ItemForm.js.map +7 -0
- package/dist/modules/billing/components/LineFormDialog.js +195 -0
- package/dist/modules/billing/components/LineFormDialog.js.map +7 -0
- package/dist/modules/billing/components/UsageForm.js +262 -0
- package/dist/modules/billing/components/UsageForm.js.map +7 -0
- package/dist/modules/billing/data/entities.js +433 -0
- package/dist/modules/billing/data/entities.js.map +7 -0
- package/dist/modules/billing/data/entityIds.js +12 -0
- package/dist/modules/billing/data/entityIds.js.map +7 -0
- package/dist/modules/billing/data/validators.js +396 -0
- package/dist/modules/billing/data/validators.js.map +7 -0
- package/dist/modules/billing/di.js +6 -0
- package/dist/modules/billing/di.js.map +7 -0
- package/dist/modules/billing/events.js +35 -0
- package/dist/modules/billing/events.js.map +7 -0
- package/dist/modules/billing/i18n/en.json +336 -0
- package/dist/modules/billing/i18n/pl.json +336 -0
- package/dist/modules/billing/index.js +17 -0
- package/dist/modules/billing/index.js.map +7 -0
- package/dist/modules/billing/lib/billPeriod.js +101 -0
- package/dist/modules/billing/lib/billPeriod.js.map +7 -0
- package/dist/modules/billing/lib/billRunEngine.js +256 -0
- package/dist/modules/billing/lib/billRunEngine.js.map +7 -0
- package/dist/modules/billing/lib/billRunLabel.js +8 -0
- package/dist/modules/billing/lib/billRunLabel.js.map +7 -0
- package/dist/modules/billing/lib/idempotency.js +13 -0
- package/dist/modules/billing/lib/idempotency.js.map +7 -0
- package/dist/modules/billing/lib/invoiceStatus.js +38 -0
- package/dist/modules/billing/lib/invoiceStatus.js.map +7 -0
- package/dist/modules/billing/lib/invoiceWriter.js +153 -0
- package/dist/modules/billing/lib/invoiceWriter.js.map +7 -0
- package/dist/modules/billing/lib/itemSelector.js +77 -0
- package/dist/modules/billing/lib/itemSelector.js.map +7 -0
- package/dist/modules/billing/lib/seeds/demo.js +130 -0
- package/dist/modules/billing/lib/seeds/demo.js.map +7 -0
- package/dist/modules/billing/lib/tenantLock.js +32 -0
- package/dist/modules/billing/lib/tenantLock.js.map +7 -0
- package/dist/modules/billing/lib/usageRater.js +150 -0
- package/dist/modules/billing/lib/usageRater.js.map +7 -0
- package/dist/modules/billing/lib/usageRunner.js +82 -0
- package/dist/modules/billing/lib/usageRunner.js.map +7 -0
- package/dist/modules/billing/migrations/Migration20260519000000_billing.js +144 -0
- package/dist/modules/billing/migrations/Migration20260519000000_billing.js.map +7 -0
- package/dist/modules/billing/setup.js +190 -0
- package/dist/modules/billing/setup.js.map +7 -0
- package/dist/modules/billing/subscribers/payment-captured-to-paid.js +47 -0
- package/dist/modules/billing/subscribers/payment-captured-to-paid.js.map +7 -0
- package/dist/modules/billing/translations.js +5 -0
- package/dist/modules/billing/translations.js.map +7 -0
- package/dist/modules/billing/workers/reap-stale-bill-runs.js +31 -0
- package/dist/modules/billing/workers/reap-stale-bill-runs.js.map +7 -0
- package/package.json +148 -0
- package/src/modules/billing/__integration__/TC-BILL-001.spec.ts +116 -0
- package/src/modules/billing/__integration__/TC-BILL-002.spec.ts +169 -0
- package/src/modules/billing/__integration__/TC-BILL-003.spec.ts +28 -0
- package/src/modules/billing/__integration__/meta.ts +4 -0
- package/src/modules/billing/__tests__/commands/invoices.test.ts +464 -0
- package/src/modules/billing/__tests__/commands/itemsBulk.test.ts +284 -0
- package/src/modules/billing/__tests__/lib/billPeriod.test.ts +131 -0
- package/src/modules/billing/__tests__/lib/billRunEngine.test.ts +561 -0
- package/src/modules/billing/__tests__/lib/idempotency.test.ts +81 -0
- package/src/modules/billing/__tests__/lib/invoiceStatus.test.ts +97 -0
- package/src/modules/billing/__tests__/lib/invoiceWriter.test.ts +119 -0
- package/src/modules/billing/__tests__/lib/itemSelector.test.ts +192 -0
- package/src/modules/billing/__tests__/lib/seedsDemo.test.ts +86 -0
- package/src/modules/billing/__tests__/lib/tenantLock.test.ts +126 -0
- package/src/modules/billing/__tests__/lib/usageRater.test.ts +190 -0
- package/src/modules/billing/__tests__/package-isolation.test.ts +223 -0
- package/src/modules/billing/__tests__/setup.test.ts +107 -0
- package/src/modules/billing/__tests__/validators.test.ts +594 -0
- package/src/modules/billing/acl.ts +16 -0
- package/src/modules/billing/api/accounts/route.ts +198 -0
- package/src/modules/billing/api/export/account/[id]/route.ts +233 -0
- package/src/modules/billing/api/invoices/[id]/route.ts +143 -0
- package/src/modules/billing/api/invoices/add-line/route.ts +74 -0
- package/src/modules/billing/api/invoices/edit-line/route.ts +97 -0
- package/src/modules/billing/api/invoices/post/route.ts +97 -0
- package/src/modules/billing/api/invoices/remove-line/route.ts +75 -0
- package/src/modules/billing/api/invoices/route.ts +167 -0
- package/src/modules/billing/api/items/bulk/route.ts +92 -0
- package/src/modules/billing/api/items/route.ts +255 -0
- package/src/modules/billing/api/openapi.ts +33 -0
- package/src/modules/billing/api/run-outcomes/route.ts +149 -0
- package/src/modules/billing/api/runs/retry-failed/route.ts +88 -0
- package/src/modules/billing/api/runs/route.ts +170 -0
- package/src/modules/billing/api/test-invoices/wipe/route.ts +87 -0
- package/src/modules/billing/api/usage/route.ts +148 -0
- package/src/modules/billing/backend/billing/accounts/[id]/page.meta.ts +23 -0
- package/src/modules/billing/backend/billing/accounts/[id]/page.tsx +574 -0
- package/src/modules/billing/backend/billing/accounts/create/page.meta.ts +23 -0
- package/src/modules/billing/backend/billing/accounts/create/page.tsx +101 -0
- package/src/modules/billing/backend/billing/accounts/page.meta.ts +16 -0
- package/src/modules/billing/backend/billing/accounts/page.tsx +222 -0
- package/src/modules/billing/backend/billing/invoices/[id]/page.meta.ts +23 -0
- package/src/modules/billing/backend/billing/invoices/[id]/page.tsx +613 -0
- package/src/modules/billing/backend/billing/invoices/page.meta.ts +16 -0
- package/src/modules/billing/backend/billing/invoices/page.tsx +245 -0
- package/src/modules/billing/backend/billing/items/[id]/page.meta.ts +23 -0
- package/src/modules/billing/backend/billing/items/[id]/page.tsx +366 -0
- package/src/modules/billing/backend/billing/items/create/page.meta.ts +23 -0
- package/src/modules/billing/backend/billing/items/create/page.tsx +110 -0
- package/src/modules/billing/backend/billing/items/page.meta.ts +16 -0
- package/src/modules/billing/backend/billing/items/page.tsx +272 -0
- package/src/modules/billing/backend/billing/runs/[id]/page.meta.ts +19 -0
- package/src/modules/billing/backend/billing/runs/[id]/page.tsx +404 -0
- package/src/modules/billing/backend/billing/runs/page.meta.ts +16 -0
- package/src/modules/billing/backend/billing/runs/page.tsx +426 -0
- package/src/modules/billing/backend/billing/usage/create/page.meta.ts +23 -0
- package/src/modules/billing/backend/billing/usage/create/page.tsx +120 -0
- package/src/modules/billing/ce.ts +74 -0
- package/src/modules/billing/cli.ts +89 -0
- package/src/modules/billing/commands/accounts.ts +205 -0
- package/src/modules/billing/commands/index.ts +13 -0
- package/src/modules/billing/commands/invoices.ts +542 -0
- package/src/modules/billing/commands/items.ts +438 -0
- package/src/modules/billing/commands/runs.ts +166 -0
- package/src/modules/billing/commands/usage.ts +118 -0
- package/src/modules/billing/components/AccountForm.tsx +517 -0
- package/src/modules/billing/components/DetailFields.tsx +60 -0
- package/src/modules/billing/components/ItemForm.tsx +558 -0
- package/src/modules/billing/components/LineFormDialog.tsx +253 -0
- package/src/modules/billing/components/UsageForm.tsx +326 -0
- package/src/modules/billing/data/entities.ts +533 -0
- package/src/modules/billing/data/entityIds.ts +25 -0
- package/src/modules/billing/data/validators.ts +562 -0
- package/src/modules/billing/di.ts +14 -0
- package/src/modules/billing/events.ts +47 -0
- package/src/modules/billing/i18n/en.json +336 -0
- package/src/modules/billing/i18n/pl.json +336 -0
- package/src/modules/billing/index.ts +22 -0
- package/src/modules/billing/lib/billPeriod.ts +181 -0
- package/src/modules/billing/lib/billRunEngine.ts +416 -0
- package/src/modules/billing/lib/billRunLabel.ts +14 -0
- package/src/modules/billing/lib/idempotency.ts +46 -0
- package/src/modules/billing/lib/invoiceStatus.ts +61 -0
- package/src/modules/billing/lib/invoiceWriter.ts +260 -0
- package/src/modules/billing/lib/itemSelector.ts +154 -0
- package/src/modules/billing/lib/seeds/demo.ts +199 -0
- package/src/modules/billing/lib/tenantLock.ts +87 -0
- package/src/modules/billing/lib/usageRater.ts +250 -0
- package/src/modules/billing/lib/usageRunner.ts +189 -0
- package/src/modules/billing/migrations/Migration20260519000000_billing.ts +175 -0
- package/src/modules/billing/setup.ts +252 -0
- package/src/modules/billing/subscribers/payment-captured-to-paid.ts +89 -0
- package/src/modules/billing/translations.ts +9 -0
- package/src/modules/billing/workers/reap-stale-bill-runs.ts +57 -0
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
{
|
|
2
|
+
"billing.accounts.actions.open": "Otwórz",
|
|
3
|
+
"billing.accounts.columns.currency": "Waluta",
|
|
4
|
+
"billing.accounts.columns.customer": "Klient",
|
|
5
|
+
"billing.accounts.columns.cycle": "Cykl",
|
|
6
|
+
"billing.accounts.columns.last_bill": "Ostatnie rozliczenie",
|
|
7
|
+
"billing.accounts.columns.name": "Nazwa",
|
|
8
|
+
"billing.accounts.columns.next_bill": "Następne rozliczenie",
|
|
9
|
+
"billing.accounts.columns.status": "Status",
|
|
10
|
+
"billing.accounts.create.action": "Nowe konto",
|
|
11
|
+
"billing.accounts.create.error": "Nie udało się utworzyć konta",
|
|
12
|
+
"billing.accounts.create.success": "Utworzono konto rozliczeniowe",
|
|
13
|
+
"billing.accounts.create.title": "Utwórz konto rozliczeniowe",
|
|
14
|
+
"billing.accounts.detail.add_item": "Dodaj pozycję",
|
|
15
|
+
"billing.accounts.detail.add_usage": "Dodaj zużycie",
|
|
16
|
+
"billing.accounts.detail.delete.action": "Usuń",
|
|
17
|
+
"billing.accounts.detail.delete.confirm.button": "Usuń",
|
|
18
|
+
"billing.accounts.detail.delete.confirm.text": "Usuwa konto w trybie miękkim. Jego pozycje i rekordy zużycia pozostają w bazie na potrzeby audytu; silnik przebiegów rozliczeniowych natychmiast przestanie je uwzględniać.",
|
|
19
|
+
"billing.accounts.detail.delete.confirm.title": "Usunąć konto?",
|
|
20
|
+
"billing.accounts.detail.delete.error": "Usuwanie nie powiodło się",
|
|
21
|
+
"billing.accounts.detail.delete.in_progress": "Usuwanie…",
|
|
22
|
+
"billing.accounts.detail.delete.success": "Usunięto konto",
|
|
23
|
+
"billing.accounts.detail.error.load": "Nie udało się wczytać konta",
|
|
24
|
+
"billing.accounts.detail.error.not_found": "Nie znaleziono konta",
|
|
25
|
+
"billing.accounts.detail.items.empty": "Brak pozycji dla tego konta.",
|
|
26
|
+
"billing.accounts.detail.items.title": "Pozycje",
|
|
27
|
+
"billing.accounts.detail.loading": "Wczytywanie konta…",
|
|
28
|
+
"billing.accounts.detail.save.error": "Zapis nie powiódł się",
|
|
29
|
+
"billing.accounts.detail.save.success": "Zaktualizowano konto",
|
|
30
|
+
"billing.accounts.detail.title": "Konto rozliczeniowe",
|
|
31
|
+
"billing.accounts.detail.usage.empty": "Brak rekordów zużycia dla tego konta.",
|
|
32
|
+
"billing.accounts.detail.usage.title": "Zużycie",
|
|
33
|
+
"billing.accounts.detail.view_items": "Zobacz pozycje",
|
|
34
|
+
"billing.accounts.filters.active": "Aktywne",
|
|
35
|
+
"billing.accounts.filters.currency": "Waluta",
|
|
36
|
+
"billing.accounts.filters.cycle": "Cykl rozliczeniowy",
|
|
37
|
+
"billing.accounts.form.active": "Aktywne",
|
|
38
|
+
"billing.accounts.form.active.help": "Nieaktywne konta nadal podlegają rozliczaniu aż do usunięcia — przełącznik służy wyłącznie do filtrowania widoczności.",
|
|
39
|
+
"billing.accounts.form.address.city": "Miasto",
|
|
40
|
+
"billing.accounts.form.address.country": "Kraj (ISO 3166)",
|
|
41
|
+
"billing.accounts.form.address.line1": "Linia 1",
|
|
42
|
+
"billing.accounts.form.address.line2": "Linia 2",
|
|
43
|
+
"billing.accounts.form.address.postal_code": "Kod pocztowy",
|
|
44
|
+
"billing.accounts.form.address.title": "Adres na fakturze",
|
|
45
|
+
"billing.accounts.form.bill_cycle": "Cykl rozliczeniowy",
|
|
46
|
+
"billing.accounts.form.cancel_hint": "aby odrzucić",
|
|
47
|
+
"billing.accounts.form.create": "Utwórz konto",
|
|
48
|
+
"billing.accounts.form.currency": "Waluta (ISO 4217)",
|
|
49
|
+
"billing.accounts.form.currency.locked": "Niezmienne — ustalane przy tworzeniu konta.",
|
|
50
|
+
"billing.accounts.form.customer": "Klient",
|
|
51
|
+
"billing.accounts.form.customer.placeholder": "Wyszukaj klienta po nazwie lub e-mailu…",
|
|
52
|
+
"billing.accounts.form.customer_id": "ID klienta",
|
|
53
|
+
"billing.accounts.form.customer_id.locked": "Niezmienne — utwórz nowe konto, aby powiązać innego klienta.",
|
|
54
|
+
"billing.accounts.form.cycle_anchor": "Zakotwiczenie cyklu",
|
|
55
|
+
"billing.accounts.form.cycle_anchor.month_hint": "1 — 28",
|
|
56
|
+
"billing.accounts.form.cycle_anchor.weekly_hint": "pon | wt | … | nd",
|
|
57
|
+
"billing.accounts.form.error.address_required": "Adres na fakturze (linia 1 + miasto) jest wymagany",
|
|
58
|
+
"billing.accounts.form.error.currency_invalid": "Waluta musi być 3-literowym kodem ISO",
|
|
59
|
+
"billing.accounts.form.error.customerId_required": "Wybierz klienta",
|
|
60
|
+
"billing.accounts.form.error.email_invalid": "E-mail do faktur wygląda na nieprawidłowy",
|
|
61
|
+
"billing.accounts.form.error.name_required": "Nazwa jest wymagana",
|
|
62
|
+
"billing.accounts.form.error.next_bill_date_required": "Data następnego rozliczenia jest wymagana",
|
|
63
|
+
"billing.accounts.form.invoice_email": "E-mail do faktur",
|
|
64
|
+
"billing.accounts.form.invoice_language": "Język faktury (ISO 639-1)",
|
|
65
|
+
"billing.accounts.form.name": "Nazwa",
|
|
66
|
+
"billing.accounts.form.name.placeholder": "Uzupełnione z klienta — nadpisz np. „Acme — produkcja”",
|
|
67
|
+
"billing.accounts.form.next_bill_date": "Data następnego rozliczenia",
|
|
68
|
+
"billing.accounts.form.save": "Zapisz zmiany",
|
|
69
|
+
"billing.accounts.form.saving": "Zapisywanie…",
|
|
70
|
+
"billing.accounts.form.submit_hint": "aby zapisać,",
|
|
71
|
+
"billing.accounts.form.tax_id": "NIP / VATIN (opcjonalnie)",
|
|
72
|
+
"billing.accounts.title": "Konta rozliczeniowe",
|
|
73
|
+
"billing.common.active": "Aktywne",
|
|
74
|
+
"billing.common.cancel": "Anuluj",
|
|
75
|
+
"billing.common.edit": "Edytuj",
|
|
76
|
+
"billing.common.id": "ID",
|
|
77
|
+
"billing.common.inactive": "Nieaktywne",
|
|
78
|
+
"billing.common.refresh": "Odśwież",
|
|
79
|
+
"billing.common.save": "Zapisz",
|
|
80
|
+
"billing.common.yes": "Tak",
|
|
81
|
+
"billing.cycle.annually": "Rocznie",
|
|
82
|
+
"billing.cycle.monthly": "Miesięcznie",
|
|
83
|
+
"billing.cycle.quarterly": "Kwartalnie",
|
|
84
|
+
"billing.cycle.weekly": "Tygodniowo",
|
|
85
|
+
"billing.invoices.actions.open": "Otwórz",
|
|
86
|
+
"billing.invoices.columns.issued": "Wystawiono",
|
|
87
|
+
"billing.invoices.columns.number": "Numer",
|
|
88
|
+
"billing.invoices.columns.outstanding": "Do zapłaty",
|
|
89
|
+
"billing.invoices.columns.period": "Okres",
|
|
90
|
+
"billing.invoices.columns.status": "Status",
|
|
91
|
+
"billing.invoices.columns.total": "Suma",
|
|
92
|
+
"billing.invoices.detail.error.load": "Nie udało się wczytać faktury",
|
|
93
|
+
"billing.invoices.detail.field.account": "Konto rozliczeniowe",
|
|
94
|
+
"billing.invoices.detail.field.bill_run": "Przebieg rozliczeniowy",
|
|
95
|
+
"billing.invoices.detail.field.issued": "Wystawiono",
|
|
96
|
+
"billing.invoices.detail.field.period": "Okres rozliczeniowy",
|
|
97
|
+
"billing.invoices.detail.loading": "Wczytywanie faktury…",
|
|
98
|
+
"billing.invoices.detail.outstanding": "Do zapłaty",
|
|
99
|
+
"billing.invoices.detail.paid": "Opłacono",
|
|
100
|
+
"billing.invoices.detail.subtotal": "Suma netto",
|
|
101
|
+
"billing.invoices.detail.title": "Faktura",
|
|
102
|
+
"billing.invoices.detail.total": "Suma całkowita",
|
|
103
|
+
"billing.invoices.filters.status": "Status",
|
|
104
|
+
"billing.invoices.filters.test_run": "Przebiegi testowe",
|
|
105
|
+
"billing.invoices.filters.test_run.exclude": "Wyklucz testowe",
|
|
106
|
+
"billing.invoices.filters.test_run.only": "Tylko testowe",
|
|
107
|
+
"billing.invoices.lines.actions.edit": "Edytuj pozycję",
|
|
108
|
+
"billing.invoices.lines.actions.remove": "Usuń pozycję",
|
|
109
|
+
"billing.invoices.lines.add.action": "Dodaj pozycję",
|
|
110
|
+
"billing.invoices.lines.add.success": "Dodano pozycję",
|
|
111
|
+
"billing.invoices.lines.columns.description": "Opis",
|
|
112
|
+
"billing.invoices.lines.columns.quantity": "Ilość",
|
|
113
|
+
"billing.invoices.lines.columns.total": "Razem netto",
|
|
114
|
+
"billing.invoices.lines.columns.unit_price": "Cena jednostkowa",
|
|
115
|
+
"billing.invoices.lines.edit.success": "Zaktualizowano pozycję",
|
|
116
|
+
"billing.invoices.lines.form.cancel_hint": "aby anulować",
|
|
117
|
+
"billing.invoices.lines.form.computed_total": "Obliczona suma: {computed}",
|
|
118
|
+
"billing.invoices.lines.form.description": "Opis",
|
|
119
|
+
"billing.invoices.lines.form.error.description_required": "Opis jest wymagany",
|
|
120
|
+
"billing.invoices.lines.form.error.quantity_invalid": "Ilość musi być liczbą nieujemną",
|
|
121
|
+
"billing.invoices.lines.form.error.total_invalid": "Nadpisanie sumy musi być liczbą, jeśli zostało podane",
|
|
122
|
+
"billing.invoices.lines.form.error.unit_price_invalid": "Cena jednostkowa musi być liczbą",
|
|
123
|
+
"billing.invoices.lines.form.help": "Zmiany są zapisywane w dzienniku audytu edycji wersji roboczej.",
|
|
124
|
+
"billing.invoices.lines.form.quantity": "Ilość",
|
|
125
|
+
"billing.invoices.lines.form.saving": "Zapisywanie…",
|
|
126
|
+
"billing.invoices.lines.form.submit_hint": "aby zapisać,",
|
|
127
|
+
"billing.invoices.lines.form.title_add": "Dodaj pozycję faktury",
|
|
128
|
+
"billing.invoices.lines.form.title_edit": "Edytuj pozycję faktury",
|
|
129
|
+
"billing.invoices.lines.form.total_override": "Nadpisanie sumy (opcjonalne)",
|
|
130
|
+
"billing.invoices.lines.form.unit_price": "Cena jednostkowa (netto)",
|
|
131
|
+
"billing.invoices.lines.operator_added": "Dodane przez operatora",
|
|
132
|
+
"billing.invoices.lines.remove.confirm.button": "Usuń pozycję",
|
|
133
|
+
"billing.invoices.lines.remove.confirm.text": "Pozycja zostanie usunięta i zapisana w dzienniku audytu edycji wersji roboczej.",
|
|
134
|
+
"billing.invoices.lines.remove.confirm.title": "Usunąć pozycję?",
|
|
135
|
+
"billing.invoices.lines.remove.error": "Usuwanie nie powiodło się",
|
|
136
|
+
"billing.invoices.lines.remove.success": "Usunięto pozycję",
|
|
137
|
+
"billing.invoices.lines.save.error": "Zapis nie powiódł się",
|
|
138
|
+
"billing.invoices.lines.title": "Pozycje",
|
|
139
|
+
"billing.invoices.post.action": "Zaksięguj fakturę",
|
|
140
|
+
"billing.invoices.post.error": "Księgowanie nie powiodło się",
|
|
141
|
+
"billing.invoices.post.in_progress": "Księgowanie…",
|
|
142
|
+
"billing.invoices.post.success": "Zaksięgowano fakturę",
|
|
143
|
+
"billing.invoices.status.draft": "Robocza",
|
|
144
|
+
"billing.invoices.status.paid": "Opłacona",
|
|
145
|
+
"billing.invoices.status.posted": "Zaksięgowana",
|
|
146
|
+
"billing.invoices.status.void": "Anulowana",
|
|
147
|
+
"billing.invoices.title": "Faktury",
|
|
148
|
+
"billing.invoices.wipe.action": "Usuń faktury testowe tego przebiegu",
|
|
149
|
+
"billing.invoices.wipe.confirm.button": "Usuń faktury testowe",
|
|
150
|
+
"billing.invoices.wipe.confirm.text": "Wszystkie faktury testowe z tego przebiegu rozliczeniowego zostaną trwale usunięte. Tej operacji nie można cofnąć.",
|
|
151
|
+
"billing.invoices.wipe.confirm.title": "Usunąć faktury testowe?",
|
|
152
|
+
"billing.invoices.wipe.error": "Usuwanie nie powiodło się",
|
|
153
|
+
"billing.invoices.wipe.in_progress": "Usuwanie…",
|
|
154
|
+
"billing.invoices.wipe.success": "Usunięto faktury testowe",
|
|
155
|
+
"billing.items.actions.open": "Otwórz",
|
|
156
|
+
"billing.items.columns.account": "Konto",
|
|
157
|
+
"billing.items.columns.description": "Opis",
|
|
158
|
+
"billing.items.columns.end": "Koniec",
|
|
159
|
+
"billing.items.columns.start": "Początek",
|
|
160
|
+
"billing.items.columns.status": "Status",
|
|
161
|
+
"billing.items.columns.type": "Typ",
|
|
162
|
+
"billing.items.columns.uom": "JM",
|
|
163
|
+
"billing.items.create.action": "Nowa pozycja",
|
|
164
|
+
"billing.items.create.error": "Nie udało się utworzyć pozycji",
|
|
165
|
+
"billing.items.create.loading": "Wczytywanie kont…",
|
|
166
|
+
"billing.items.create.success": "Utworzono pozycję rozliczeniową",
|
|
167
|
+
"billing.items.create.title": "Utwórz pozycję rozliczeniową",
|
|
168
|
+
"billing.items.detail.billed_to": "Rozliczono do {date}",
|
|
169
|
+
"billing.items.detail.currency_mismatch": "Niezgodność waluty",
|
|
170
|
+
"billing.items.detail.delete.action": "Usuń",
|
|
171
|
+
"billing.items.detail.delete.confirm.button": "Usuń",
|
|
172
|
+
"billing.items.detail.delete.confirm.text": "Usuwa pozycję w trybie miękkim. Jej rekord pozostaje w bazie na potrzeby audytu; silnik przebiegów rozliczeniowych natychmiast przestanie ją uwzględniać.",
|
|
173
|
+
"billing.items.detail.delete.confirm.title": "Usunąć pozycję?",
|
|
174
|
+
"billing.items.detail.delete.error": "Usuwanie nie powiodło się",
|
|
175
|
+
"billing.items.detail.delete.in_progress": "Usuwanie…",
|
|
176
|
+
"billing.items.detail.delete.success": "Usunięto pozycję",
|
|
177
|
+
"billing.items.detail.error.load": "Nie udało się wczytać pozycji",
|
|
178
|
+
"billing.items.detail.error.not_found": "Nie znaleziono pozycji",
|
|
179
|
+
"billing.items.detail.field.account": "Konto",
|
|
180
|
+
"billing.items.detail.field.billed_to": "Rozliczono do",
|
|
181
|
+
"billing.items.detail.field.source_ref": "Źródło (source_ref)",
|
|
182
|
+
"billing.items.detail.loading": "Wczytywanie pozycji…",
|
|
183
|
+
"billing.items.detail.save.error": "Zapis nie powiódł się",
|
|
184
|
+
"billing.items.detail.save.success": "Zaktualizowano pozycję",
|
|
185
|
+
"billing.items.detail.source_ref": "source_ref: {ref}",
|
|
186
|
+
"billing.items.detail.title": "Pozycja rozliczeniowa",
|
|
187
|
+
"billing.items.filters.account": "Konto rozliczeniowe",
|
|
188
|
+
"billing.items.filters.active": "Aktywne",
|
|
189
|
+
"billing.items.filters.subscription": "ID subskrypcji",
|
|
190
|
+
"billing.items.filters.type": "Typ",
|
|
191
|
+
"billing.items.form.account": "Konto rozliczeniowe",
|
|
192
|
+
"billing.items.form.account.placeholder": "Wybierz konto",
|
|
193
|
+
"billing.items.form.active": "Aktywne",
|
|
194
|
+
"billing.items.form.active.help": "Nieaktywne pozycje są pomijane przez silnik przebiegów rozliczeniowych.",
|
|
195
|
+
"billing.items.form.cancel_hint": "aby odrzucić",
|
|
196
|
+
"billing.items.form.create": "Utwórz pozycję",
|
|
197
|
+
"billing.items.form.description": "Opis",
|
|
198
|
+
"billing.items.form.description.help": "Wyświetlany dosłownie w pozycji faktury.",
|
|
199
|
+
"billing.items.form.end_date": "Data zakończenia rozliczania (opcjonalna)",
|
|
200
|
+
"billing.items.form.error.account_required": "Konto rozliczeniowe jest wymagane",
|
|
201
|
+
"billing.items.form.error.amount_invalid": "Kwota musi być liczbą",
|
|
202
|
+
"billing.items.form.error.description_required": "Opis jest wymagany",
|
|
203
|
+
"billing.items.form.error.start_date_required": "Data rozpoczęcia rozliczania jest wymagana",
|
|
204
|
+
"billing.items.form.error.tiered_json": "JSON stawki progowej nie jest prawidłowym JSON-em",
|
|
205
|
+
"billing.items.form.error.tiered_required": "JSON stawki progowej jest wymagany dla zużycia progowego",
|
|
206
|
+
"billing.items.form.error.tiered_shape": "JSON progowy musi zawierać `model` i `tiers`",
|
|
207
|
+
"billing.items.form.error.unit_price_invalid": "Cena jednostkowa musi być liczbą nieujemną",
|
|
208
|
+
"billing.items.form.error.uom_required": "Kod JM jest wymagany dla pozycji wg zużycia",
|
|
209
|
+
"billing.items.form.rate.amount": "Kwota",
|
|
210
|
+
"billing.items.form.rate.amount.help": "Wartości ujemne są dozwolone dla zwrotów / korekt / kredytów proporcjonalnych.",
|
|
211
|
+
"billing.items.form.rate.tiered_json": "JSON stawki progowej",
|
|
212
|
+
"billing.items.form.rate.tiered_json.help": "Modele: volume / graduated / flat. Dokładnie jeden próg musi mieć `up_to: null` (otwarty próg najwyższy). Walidatory po stronie serwera odrzucają nieprawidłowe struktury.",
|
|
213
|
+
"billing.items.form.rate.title": "Stawka",
|
|
214
|
+
"billing.items.form.rate.unit_price_recurring": "Cena jednostkowa za cykl",
|
|
215
|
+
"billing.items.form.rate.unit_price_usage": "Cena jednostkowa za jednostkę zużycia",
|
|
216
|
+
"billing.items.form.rate.usage_mode": "Model stawki",
|
|
217
|
+
"billing.items.form.rate.usage_mode.simple": "Prosta stawka stała",
|
|
218
|
+
"billing.items.form.rate.usage_mode.tiered": "Progowa (volume / graduated / flat)",
|
|
219
|
+
"billing.items.form.refs.title": "Odwołania zewnętrzne (opcjonalne)",
|
|
220
|
+
"billing.items.form.save": "Zapisz zmiany",
|
|
221
|
+
"billing.items.form.saving": "Zapisywanie…",
|
|
222
|
+
"billing.items.form.start_date": "Data rozpoczęcia rozliczania",
|
|
223
|
+
"billing.items.form.submit_hint": "aby zapisać,",
|
|
224
|
+
"billing.items.form.subscription_id": "ID subskrypcji",
|
|
225
|
+
"billing.items.form.subscription_item_id": "ID pozycji subskrypcji",
|
|
226
|
+
"billing.items.form.type": "Typ",
|
|
227
|
+
"billing.items.form.type.one_time": "Opłata jednorazowa",
|
|
228
|
+
"billing.items.form.type.recurring": "Cykliczna (za cykl)",
|
|
229
|
+
"billing.items.form.type.usage": "Wg zużycia (opomiarowana)",
|
|
230
|
+
"billing.items.form.uom_code": "Kod JM",
|
|
231
|
+
"billing.items.form.uom_code.help": "Musi dokładnie odpowiadać polu `uom_code` w rekordach zużycia. Brak konwersji.",
|
|
232
|
+
"billing.items.title": "Pozycje rozliczeniowe",
|
|
233
|
+
"billing.items.type.one_time": "Jednorazowa",
|
|
234
|
+
"billing.items.type.recurring": "Cykliczna",
|
|
235
|
+
"billing.items.type.usage": "Wg zużycia",
|
|
236
|
+
"billing.runs.actions.open": "Otwórz",
|
|
237
|
+
"billing.runs.columns.accounts": "Konta",
|
|
238
|
+
"billing.runs.columns.as_of_date": "Data rozliczenia",
|
|
239
|
+
"billing.runs.columns.drafts": "Wersje robocze",
|
|
240
|
+
"billing.runs.columns.failed": "Nieudane",
|
|
241
|
+
"billing.runs.columns.finished_at": "Zakończono",
|
|
242
|
+
"billing.runs.columns.name": "Przebieg",
|
|
243
|
+
"billing.runs.columns.started_at": "Rozpoczęto",
|
|
244
|
+
"billing.runs.columns.status": "Status",
|
|
245
|
+
"billing.runs.columns.triggered_by": "Wyzwalacz",
|
|
246
|
+
"billing.runs.detail.error.load": "Nie udało się wczytać przebiegu",
|
|
247
|
+
"billing.runs.detail.error.not_found": "Nie znaleziono przebiegu",
|
|
248
|
+
"billing.runs.detail.field.as_of_date": "Data rozliczenia",
|
|
249
|
+
"billing.runs.detail.field.finished_at": "Zakończono",
|
|
250
|
+
"billing.runs.detail.field.mode": "Tryb",
|
|
251
|
+
"billing.runs.detail.field.parent_run": "Przebieg nadrzędny",
|
|
252
|
+
"billing.runs.detail.field.run_id": "ID przebiegu",
|
|
253
|
+
"billing.runs.detail.field.started_at": "Rozpoczęto",
|
|
254
|
+
"billing.runs.detail.field.triggered_by": "Wyzwalacz",
|
|
255
|
+
"billing.runs.detail.loading": "Wczytywanie przebiegu…",
|
|
256
|
+
"billing.runs.detail.title": "Przebieg rozliczeniowy",
|
|
257
|
+
"billing.runs.filters.status": "Status",
|
|
258
|
+
"billing.runs.filters.triggered_by": "Wyzwalacz",
|
|
259
|
+
"billing.runs.outcomes.columns.account": "Konto",
|
|
260
|
+
"billing.runs.outcomes.columns.error": "Błąd",
|
|
261
|
+
"billing.runs.outcomes.columns.invoice": "Faktura",
|
|
262
|
+
"billing.runs.outcomes.columns.status": "Status",
|
|
263
|
+
"billing.runs.outcomes.columns.warnings": "Ostrzeżenia",
|
|
264
|
+
"billing.runs.outcomes.title": "Wyniki per konto",
|
|
265
|
+
"billing.runs.retry.action": "Ponów nieudane konta",
|
|
266
|
+
"billing.runs.retry.error": "Ponowienie nie powiodło się",
|
|
267
|
+
"billing.runs.retry.in_progress": "Ponawianie…",
|
|
268
|
+
"billing.runs.retry.success": "Utworzono przebieg ponawiający",
|
|
269
|
+
"billing.runs.status.completed": "Zakończony",
|
|
270
|
+
"billing.runs.status.failed": "Niepowodzenie",
|
|
271
|
+
"billing.runs.status.partial_failure": "Częściowe niepowodzenie",
|
|
272
|
+
"billing.runs.status.running": "W toku",
|
|
273
|
+
"billing.runs.summary.accounts": "Konta",
|
|
274
|
+
"billing.runs.summary.drafts": "Wersje robocze",
|
|
275
|
+
"billing.runs.summary.failed": "Nieudane",
|
|
276
|
+
"billing.runs.summary.skipped": "Pominięte",
|
|
277
|
+
"billing.runs.summary.title": "Podsumowanie",
|
|
278
|
+
"billing.runs.summary.usage": "Rozliczone zużycie",
|
|
279
|
+
"billing.runs.summary.warnings": "Ostrzeżenia",
|
|
280
|
+
"billing.runs.mode.catch_up": "Nadrabianie",
|
|
281
|
+
"billing.runs.mode.dry_run": "Dry-run",
|
|
282
|
+
"billing.runs.mode.real": "Realny",
|
|
283
|
+
"billing.runs.mode.test": "Testowy",
|
|
284
|
+
"billing.runs.title": "Przebiegi rozliczeniowe",
|
|
285
|
+
"billing.runs.trigger.action": "Nowy przebieg",
|
|
286
|
+
"billing.runs.trigger.dialog.as_of_date": "Data odniesienia",
|
|
287
|
+
"billing.runs.trigger.dialog.as_of_date.help": "Zafakturowane zostaną konta, których data następnego rozliczenia jest tą datą lub wcześniejsza.",
|
|
288
|
+
"billing.runs.trigger.dialog.cancel_hint": "aby anulować",
|
|
289
|
+
"billing.runs.trigger.dialog.description": "Uruchamia cykl rozliczeniowy dla wszystkich kont, którym minął termin następnego rozliczenia. Dry-run / Test generują faktury robocze bez ich księgowania.",
|
|
290
|
+
"billing.runs.trigger.dialog.mode": "Tryb",
|
|
291
|
+
"billing.runs.trigger.dialog.mode.dry": "Dry-run — nic nie jest zapisywane",
|
|
292
|
+
"billing.runs.trigger.dialog.mode.real": "Realny — tworzy faktury robocze",
|
|
293
|
+
"billing.runs.trigger.dialog.mode.test": "Testowy — faktury oznaczone do usunięcia",
|
|
294
|
+
"billing.runs.trigger.dialog.running": "Trwa…",
|
|
295
|
+
"billing.runs.trigger.dialog.submit": "Uruchom",
|
|
296
|
+
"billing.runs.trigger.dialog.submit_hint": "aby uruchomić,",
|
|
297
|
+
"billing.runs.trigger.dialog.title": "Uruchom przebieg rozliczeniowy",
|
|
298
|
+
"billing.runs.trigger.error": "Nie udało się uruchomić przebiegu",
|
|
299
|
+
"billing.runs.trigger.manual": "Ręcznie",
|
|
300
|
+
"billing.runs.trigger.schedule": "Harmonogram",
|
|
301
|
+
"billing.runs.trigger.success": "Przebieg rozliczeniowy uruchomiony",
|
|
302
|
+
"billing.usage.columns.description": "Opis",
|
|
303
|
+
"billing.usage.columns.period": "Okres",
|
|
304
|
+
"billing.usage.columns.quantity": "Ilość",
|
|
305
|
+
"billing.usage.columns.rated": "Rozliczone",
|
|
306
|
+
"billing.usage.columns.uom": "Jednostka",
|
|
307
|
+
"billing.usage.create.deduplicated": "Rekord zużycia z tą referencją źródłową już istniał — nic nie zostało zduplikowane.",
|
|
308
|
+
"billing.usage.create.error": "Nie udało się zapisać zużycia",
|
|
309
|
+
"billing.usage.create.loading": "Wczytywanie kont…",
|
|
310
|
+
"billing.usage.create.success": "Utworzono rekord zużycia",
|
|
311
|
+
"billing.usage.create.title": "Zapisz zużycie",
|
|
312
|
+
"billing.usage.form.account": "Konto rozliczeniowe",
|
|
313
|
+
"billing.usage.form.account.placeholder": "Wybierz konto",
|
|
314
|
+
"billing.usage.form.cancel_hint": "aby odrzucić",
|
|
315
|
+
"billing.usage.form.create": "Zapisz zużycie",
|
|
316
|
+
"billing.usage.form.description": "Opis (opcjonalnie)",
|
|
317
|
+
"billing.usage.form.description.help": "Pokazywany jako osobna pozycja na fakturze, gdy podany; w przeciwnym razie pasujące rekordy są agregowane w jedną pozycję.",
|
|
318
|
+
"billing.usage.form.error.account_required": "Konto rozliczeniowe jest wymagane",
|
|
319
|
+
"billing.usage.form.error.period_order": "Koniec okresu musi być nie wcześniejszy niż początek",
|
|
320
|
+
"billing.usage.form.error.period_required": "Początek i koniec okresu są wymagane",
|
|
321
|
+
"billing.usage.form.error.quantity_invalid": "Ilość musi być liczbą nieujemną",
|
|
322
|
+
"billing.usage.form.error.uom_required": "Kod jednostki (UoM) jest wymagany",
|
|
323
|
+
"billing.usage.form.period_end": "Koniec okresu",
|
|
324
|
+
"billing.usage.form.period_start": "Początek okresu",
|
|
325
|
+
"billing.usage.form.quantity": "Ilość",
|
|
326
|
+
"billing.usage.form.quantity.help": "Łączna liczba jednostek zużytych w okresie (pre-agregowana).",
|
|
327
|
+
"billing.usage.form.saving": "Zapisywanie…",
|
|
328
|
+
"billing.usage.form.source_ref": "Referencja źródłowa (opcjonalnie)",
|
|
329
|
+
"billing.usage.form.source_ref.help": "Klucz idempotencji — ponowne wysłanie tej samej referencji dla tego konta jest deduplikowane.",
|
|
330
|
+
"billing.usage.form.submit_hint": "aby zapisać,",
|
|
331
|
+
"billing.usage.form.uom_code": "Kod jednostki (UoM)",
|
|
332
|
+
"billing.usage.form.uom_code.help": "Musi dokładnie odpowiadać jednostce na pozycji billingowej typu usage dla tego konta — bez konwersji.",
|
|
333
|
+
"billing.usage.form.uom_code.placeholder": "api_request, gb, seat, …",
|
|
334
|
+
"billing.usage.rated.no": "Nierozliczone",
|
|
335
|
+
"billing.usage.rated.yes": "Rozliczone"
|
|
336
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "./commands/index.js";
|
|
2
|
+
const metadata = {
|
|
3
|
+
name: "billing",
|
|
4
|
+
title: "Billing",
|
|
5
|
+
version: "0.1.0",
|
|
6
|
+
description: "Lightweight recurring-billing engine \u2014 collects one-time / recurring / usage items, runs Bill Runs, produces draft invoices in core/sales.",
|
|
7
|
+
author: "Dainamite",
|
|
8
|
+
license: "MIT",
|
|
9
|
+
requires: ["auth", "directory", "dictionaries", "configs", "sales"],
|
|
10
|
+
ejectable: false
|
|
11
|
+
};
|
|
12
|
+
import { features } from "./acl.js";
|
|
13
|
+
export {
|
|
14
|
+
features,
|
|
15
|
+
metadata
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/modules/billing/index.ts"],
|
|
4
|
+
"sourcesContent": ["import type { ModuleInfo } from '@open-mercato/shared/modules/registry'\n\n// Side-effect import \u2014 registers every CRUD command in the global\n// command bus at module load time. The makeCrudRoute factory looks up\n// `actions.<verb>.commandId` against this registry at request time, so\n// without this import every billing write returns \"command not found\".\n// Pattern mirrors `@open-mercato/core/src/modules/customers/index.ts`.\nimport './commands'\n\nexport const metadata: ModuleInfo = {\n name: 'billing',\n title: 'Billing',\n version: '0.1.0',\n description:\n 'Lightweight recurring-billing engine \u2014 collects one-time / recurring / usage items, runs Bill Runs, produces draft invoices in core/sales.',\n author: 'Dainamite',\n license: 'MIT',\n requires: ['auth', 'directory', 'dictionaries', 'configs', 'sales'],\n ejectable: false,\n}\n\nexport { features } from './acl'\n"],
|
|
5
|
+
"mappings": "AAOA,OAAO;AAEA,MAAM,WAAuB;AAAA,EAClC,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,aACE;AAAA,EACF,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,UAAU,CAAC,QAAQ,aAAa,gBAAgB,WAAW,OAAO;AAAA,EAClE,WAAW;AACb;AAEA,SAAS,gBAAgB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
function cloneAtMidnight(date) {
|
|
2
|
+
const result = new Date(date instanceof Date ? date.getTime() : date);
|
|
3
|
+
result.setUTCHours(0, 0, 0, 0);
|
|
4
|
+
return result;
|
|
5
|
+
}
|
|
6
|
+
function subtractDays(date, days) {
|
|
7
|
+
const result = cloneAtMidnight(date);
|
|
8
|
+
result.setUTCDate(result.getUTCDate() - days);
|
|
9
|
+
return result;
|
|
10
|
+
}
|
|
11
|
+
function addDays(date, days) {
|
|
12
|
+
const result = cloneAtMidnight(date);
|
|
13
|
+
result.setUTCDate(result.getUTCDate() + days);
|
|
14
|
+
return result;
|
|
15
|
+
}
|
|
16
|
+
function lastDayOfMonthUTC(year, monthZeroIndexed) {
|
|
17
|
+
return new Date(Date.UTC(year, monthZeroIndexed + 1, 0)).getUTCDate();
|
|
18
|
+
}
|
|
19
|
+
function shiftMonths(date, deltaMonths) {
|
|
20
|
+
const result = cloneAtMidnight(date);
|
|
21
|
+
const day = result.getUTCDate();
|
|
22
|
+
result.setUTCDate(1);
|
|
23
|
+
result.setUTCMonth(result.getUTCMonth() + deltaMonths);
|
|
24
|
+
const lastDay = lastDayOfMonthUTC(result.getUTCFullYear(), result.getUTCMonth());
|
|
25
|
+
result.setUTCDate(Math.min(day, lastDay));
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
function shiftYears(date, deltaYears) {
|
|
29
|
+
const result = cloneAtMidnight(date);
|
|
30
|
+
const day = result.getUTCDate();
|
|
31
|
+
result.setUTCDate(1);
|
|
32
|
+
result.setUTCFullYear(result.getUTCFullYear() + deltaYears);
|
|
33
|
+
const lastDay = lastDayOfMonthUTC(result.getUTCFullYear(), result.getUTCMonth());
|
|
34
|
+
result.setUTCDate(Math.min(day, lastDay));
|
|
35
|
+
return result;
|
|
36
|
+
}
|
|
37
|
+
function subtractCycle(date, cycle) {
|
|
38
|
+
switch (cycle) {
|
|
39
|
+
case "weekly": {
|
|
40
|
+
const result = cloneAtMidnight(date);
|
|
41
|
+
result.setUTCDate(result.getUTCDate() - 7);
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
case "monthly":
|
|
45
|
+
return shiftMonths(date, -1);
|
|
46
|
+
case "quarterly":
|
|
47
|
+
return shiftMonths(date, -3);
|
|
48
|
+
case "annually":
|
|
49
|
+
return shiftYears(date, -1);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function addCycle(date, cycle) {
|
|
53
|
+
switch (cycle) {
|
|
54
|
+
case "weekly": {
|
|
55
|
+
const result = cloneAtMidnight(date);
|
|
56
|
+
result.setUTCDate(result.getUTCDate() + 7);
|
|
57
|
+
return result;
|
|
58
|
+
}
|
|
59
|
+
case "monthly":
|
|
60
|
+
return shiftMonths(date, 1);
|
|
61
|
+
case "quarterly":
|
|
62
|
+
return shiftMonths(date, 3);
|
|
63
|
+
case "annually":
|
|
64
|
+
return shiftYears(date, 1);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function deriveBillPeriod(nextBillDate, cycle) {
|
|
68
|
+
const periodEnd = subtractDays(nextBillDate, 1);
|
|
69
|
+
const periodStart = subtractCycle(nextBillDate, cycle);
|
|
70
|
+
return { periodStart, periodEnd };
|
|
71
|
+
}
|
|
72
|
+
function advanceNextBillDate(currentNextBillDate, cycle) {
|
|
73
|
+
return addCycle(currentNextBillDate, cycle);
|
|
74
|
+
}
|
|
75
|
+
function cycleContaining(anchor, cycle, target) {
|
|
76
|
+
const targetMs = cloneAtMidnight(target).getTime();
|
|
77
|
+
let start = cloneAtMidnight(anchor);
|
|
78
|
+
let guard = 0;
|
|
79
|
+
while (addCycle(start, cycle).getTime() <= targetMs && guard++ < 600) {
|
|
80
|
+
start = addCycle(start, cycle);
|
|
81
|
+
}
|
|
82
|
+
guard = 0;
|
|
83
|
+
while (start.getTime() > targetMs && guard++ < 600) {
|
|
84
|
+
start = subtractCycle(start, cycle);
|
|
85
|
+
}
|
|
86
|
+
return { periodStart: start, periodEnd: subtractDays(addCycle(start, cycle), 1) };
|
|
87
|
+
}
|
|
88
|
+
function isCycleDue(nextBillDate, asOfDate) {
|
|
89
|
+
const a = cloneAtMidnight(nextBillDate).getTime();
|
|
90
|
+
const b = cloneAtMidnight(asOfDate).getTime();
|
|
91
|
+
return a <= b;
|
|
92
|
+
}
|
|
93
|
+
export {
|
|
94
|
+
addDays,
|
|
95
|
+
advanceNextBillDate,
|
|
96
|
+
cloneAtMidnight,
|
|
97
|
+
cycleContaining,
|
|
98
|
+
deriveBillPeriod,
|
|
99
|
+
isCycleDue
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=billPeriod.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/modules/billing/lib/billPeriod.ts"],
|
|
4
|
+
"sourcesContent": ["import type { BillCycle } from '../data/validators'\n\n/**\n * Calendar-aware bill-period arithmetic.\n *\n * The spec mandates calendar units (Postgres `interval`-equivalent),\n * NOT raw day counts \u2014 months and quarters have variable length, so a\n * 30-day subtraction would skew the period boundary every February.\n *\n * All helpers here treat input dates as midnight in the host timezone\n * (the way MikroORM's `date`-column round-trip lands them). Date math\n * via `Date.setMonth` / `setDate` is the right primitive: Postgres'\n * `+ interval '1 month'` and JS's `setMonth(+1)` agree on the\n * \"clamp to month end\" behaviour (e.g. Jan 31 + 1 month \u2192 Feb 28/29).\n *\n * Examples (all from the spec's reference table):\n *\n * monthly next=2026-06-01 \u2192 period=2026-05-01..2026-05-31\n * monthly next=2026-03-01 \u2192 period=2026-02-01..2026-02-28\n * monthly next=2024-03-01 \u2192 period=2024-02-01..2024-02-29 (leap)\n * quarterly next=2026-07-01 \u2192 period=2026-04-01..2026-06-30\n * weekly next=2026-05-04 (Mon) \u2192 period=2026-04-27..2026-05-03\n */\n\nexport type BillPeriod = {\n /** Inclusive \u2014 first day of the cycle being billed. */\n periodStart: Date\n /** Inclusive \u2014 last day of the cycle (`nextBillDate - 1 day`). */\n periodEnd: Date\n}\n\nfunction cloneAtMidnight(date: Date | string | number): Date {\n // MikroORM hands `date`-typed columns back as 'YYYY-MM-DD' strings,\n // not Date objects \u2014 coerce so every helper here is input-tolerant\n // whether called from the engine (DB rows) or unit tests (plain\n // `new Date('2026-06-01')` values).\n const result = new Date(date instanceof Date ? date.getTime() : date)\n result.setUTCHours(0, 0, 0, 0)\n return result\n}\n\nfunction subtractDays(date: Date, days: number): Date {\n const result = cloneAtMidnight(date)\n result.setUTCDate(result.getUTCDate() - days)\n return result\n}\n\nfunction addDays(date: Date, days: number): Date {\n const result = cloneAtMidnight(date)\n result.setUTCDate(result.getUTCDate() + days)\n return result\n}\n\nfunction lastDayOfMonthUTC(year: number, monthZeroIndexed: number): number {\n // Date(Date.UTC(y, m+1, 0)) returns the last day of month m. The\n // zero-day-of-next-month trick is the canonical JS idiom.\n return new Date(Date.UTC(year, monthZeroIndexed + 1, 0)).getUTCDate()\n}\n\nfunction shiftMonths(date: Date, deltaMonths: number): Date {\n // JS `setUTCMonth` does NOT clamp when the target month is shorter\n // than the source day \u2014 it overflows (Jan 31 + 1 month \u2192 Mar 3\n // because Feb 31 spills over). Postgres `+ interval '1 month'` and\n // the spec both clamp, so we replicate that: shift the month while\n // pinned to day 1, then restore the original day clamped to the new\n // month's last day.\n const result = cloneAtMidnight(date)\n const day = result.getUTCDate()\n result.setUTCDate(1)\n result.setUTCMonth(result.getUTCMonth() + deltaMonths)\n const lastDay = lastDayOfMonthUTC(result.getUTCFullYear(), result.getUTCMonth())\n result.setUTCDate(Math.min(day, lastDay))\n return result\n}\n\nfunction shiftYears(date: Date, deltaYears: number): Date {\n // Same clamp story for Feb 29 in non-leap years.\n const result = cloneAtMidnight(date)\n const day = result.getUTCDate()\n result.setUTCDate(1)\n result.setUTCFullYear(result.getUTCFullYear() + deltaYears)\n const lastDay = lastDayOfMonthUTC(result.getUTCFullYear(), result.getUTCMonth())\n result.setUTCDate(Math.min(day, lastDay))\n return result\n}\n\nfunction subtractCycle(date: Date, cycle: BillCycle): Date {\n switch (cycle) {\n case 'weekly': {\n const result = cloneAtMidnight(date)\n result.setUTCDate(result.getUTCDate() - 7)\n return result\n }\n case 'monthly':\n return shiftMonths(date, -1)\n case 'quarterly':\n return shiftMonths(date, -3)\n case 'annually':\n return shiftYears(date, -1)\n }\n}\n\nfunction addCycle(date: Date, cycle: BillCycle): Date {\n switch (cycle) {\n case 'weekly': {\n const result = cloneAtMidnight(date)\n result.setUTCDate(result.getUTCDate() + 7)\n return result\n }\n case 'monthly':\n return shiftMonths(date, 1)\n case 'quarterly':\n return shiftMonths(date, 3)\n case 'annually':\n return shiftYears(date, 1)\n }\n}\n\n/**\n * Compute the bill period for the cycle that `nextBillDate` marks the\n * START of the *next* one. So `periodEnd = nextBillDate - 1 day` and\n * `periodStart = nextBillDate - cycle`.\n */\nexport function deriveBillPeriod(nextBillDate: Date, cycle: BillCycle): BillPeriod {\n const periodEnd = subtractDays(nextBillDate, 1)\n const periodStart = subtractCycle(nextBillDate, cycle)\n return { periodStart, periodEnd }\n}\n\n/**\n * Advance `nextBillDate` by one cycle. Used by the engine after a\n * successful real-mode account run.\n */\nexport function advanceNextBillDate(currentNextBillDate: Date, cycle: BillCycle): Date {\n return addCycle(currentNextBillDate, cycle)\n}\n\n/**\n * The bill cycle that `target` falls into, given any known cycle\n * boundary `anchor` (e.g. an account's `nextBillDate`). Returned\n * `periodStart` is inclusive, `periodEnd` is the last day of the cycle.\n *\n * Used by the cpq-billing-connector to prorate a mid-cycle amendment \u2014\n * the connector owns the billing-cycle knowledge, CPQ does not.\n */\nexport function cycleContaining(\n anchor: Date | string | number,\n cycle: BillCycle,\n target: Date | string | number,\n): BillPeriod {\n const targetMs = cloneAtMidnight(target).getTime()\n let start = cloneAtMidnight(anchor)\n let guard = 0\n // Walk forward while the cycle starting at `start` ends before target.\n while (addCycle(start, cycle).getTime() <= targetMs && guard++ < 600) {\n start = addCycle(start, cycle)\n }\n guard = 0\n // Walk backward while `start` itself is after target.\n while (start.getTime() > targetMs && guard++ < 600) {\n start = subtractCycle(start, cycle)\n }\n return { periodStart: start, periodEnd: subtractDays(addCycle(start, cycle), 1) }\n}\n\n/**\n * True when the account still has cycles to bill on or before\n * `asOfDate`. The engine uses this to drive the catch-up loop.\n */\nexport function isCycleDue(nextBillDate: Date, asOfDate: Date): boolean {\n const a = cloneAtMidnight(nextBillDate).getTime()\n const b = cloneAtMidnight(asOfDate).getTime()\n return a <= b\n}\n\n/**\n * Test seam: re-export the day-add helper so the engine can compute\n * `bill_period_end + 1 day` consistently with this module's calendar\n * semantics (avoids drift between engine code and period-math tests).\n */\nexport { addDays, cloneAtMidnight }\n"],
|
|
5
|
+
"mappings": "AA+BA,SAAS,gBAAgB,MAAoC;AAK3D,QAAM,SAAS,IAAI,KAAK,gBAAgB,OAAO,KAAK,QAAQ,IAAI,IAAI;AACpE,SAAO,YAAY,GAAG,GAAG,GAAG,CAAC;AAC7B,SAAO;AACT;AAEA,SAAS,aAAa,MAAY,MAAoB;AACpD,QAAM,SAAS,gBAAgB,IAAI;AACnC,SAAO,WAAW,OAAO,WAAW,IAAI,IAAI;AAC5C,SAAO;AACT;AAEA,SAAS,QAAQ,MAAY,MAAoB;AAC/C,QAAM,SAAS,gBAAgB,IAAI;AACnC,SAAO,WAAW,OAAO,WAAW,IAAI,IAAI;AAC5C,SAAO;AACT;AAEA,SAAS,kBAAkB,MAAc,kBAAkC;AAGzE,SAAO,IAAI,KAAK,KAAK,IAAI,MAAM,mBAAmB,GAAG,CAAC,CAAC,EAAE,WAAW;AACtE;AAEA,SAAS,YAAY,MAAY,aAA2B;AAO1D,QAAM,SAAS,gBAAgB,IAAI;AACnC,QAAM,MAAM,OAAO,WAAW;AAC9B,SAAO,WAAW,CAAC;AACnB,SAAO,YAAY,OAAO,YAAY,IAAI,WAAW;AACrD,QAAM,UAAU,kBAAkB,OAAO,eAAe,GAAG,OAAO,YAAY,CAAC;AAC/E,SAAO,WAAW,KAAK,IAAI,KAAK,OAAO,CAAC;AACxC,SAAO;AACT;AAEA,SAAS,WAAW,MAAY,YAA0B;AAExD,QAAM,SAAS,gBAAgB,IAAI;AACnC,QAAM,MAAM,OAAO,WAAW;AAC9B,SAAO,WAAW,CAAC;AACnB,SAAO,eAAe,OAAO,eAAe,IAAI,UAAU;AAC1D,QAAM,UAAU,kBAAkB,OAAO,eAAe,GAAG,OAAO,YAAY,CAAC;AAC/E,SAAO,WAAW,KAAK,IAAI,KAAK,OAAO,CAAC;AACxC,SAAO;AACT;AAEA,SAAS,cAAc,MAAY,OAAwB;AACzD,UAAQ,OAAO;AAAA,IACb,KAAK,UAAU;AACb,YAAM,SAAS,gBAAgB,IAAI;AACnC,aAAO,WAAW,OAAO,WAAW,IAAI,CAAC;AACzC,aAAO;AAAA,IACT;AAAA,IACA,KAAK;AACH,aAAO,YAAY,MAAM,EAAE;AAAA,IAC7B,KAAK;AACH,aAAO,YAAY,MAAM,EAAE;AAAA,IAC7B,KAAK;AACH,aAAO,WAAW,MAAM,EAAE;AAAA,EAC9B;AACF;AAEA,SAAS,SAAS,MAAY,OAAwB;AACpD,UAAQ,OAAO;AAAA,IACb,KAAK,UAAU;AACb,YAAM,SAAS,gBAAgB,IAAI;AACnC,aAAO,WAAW,OAAO,WAAW,IAAI,CAAC;AACzC,aAAO;AAAA,IACT;AAAA,IACA,KAAK;AACH,aAAO,YAAY,MAAM,CAAC;AAAA,IAC5B,KAAK;AACH,aAAO,YAAY,MAAM,CAAC;AAAA,IAC5B,KAAK;AACH,aAAO,WAAW,MAAM,CAAC;AAAA,EAC7B;AACF;AAOO,SAAS,iBAAiB,cAAoB,OAA8B;AACjF,QAAM,YAAY,aAAa,cAAc,CAAC;AAC9C,QAAM,cAAc,cAAc,cAAc,KAAK;AACrD,SAAO,EAAE,aAAa,UAAU;AAClC;AAMO,SAAS,oBAAoB,qBAA2B,OAAwB;AACrF,SAAO,SAAS,qBAAqB,KAAK;AAC5C;AAUO,SAAS,gBACd,QACA,OACA,QACY;AACZ,QAAM,WAAW,gBAAgB,MAAM,EAAE,QAAQ;AACjD,MAAI,QAAQ,gBAAgB,MAAM;AAClC,MAAI,QAAQ;AAEZ,SAAO,SAAS,OAAO,KAAK,EAAE,QAAQ,KAAK,YAAY,UAAU,KAAK;AACpE,YAAQ,SAAS,OAAO,KAAK;AAAA,EAC/B;AACA,UAAQ;AAER,SAAO,MAAM,QAAQ,IAAI,YAAY,UAAU,KAAK;AAClD,YAAQ,cAAc,OAAO,KAAK;AAAA,EACpC;AACA,SAAO,EAAE,aAAa,OAAO,WAAW,aAAa,SAAS,OAAO,KAAK,GAAG,CAAC,EAAE;AAClF;AAMO,SAAS,WAAW,cAAoB,UAAyB;AACtE,QAAM,IAAI,gBAAgB,YAAY,EAAE,QAAQ;AAChD,QAAM,IAAI,gBAAgB,QAAQ,EAAE,QAAQ;AAC5C,SAAO,KAAK;AACd;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|