diff --git a/app/models/invoice.rb b/app/models/invoice.rb index 693967f5b..91948db03 100644 --- a/app/models/invoice.rb +++ b/app/models/invoice.rb @@ -12,6 +12,14 @@ class Invoice < ActiveRecord::Base [buyer_street, buyer_city, buyer_state, buyer_zip].reject(&:blank?).compact.join(', ') end + def seller_country + Country.new(seller_country_code) + end + + def buyer_country + Country.new(buyer_country_code) + end + def items invoice_items end diff --git a/app/views/registrar/invoices/index.haml b/app/views/registrar/invoices/index.haml index b76d4f40e..94ac37011 100644 --- a/app/views/registrar/invoices/index.haml +++ b/app/views/registrar/invoices/index.haml @@ -1,3 +1,14 @@ +.row + .col-sm-6 + %h1.text-center-xs + = t('your_account') + .col-sm-6 + %h1.text-right.text-center-xs + = link_to(t('add_deposit'), new_registrar_deposit_path, class: 'btn btn-default') + +%hr += t('your_current_credit_account_balance_is', balance: 1000.0) + %h1= t('invoices') %hr .table-responsive diff --git a/app/views/registrar/invoices/partials/_buyer.haml b/app/views/registrar/invoices/partials/_buyer.haml index 2201e65ac..50f45a706 100644 --- a/app/views/registrar/invoices/partials/_buyer.haml +++ b/app/views/registrar/invoices/partials/_buyer.haml @@ -10,11 +10,16 @@ %dt= t('address') %dd= @invoice.buyer_address - %dt= t('phone') - %dd= @invoice.buyer_phone + %dt= t('country') + %dd= @invoice.buyer_country - %dt= t('url') - %dd= @invoice.buyer_url + - if @invoice.buyer_phone + %dt= t('phone') + %dd= @invoice.buyer_phone + + - if @invoice.buyer_url + %dt= t('url') + %dd= @invoice.buyer_url %dt= t('email') %dd= @invoice.buyer_email diff --git a/app/views/registrar/invoices/partials/_seller.haml b/app/views/registrar/invoices/partials/_seller.haml index 91c15b695..ab082fcd0 100644 --- a/app/views/registrar/invoices/partials/_seller.haml +++ b/app/views/registrar/invoices/partials/_seller.haml @@ -22,6 +22,9 @@ %dt= t('address') %dd= @invoice.seller_address + %dt= t('country') + %dd= @invoice.seller_country + %dt= t('phone') %dd= @invoice.seller_phone diff --git a/app/views/registrar/invoices/show.haml b/app/views/registrar/invoices/show.haml index 41619084d..08eba28dc 100644 --- a/app/views/registrar/invoices/show.haml +++ b/app/views/registrar/invoices/show.haml @@ -7,14 +7,3 @@ .col-md-12= render 'registrar/invoices/partials/buyer' .row .col-md-12= render 'registrar/invoices/partials/items' -/ .row -/ .col-md-12= render 'admin/domains/partials/statuses' -/ .row -/ .col-md-12= render 'admin/domains/partials/nameservers' -/ .row -/ .col-md-12= render 'admin/domains/partials/dnskeys' -/ .row -/ .col-md-12= render 'admin/domains/partials/keyrelays' -/ .row -/ .col-md-12 -/ = render 'admin/domains/partials/legal_documents', legal_documents: @domain.legal_documents diff --git a/config/locales/en.yml b/config/locales/en.yml index b9e0e6089..79bae57b4 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -651,3 +651,6 @@ en: prepayment: 'Prepayment' vat: 'VAT (%{vat_prc}%)' unpaid: 'Unpaid' + your_current_credit_account_balance_is: 'Your current credit account balance is %{balance} EUR' + accounting: 'Accounting' + your_account: 'Your account'