foodcoop-adam/foodsoft

View on GitHub
app/views/shared/_article_price_info.html.haml

Summary

Maintainability
Test Coverage
%table.table.table-condensed
  %tr
    %th= t 'activerecord.attributes.article.price'
    %td.numeric= number_to_currency article.price
  %tr
    %th= t 'activerecord.attributes.article.deposit'
    %td.numeric= number_to_currency article.deposit
  %tr
    %th= t 'activerecord.attributes.article.tax'
    %td.numeric= number_to_percentage article.tax
  - unless article.fc_price == article.gross_price
    %tr
      %th= t 'activerecord.attributes.article.fc_share'
      %td.numeric= number_to_currency(article.fc_price-article.gross_price)
  %tr
    %th= t 'activerecord.attributes.article.fc_price'
    %td.numeric= number_to_currency article.fc_price