mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'feat/tarifa-code' into 'dev/presu_cliente_v2'
Feat/tarifa code See merge request jjimenez/safekat!351
This commit is contained in:
@ -30,15 +30,24 @@ class ConfigErrores extends BaseResourceController
|
|||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
$this->viewData['breadcrumb'] = [
|
||||||
|
['title' => lang("App.menu_configuration"), 'route' => "javascript:void(0);", 'active' => false],
|
||||||
|
['title' => lang("App.menu_error_presupuesto"), 'route' => site_url('configuracion/errores-presupuesto'), 'active' => true]
|
||||||
|
];
|
||||||
return view(static::$viewPath . $this->indexRoute, $this->viewData);
|
return view(static::$viewPath . $this->indexRoute, $this->viewData);
|
||||||
}
|
}
|
||||||
public function viewForm(int $error_presupuesto_id)
|
public function viewForm(int $error_presupuesto_id)
|
||||||
{
|
{
|
||||||
|
$this->viewData['breadcrumb'] = [
|
||||||
|
['title' => lang("App.menu_configuration"), 'route' => "javascript:void(0);", 'active' => false],
|
||||||
|
['title' => lang("App.menu_error_presupuesto"), 'route' => site_url('configuracion/errores-presupuesto'), 'active' => true]
|
||||||
|
];
|
||||||
|
$this->viewData["error_presupuesto_id"] = $error_presupuesto_id;
|
||||||
$this->errorPresupuestoModel->update($error_presupuesto_id, [
|
$this->errorPresupuestoModel->update($error_presupuesto_id, [
|
||||||
"last_user_id" => auth()->user()->id,
|
"last_user_id" => auth()->user()->id,
|
||||||
"visto" => true,
|
"visto" => true,
|
||||||
]);
|
]);
|
||||||
return view(static::$viewPath . 'viewErrorPresupuestoForm', ["error_presupuesto_id" => $error_presupuesto_id]);
|
return view(static::$viewPath . 'viewErrorPresupuestoForm', $this->viewData);
|
||||||
}
|
}
|
||||||
public function store()
|
public function store()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -9,6 +9,7 @@ class TarifaAcabadoEntity extends \CodeIgniter\Entity\Entity
|
|||||||
"id" => null,
|
"id" => null,
|
||||||
"nombre" => null,
|
"nombre" => null,
|
||||||
"code" => null,
|
"code" => null,
|
||||||
|
"comment" => null,
|
||||||
"precio_min" => 0,
|
"precio_min" => 0,
|
||||||
"importe_fijo" => 0,
|
"importe_fijo" => 0,
|
||||||
"mostrar_en_presupuesto" => 1,
|
"mostrar_en_presupuesto" => 1,
|
||||||
@ -23,6 +24,8 @@ class TarifaAcabadoEntity extends \CodeIgniter\Entity\Entity
|
|||||||
];
|
];
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
"precio_min" => "float",
|
"precio_min" => "float",
|
||||||
|
"comment" => "string",
|
||||||
|
"code" => "string",
|
||||||
"importe_fijo" => "float",
|
"importe_fijo" => "float",
|
||||||
"user_created_id" => "int",
|
"user_created_id" => "int",
|
||||||
"user_updated_id" => "int",
|
"user_updated_id" => "int",
|
||||||
|
|||||||
@ -9,6 +9,7 @@ class TarifaEncuadernacionEntity extends \CodeIgniter\Entity\Entity
|
|||||||
protected $attributes = [
|
protected $attributes = [
|
||||||
"id" => null,
|
"id" => null,
|
||||||
"nombre" => null,
|
"nombre" => null,
|
||||||
|
"code" => null,
|
||||||
"mostrar_en_presupuesto" => 1,
|
"mostrar_en_presupuesto" => 1,
|
||||||
"tipo_encuadernacion" => 0,
|
"tipo_encuadernacion" => 0,
|
||||||
"servicio_encuadernacion" => 0,
|
"servicio_encuadernacion" => 0,
|
||||||
@ -22,6 +23,7 @@ class TarifaEncuadernacionEntity extends \CodeIgniter\Entity\Entity
|
|||||||
];
|
];
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
"mostrar_en_presupuesto" => "int",
|
"mostrar_en_presupuesto" => "int",
|
||||||
|
"code" => "string",
|
||||||
"tipo_encuadernacion" => "int",
|
"tipo_encuadernacion" => "int",
|
||||||
"servicio_encuadernacion" => "int",
|
"servicio_encuadernacion" => "int",
|
||||||
"por_horas" => "int",
|
"por_horas" => "int",
|
||||||
|
|||||||
@ -9,6 +9,8 @@ class TarifaEnvioEntity extends \CodeIgniter\Entity\Entity
|
|||||||
"id" => null,
|
"id" => null,
|
||||||
"pais_id" => null,
|
"pais_id" => null,
|
||||||
"nombre" => null,
|
"nombre" => null,
|
||||||
|
"code" => null,
|
||||||
|
"comment" => null,
|
||||||
"user_created_id" => 0,
|
"user_created_id" => 0,
|
||||||
"user_updated_id" => 0,
|
"user_updated_id" => 0,
|
||||||
"is_deleted" => 0,
|
"is_deleted" => 0,
|
||||||
@ -17,6 +19,8 @@ class TarifaEnvioEntity extends \CodeIgniter\Entity\Entity
|
|||||||
];
|
];
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
"pais_id" => "?int",
|
"pais_id" => "?int",
|
||||||
|
"code" => "string",
|
||||||
|
"comment" => "string",
|
||||||
"user_created_id" => "int",
|
"user_created_id" => "int",
|
||||||
"user_updated_id" => "int",
|
"user_updated_id" => "int",
|
||||||
"is_deleted" => "int",
|
"is_deleted" => "int",
|
||||||
|
|||||||
@ -9,6 +9,8 @@ class TarifaManipuladoEntity extends \CodeIgniter\Entity\Entity
|
|||||||
protected $attributes = [
|
protected $attributes = [
|
||||||
"id" => null,
|
"id" => null,
|
||||||
"nombre" => null,
|
"nombre" => null,
|
||||||
|
"code" => null,
|
||||||
|
"comment" => null,
|
||||||
"precio_min" => 0,
|
"precio_min" => 0,
|
||||||
"importe_fijo" => 0,
|
"importe_fijo" => 0,
|
||||||
"mostrar_en_presupuesto" => 1,
|
"mostrar_en_presupuesto" => 1,
|
||||||
@ -22,6 +24,8 @@ class TarifaManipuladoEntity extends \CodeIgniter\Entity\Entity
|
|||||||
protected $casts = [
|
protected $casts = [
|
||||||
"precio_min" => "float",
|
"precio_min" => "float",
|
||||||
"importe_fijo" => "float",
|
"importe_fijo" => "float",
|
||||||
|
"code" => "string",
|
||||||
|
"comment" => "string",
|
||||||
"mostrar_en_presupuesto" => "int",
|
"mostrar_en_presupuesto" => "int",
|
||||||
"user_created_id" => "int",
|
"user_created_id" => "int",
|
||||||
"user_updated_id" => "int",
|
"user_updated_id" => "int",
|
||||||
|
|||||||
@ -8,6 +8,8 @@ class TarifaextraEntity extends \CodeIgniter\Entity\Entity
|
|||||||
protected $attributes = [
|
protected $attributes = [
|
||||||
"id" => null,
|
"id" => null,
|
||||||
"nombre" => null,
|
"nombre" => null,
|
||||||
|
"code" => null,
|
||||||
|
"comment" => null,
|
||||||
"precio" => null,
|
"precio" => null,
|
||||||
"margen" => 0,
|
"margen" => 0,
|
||||||
"mostrar_en_presupuesto" => 1,
|
"mostrar_en_presupuesto" => 1,
|
||||||
@ -20,6 +22,8 @@ class TarifaextraEntity extends \CodeIgniter\Entity\Entity
|
|||||||
];
|
];
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
"precio" => "float",
|
"precio" => "float",
|
||||||
|
"code" => "string",
|
||||||
|
"comment" => "string",
|
||||||
"margen" => "float",
|
"margen" => "float",
|
||||||
"mostrar_en_presupuesto" => "int",
|
"mostrar_en_presupuesto" => "int",
|
||||||
"user_created_id" => "int",
|
"user_created_id" => "int",
|
||||||
|
|||||||
@ -8,6 +8,8 @@ class TarifapreimpresionEntity extends \CodeIgniter\Entity\Entity
|
|||||||
protected $attributes = [
|
protected $attributes = [
|
||||||
"id" => null,
|
"id" => null,
|
||||||
"nombre" => null,
|
"nombre" => null,
|
||||||
|
"code" => null,
|
||||||
|
"comment" => null,
|
||||||
"precio" => null,
|
"precio" => null,
|
||||||
"margen" => 0,
|
"margen" => 0,
|
||||||
"mostrar_en_presupuesto" => 1,
|
"mostrar_en_presupuesto" => 1,
|
||||||
@ -21,6 +23,8 @@ class TarifapreimpresionEntity extends \CodeIgniter\Entity\Entity
|
|||||||
protected $casts = [
|
protected $casts = [
|
||||||
"precio" => "float",
|
"precio" => "float",
|
||||||
"margen" => "float",
|
"margen" => "float",
|
||||||
|
"code" => "string",
|
||||||
|
"comment" => "string",
|
||||||
"mostrar_en_presupuesto" => "int",
|
"mostrar_en_presupuesto" => "int",
|
||||||
"user_created_id" => "int",
|
"user_created_id" => "int",
|
||||||
"user_update_id" => "int",
|
"user_update_id" => "int",
|
||||||
|
|||||||
@ -10,6 +10,9 @@ return [
|
|||||||
'id' => 'ID',
|
'id' => 'ID',
|
||||||
'moduleTitle' => 'Finishing Rates',
|
'moduleTitle' => 'Finishing Rates',
|
||||||
'nombre' => 'Name',
|
'nombre' => 'Name',
|
||||||
|
'code' => 'Código',
|
||||||
|
'comment' => 'Comentario',
|
||||||
|
'comment_placeholder' => 'Inserte un comentario',
|
||||||
'precioMax' => 'Price Max',
|
'precioMax' => 'Price Max',
|
||||||
'precioMin' => 'Price Min',
|
'precioMin' => 'Price Min',
|
||||||
'precioMin' => 'Min Price',
|
'precioMin' => 'Min Price',
|
||||||
|
|||||||
@ -10,6 +10,9 @@ return [
|
|||||||
'id' => 'ID',
|
'id' => 'ID',
|
||||||
'moduleTitle' => 'Tarifas Encuadernación',
|
'moduleTitle' => 'Tarifas Encuadernación',
|
||||||
'nombre' => 'Nombre',
|
'nombre' => 'Nombre',
|
||||||
|
'code' => 'Código',
|
||||||
|
'comment' => 'Comentario',
|
||||||
|
'comment_placeholder' => 'Inserte un comentario',
|
||||||
'precioMax' => 'Precio T. Mín',
|
'precioMax' => 'Precio T. Mín',
|
||||||
'precioMin' => 'Precio T. Máx',
|
'precioMin' => 'Precio T. Máx',
|
||||||
'importeFijo' => 'Importe Fijo',
|
'importeFijo' => 'Importe Fijo',
|
||||||
|
|||||||
@ -7,6 +7,9 @@ return [
|
|||||||
'id' => 'ID',
|
'id' => 'ID',
|
||||||
'moduleTitle' => 'Tarifas Servicios Extra',
|
'moduleTitle' => 'Tarifas Servicios Extra',
|
||||||
'nombre' => 'Nombre',
|
'nombre' => 'Nombre',
|
||||||
|
'code' => 'Código',
|
||||||
|
'comment' => 'Comentario',
|
||||||
|
'comment_placeholder' => 'Inserte un comentario',
|
||||||
'precio' => 'Precio',
|
'precio' => 'Precio',
|
||||||
'precioMin' => 'Precio Mínimo',
|
'precioMin' => 'Precio Mínimo',
|
||||||
'importeFijo' => 'Importe Fijo',
|
'importeFijo' => 'Importe Fijo',
|
||||||
|
|||||||
@ -10,6 +10,9 @@ return [
|
|||||||
'id' => 'ID',
|
'id' => 'ID',
|
||||||
'moduleTitle' => 'Tarifas Manipulado',
|
'moduleTitle' => 'Tarifas Manipulado',
|
||||||
'nombre' => 'Nombre',
|
'nombre' => 'Nombre',
|
||||||
|
'code' => 'Código',
|
||||||
|
'comment' => 'Comentario',
|
||||||
|
'comment_placeholder' => 'Inserte un comentario',
|
||||||
'importeMinimo' => 'Importe mínimo',
|
'importeMinimo' => 'Importe mínimo',
|
||||||
'precioMax' => 'Precio T. Mín',
|
'precioMax' => 'Precio T. Mín',
|
||||||
'precioMin' => 'Precio T. Máx',
|
'precioMin' => 'Precio T. Máx',
|
||||||
|
|||||||
@ -7,6 +7,9 @@ return [
|
|||||||
'id' => 'ID',
|
'id' => 'ID',
|
||||||
'moduleTitle' => 'Tarifas Preimpresión',
|
'moduleTitle' => 'Tarifas Preimpresión',
|
||||||
'nombre' => 'Nombre',
|
'nombre' => 'Nombre',
|
||||||
|
'code' => 'Código',
|
||||||
|
'comment' => 'Comentario',
|
||||||
|
'comment_placeholder' => 'Inserte un comentario',
|
||||||
'precio' => 'Precio',
|
'precio' => 'Precio',
|
||||||
'precioMin' => 'Precio Mínimo',
|
'precioMin' => 'Precio Mínimo',
|
||||||
'importeFijo' => 'Importe Fijo',
|
'importeFijo' => 'Importe Fijo',
|
||||||
@ -25,7 +28,16 @@ return [
|
|||||||
'required' => 'El campo {field} es obligatorio.',
|
'required' => 'El campo {field} es obligatorio.',
|
||||||
|
|
||||||
],
|
],
|
||||||
|
'code' => [
|
||||||
|
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||||
|
'required' => 'El campo {field} es obligatorio.',
|
||||||
|
|
||||||
|
],
|
||||||
|
'comment' => [
|
||||||
|
'max_length' => 'El campo {field} no puede exceder {param} caracteres en longitud.',
|
||||||
|
'required' => 'El campo {field} es obligatorio.',
|
||||||
|
|
||||||
|
],
|
||||||
'precio' => [
|
'precio' => [
|
||||||
'decimal' => 'El campo {field} debe contener un número decimal.',
|
'decimal' => 'El campo {field} debe contener un número decimal.',
|
||||||
'required' => 'El campo {field} es obligatorio.',
|
'required' => 'El campo {field} es obligatorio.',
|
||||||
|
|||||||
@ -9,6 +9,9 @@ return [
|
|||||||
'isDeleted' => 'Is Deleted',
|
'isDeleted' => 'Is Deleted',
|
||||||
'moduleTitle' => 'Tarifas Envíos',
|
'moduleTitle' => 'Tarifas Envíos',
|
||||||
'nombre' => 'Nombre',
|
'nombre' => 'Nombre',
|
||||||
|
'code' => 'Código',
|
||||||
|
'comment' => 'Comentario',
|
||||||
|
'comment_placeholder' => 'Inserte un comentario',
|
||||||
'paisId' => 'Pais',
|
'paisId' => 'Pais',
|
||||||
'tarifaEnvio' => 'Tarifa Envío',
|
'tarifaEnvio' => 'Tarifa Envío',
|
||||||
'tarifaEnvioList' => 'Lista Tarifas Envío',
|
'tarifaEnvioList' => 'Lista Tarifas Envío',
|
||||||
|
|||||||
@ -22,6 +22,7 @@ class TarifaAcabadoModel extends \App\Models\BaseModel
|
|||||||
protected $allowedFields = [
|
protected $allowedFields = [
|
||||||
"nombre",
|
"nombre",
|
||||||
"code",
|
"code",
|
||||||
|
"comment",
|
||||||
"precio_min",
|
"precio_min",
|
||||||
"importe_fijo",
|
"importe_fijo",
|
||||||
"mostrar_en_presupuesto",
|
"mostrar_en_presupuesto",
|
||||||
@ -84,7 +85,7 @@ class TarifaAcabadoModel extends \App\Models\BaseModel
|
|||||||
public function getResource(string $search = "")
|
public function getResource(string $search = "")
|
||||||
{
|
{
|
||||||
$builder = $this->db->table($this->table . " t1")->select(
|
$builder = $this->db->table($this->table . " t1")->select(
|
||||||
"t1.id AS id, t1.nombre AS nombre, t1.precio_min AS precio_min, t1.importe_fijo AS importe_fijo,
|
"t1.id AS id, t1.nombre AS nombre,t1.code AS code, t1.precio_min AS precio_min, t1.importe_fijo AS importe_fijo,
|
||||||
t1.mostrar_en_presupuesto AS mostrar_en_presupuesto, t1.acabado_cubierta AS acabado_cubierta, t1.acabado_sobrecubierta AS acabado_sobrecubierta"
|
t1.mostrar_en_presupuesto AS mostrar_en_presupuesto, t1.acabado_cubierta AS acabado_cubierta, t1.acabado_sobrecubierta AS acabado_sobrecubierta"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -22,6 +22,8 @@ class TarifaEncuadernacionModel extends \App\Models\BaseModel
|
|||||||
|
|
||||||
protected $allowedFields = [
|
protected $allowedFields = [
|
||||||
"nombre",
|
"nombre",
|
||||||
|
"code",
|
||||||
|
"comment",
|
||||||
"mostrar_en_presupuesto",
|
"mostrar_en_presupuesto",
|
||||||
"tipo_encuadernacion",
|
"tipo_encuadernacion",
|
||||||
"servicio_encuadernacion",
|
"servicio_encuadernacion",
|
||||||
@ -65,7 +67,7 @@ class TarifaEncuadernacionModel extends \App\Models\BaseModel
|
|||||||
*/
|
*/
|
||||||
public function getResource(string $search = "")
|
public function getResource(string $search = "")
|
||||||
{
|
{
|
||||||
$builder = $this->db->table($this->table . " t1")->select("t1.id AS id, t1.nombre AS nombre,
|
$builder = $this->db->table($this->table . " t1")->select("t1.id AS id, t1.nombre AS nombre, t1.code AS code,
|
||||||
t1.mostrar_en_presupuesto AS mostrar_en_presupuesto,
|
t1.mostrar_en_presupuesto AS mostrar_en_presupuesto,
|
||||||
t1.tipo_encuadernacion AS tipo_encuadernacion, t1.servicio_encuadernacion AS servicio_encuadernacion,
|
t1.tipo_encuadernacion AS tipo_encuadernacion, t1.servicio_encuadernacion AS servicio_encuadernacion,
|
||||||
t1.por_horas AS por_horas");
|
t1.por_horas AS por_horas");
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Models\Tarifas;
|
namespace App\Models\Tarifas;
|
||||||
|
|
||||||
class TarifaEnvioModel extends \App\Models\BaseModel
|
class TarifaEnvioModel extends \App\Models\BaseModel
|
||||||
@ -17,7 +18,7 @@ class TarifaEnvioModel extends \App\Models\BaseModel
|
|||||||
1 => "t2.nombre",
|
1 => "t2.nombre",
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $allowedFields = ["pais_id", "nombre","deleted_at","is_deleted"];
|
protected $allowedFields = ["pais_id", "nombre", "code", "comment", "deleted_at", "is_deleted"];
|
||||||
protected $returnType = "App\Entities\Tarifas\TarifaEnvioEntity";
|
protected $returnType = "App\Entities\Tarifas\TarifaEnvioEntity";
|
||||||
|
|
||||||
protected $useTimestamps = true;
|
protected $useTimestamps = true;
|
||||||
@ -73,7 +74,7 @@ class TarifaEnvioModel extends \App\Models\BaseModel
|
|||||||
*/
|
*/
|
||||||
public function getResource(string $search = "")
|
public function getResource(string $search = "")
|
||||||
{
|
{
|
||||||
$builder = $this->db->table($this->table . " t1")->select("t1.id as id, t1.nombre AS nombre, t2.nombre AS pais_id");
|
$builder = $this->db->table($this->table . " t1")->select("t1.id as id, t1.nombre AS nombre,t1.code AS code, t2.nombre AS pais_id");
|
||||||
$builder->join("lg_paises t2", "t1.pais_id = t2.id", "left");
|
$builder->join("lg_paises t2", "t1.pais_id = t2.id", "left");
|
||||||
|
|
||||||
//JJO
|
//JJO
|
||||||
@ -82,43 +83,44 @@ class TarifaEnvioModel extends \App\Models\BaseModel
|
|||||||
return empty($search)
|
return empty($search)
|
||||||
? $builder
|
? $builder
|
||||||
: $builder
|
: $builder
|
||||||
->groupStart()
|
->groupStart()
|
||||||
->like("t1.nombre", $search)
|
->like("t1.nombre", $search)
|
||||||
->orLike("t2.id", $search)
|
->orLike("t2.code", $search)
|
||||||
->orLike("t1.pais_id", $search)
|
->orLike("t2.id", $search)
|
||||||
->orLike("t1.nombre", $search)
|
->orLike("t1.pais_id", $search)
|
||||||
->orLike("t2.nombre", $search)
|
->orLike("t1.nombre", $search)
|
||||||
->groupEnd();
|
->orLike("t2.nombre", $search)
|
||||||
|
->groupEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTarifaEnvio($paisId, string $cp, $peso, $tipo_envio){
|
public function getTarifaEnvio($paisId, string $cp, $peso, $tipo_envio)
|
||||||
|
{
|
||||||
// Si el pais es españa se tienen que tener en cuenta los postales
|
// Si el pais es españa se tienen que tener en cuenta los postales
|
||||||
// Se busca primero la tarifa a la que corresponde
|
// Se busca primero la tarifa a la que corresponde
|
||||||
$builder = $this->db->table($this->table . " t1")
|
$builder = $this->db->table($this->table . " t1")
|
||||||
->select("t1.id AS tarifa_envio_id, t2.importe_fijo as importe_fijo")
|
->select("t1.id AS tarifa_envio_id, t2.importe_fijo as importe_fijo")
|
||||||
->join("tarifas_envios_zonas t2", "t1.id = t2.tarifa_envio_id")
|
->join("tarifas_envios_zonas t2", "t1.id = t2.tarifa_envio_id")
|
||||||
->where("t1.pais_id", $paisId)
|
->where("t1.pais_id", $paisId)
|
||||||
->where("t1.is_deleted", 0)
|
->where("t1.is_deleted", 0)
|
||||||
->where("t2.is_deleted", 0);
|
->where("t2.is_deleted", 0);
|
||||||
|
|
||||||
if($paisId == 1) {// España
|
if ($paisId == 1) { // España
|
||||||
$builder->where("CAST(t2.cp_inicial AS UNSIGNED)<=", intval($cp))
|
$builder->where("CAST(t2.cp_inicial AS UNSIGNED)<=", intval($cp))
|
||||||
->where("CAST(t2.cp_final AS UNSIGNED) >=", intval($cp));
|
->where("CAST(t2.cp_final AS UNSIGNED) >=", intval($cp));
|
||||||
}
|
}
|
||||||
$tarifas = $builder->get()->getResultObject();
|
$tarifas = $builder->get()->getResultObject();
|
||||||
|
|
||||||
$resultado = [];
|
$resultado = [];
|
||||||
|
|
||||||
$model = model('App\Models\Tarifas\TarifaEnvioPrecioModel');
|
$model = model('App\Models\Tarifas\TarifaEnvioPrecioModel');
|
||||||
foreach($tarifas as $tarifa){
|
foreach ($tarifas as $tarifa) {
|
||||||
$precio_tarifas = $model->getEnvioPrecio($tarifa->tarifa_envio_id, $peso, $tipo_envio);
|
$precio_tarifas = $model->getEnvioPrecio($tarifa->tarifa_envio_id, $peso, $tipo_envio);
|
||||||
foreach($precio_tarifas as $precio_tarifa){
|
foreach ($precio_tarifas as $precio_tarifa) {
|
||||||
$precio_tarifa->importe_fijo = $tarifa->importe_fijo;
|
$precio_tarifa->importe_fijo = $tarifa->importe_fijo;
|
||||||
array_push($resultado, $precio_tarifa);
|
array_push($resultado, $precio_tarifa);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $resultado;
|
return $resultado;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,6 +22,8 @@ class TarifaManipuladoModel extends \App\Models\BaseModel
|
|||||||
protected $allowedFields = [
|
protected $allowedFields = [
|
||||||
"nombre",
|
"nombre",
|
||||||
"precio_min",
|
"precio_min",
|
||||||
|
"code",
|
||||||
|
"comment",
|
||||||
"importe_fijo",
|
"importe_fijo",
|
||||||
"mostrar_en_presupuesto",
|
"mostrar_en_presupuesto",
|
||||||
"deleted_at",
|
"deleted_at",
|
||||||
@ -80,7 +82,7 @@ class TarifaManipuladoModel extends \App\Models\BaseModel
|
|||||||
*/
|
*/
|
||||||
public function getResource(string $search = "")
|
public function getResource(string $search = "")
|
||||||
{
|
{
|
||||||
$builder = $this->db->table($this->table . " t1")->select("t1.id AS id, t1.nombre AS nombre, t1.precio_min AS precio_min, t1.importe_fijo AS importe_fijo
|
$builder = $this->db->table($this->table . " t1")->select("t1.id AS id,t1.code AS code, t1.nombre AS nombre, t1.precio_min AS precio_min, t1.importe_fijo AS importe_fijo
|
||||||
,t1.mostrar_en_presupuesto AS mostrar_en_presupuesto");
|
,t1.mostrar_en_presupuesto AS mostrar_en_presupuesto");
|
||||||
|
|
||||||
//JJO
|
//JJO
|
||||||
|
|||||||
@ -13,7 +13,9 @@ class TarifaextraModel extends \App\Models\BaseModel
|
|||||||
protected $useAutoIncrement = true;
|
protected $useAutoIncrement = true;
|
||||||
|
|
||||||
protected $allowedFields = [
|
protected $allowedFields = [
|
||||||
"nombre",
|
"nombre",
|
||||||
|
"code",
|
||||||
|
"comment",
|
||||||
"precio",
|
"precio",
|
||||||
"margen",
|
"margen",
|
||||||
"mostrar_en_presupuesto",
|
"mostrar_en_presupuesto",
|
||||||
|
|||||||
@ -13,7 +13,9 @@ class TarifapreimpresionModel extends \App\Models\BaseModel
|
|||||||
protected $useAutoIncrement = true;
|
protected $useAutoIncrement = true;
|
||||||
|
|
||||||
protected $allowedFields = [
|
protected $allowedFields = [
|
||||||
"nombre",
|
"nombre",
|
||||||
|
"code",
|
||||||
|
"comment",
|
||||||
"precio",
|
"precio",
|
||||||
"margen",
|
"margen",
|
||||||
"mostrar_en_presupuesto",
|
"mostrar_en_presupuesto",
|
||||||
@ -37,6 +39,14 @@ class TarifapreimpresionModel extends \App\Models\BaseModel
|
|||||||
"label" => "Tarifapreimpresion.nombre",
|
"label" => "Tarifapreimpresion.nombre",
|
||||||
"rules" => "trim|required|max_length[255]",
|
"rules" => "trim|required|max_length[255]",
|
||||||
],
|
],
|
||||||
|
"code" => [
|
||||||
|
"label" => "Tarifapreimpresion.code",
|
||||||
|
"rules" => "trim|required|max_length[5]",
|
||||||
|
],
|
||||||
|
"comment" => [
|
||||||
|
"label" => "Tarifapreimpresion.comment",
|
||||||
|
"rules" => "trim|max_length[255]",
|
||||||
|
],
|
||||||
"precio" => [
|
"precio" => [
|
||||||
"label" => "Tarifapreimpresion.precio",
|
"label" => "Tarifapreimpresion.precio",
|
||||||
"rules" => "required|decimal",
|
"rules" => "required|decimal",
|
||||||
@ -52,6 +62,14 @@ class TarifapreimpresionModel extends \App\Models\BaseModel
|
|||||||
"max_length" => "Tarifapreimpresion.validation.nombre.max_length",
|
"max_length" => "Tarifapreimpresion.validation.nombre.max_length",
|
||||||
"required" => "Tarifapreimpresion.validation.nombre.required",
|
"required" => "Tarifapreimpresion.validation.nombre.required",
|
||||||
],
|
],
|
||||||
|
"code" => [
|
||||||
|
"max_length" => "Tarifapreimpresion.validation.code.max_length",
|
||||||
|
"required" => "Tarifapreimpresion.validation.code.required",
|
||||||
|
],
|
||||||
|
"comment" => [
|
||||||
|
"max_length" => "Tarifapreimpresion.validation.comment.max_length",
|
||||||
|
"required" => "Tarifapreimpresion.validation.comment.required",
|
||||||
|
],
|
||||||
"precio" => [
|
"precio" => [
|
||||||
"decimal" => "Tarifapreimpresion.validation.precio.decimal",
|
"decimal" => "Tarifapreimpresion.validation.precio.decimal",
|
||||||
"required" => "Tarifapreimpresion.validation.precio.required",
|
"required" => "Tarifapreimpresion.validation.precio.required",
|
||||||
|
|||||||
@ -25,7 +25,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-2 overflow-hidden w-20">
|
<div class="col-md-2 overflow-hidden w-20">
|
||||||
<label class="switch switch-square switch-lg">
|
<label class="switch switch-square switch-lg">
|
||||||
<input type="checkbox" class="switch-input" id="error-presupuesto-visto" name="visto" disabled>
|
<input type="checkbox" class="switch-input" id="error-presupuesto-visto" name="visto"
|
||||||
|
disabled>
|
||||||
<span class="switch-toggle-slider">
|
<span class="switch-toggle-slider">
|
||||||
<span class="switch-on">
|
<span class="switch-on">
|
||||||
<i class="ti ti-eye"></i>
|
<i class="ti ti-eye"></i>
|
||||||
@ -46,8 +47,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 mb-3 overflow-hidden">
|
<div class="col-md-6 mb-3 overflow-hidden">
|
||||||
<label for="error-presupuesto">Error</label>
|
<label for="error-presupuesto">Error</label>
|
||||||
<textarea rows="10" class="form-control" id="error-presupuesto-text"
|
<textarea rows="10" class="form-control" id="error-presupuesto-text" placeholder="Error"
|
||||||
placeholder="Error" disabled></textarea>
|
disabled></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12 mb-3 overflow-hidden">
|
<div class="col-md-12 mb-3 overflow-hidden">
|
||||||
<label for="comments-presupuesto">Comentarios</label>
|
<label for="comments-presupuesto">Comentarios</label>
|
||||||
@ -56,23 +57,28 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<button class="btn btn-primary button-update-comment w-100" type="button">
|
<button class="btn btn-primary button-update-comment" type="button">
|
||||||
<span class="ti ti-sm ti-send me-1" id="update-button-icon"></span>
|
<span class="ti ti-sm ti-send me-1" id="update-button-icon"></span>
|
||||||
<span class="spinner-border me-1" role="status" aria-hidden="true" id="update-button-loader" hidden></span>
|
<span class="spinner-border me-1" role="status" aria-hidden="true"
|
||||||
|
id="update-button-loader" hidden></span>
|
||||||
<?= lang("App.global_save") ?></button>
|
<?= lang("App.global_save") ?></button>
|
||||||
|
<a class="btn btn-secondary" href="<?= route_to("erroresPresupuestoIndex") ?>"
|
||||||
|
class="btn btn-secondary"><?= lang("App.global_come_back") ?>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<!--//.card-body -->
|
|
||||||
<div class="card-footer">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!--//.card-footer -->
|
|
||||||
</div>
|
</div>
|
||||||
<!--//.card -->
|
<!--//.card-body -->
|
||||||
|
<div class="card-footer">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!--//.card-footer -->
|
||||||
|
</div>
|
||||||
|
<!--//.card -->
|
||||||
</div>
|
</div>
|
||||||
<!--//.col -->
|
<!--//.col -->
|
||||||
<!--//.row -->
|
<!--//.row -->
|
||||||
|
|||||||
@ -5,15 +5,26 @@
|
|||||||
<?= lang('Tarifaacabado.nombre') ?>*
|
<?= lang('Tarifaacabado.nombre') ?>*
|
||||||
</label>
|
</label>
|
||||||
<input type="text" id="nombre" name="nombre" maxLength="255" class="form-control"
|
<input type="text" id="nombre" name="nombre" maxLength="255" class="form-control"
|
||||||
value="<?= old('nombre', $tarifaacabadoEntity->nombre) ?>">
|
value="<?= old('nombre', $tarifaacabadoEntity->nombre) ?>">
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="code" class="form-label">
|
||||||
|
<?= lang('Tarifaacabado.code') ?>
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
id="code"
|
||||||
|
name="code"
|
||||||
|
maxLength="5"
|
||||||
|
class="form-control"
|
||||||
|
value="<?= old('code', $tarifaacabadoEntity->code) ?>">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="nombre" class="form-label">
|
<label for="nombre" class="form-label">
|
||||||
<?= lang('Tarifaacabado.precioMin') ?>*
|
<?= lang('Tarifaacabado.precioMin') ?>*
|
||||||
</label>
|
</label>
|
||||||
<input type="text" id="precio_min" name="precio_min" class="form-control"
|
<input type="text" id="precio_min" name="precio_min" class="form-control"
|
||||||
value="<?= old('precio_min', $tarifaacabadoEntity->precio_min) ?>">
|
value="<?= old('precio_min', $tarifaacabadoEntity->precio_min) ?>">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
@ -21,9 +32,21 @@
|
|||||||
<?= lang('Tarifaacabado.importeFijo') ?>*
|
<?= lang('Tarifaacabado.importeFijo') ?>*
|
||||||
</label>
|
</label>
|
||||||
<input type="text" id="importe_fijo" name="importe_fijo" class="form-control"
|
<input type="text" id="importe_fijo" name="importe_fijo" class="form-control"
|
||||||
value="<?= old('importe_fijo', $tarifaacabadoEntity->importe_fijo) ?>">
|
value="<?= old('importe_fijo', $tarifaacabadoEntity->importe_fijo) ?>">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="comment" class="form-label">
|
||||||
|
<?= lang('Tarifaacabado.comment') ?>
|
||||||
|
</label>
|
||||||
|
<textarea
|
||||||
|
id="comment"
|
||||||
|
name="comment"
|
||||||
|
rows="5"
|
||||||
|
cols="10"
|
||||||
|
placeholder="<?= lang('Tarifaacabado.comment_placeholder') ?>"
|
||||||
|
class="form-control"><?= old('comment', $tarifaacabadoEntity->comment) ?></textarea>
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<label for="mostrar_en_presupuesto" class="form-check-label">
|
<label for="mostrar_en_presupuesto" class="form-check-label">
|
||||||
@ -32,7 +55,6 @@
|
|||||||
</label>
|
</label>
|
||||||
</div><!--//.form-check -->
|
</div><!--//.form-check -->
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<label for="acabado_cubierta" class="form-check-label">
|
<label for="acabado_cubierta" class="form-check-label">
|
||||||
|
|||||||
@ -17,6 +17,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= lang('Tarifaacabado.nombre') ?></th>
|
<th><?= lang('Tarifaacabado.nombre') ?></th>
|
||||||
|
<th><?= lang('Tarifaacabado.code') ?></th>
|
||||||
<th><?= lang('Tarifaacabado.precioMin') ?></th>
|
<th><?= lang('Tarifaacabado.precioMin') ?></th>
|
||||||
<th><?= lang('Tarifaacabado.importeFijo') ?></th>
|
<th><?= lang('Tarifaacabado.importeFijo') ?></th>
|
||||||
<th><?= lang('Tarifaacabado.mostrar_en_presupuesto') ?></th>
|
<th><?= lang('Tarifaacabado.mostrar_en_presupuesto') ?></th>
|
||||||
@ -90,6 +91,7 @@
|
|||||||
],
|
],
|
||||||
columns : [
|
columns : [
|
||||||
{ 'data': 'nombre' },
|
{ 'data': 'nombre' },
|
||||||
|
{ 'data': 'code' },
|
||||||
{ 'data': 'precio_min' },
|
{ 'data': 'precio_min' },
|
||||||
{ 'data': 'importe_fijo' },
|
{ 'data': 'importe_fijo' },
|
||||||
{ 'data': 'mostrar_en_presupuesto' },
|
{ 'data': 'mostrar_en_presupuesto' },
|
||||||
|
|||||||
@ -7,13 +7,37 @@
|
|||||||
</label>
|
</label>
|
||||||
<input type="text" id="nombre" name="nombre" maxLength="255" class="form-control" value="<?=old('nombre', $tarifaEncuadernacionEntity->nombre) ?>">
|
<input type="text" id="nombre" name="nombre" maxLength="255" class="form-control" value="<?=old('nombre', $tarifaEncuadernacionEntity->nombre) ?>">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="code" class="form-label">
|
||||||
|
<?= lang('Tarifaencuadernacion.code') ?>
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
id="code"
|
||||||
|
name="code"
|
||||||
|
maxLength="5"
|
||||||
|
class="form-control"
|
||||||
|
value="<?= old('code', $tarifaEncuadernacionEntity->code) ?>">
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="comment" class="form-label">
|
||||||
|
<?= lang('Tarifaencuadernacion.comment') ?>
|
||||||
|
</label>
|
||||||
|
<textarea
|
||||||
|
id="comment"
|
||||||
|
name="comment"
|
||||||
|
rows="5"
|
||||||
|
cols="10"
|
||||||
|
placeholder="<?= lang('Tarifaencuadernacion.comment_placeholder') ?>"
|
||||||
|
class="form-control"><?= old('comment', $tarifaEncuadernacionEntity->comment) ?></textarea>
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
</div><!--//.col -->
|
</div><!--//.col -->
|
||||||
</div><!-- //.row -->
|
</div><!-- //.row -->
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-12 col-lg-4 px-4">
|
<div class="col-md-12 col-lg-4 px-4">
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<label for="mostrar_en_presupuesto" class="form-check-label">
|
<label for="mostrar_en_presupuesto" class="form-check-label">
|
||||||
|
|||||||
@ -17,6 +17,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= lang('Tarifaencuadernacion.nombre') ?></th>
|
<th><?= lang('Tarifaencuadernacion.nombre') ?></th>
|
||||||
|
<th><?= lang('Tarifaencuadernacion.code') ?></th>
|
||||||
<th><?= lang('Tarifaencuadernacion.mostrar_en_presupuesto') ?></th>
|
<th><?= lang('Tarifaencuadernacion.mostrar_en_presupuesto') ?></th>
|
||||||
<th><?= lang('Tarifaencuadernacion.tipo_encuadernacion') ?></th>
|
<th><?= lang('Tarifaencuadernacion.tipo_encuadernacion') ?></th>
|
||||||
<th><?= lang('Tarifaencuadernacion.servicio_encuadernacion') ?></th>
|
<th><?= lang('Tarifaencuadernacion.servicio_encuadernacion') ?></th>
|
||||||
@ -88,6 +89,7 @@
|
|||||||
],
|
],
|
||||||
columns : [
|
columns : [
|
||||||
{ 'data': 'nombre' },
|
{ 'data': 'nombre' },
|
||||||
|
{ 'data': 'code' },
|
||||||
{ 'data': 'mostrar_en_presupuesto' },
|
{ 'data': 'mostrar_en_presupuesto' },
|
||||||
{ 'data': 'tipo_encuadernacion' },
|
{ 'data': 'tipo_encuadernacion' },
|
||||||
{ 'data': 'servicio_encuadernacion' },
|
{ 'data': 'servicio_encuadernacion' },
|
||||||
|
|||||||
@ -1,28 +1,51 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12 col-lg-12 px-4">
|
<div class="col-md-12 col-lg-12 px-4">
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="nombre" class="form-label">
|
||||||
|
<?= lang('TarifasEnvios.nombre') ?>*
|
||||||
|
</label>
|
||||||
|
<input type="text" id="nombre" name="nombre" required maxLength="255" class="form-control" value="<?= old('nombre', $tarifaEnvioEntity->nombre) ?>">
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="code" class="form-label">
|
||||||
|
<?= lang('TarifasEnvios.code') ?>
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
id="code"
|
||||||
|
name="code"
|
||||||
|
maxLength="5"
|
||||||
|
class="form-control"
|
||||||
|
value="<?= old('code', $tarifaEnvioEntity->code) ?>">
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="paisId" class="form-label">
|
||||||
|
<?= lang('TarifasEnvios.paisId') ?>*
|
||||||
|
</label>
|
||||||
|
<select id="paisId" name="pais_id" class="form-control select2bs" style="width: 100%;">
|
||||||
|
<option value=""><?= lang('Basic.global.pleaseSelectA', [lang('TarifasEnvios.paisId')]) ?></option>
|
||||||
|
|
||||||
|
<?php foreach ($paisList as $item) : ?>
|
||||||
|
<option value="<?= $item->id ?>" <?= $item->id == $tarifaEnvioEntity->pais_id ? ' selected' : '' ?>>
|
||||||
|
<?= $item->nombre ?>
|
||||||
|
</option>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</select>
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="nombre" class="form-label">
|
<label for="comment" class="form-label">
|
||||||
<?=lang('TarifasEnvios.nombre') ?>*
|
<?= lang('TarifasEnvios.comment') ?>
|
||||||
</label>
|
</label>
|
||||||
<input type="text" id="nombre" name="nombre" required maxLength="255" class="form-control" value="<?=old('nombre', $tarifaEnvioEntity->nombre) ?>">
|
<textarea
|
||||||
</div><!--//.mb-3 -->
|
id="comment"
|
||||||
|
name="comment"
|
||||||
|
rows="5"
|
||||||
|
cols="10"
|
||||||
|
placeholder="<?= lang('TarifasEnvios.comment_placeholder') ?>"
|
||||||
|
class="form-control"><?= old('comment', $tarifaEnvioEntity->comment) ?></textarea>
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
<div class="mb-3">
|
</div><!--//.col -->
|
||||||
<label for="paisId" class="form-label">
|
|
||||||
<?=lang('TarifasEnvios.paisId') ?>*
|
|
||||||
</label>
|
|
||||||
<select id="paisId" name="pais_id" class="form-control select2bs" style="width: 100%;" >
|
|
||||||
<option value=""><?=lang('Basic.global.pleaseSelectA', [lang('TarifasEnvios.paisId')]) ?></option>
|
|
||||||
|
|
||||||
<?php foreach ($paisList as $item) : ?>
|
|
||||||
<option value="<?=$item->id ?>"<?=$item->id==$tarifaEnvioEntity->pais_id ? ' selected':'' ?>>
|
|
||||||
<?=$item->nombre ?>
|
|
||||||
</option>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</select>
|
|
||||||
</div><!--//.mb-3 -->
|
|
||||||
|
|
||||||
</div><!--//.col -->
|
|
||||||
|
|
||||||
</div><!-- //.row -->
|
</div><!-- //.row -->
|
||||||
@ -176,7 +176,8 @@
|
|||||||
idSrc: 'id',
|
idSrc: 'id',
|
||||||
fields: [ {
|
fields: [ {
|
||||||
name: "nombre"
|
name: "nombre"
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
name: "cp_inicial"
|
name: "cp_inicial"
|
||||||
}, {
|
}, {
|
||||||
name: "cp_final"
|
name: "cp_final"
|
||||||
|
|||||||
@ -18,6 +18,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= lang('TarifasEnvios.nombre') ?></th>
|
<th><?= lang('TarifasEnvios.nombre') ?></th>
|
||||||
|
<th><?= lang('TarifasEnvios.code') ?></th>
|
||||||
<th><?= lang('Paises.pais') ?></th>
|
<th><?= lang('Paises.pais') ?></th>
|
||||||
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -87,6 +88,7 @@
|
|||||||
],
|
],
|
||||||
columns : [
|
columns : [
|
||||||
{ 'data': 'nombre' },
|
{ 'data': 'nombre' },
|
||||||
|
{ 'data': 'code' },
|
||||||
{ 'data': 'pais_id' },
|
{ 'data': 'pais_id' },
|
||||||
{ 'data': actionBtns }
|
{ 'data': actionBtns }
|
||||||
]
|
]
|
||||||
|
|||||||
@ -14,7 +14,18 @@
|
|||||||
value="<?= old('nombre', $tarifaextraEntity->nombre) ?>"
|
value="<?= old('nombre', $tarifaextraEntity->nombre) ?>"
|
||||||
>
|
>
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="code" class="form-label">
|
||||||
|
<?= lang('Tarifaextra.code') ?>
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
id="code"
|
||||||
|
name="code"
|
||||||
|
maxLength="5"
|
||||||
|
class="form-control"
|
||||||
|
value="<?= old('code', $tarifaextraEntity->code) ?>">
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="precio" class="form-label">
|
<label for="precio" class="form-label">
|
||||||
<?= lang('Tarifaextra.precio') ?>*
|
<?= lang('Tarifaextra.precio') ?>*
|
||||||
@ -45,7 +56,18 @@
|
|||||||
>
|
>
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="comment" class="form-label">
|
||||||
|
<?= lang('Tarifaextra.comment') ?>
|
||||||
|
</label>
|
||||||
|
<textarea
|
||||||
|
id="comment"
|
||||||
|
name="comment"
|
||||||
|
rows="5"
|
||||||
|
cols="10"
|
||||||
|
placeholder="<?= lang('Tarifaextra.comment_placeholder') ?>"
|
||||||
|
class="form-control"><?= old('comment', $tarifaextraEntity->comment) ?></textarea>
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<div class="form-check form-check-inline">
|
<div class="form-check form-check-inline">
|
||||||
<input type="checkbox"
|
<input type="checkbox"
|
||||||
|
|||||||
@ -16,6 +16,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= lang('Tarifaextra.nombre') ?></th>
|
<th><?= lang('Tarifaextra.nombre') ?></th>
|
||||||
|
<th><?= lang('Tarifaextra.code') ?></th>
|
||||||
<th><?= lang('Tarifaextra.precio') ?></th>
|
<th><?= lang('Tarifaextra.precio') ?></th>
|
||||||
<th><?= lang('Tarifaextra.margen') ?></th>
|
<th><?= lang('Tarifaextra.margen') ?></th>
|
||||||
<th><?= lang('Tarifaextra.mostrar_en_presupuesto') ?></th>
|
<th><?= lang('Tarifaextra.mostrar_en_presupuesto') ?></th>
|
||||||
@ -28,6 +29,9 @@
|
|||||||
<td class="align-middle">
|
<td class="align-middle">
|
||||||
<?= empty($item->nombre) || strlen($item->nombre) < 51 ? esc($item->nombre) : character_limiter(esc($item->nombre), 50) ?>
|
<?= empty($item->nombre) || strlen($item->nombre) < 51 ? esc($item->nombre) : character_limiter(esc($item->nombre), 50) ?>
|
||||||
</td>
|
</td>
|
||||||
|
<td class="align-middle">
|
||||||
|
<?= esc($item->code) ?>
|
||||||
|
</td>
|
||||||
<td class="align-middle">
|
<td class="align-middle">
|
||||||
<?= esc($item->precio) ?>
|
<?= esc($item->precio) ?>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@ -1,35 +1,57 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12 col-lg-12 px-4">
|
<div class="col-md-12 col-lg-12 px-4">
|
||||||
<div class="mb-3">
|
|
||||||
<label for="nombre" class="form-label">
|
|
||||||
<?=lang('Tarifamanipulado.nombre') ?>*
|
|
||||||
</label>
|
|
||||||
<input type="text" id="nombre" name="nombre" maxLength="255" class="form-control" value="<?=old('nombre', $tarifaManipuladoEntity->nombre) ?>">
|
|
||||||
</div><!--//.mb-3 -->
|
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="nombre" class="form-label">
|
<label for="nombre" class="form-label">
|
||||||
<?=lang('Tarifamanipulado.importeMinimo') ?>*
|
<?= lang('Tarifamanipulado.nombre') ?>*
|
||||||
</label>
|
</label>
|
||||||
<input type="text" id="precio_min" name="precio_min" class="form-control" value="<?=old('precio_min', $tarifaManipuladoEntity->precio_min) ?>">
|
<input type="text" id="nombre" name="nombre" maxLength="255" class="form-control" value="<?= old('nombre', $tarifaManipuladoEntity->nombre) ?>">
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="code" class="form-label">
|
||||||
|
<?= lang('Tarifamanipulado.code') ?>
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
id="code"
|
||||||
|
name="code"
|
||||||
|
maxLength="5"
|
||||||
|
class="form-control"
|
||||||
|
value="<?= old('code', $tarifaManipuladoEntity->code) ?>">
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="nombre" class="form-label">
|
||||||
|
<?= lang('Tarifamanipulado.importeMinimo') ?>*
|
||||||
|
</label>
|
||||||
|
<input type="text" id="precio_min" name="precio_min" class="form-control" value="<?= old('precio_min', $tarifaManipuladoEntity->precio_min) ?>">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="nombre" class="form-label">
|
<label for="nombre" class="form-label">
|
||||||
<?=lang('Tarifamanipulado.importeFijo') ?>*
|
<?= lang('Tarifamanipulado.importeFijo') ?>*
|
||||||
</label>
|
</label>
|
||||||
<input type="text" id="importe_fijo" name="importe_fijo" class="form-control" value="<?=old('importe_fijo', $tarifaManipuladoEntity->importe_fijo) ?>">
|
<input type="text" id="importe_fijo" name="importe_fijo" class="form-control" value="<?= old('importe_fijo', $tarifaManipuladoEntity->importe_fijo) ?>">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<div class="form-check">
|
<label for="comment" class="form-label">
|
||||||
|
<?= lang('Tarifamanipulado.comment') ?>
|
||||||
|
</label>
|
||||||
|
<textarea
|
||||||
|
id="comment"
|
||||||
|
name="comment"
|
||||||
|
rows="5"
|
||||||
|
cols="10"
|
||||||
|
placeholder="<?= lang('Tarifamanipulado.comment_placeholder') ?>"
|
||||||
|
class="form-control"><?= old('comment', $tarifaManipuladoEntity->comment) ?></textarea>
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
|
<div class="mb-3">
|
||||||
|
<div class="form-check">
|
||||||
|
|
||||||
<label for="mostrar_en_presupuesto" class="form-check-label">
|
<label for="mostrar_en_presupuesto" class="form-check-label">
|
||||||
<input type="checkbox" id="mostrar_en_presupuesto" name="mostrar_en_presupuesto" value="1" class="form-check-input" <?= $tarifaManipuladoEntity->mostrar_en_presupuesto == true ? 'checked' : ''; ?>>
|
<input type="checkbox" id="mostrar_en_presupuesto" name="mostrar_en_presupuesto" value="1" class="form-check-input" <?= $tarifaManipuladoEntity->mostrar_en_presupuesto == true ? 'checked' : ''; ?>>
|
||||||
<?= lang('Tarifamanipulado.mostrar_en_presupuesto') ?>
|
<?= lang('Tarifamanipulado.mostrar_en_presupuesto') ?>
|
||||||
</label>
|
</label>
|
||||||
</div><!--//.form-check -->
|
</div><!--//.form-check -->
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
</div><!--//.col -->
|
</div><!--//.col -->
|
||||||
|
|
||||||
|
|||||||
@ -17,6 +17,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= lang('Tarifamanipulado.nombre') ?></th>
|
<th><?= lang('Tarifamanipulado.nombre') ?></th>
|
||||||
|
<th><?= lang('Tarifamanipulado.code') ?></th>
|
||||||
<th><?= lang('Tarifamanipulado.importeMinimo') ?></th>
|
<th><?= lang('Tarifamanipulado.importeMinimo') ?></th>
|
||||||
<th><?= lang('Tarifamanipulado.importeFijo') ?></th>
|
<th><?= lang('Tarifamanipulado.importeFijo') ?></th>
|
||||||
<th><?= lang('Tarifamanipulado.mostrar_en_presupuesto') ?></th>
|
<th><?= lang('Tarifamanipulado.mostrar_en_presupuesto') ?></th>
|
||||||
@ -87,6 +88,7 @@
|
|||||||
],
|
],
|
||||||
columns : [
|
columns : [
|
||||||
{ 'data': 'nombre' },
|
{ 'data': 'nombre' },
|
||||||
|
{ 'data': 'code' },
|
||||||
{ 'data': 'precio_min' },
|
{ 'data': 'precio_min' },
|
||||||
{ 'data': 'importe_fijo' },
|
{ 'data': 'importe_fijo' },
|
||||||
{ 'data': 'mostrar_en_presupuesto' },
|
{ 'data': 'mostrar_en_presupuesto' },
|
||||||
|
|||||||
@ -5,62 +5,82 @@
|
|||||||
<?= lang('Tarifapreimpresion.nombre') ?>*
|
<?= lang('Tarifapreimpresion.nombre') ?>*
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
id="nombre"
|
id="nombre"
|
||||||
name="nombre"
|
name="nombre"
|
||||||
required
|
required
|
||||||
maxLength="255"
|
maxLength="255"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
value="<?= old('nombre', $tarifapreimpresionEntity->nombre) ?>"
|
value="<?= old('nombre', $tarifapreimpresionEntity->nombre) ?>">
|
||||||
>
|
</div><!--//.mb-3 -->
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="code" class="form-label">
|
||||||
|
<?= lang('Tarifapreimpresion.code') ?>
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
id="code"
|
||||||
|
name="code"
|
||||||
|
maxLength="5"
|
||||||
|
class="form-control"
|
||||||
|
value="<?= old('code', $tarifapreimpresionEntity->code) ?>">
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="precio" class="form-label">
|
<label for="precio" class="form-label">
|
||||||
<?= lang('Tarifapreimpresion.precio') ?>*
|
<?= lang('Tarifapreimpresion.precio') ?>*
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
id="precio"
|
id="precio"
|
||||||
name="precio"
|
name="precio"
|
||||||
required
|
required
|
||||||
maxLength="31"
|
maxLength="31"
|
||||||
step="0.01"
|
step="0.01"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
value="<?= old('precio', $tarifapreimpresionEntity->precio) ?>"
|
value="<?= old('precio', $tarifapreimpresionEntity->precio) ?>">
|
||||||
>
|
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label for="margen" class="form-label">
|
<label for="margen" class="form-label">
|
||||||
<?= lang('Tarifapreimpresion.margen') ?>*
|
<?= lang('Tarifapreimpresion.margen') ?>*
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
id="margen"
|
id="margen"
|
||||||
name="margen"
|
name="margen"
|
||||||
required
|
required
|
||||||
class="form-control"
|
class="form-control"
|
||||||
value="<?= old('margen', $tarifapreimpresionEntity->margen) ?>"
|
value="<?= old('margen', $tarifapreimpresionEntity->margen) ?>">
|
||||||
>
|
|
||||||
</div><!--//.mb-3 -->
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="comment" class="form-label">
|
||||||
|
<?= lang('Tarifapreimpresion.comment') ?>
|
||||||
|
</label>
|
||||||
|
<textarea
|
||||||
|
id="comment"
|
||||||
|
name="comment"
|
||||||
|
rows="5"
|
||||||
|
cols="10"
|
||||||
|
placeholder="<?= lang('Tarifapreimpresion.comment_placeholder') ?>"
|
||||||
|
class="form-control"><?= old('comment', $tarifapreimpresionEntity->comment) ?></textarea>
|
||||||
|
</div><!--//.mb-3 -->
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<div class="form-check form-check-inline">
|
<div class="form-check form-check-inline">
|
||||||
<input type="checkbox"
|
<input type="checkbox"
|
||||||
id="mostrar_en_presupuesto"
|
id="mostrar_en_presupuesto"
|
||||||
name="mostrar_en_presupuesto"
|
name="mostrar_en_presupuesto"
|
||||||
value="1"
|
value="1"
|
||||||
class="form-check-input"<?= $tarifapreimpresionEntity->mostrar_en_presupuesto == true ? 'checked' : ''; ?>
|
class="form-check-input" <?= $tarifapreimpresionEntity->mostrar_en_presupuesto == true ? 'checked' : ''; ?>>
|
||||||
>
|
|
||||||
<label for="mostrar_en_presupuesto" class="form-check-label">
|
<label for="mostrar_en_presupuesto" class="form-check-label">
|
||||||
<?= lang('Tarifapreimpresion.mostrar_en_presupuesto') ?>
|
<?= lang('Tarifapreimpresion.mostrar_en_presupuesto') ?>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div><!--//.col -->
|
</div><!--//.col -->
|
||||||
|
|
||||||
</div><!-- //.row -->
|
</div><!-- //.row -->
|
||||||
@ -16,6 +16,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= lang('Tarifapreimpresion.nombre') ?></th>
|
<th><?= lang('Tarifapreimpresion.nombre') ?></th>
|
||||||
|
<th><?= lang('Tarifapreimpresion.code') ?></th>
|
||||||
<th><?= lang('Tarifapreimpresion.precio') ?></th>
|
<th><?= lang('Tarifapreimpresion.precio') ?></th>
|
||||||
<th><?= lang('Tarifapreimpresion.margen') ?></th>
|
<th><?= lang('Tarifapreimpresion.margen') ?></th>
|
||||||
<th><?= lang('Tarifapreimpresion.mostrar_en_presupuesto') ?></th>
|
<th><?= lang('Tarifapreimpresion.mostrar_en_presupuesto') ?></th>
|
||||||
@ -28,6 +29,9 @@
|
|||||||
<td class="align-middle">
|
<td class="align-middle">
|
||||||
<?= empty($item->nombre) || strlen($item->nombre) < 51 ? esc($item->nombre) : character_limiter(esc($item->nombre), 50) ?>
|
<?= empty($item->nombre) || strlen($item->nombre) < 51 ? esc($item->nombre) : character_limiter(esc($item->nombre), 50) ?>
|
||||||
</td>
|
</td>
|
||||||
|
<td class="align-middle">
|
||||||
|
<?= esc($item->code) ?>
|
||||||
|
</td>
|
||||||
<td class="align-middle">
|
<td class="align-middle">
|
||||||
<?= esc($item->precio) ?>
|
<?= esc($item->precio) ?>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user