mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
terminado tarifas envio
This commit is contained in:
@ -18,7 +18,7 @@ class TarifaEnvioZonaModel extends \App\Models\GoBaseModel
|
||||
2 => "t1.importe_fijo",
|
||||
];
|
||||
|
||||
protected $allowedFields = ["tarifa_envio_id", "cp_inicial", "cp_final", "importe_fijo"];
|
||||
protected $allowedFields = ["tarifa_envio_id", "cp_inicial", "cp_final", "importe_fijo", "is_deleted", "deleted_at"];
|
||||
protected $returnType = "App\Entities\Tarifas\TarifaEnvioZonaEntity";
|
||||
|
||||
protected $useTimestamps = true;
|
||||
@ -88,14 +88,15 @@ class TarifaEnvioZonaModel extends \App\Models\GoBaseModel
|
||||
*
|
||||
* @return \CodeIgniter\Database\BaseBuilder
|
||||
*/
|
||||
public function getResource(string $search = "")
|
||||
public function getResource(string $search = "", $tarifa_envio_id=-1)
|
||||
{
|
||||
$builder = $this->db
|
||||
->table($this->table . " t1")
|
||||
->select(
|
||||
"t1.cp_inicial AS cp_inicial, t1.cp_final AS cp_final, t1.importe_fijo AS importe_fijo, t2.id AS tarifa_envio"
|
||||
"t1.id as id, t1.cp_inicial AS cp_inicial, t1.cp_final AS cp_final, t1.importe_fijo AS importe_fijo, t2.id AS tarifa_envio"
|
||||
);
|
||||
$builder->join("lg_tarifas_envios t2", "t1.tarifa_envio_id = t2.id", "left");
|
||||
$builder->where("t1.tarifa_envio_id", $tarifa_envio_id);
|
||||
|
||||
//JJO
|
||||
$builder->where("t1.is_deleted", 0);
|
||||
|
||||
Reference in New Issue
Block a user