mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 16:32:04 +02:00
Refactor and improve invoices
- `runner 'Invoice.cancel_overdue_invoices'` in `schedule.rb` is changed to `rake 'invoices:cancel_overdue'`. - `invoices.payment_term` database column is removed and its value is hardcoded in UI. - `invoices.paid_at` is removed as unused - `invoices.due_date` column's type is now `date`. - `Invoice#invoice_items` renamed to `Invoice#items` and `Invoice` interface to get a list of items is unified. - Default date format in UI. - Default translations are used. - Tests improved. - Specs converted to tests and removed along with factories. - Database structure improved.
This commit is contained in:
parent
d86ec026e3
commit
a97728c0f3
65 changed files with 758 additions and 341 deletions
|
@ -40,7 +40,6 @@ if con.present? && con.table_exists?('settings')
|
|||
Setting.save_default(:directo_monthly_number_max, 309999)
|
||||
Setting.save_default(:directo_monthly_number_last, 309901)
|
||||
Setting.save_default(:days_to_keep_invoices_active, 30)
|
||||
Setting.save_default(:days_to_keep_overdue_invoices_active, 30)
|
||||
Setting.save_default(:minimum_deposit, 0.0)
|
||||
Setting.save_default(:directo_receipt_payment_term, "R")
|
||||
Setting.save_default(:directo_receipt_product_name, "ETTEM06")
|
||||
|
|
5
config/locales/account_activities.en.yml
Normal file
5
config/locales/account_activities.en.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
en:
|
||||
activerecord:
|
||||
attributes:
|
||||
account_activity:
|
||||
created_at: Receipt date
|
5
config/locales/admin/invoices.en.yml
Normal file
5
config/locales/admin/invoices.en.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
en:
|
||||
admin:
|
||||
invoices:
|
||||
cancel:
|
||||
cancelled: Invoice has been cancelled
|
|
@ -523,12 +523,10 @@ en:
|
|||
domain_not_found: 'Domain was not found'
|
||||
new_contact: 'New contact'
|
||||
add_deposit: 'Add deposit'
|
||||
amount: 'Amount'
|
||||
please_pay_the_following_invoice: 'Please pay the following invoice'
|
||||
invoice_no: 'Invoice no. %{no}'
|
||||
invoice_number: Invoice no.
|
||||
seller: 'Seller'
|
||||
prepayment: 'Prepayment'
|
||||
unpaid: 'Unpaid'
|
||||
your_current_account_balance_is: 'Your current account balance is %{balance} %{currency}'
|
||||
billing: 'Billing'
|
||||
|
@ -588,7 +586,6 @@ en:
|
|||
refers to the computer that saves and forwards notices related to the Domain Names and their corresponding IP addresses in the Internet.
|
||||
account_activity: 'Account activity'
|
||||
account_activities: 'Account activities'
|
||||
receipt_date: 'Receipt date'
|
||||
manual_binding: 'Manual binding'
|
||||
transaction_is_already_binded: 'Transaction is already binded'
|
||||
invoice_was_not_found: 'Invoice was not found'
|
||||
|
@ -614,9 +611,6 @@ en:
|
|||
certificates: 'Certificates'
|
||||
cancel: 'Cancel'
|
||||
cancelled: 'Cancelled'
|
||||
cancel_date: 'Cancel date'
|
||||
cannot_cancel_paid_invoice: 'Cannot cancel paid invoice'
|
||||
cannot_cancel_cancelled_invoice: 'Cannot cancel cancelled invoice'
|
||||
cannot_bind_cancelled_invoice: 'Cannot bind cancelled invoice'
|
||||
minimum_invoice_no: 'Miminum invoice no'
|
||||
maximum_invoice_no: 'Maximum invoice no'
|
||||
|
|
|
@ -9,3 +9,6 @@ en:
|
|||
payment_complete: Credit Card payment Complete
|
||||
index:
|
||||
reset_btn: Reset
|
||||
|
||||
cancel:
|
||||
cancelled: Invoice has been cancelled
|
|
@ -22,7 +22,7 @@ if @cron_group == 'registry'
|
|||
end
|
||||
|
||||
every :day, at: '12:10am' do
|
||||
runner 'Invoice.cancel_overdue_invoices'
|
||||
rake 'invoices:cancel_overdue'
|
||||
end
|
||||
|
||||
# TODO
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue