6d2711e36e
Default to beenvoice.soconnor.dev with server settings hidden behind Advanced; add Entities tab with clients/businesses, invoice creation, UI fixes for dashboard layout, date fields, FAB position, and card-matched button radius. Co-authored-by: Cursor <cursoragent@cursor.com>
12 lines
374 B
TypeScript
12 lines
374 B
TypeScript
/** Matches web invoice-form default numbering. */
|
|
export function generateInvoiceNumber(): string {
|
|
const date = new Date().toISOString().slice(0, 10).replace(/-/g, "");
|
|
return `INV-${date}-${String(Date.now()).slice(-6)}`;
|
|
}
|
|
|
|
export function defaultDueDate(issueDate: Date): Date {
|
|
const due = new Date(issueDate);
|
|
due.setDate(due.getDate() + 30);
|
|
return due;
|
|
}
|