feat: rename invoice (RE-) to order confirmation (BE-) throughout the application
All checks were successful
Staging Build / build (push) Successful in 2m42s

This commit is contained in:
DanielS
2026-06-25 22:43:17 +02:00
parent 52f2a78753
commit 16fb713665
7 changed files with 11 additions and 11 deletions

View File

@@ -14,13 +14,13 @@ import { getProducts, getCategories } from '@/lib/actions/products'
/**
* Erzeugt eine menschenlesbare, nicht-sequenzielle Bestellnummer.
* Format: RE-YYYY-NNNNN (z.B. RE-2026-84731)
* Format: BE-YYYY-NNNNN (z.B. BE-2026-84731)
* Kein Rückschluss auf Gesamtanzahl der Bestellungen möglich.
*/
function generateOrderNumber(): string {
const year = new Date().getFullYear()
const rand = Math.floor(10000 + Math.random() * 90000) // 5-stellig, niemals < 10000
return `RE-${year}-${rand}`
return `BE-${year}-${rand}`
}
/**
@@ -203,7 +203,7 @@ export async function submitOrder(params: {
)
// 6. PDF in Supabase Storage hochladen
const fileName = `invoice_${order.id}.pdf`
const fileName = `bestellbestaetigung_${order.id}.pdf`
const { error: uploadError } = await supabase
.storage
.from('invoices')