feat: rename invoice (RE-) to order confirmation (BE-) throughout the application
All checks were successful
Staging Build / build (push) Successful in 2m42s
All checks were successful
Staging Build / build (push) Successful in 2m42s
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user