wip: invoice reference generation

This commit is contained in:
2025-08-15 17:16:29 +01:00
parent 7f4da2f606
commit fdb4fb669a
7 changed files with 58 additions and 22 deletions
+7
View File
@@ -5,6 +5,7 @@ import (
"net/http"
"os"
"path/filepath"
"time"
"github.com/google/uuid"
"github.com/gorilla/sessions"
@@ -267,3 +268,9 @@ func GenerateInvoice(invoice types.Invoice, user types.User, client types.Client
return invoicePath, nil
}
func GenerateInvoiceReference(invoiceNumber uint32) string {
year, _, _ := time.Now().Date()
return fmt.Sprintf("INV/%d/%05d", year, invoiceNumber)
}