module OA
  class SalesHistoryPage < OA::BasePage
    page_url "/accounting/act_saleshistory.php"

    table(:data, class: "data")

    def current_quarter
      data_element[-2][0].text
    end

    def current_quarter_outstanding_balance
      # header has two rows, so this is weird
      expect(data_element[1][-3].text).to eql "Outstanding Balance"
      data_element[-2][-4].text
    end
  end
end
