Admin fatturazione: coda pagamenti senza PDF e upload diretto.

Lista globale dei pagamenti da fatturare con dati intestazione, caricamento
PDF per riga che crea la fattura e invia email; rimuove il flusso bozza manuale.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-02 17:31:49 +02:00
parent b073ded6c1
commit 964e3f472c
13 changed files with 341 additions and 54 deletions

View File

@@ -0,0 +1,9 @@
module Billing
class InvoiceNumber
def self.next_for(club)
year = Date.current.year
count = club.billing_invoices.where("number LIKE ?", "%#{year}%").count + 1
"#{year}/#{count}"
end
end
end