This function retrieves the sales representative code of the logged in user and returns it in a string. It performs a SQL query that joins the sales order and sales representative tables to filter for orders from the user's sales rep. The sales rep code is extracted from the query results and returned enclosed in quotation marks.
This function retrieves the sales representative code of the logged in user and returns it in a string. It performs a SQL query that joins the sales order and sales representative tables to filter for orders from the user's sales rep. The sales rep code is extracted from the query results and returned enclosed in quotation marks.
This function retrieves the sales representative code of the logged in user and returns it in a string. It performs a SQL query that joins the sales order and sales representative tables to filter for orders from the user's sales rep. The sales rep code is extracted from the query results and returned enclosed in quotation marks.