Schiess - General Notes
Customer Selection for Export
==========================
Schiess selects customers not by rep (or not all) by the following rule:
rep # export using reps
======= ====================
examples:
PS --- PS <--- this is the way it's done now.
RM --- RM,PS,CM,SM,SK <--- RM would get RM tagged customers along with customers tagged with PS, CM, SM, SK.
NAV table created called FORCEFIELD_SALESREP
The customer selection is like this (note that "$g_rep" is the handheld userid):
if ($for_rep_only) {
$query_stmt .= ' AND EXISTS (SELECT LoadRep FROM FORCEFIELD_SALESREP rep'
. ' WHERE rep.SalesRep = ' . QuoteString($g_rep)
. ' AND rep.LoadRep = cus."Salesperson Code")';