<commit_before>section.invoice
  = form_for @invoice, url: users_invoices_path, role: 'form' do |f|
    .row
      .col-xs-12
        h2.page-header
          i.fa.fa-globe
          |  #{current_account.name}
          small.pull-right
            | Date: #{Date.today}
    .row.invoice-info
      .col-sm-4.invoice-col
        |  From 
        address
          strong
            |  #{current_account.name}
          br
          |  #{current_account.address_line_1}
          br
          |  #{current_account.address_line_2}
          br
          |  Phone: #{current_account.phone}
          br
          |  Email: #{current_account.email}
      .col-sm-4.invoice-col
        |  To 
        - client = Client.find(params[:client_id])
        = f.hidden_field :client_id, value: params[:client_id]
        address
          strong
            |  #{client.name}
          br
          |  #{client.address_line_1}
          br
          |  #{client.address_line_2}
          br
          |  Phone: #{client.phone}
          br
          |  Email: #{client.email}
      .col-sm-4.invoice-col
        / b
        /   | Invoice #007612
        / br
        / br
        / b
        /   | Order ID:
        / |  4F3S8J
        / br
        / b
        | Payment Due:
        = f.text_field :due_at, value: Date.today, class: 'form-control'
        br
        / b
        /   | Account:
        / |  968-34567 
    = render partial: 'form', locals: {f: f}

    
    .row.no-print
      .col-xs-12
        = link_to 'Cancel', users_client_path(params[:client_id]), class: 'btn btn-default'
        / a.btn.btn-default[href="invoice-print.html" target="_blank"]
        /   i.fa.fa-print
        /   |  Print
        button.btn.btn-success.pull-right type="submit"
          i.fa.fa-credit-card
          |  Create
        / button.btn.btn-primary.pull-right[style="margin-right: 5px;"]
        /   i.fa.fa-download
        /   |  Generate PDF
.clearfix<commit_msg>Pass client var to form partial<commit_after>- client = Client.by_account(current_account).where(params[:client_id]).first

section.invoice
  = form_for @invoice, url: users_invoices_path, role: 'form' do |f|
    .row
      .col-xs-12
        h2.page-header
          i.fa.fa-globe
          |  #{current_account.name}
          small.pull-right
            | Date: #{Date.today}
    .row.invoice-info
      .col-sm-4.invoice-col
        |  From 
        address
          strong
            |  #{current_account.name}
          br
          |  #{current_account.address_line_1}
          br
          |  #{current_account.address_line_2}
          br
          |  Phone: #{current_account.phone}
          br
          |  Email: #{current_account.email}
      .col-sm-4.invoice-col
        |  To 
        = f.hidden_field :client_id, value: params[:client_id]
        address
          strong
            |  #{client.name}
          br
          |  #{client.address_line_1}
          br
          |  #{client.address_line_2}
          br
          |  Phone: #{client.phone}
          br
          |  Email: #{client.email}
      .col-sm-4.invoice-col
        / b
        /   | Invoice #007612
        / br
        / br
        / b
        /   | Order ID:
        / |  4F3S8J
        / br
        / b
        | Payment Due:
        = f.text_field :due_at, value: Date.today, class: 'form-control'
        br
        / b
        /   | Account:
        / |  968-34567 
    = render partial: 'form', locals: {f: f, client: client}

    
    .row.no-print
      .col-xs-12
        = link_to 'Cancel', users_client_path(params[:client_id]), class: 'btn btn-default'
        / a.btn.btn-default[href="invoice-print.html" target="_blank"]
        /   i.fa.fa-print
        /   |  Print
        button.btn.btn-success.pull-right type="submit"
          i.fa.fa-credit-card
          |  Create
        / button.btn.btn-primary.pull-right[style="margin-right: 5px;"]
        /   i.fa.fa-download
        /   |  Generate PDF
.clearfix
{'fraction_non_alphanumeric': 0.12349397590361445, 'fraction_numerical': 0.015060240963855422, 'mean_word_length': 1.3427395649617873, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5510689', 'n_tokens_mistral': 1351, 'n_tokens_neox': 1327, 'n_words': 219}