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:
9
backend/app/services/billing/invoice_number.rb
Normal file
9
backend/app/services/billing/invoice_number.rb
Normal 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
|
||||
Reference in New Issue
Block a user