<commit_before>- unless modal?
  = content_for :h1 do
    = current_facility

%div{class: modal? ? "modal-header" : ""}
  = modal_close_button if modal?
  %h3= "Order ##{@order_detail} #{@order_detail.product}"

= simple_form_for @order_detail,
    url: manage_facility_order_order_detail_path(current_facility, @order, @order_detail),
    remote: modal?,
    html: { class: ["manage_order_detail", edit_disabled? ? "disabled" : ""] } do |f|

  %div{class: modal? ? "modal-body" : ""}
    .row
      .span10
        = render "warnings"

    .banner-list
      .row
        = banner_date_label @order_detail, :ordered_at
        = banner_label @order_detail, :created_by_user
        = banner_label @order_detail, :user
        = banner_date_label @order_detail.reservation, :canceled_at
        = banner_label @order_detail.reservation, :canceled_by_user
        = banner_label @order_detail.reservation, :canceled_reason
        = banner_date_label @order_detail, :fulfilled_at
        = banner_date_label @order_detail, :reviewed_at
        = banner_date_label @order_detail, :statement_date do |date|
          - link_to date, statement_path(@order_detail.statement)
        = banner_date_label @order_detail, :journal_date

        - if @order_detail.removable_from_journal?
          .row
            = link_to t(".remove_from_journal"),
              remove_from_journal_facility_order_order_detail_path(current_facility, @order, @order_detail),
              method: :post

    .row
      .span5= account_input(f)

      .span3
        - if @order_statuses
          = f.association :order_status, collection: @order_statuses, label_method: :name_with_level, include_blank: false
        - else
          = f.label :order_status
          = @order_detail.order_status

      - if @order_detail.reservation
        .cancel-fee-option.span2
          = label_tag "with_cancel_fee", class: "checkbox" do
            = check_box_tag "with_cancel_fee",
              1,
              false,
              data: { connect: "#order_detail_order_status_id", show_on: OrderStatus.canceled.first.id }
            = t("facility_order_details.edit.label.with_cancel_fee")

    = render_view_hook "after_order_status", f: f, order_detail: @order_detail

    .row
      - if @order_detail.reservation
        .span5= render "reservation", f: f, reservation: @order_detail.reservation
      - else<commit_msg>[#132384] Show reconciled date on order popup (#799)<commit_after>- unless modal?
  = content_for :h1 do
    = current_facility

%div{class: modal? ? "modal-header" : ""}
  = modal_close_button if modal?
  %h3= "Order ##{@order_detail} #{@order_detail.product}"

= simple_form_for @order_detail,
    url: manage_facility_order_order_detail_path(current_facility, @order, @order_detail),
    remote: modal?,
    html: { class: ["manage_order_detail", edit_disabled? ? "disabled" : ""] } do |f|

  %div{class: modal? ? "modal-body" : ""}
    .row
      .span10
        = render "warnings"

    .banner-list
      .row
        = banner_date_label @order_detail, :ordered_at
        = banner_label @order_detail, :created_by_user
        = banner_label @order_detail, :user
        = banner_date_label @order_detail.reservation, :canceled_at
        = banner_label @order_detail.reservation, :canceled_by_user
        = banner_label @order_detail.reservation, :canceled_reason
        = banner_date_label @order_detail, :fulfilled_at
        = banner_date_label @order_detail, :reviewed_at
        = banner_date_label @order_detail, :statement_date do |date|
          - link_to date, statement_path(@order_detail.statement)
        = banner_date_label @order_detail, :journal_date

        - if @order_detail.removable_from_journal?
          .row
            = link_to t(".remove_from_journal"),
              remove_from_journal_facility_order_order_detail_path(current_facility, @order, @order_detail),
              method: :post

    .row
      .span5= account_input(f)

      .span3
        - if @order_statuses
          = f.association :order_status, collection: @order_statuses, label_method: :name_with_level, include_blank: false
        - else
          = f.label :order_status
          = @order_detail.order_status
          = l(@order_detail.reconciled_at.to_date, format: :usa) if @order_detail.reconciled_at

      - if @order_detail.reservation
        .cancel-fee-option.span2
          = label_tag "with_cancel_fee", class: "checkbox" do
            = check_box_tag "with_cancel_fee",
              1,
              false,
              data: { connect: "#order_detail_order_status_id", show_on: OrderStatus.canceled.first.id }
            = t("facility_order_details.edit.label.with_cancel_fee")

    = render_view_hook "after_order_status", f: f, order_detail: @order_detail

    .row
      - if @order_detail.reservation
        .span5= render "reservation", f: f, reservation: @order_detail.reservation
      - else
{'fraction_non_alphanumeric': 0.1043143609479441, 'fraction_numerical': 0.005468908243872798, 'mean_word_length': 2.928400954653938, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '527194', 'n_tokens_mistral': 1616, 'n_tokens_neox': 1569, 'n_words': 289}