mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 09:21:43 +02:00
Add configurable invoice due date #2775
This commit is contained in:
parent
48af3e77cd
commit
95a73327db
9 changed files with 18 additions and 11 deletions
|
@ -72,10 +72,11 @@ class Registrar < ActiveRecord::Base
|
|||
end
|
||||
|
||||
# rubocop:disable Metrics/MethodLength
|
||||
# rubocop:disable Metrics/AbcSize
|
||||
def issue_prepayment_invoice(amount, description = nil)
|
||||
invoices.create(
|
||||
invoice_type: 'DEB',
|
||||
due_date: Time.zone.now.to_date + 1.day,
|
||||
due_date: (Time.zone.now.to_date + Setting.days_to_keep_invoices_active.days).end_of_day,
|
||||
payment_term: 'prepayment',
|
||||
description: description,
|
||||
currency: 'EUR',
|
||||
|
@ -117,6 +118,7 @@ class Registrar < ActiveRecord::Base
|
|||
]
|
||||
)
|
||||
end
|
||||
# rubocop:enable Metrics/AbcSize
|
||||
# rubocop:enable Metrics/MethodLength
|
||||
|
||||
def cash_account
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue