foodcoop-adam/foodsoft

View on GitHub
app/views/shared/articles_by/_group_single_goa.html.haml

Summary

Maintainability
Test Coverage
%tr{class: [cycle('even', 'odd', :name => 'articles'), if goa.result == 0 then 'unavailable' end], id: "goa_#{goa.id}"}
  %td.name= goa.order_article.article.name
  %td= goa.order_article.article.unit
  %td.center.dimmed= "#{goa.quantity} + #{goa.tolerance}"
  %td.center.input-delta= (edit or true rescue true) ? group_order_article_edit_result(goa) : goa.result
  %td.symbol ×
  %td= number_to_currency(goa.order_article.price.fc_price(goa.group_order.ordergroup))
  %td.symbol =
  %td.price{data: {value: goa.total_price}}= number_to_currency(goa.total_price)
  %td= pkg_helper goa.order_article.price