Sha256: e963161b1ceb005654c9cec926d1c96abce53a758ed8c226c2b9edac971cd4dc

Contents?: true

Size: 1.49 KB

Versions: 1

Compression:

Stored size: 1.49 KB

Contents

%table.pure-table.pure-table-bordered
  %thead
    %tr
      %th Product ID
      %th Product Name
      %th Stock (at time of Order)
      %th Min Stock
      %th Order
      %th Packsize
      %th Stock/Sales history
  %tbody
    - order_items.each do |order_item|
      %tr
        %td
          - if order_item.local_product
            = order_item.local_product.product_id
          - else
            No local product!
        %td
          = local_product_link order_item.local_product
        %td= order_item.current_stock
        %td= order_item.min_stock
        %td
          - if order_item.remote_product_id.present?
            %input.qty(name="item_#{order_item.id}" size="1" value="#{order_item.num_wished}")
            %button.pure-button.order-none
              %i.fa.fa-remove
            - packsize = order_item.local_product.packsize
            - if packsize
              %button.pure-button.plus-pack(data-packsize="#{packsize}")
                %i.fa.fa-plus-square
                %i.fa.fa-cube
              %button.pure-button.minus-pack(data-packsize="#{packsize}")
                %i.fa.fa-minus-square
                %i.fa.fa-cube
            -#(last time X)
          - else
            No remote product
        %td= order_item.local_product.packsize
        %td
          - stock_url = "/product/#{order_item.local_product.id}/stock_sales_plot"
          %a.stock_show_action{:href => "", :data => {url: stock_url, product: order_item.local_product.name}}
            Show Stock/Sale data

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rawbotz-0.1.2 lib/rawbotz/views/order/_item_table.haml