Remove useless if in invoices form
The created_at field has a value all the time, so the check if it is set make no sense since it evaluates to true all the time.
This commit is contained in:
parent
b30b4e46d8
commit
b623b6abbf
1 changed files with 11 additions and 12 deletions
|
@ -7,18 +7,17 @@
|
||||||
- if @invoice.orders.first
|
- if @invoice.orders.first
|
||||||
%p= t('finance.invoices.linked', what_link: link_to(t('finance.invoices.linked_order'), new_finance_order_path(order_id: @invoice.orders.first.id))).html_safe
|
%p= t('finance.invoices.linked', what_link: link_to(t('finance.invoices.linked_order'), new_finance_order_path(order_id: @invoice.orders.first.id))).html_safe
|
||||||
|
|
||||||
- if @invoice.created_at
|
.fold-line
|
||||||
.fold-line
|
.control-group
|
||||||
.control-group
|
%label.control-label{for: 'created_at'}
|
||||||
%label.control-label{for: 'created_at'}
|
= Invoice.human_attribute_name(:created_at)
|
||||||
= Invoice.human_attribute_name(:created_at)
|
.controls.control-text#article_fc_price
|
||||||
.controls.control-text#article_fc_price
|
= format_date @invoice.created_at
|
||||||
= format_date @invoice.created_at
|
.control-group
|
||||||
.control-group
|
%label.control-label{for: 'created_by'}
|
||||||
%label.control-label{for: 'created_by'}
|
= Invoice.human_attribute_name(:created_by)
|
||||||
= Invoice.human_attribute_name(:created_by)
|
.controls.control-text#article_fc_price
|
||||||
.controls.control-text#article_fc_price
|
= show_user @invoice.created_by
|
||||||
= show_user @invoice.created_by
|
|
||||||
= f.association :supplier, collection: Supplier.order(:name), hint: false
|
= f.association :supplier, collection: Supplier.order(:name), hint: false
|
||||||
= f.input :number
|
= f.input :number
|
||||||
= f.input :date, as: :date_picker
|
= f.input :date, as: :date_picker
|
||||||
|
|
Loading…
Reference in a new issue