Reduce foreach()-loops and sql-queries in CRM>Customer: Amount of loops and queries depends now on selected customer(s) and sub-element(s)