From e678e655da6fc4650489fae3f47ccdea9e872b19 Mon Sep 17 00:00:00 2001 From: Martin Lensment Date: Tue, 14 Apr 2015 15:18:28 +0300 Subject: [PATCH] Add ref no to invoice --- app/models/registrar.rb | 1 + app/views/registrar/invoices/partials/_details.haml | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/models/registrar.rb b/app/models/registrar.rb index 6bf55a865..e2e9a5dda 100644 --- a/app/models/registrar.rb +++ b/app/models/registrar.rb @@ -87,6 +87,7 @@ class Registrar < ActiveRecord::Base buyer_phone: phone, buyer_url: url, buyer_email: email, + reference_no: reference_no, invoice_items_attributes: [ { description: 'prepayment', diff --git a/app/views/registrar/invoices/partials/_details.haml b/app/views/registrar/invoices/partials/_details.haml index 608dade76..7aac2579a 100644 --- a/app/views/registrar/invoices/partials/_details.haml +++ b/app/views/registrar/invoices/partials/_details.haml @@ -1,9 +1,6 @@ %h4= t('details') %hr %dl.dl-horizontal - / %dt= t('document_name') - / %dd= t(@invoice.document_name) - %dt= t('issue_date') %dd= l(@invoice.created_at) @@ -14,4 +11,8 @@ %dd= t(@invoice.payment_term) %dt= t('description') - %dd= @invoice.description + - @invoice.description.prepend(' - ') if @invoice.description.present? + %dd= "#{t('invoice_no', no: @invoice.id)}#{@invoice.description}" + + %dt= t('reference_no') + %dd= @invoice.reference_no