mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
trabajando en el form de cliente
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user