<!-- shared/_purchase_information starts -->
<%= start_box t('shared.purchase_information') %>
  <table>
    <tr>
      <th><%= t("activeldap.attributes.#{device.class.to_s.downcase}.puavoPurchaseDate") %></th>
      <td><%= device.puavoPurchaseDate ? device.puavoPurchaseDate.strftime('%Y-%m-%d') : '' %></td>
    </tr>

    <tr>
      <th><%= t("activeldap.attributes.#{device.class.to_s.downcase}.puavoWarrantyEndDate") %></th>
      <td><%= device.puavoWarrantyEndDate ? device.puavoWarrantyEndDate.strftime('%Y-%m-%d') : '' %></td>
    </tr>

    <tr>
      <th><%= t("activeldap.attributes.#{device.class.to_s.downcase}.puavoPurchaseLocation") %></th>
      <td><%= h device.puavoPurchaseLocation %></td>
    </tr>

    <tr>
      <th><%= t("activeldap.attributes.#{device.class.to_s.downcase}.puavoPurchaseURL") %></th>
      <td><%= h device.puavoPurchaseURL %></td>
    </tr>

    <tr>
      <th><%= t("activeldap.attributes.#{device.class.to_s.downcase}.puavoSupportContract") %></th>
      <td><%= h device.puavoSupportContract %></td>
    </tr>

    <% if device.puavoDeviceType != 'bootserver' %>
    <% if device.puavoDeviceExpirationTime && Time.now >= device.puavoDeviceExpirationTime %>
    <tr class="invalidData">
    <% else %>
    <tr>
    <% end %>
      <th><%= t('activeldap.attributes.device.puavoDeviceExpirationTime') %></th>
      <td class="noWrap">
        <% unless device.puavoDeviceExpirationTime.nil? %>
        <%= h(device.puavoDeviceExpirationTime.localtime.strftime('%Y-%m-%d %H:%M:%S')) %>
        <% end %>
      </td>
    </tr>
    <% end %>
  </table>
<%= end_box %>
<!-- shared/_purchase_information ends -->
