##To be deprecated as this has been moved to abacus_looker project space

view: int_dbt_prod_abacus_adjustments {
   sql_table_name: intelligence.dbt_prod.abacus_adjustments ;;

   dimension: batch_id{
     type: number
     value_format: "0"
     sql: ${TABLE}.batch_id ;;
    }

    dimension: adjustment_item_id{
      type: number
      value_format: "0"
      sql: ${TABLE}.adjustment_item_id ;;
    }

    dimension: ledger_status{
      type: string
      sql: ${TABLE}.ledger_status ;;
    }

    dimension: account_id{
      type: number
      value_format: "0"
      sql: ${TABLE}.account_id ;;
    }

    dimension: account_name{
      type: string
      sql: ${TABLE}.account_name ;;
    }

    dimension: contract_id{
      type: number
      value_format: "0"
      sql: ${TABLE}.contract_id ;;
    }

    dimension: contract_name{
      type: string
      sql: ${TABLE}.contract_name ;;
    }

    dimension: adjustment_amount{
      type: number
      value_format: "0.00"
      sql: ${TABLE}.adjustment_amount ;;
    }

    dimension: adjustment_currency_code{
      type: string
      sql: ${TABLE}.adjustment_currency_code ;;
    }

    dimension: adjustment_type_id{
      type: number
      value_format: "0"
      sql: ${TABLE}.adjustment_type_id ;;
    }

    dimension: oa_category_name{
      type: string
      sql: ${TABLE}.oa_category_name ;;
    }

    dimension: type_name{
      type: string
      sql: ${TABLE}.type_name ;;
      link: {
        label: "Expense Detail"
        url:"

        {% if _explore._name == 'int_dbt_prod_abacus_adjustments' %}

        https://theorchard.looker.com/dashboards/2219?Adjustment+Item+ID={{int_dbt_prod_abacus_adjustments.adjustment_item_id._value }}

        {% endif %}

        "

      }
    }

    dimension: activity_period{
      type: number
      value_format: "0"
      sql: ${TABLE}.activity_period ;;
    }

    dimension: statement_period{
      type: number
      value_format: "0"
      sql: ${TABLE}.statement_period ;;
    }

    dimension: note{
      type: string
      sql: ${TABLE}.note ;;
    }
}
