R/RGPr_customer_guid.R

Defines functions RGPr_customer_guid

Documented in RGPr_customer_guid

#' Get GUID-CUSTOMER_ID table
#'
#' This allows all calls, including calls for checkins and invoices, to return GUID
#'
#' @param RGPconn this is a connection to an RGP database from RGPr_open_conn
#'
#' @return a tibble containing GUID and CUSTOMER_ID for the current facility
#'
#' @importFrom DBI dbConnect
#' @importFrom RMySQL MySQL
#' @import magrittr
#' @importFrom dplyr tbl select collect
#' @importFrom tibble as_tibble
#'
#' @export
#'

RGPr_customer_guid <- function(RGPconn=NULL){

  customer_guid <- tbl(RGPconn,"customers") %>%
    select(CUSTOMER_ID,GUID) %>%
    collect() %>%
    as_tibble()

}
YourEconProf/RockGymProR documentation built on March 1, 2020, 2:27 a.m.