Don't allow changes to settled orders (PR #614)
This commit is contained in:
parent
a524dd0325
commit
99052fa3a7
7 changed files with 24 additions and 7 deletions
|
|
@ -9,8 +9,9 @@
|
|||
%acronym{:title => t('shared.articles.received_desc')}= t 'shared.articles.received'
|
||||
%td= t('.total')
|
||||
%td{:colspan => "3",:style => "width:14em"}
|
||||
= link_to t('.add_group'), new_group_order_article_path(order_article_id: order_article.id),
|
||||
remote: true, class: 'btn btn-mini'
|
||||
- unless order_article.order.closed?
|
||||
= link_to t('.add_group'), new_group_order_article_path(order_article_id: order_article.id),
|
||||
remote: true, class: 'btn btn-mini'
|
||||
%tbody
|
||||
- totals = {result: 0}
|
||||
- for group_order_article in order_article.group_order_articles.select { |goa| goa.result > 0 }
|
||||
|
|
@ -21,8 +22,9 @@
|
|||
%td.center= group_order_article_edit_result(group_order_article)
|
||||
%td.numeric= number_to_currency(group_order_article.order_article.price.fc_price * group_order_article.result)
|
||||
%td.actions{:style=>"width:1em"}
|
||||
= link_to t('ui.delete'), group_order_article_path(group_order_article), method: :delete,
|
||||
remote: true, class: 'btn btn-mini btn-danger'
|
||||
- unless order_article.order.closed?
|
||||
= link_to t('ui.delete'), group_order_article_path(group_order_article),
|
||||
method: :delete, remote: true, class: 'btn btn-mini btn-danger'
|
||||
%td
|
||||
- totals[:result] += group_order_article.result
|
||||
%tfoot
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue