resuelto problema de la tabla de precios y añadida lista a los comerciales

This commit is contained in:
jaimejimenezortega
2024-06-02 19:55:38 +02:00
parent ce753ef926
commit 1d969e5c9f
6 changed files with 5710 additions and 7 deletions

View File

@ -26,4 +26,20 @@ class UserModel extends ShieldUserModel
]
];
public function getComerciales(){
$builder = $this->db
->table("users" . " t1")
->select(
"t1.id AS id, CONCAT(t1.first_name, ' ', t1.last_name) AS text"
);
$builder->where('t1.deleted_at', null);
$builder->where("t2.group", "comercial");
$builder->join("auth_groups_users t2", "t1.id = t2.user_id", "left");
return $builder->get()->getResult();
}
}