Invoices: issued in Billingo by the worker, downloadable on Számláim
CI / test (push) Successful in 1m29s
CI / build (push) Successful in 9m7s
CI / deploy (push) Skipped

A paid checkout queues an invoice row with every invoice detail (buyer,
tax type and number, item, net, VAT, gross). The worker's new 'invoices'
task creates the Billingo partner and the paid card invoice and e-mails
it (API v3), saving each step so a retry never issues a second invoice,
and keeps Billingo's whole answer; the PDF is fetched from Billingo when
the user downloads it from the new Számláim page (in the menu once there
is an invoice). Payments and invoices outlive a deleted account.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-20 07:52:34 +00:00
co-authored by Claude Opus 5.5
parent e530e78c54
commit 2a0830fda0
24 changed files with 1090 additions and 35 deletions
@@ -212,6 +212,10 @@ export default async function PrivacyPage() {
<strong>Stripe Payments Europe, Ltd.</strong> (Írország) – a bankkártyás fizetés lebonyolítása és a
visszaélések kiszűrése; a kártyaadatokat csak a Stripe kezeli.
</li>
<li>
<strong>Billingo Technologies Zrt.</strong> (Billingo) – a számlák kiállítása, megküldése és megőrzése; a
számlázási adataidat (név, cím, e-mail-cím, céges vásárlásnál cégnév és adószám) kapja meg.
</li>
<li>
<strong>OpenRouter, Inc.</strong> és az általa elért mesterségesintelligencia-szolgáltatók – az elemzések
megírása, kizárólag a 4. pontban leírt csillagászati adatokból (személyes adat nem jut el hozzájuk).
@@ -1,4 +1,5 @@
import type { Metadata } from "next";
import Link from "next/link";
import { AiNote } from "@/components/AiNote";
import { PackageCards } from "@/components/PackageCards";
@@ -84,6 +85,12 @@ export default async function PackagesPage() {
<RedeemCode />
</section>
{me.invoice_count > 0 && (
<p className="hint">
A korábbi vásárlásaid számlái: <Link href="/szamlak">Számláim →</Link>
</p>
)}
<PackageCards packages={packages} canPay={canPay} />
<section className="field" aria-labelledby="addon-title" style={{ gap: 12 }}>
+7
View File
@@ -957,3 +957,10 @@ a.pair-row:hover strong { color: var(--gold); }
}
.pay-return .msg-ok { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); }
.pay-return .msg-error { border-color: color-mix(in srgb, var(--danger) 55%, var(--line)); }
/* Számláim */
.invoice-table th.num, .invoice-table td.num { text-align: right; }
.invoice-table td.act { text-align: right; white-space: nowrap; }
@media (max-width: 640px) {
.invoice-table th:nth-child(3), .invoice-table td:nth-child(3) { display: none; }
}
@@ -211,6 +211,10 @@ export default async function PrivacyPolicyPage() {
<strong>Stripe Payments Europe, Ltd.</strong> (Ireland): processing card payments and preventing fraud;
only Stripe handles card details.
</li>
<li>
<strong>Billingo Technologies Zrt.</strong> (Billingo): issuing, sending and keeping the invoices; it
receives your billing details (name, address, e-mail address, and for a company its name and tax number).
</li>
<li>
<strong>OpenRouter, Inc.</strong> and the artificial intelligence providers it reaches: writing the readings,
only from the astronomical data described in section 4 (no personal data reaches them).
+1 -1
View File
@@ -46,7 +46,7 @@ export default async function robots(): Promise<MetadataRoute.Robots> {
rules: [
{ userAgent: AI_CRAWLERS, disallow: "/" },
// Logged-in pages redirect anyway; shared links carry noindex.
{ userAgent: "*", allow: "/", disallow: ["/api/", "/admin", "/profil", "/kepletek", "/osszevetesek", "/szemelyek"] },
{ userAgent: "*", allow: "/", disallow: ["/api/", "/admin", "/profil", "/kepletek", "/osszevetesek", "/szemelyek", "/szamlak"] },
],
};
}
@@ -0,0 +1,77 @@
import type { Metadata } from "next";
import Link from "next/link";
import { backendGet, requireMe } from "@/lib/server";
import type { Invoice } from "@/lib/types";
export const metadata: Metadata = { title: "Számláim" };
const huf = (n: number) => `${n.toLocaleString("hu-HU")} Ft`;
const day = (iso: string) => new Date(iso).toLocaleDateString("hu-HU", { timeZone: "Europe/Budapest" });
/** The invoices of the user's purchases, with the PDF to download. */
export default async function InvoicesPage() {
await requireMe("/szamlak");
const invoices = (await backendGet<{ invoices: Invoice[] }>("/v1/invoices"))?.invoices ?? [];
return (
<main className="page" style={{ maxWidth: 900 }}>
<div className="page-head">
<h1>Számláim</h1>
<p className="muted">
A vásárlásaid számlái. A számlát e-mailben is elküldjük a fizetéskor megadott címre; itt bármikor újra
letöltheted.
</p>
</div>
{invoices.length === 0 ? (
<section className="card">
<p className="muted">
Még nincs számlád. Ha csomagot vásárolsz, a számlája itt jelenik meg. <Link href="/csomagok">Csomagok →</Link>
</p>
</section>
) : (
<section className="card">
<div className="table-wrap">
<table className="invoice-table">
<thead>
<tr>
<th>Dátum</th>
<th>Számlaszám</th>
<th>Tétel</th>
<th className="num">Összeg</th>
<th>
<span className="sr-only">Letöltés</span>
</th>
</tr>
</thead>
<tbody>
{invoices.map((inv) => (
<tr key={inv.id}>
<td>{day(inv.invoice_date ?? inv.paid_at)}</td>
<td>{inv.invoice_number ?? "–"}</td>
<td>{inv.item}</td>
<td className="num">{huf(inv.gross_huf)}</td>
<td className="act">
{inv.ready ? (
<a className="btn btn-sm" href={`/api/v1/invoices/${inv.id}/pdf`} download>
PDF letöltése
</a>
) : (
<span className="hint">Készül…</span>
)}
</td>
</tr>
))}
</tbody>
</table>
</div>
<p className="hint">
A számlákat a Billingo állítja ki. Ha egy számla adatai hibásak (például a cégnév vagy az adószám), írj nekünk,
és helyesbítjük.
</p>
</section>
)}
</main>
);
}