@kernhq/module-billing 0.5.8 → 0.5.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kernhq/module-billing",
3
- "version": "0.5.8",
3
+ "version": "0.5.9",
4
4
  "description": "Kern billing module: plans, entitlements, subscriptions and Stripe — the mechanism that lets any Kern instance sell seats on itself",
5
5
  "homepage": "https://github.com/KernAIO/module-billing#readme",
6
6
  "license": "AGPL-3.0-only",
@@ -128,6 +128,7 @@ export const en: Record<string, Message> = {
128
128
  'billing.invoice_date': 'Date',
129
129
  'billing.invoice_number': 'Invoice',
130
130
  'billing.invoice_view': 'View',
131
+ 'billing.invoice_pdf': 'PDF',
131
132
  'billing.invoices_empty': 'No invoices yet',
132
133
  'billing.invoices_empty_hint': 'An invoice appears here after the first payment.',
133
134
  'billing.invoices_section': 'Invoices',
@@ -287,6 +288,7 @@ const ar: Record<string, Message> = {
287
288
  'billing.invoice_date': 'التاريخ',
288
289
  'billing.invoice_number': 'الفاتورة',
289
290
  'billing.invoice_view': 'عرض',
291
+ 'billing.invoice_pdf': 'PDF',
290
292
  'billing.invoices_empty': 'لا فواتير بعد',
291
293
  'billing.invoices_empty_hint': 'تظهر الفاتورة هنا بعد أول عملية دفع.',
292
294
  'billing.invoices_section': 'الفواتير',
@@ -453,6 +455,7 @@ const de: Record<string, Message> = {
453
455
  'billing.invoice_date': 'Datum',
454
456
  'billing.invoice_number': 'Rechnung',
455
457
  'billing.invoice_view': 'Ansehen',
458
+ 'billing.invoice_pdf': 'PDF',
456
459
  'billing.invoices_empty': 'Noch keine Rechnungen',
457
460
  'billing.invoices_empty_hint': 'Nach der ersten Zahlung erscheint hier eine Rechnung.',
458
461
  'billing.invoices_section': 'Rechnungen',
@@ -612,6 +615,7 @@ const fa: Record<string, Message> = {
612
615
  'billing.invoice_date': 'تاریخ',
613
616
  'billing.invoice_number': 'صورتحساب',
614
617
  'billing.invoice_view': 'نمایش',
618
+ 'billing.invoice_pdf': 'PDF',
615
619
  'billing.invoices_empty': 'هنوز صورتحسابی نیست',
616
620
  'billing.invoices_empty_hint': 'پس از نخستین پرداخت، صورتحساب اینجا می‌آید.',
617
621
  'billing.invoices_section': 'صورتحساب‌ها',
@@ -770,6 +774,7 @@ const tr: Record<string, Message> = {
770
774
  'billing.invoice_date': 'Tarih',
771
775
  'billing.invoice_number': 'Fatura',
772
776
  'billing.invoice_view': 'Görüntüle',
777
+ 'billing.invoice_pdf': 'PDF',
773
778
  'billing.invoices_empty': 'Henüz fatura yok',
774
779
  'billing.invoices_empty_hint': 'İlk ödemeden sonra burada bir fatura görünür.',
775
780
  'billing.invoices_section': 'Faturalar',
@@ -514,16 +514,31 @@ function once(run: () => void) {
514
514
  <TableCell>{day(inv.createdAt)}</TableCell>
515
515
  <TableCell end>{formatMoney(inv.totalMinor, inv.currency, locale)}</TableCell>
516
516
  <TableCell end>
517
- {#if inv.hostedUrl}
518
- <a
519
- class="text-[13px] text-[var(--kern-accent-deep)] underline-offset-2 hover:underline"
520
- href={inv.hostedUrl}
521
- target="_blank"
522
- rel="noreferrer noopener"
523
- >
524
- {t('invoice_view')}
525
- </a>
526
- {/if}
517
+ <!-- Both links Stripe gives us: the hosted page (pay, see the receipt) and the PDF
518
+ an accountant files. Neither is ours to render, so nothing is shown when
519
+ Stripe sent none. -->
520
+ <span class="inline-flex items-center gap-3">
521
+ {#if inv.hostedUrl}
522
+ <a
523
+ class="text-[13px] text-[var(--kern-accent-deep)] underline-offset-2 hover:underline"
524
+ href={inv.hostedUrl}
525
+ target="_blank"
526
+ rel="noreferrer noopener"
527
+ >
528
+ {t('invoice_view')}
529
+ </a>
530
+ {/if}
531
+ {#if inv.pdfUrl}
532
+ <a
533
+ class="text-[13px] text-[var(--kern-accent-deep)] underline-offset-2 hover:underline"
534
+ href={inv.pdfUrl}
535
+ target="_blank"
536
+ rel="noreferrer noopener"
537
+ >
538
+ {t('invoice_pdf')}
539
+ </a>
540
+ {/if}
541
+ </span>
527
542
  </TableCell>
528
543
  </TableRow>
529
544
  {/each}