How to setup a Hierarchy View? |
7/20/2015 2:08:27 AM |
PHPRunner General questions | |
![]() What would be the best way to create a filter so that the user logged in can access only certain "Sales Orders" in a hierarchy environment?
|
|
D
|
DealerModulesDevClub member 7/20/2015 |
What would be the best way to create a filter so that the user logged in can access only certain "Sales Orders" in a hierarchy environment? Example Hierarchy
|
![]() |
Sergey Kornilov admin 7/20/2015 |
The basic idea is to keep the current level of hierarchy is some session variable i.e. $_SESSION["ParentID"]="Homer". Then in AfterTableInit event you can modify query on the fly to only select employees that report directly to Homer: $query->addWhere("ParentID='".$_SESSION["ParentID"]."'");
|