fix nil pointer~ refs automatic go invoice
This commit is contained in:
parent
1fc582319f
commit
81daddfb10
1 changed files with 8 additions and 7 deletions
|
@ -1,11 +1,12 @@
|
||||||
.row
|
- order.group_orders.includes([:group_order_invoice, :ordergroup]).each do |go|
|
||||||
- order.group_orders.includes([:group_order_invoice, :ordergroup]).each do |go|
|
.row
|
||||||
.row
|
.column.small-3
|
||||||
= label_tag go.ordergroup.name
|
= label_tag go.ordergroup.name
|
||||||
- if go.group_order_invoice
|
- if go.group_order_invoice
|
||||||
|
.column.small-3
|
||||||
= link_to I18n.t('activerecord.attributes.group_order_invoice.links.download'), group_order_invoice_path(go.group_order_invoice, :format => 'pdf'), class: 'btn btn-small'
|
= link_to I18n.t('activerecord.attributes.group_order_invoice.links.download'), group_order_invoice_path(go.group_order_invoice, :format => 'pdf'), class: 'btn btn-small'
|
||||||
|
.column.small-3
|
||||||
= link_to I18n.t('activerecord.attributes.group_order_invoice.links.delete'), go.group_order_invoice, method: :delete, class: 'btn btn-danger btn-small', remote: true
|
= link_to I18n.t('activerecord.attributes.group_order_invoice.links.delete'), go.group_order_invoice, method: :delete, class: 'btn btn-danger btn-small', remote: true
|
||||||
- else
|
- else
|
||||||
= button_to I18n.t('activerecord.attributes.group_order_invoice.links.generate'), group_order_invoices_path(:method => :post, group_order: go) ,class: 'btn btn-small', params: {id: order.id}, remote: true
|
= button_to I18n.t('activerecord.attributes.group_order_invoice.links.generate'), group_order_invoices_path(:method => :post, group_order: go) ,class: 'btn btn-small', params: {id: order.id}, remote: true
|
||||||
%br
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue