trabajando en el form de cliente

This commit is contained in:
2024-06-11 11:02:36 +02:00
parent 2143660cf6
commit 8aa7751060
10 changed files with 209 additions and 10 deletions

View File

@ -12,7 +12,7 @@ class PedidoModel extends \App\Models\BaseModel
* @var bool
*/
protected $useAutoIncrement = true;
const SORTABLE_TODOS = [
0 => "t1.id",
1 => "t1.updated_at",
@ -53,7 +53,7 @@ class PedidoModel extends \App\Models\BaseModel
public static $labelField = "id";
public function getResource(string $search = "", $tarifa_envio_id = -1)
public function getResource(string $search = "", $estado="")
{
$builder = $this->db
->table($this->table . " t1")
@ -71,6 +71,11 @@ class PedidoModel extends \App\Models\BaseModel
$builder->join("users t5", "t5.id = t4.comercial_id", "left");
$builder->join("ubicaciones t6", "t6.id = t2.ubicacion_id", "left");
if($estado != "") {
$builder->where("t1.estado", $estado);
}
// Falta implementar la busqueda por grupos
return empty($search)
? $builder
: $builder