mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'mod/logistica_v2' into 'main'
Mod/logistica v2 See merge request jjimenez/safekat!825
This commit is contained in:
@ -411,6 +411,14 @@ class Albaran extends \App\Controllers\BaseResourceController
|
|||||||
return '<input type="text" class="form-control form-control-sm input-albaran-linea" value="' . $q->titulo .
|
return '<input type="text" class="form-control form-control-sm input-albaran-linea" value="' . $q->titulo .
|
||||||
'" data-id="' . $q->id . '" data-field="titulo" />';
|
'" data-id="' . $q->id . '" data-field="titulo" />';
|
||||||
})
|
})
|
||||||
|
->edit('cajas', function ($q) {
|
||||||
|
return '<input class="form-control input-albaran-linea
|
||||||
|
form-control-sm text-center" value="' . $q->cajas . '" data-id="' . $q->id . '" data-field="cajas" />';
|
||||||
|
})
|
||||||
|
->edit('unidades_cajas', function ($q) {
|
||||||
|
return '<input class="form-control input-albaran-linea
|
||||||
|
form-control-sm text-center" value="' . $q->unidades_cajas . '" data-id="' . $q->id . '" data-field="unidades_cajas" />';
|
||||||
|
})
|
||||||
->edit('total', function ($q) {
|
->edit('total', function ($q) {
|
||||||
return '<input class="form-control autonumeric-2 input-albaran-linea
|
return '<input class="form-control autonumeric-2 input-albaran-linea
|
||||||
form-control-sm text-center" value="' . $q->total . '" data-id="' . $q->id . '" data-field="total" />';
|
form-control-sm text-center" value="' . $q->total . '" data-id="' . $q->id . '" data-field="total" />';
|
||||||
|
|||||||
@ -195,7 +195,8 @@ class Pedido extends \App\Controllers\BaseResourceController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function cambiarEstado(){
|
public function cambiarEstado()
|
||||||
|
{
|
||||||
if ($this->request->isAJAX()) {
|
if ($this->request->isAJAX()) {
|
||||||
|
|
||||||
$id = $this->request->getPost('id');
|
$id = $this->request->getPost('id');
|
||||||
@ -209,7 +210,8 @@ class Pedido extends \App\Controllers\BaseResourceController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function update($id = null){
|
public function update($id = null)
|
||||||
|
{
|
||||||
|
|
||||||
$data = [];
|
$data = [];
|
||||||
|
|
||||||
@ -291,13 +293,13 @@ class Pedido extends \App\Controllers\BaseResourceController
|
|||||||
$csrfTokenName => $newTokenHash
|
$csrfTokenName => $newTokenHash
|
||||||
];
|
];
|
||||||
return $this->respond($data);
|
return $this->respond($data);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
return $this->failUnauthorized('Invalid request', 403);
|
return $this->failUnauthorized('Invalid request', 403);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function edit($id=null){
|
public function edit($id = null)
|
||||||
|
{
|
||||||
|
|
||||||
if ($id == null):
|
if ($id == null):
|
||||||
return $this->redirect2listView();
|
return $this->redirect2listView();
|
||||||
@ -342,7 +344,8 @@ class Pedido extends \App\Controllers\BaseResourceController
|
|||||||
return $this->displayForm(__METHOD__, $id);
|
return $this->displayForm(__METHOD__, $id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function datatable(){
|
public function datatable()
|
||||||
|
{
|
||||||
|
|
||||||
if ($this->request->isAJAX()) {
|
if ($this->request->isAJAX()) {
|
||||||
|
|
||||||
@ -360,7 +363,8 @@ class Pedido extends \App\Controllers\BaseResourceController
|
|||||||
$dir = $reqData['order']['0']['dir'] ?? 'asc';
|
$dir = $reqData['order']['0']['dir'] ?? 'asc';
|
||||||
$estado = $reqData['estado'] ?? 'todos';
|
$estado = $reqData['estado'] ?? 'todos';
|
||||||
$cliente_id = $reqData['cliente_id'] ?? -1;
|
$cliente_id = $reqData['cliente_id'] ?? -1;
|
||||||
if($estado == 'todos') $estado = '';
|
if ($estado == 'todos')
|
||||||
|
$estado = '';
|
||||||
|
|
||||||
$showTotal = $reqData['showTotal'] ?? false;
|
$showTotal = $reqData['showTotal'] ?? false;
|
||||||
|
|
||||||
@ -459,7 +463,8 @@ class Pedido extends \App\Controllers\BaseResourceController
|
|||||||
return $result->toJson(returnAsObject: true);
|
return $result->toJson(returnAsObject: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function obtenerTotalPedidosCliente($cliente_id){
|
public function obtenerTotalPedidosCliente($cliente_id)
|
||||||
|
{
|
||||||
|
|
||||||
$error = false;
|
$error = false;
|
||||||
$result = [
|
$result = [
|
||||||
@ -474,8 +479,7 @@ class Pedido extends \App\Controllers\BaseResourceController
|
|||||||
->groupBy('presupuestos.cliente_id')->get()->getResultObject();
|
->groupBy('presupuestos.cliente_id')->get()->getResultObject();
|
||||||
if (count($data) > 0) {
|
if (count($data) > 0) {
|
||||||
$result['total_impresion'] = round(floatval($data[0]->total), 2);
|
$result['total_impresion'] = round(floatval($data[0]->total), 2);
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$error = true;
|
$error = true;
|
||||||
}
|
}
|
||||||
$result['total'] = $result['total_impresion'] + $result['total_maquetacion'];
|
$result['total'] = $result['total_impresion'] + $result['total_maquetacion'];
|
||||||
@ -483,17 +487,18 @@ class Pedido extends \App\Controllers\BaseResourceController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function obtenerPedidosForFacturas(){
|
public function obtenerPedidosForFacturas()
|
||||||
|
{
|
||||||
if ($this->request->isAJAX()) {
|
if ($this->request->isAJAX()) {
|
||||||
$reqData = $this->request->getPost();
|
$reqData = $this->request->getPost();
|
||||||
$start = $reqData['start'] ?? 0;
|
$start = $reqData['start'] ?? 0;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
return $this->failUnauthorized('Invalid request', 403);
|
return $this->failUnauthorized('Invalid request', 403);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getlineas(){
|
public function getlineas()
|
||||||
|
{
|
||||||
if ($this->request->isAJAX()) {
|
if ($this->request->isAJAX()) {
|
||||||
|
|
||||||
$reqData = $this->request->getPost();
|
$reqData = $this->request->getPost();
|
||||||
@ -517,7 +522,8 @@ class Pedido extends \App\Controllers\BaseResourceController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function addFactura(){
|
public function addFactura()
|
||||||
|
{
|
||||||
|
|
||||||
if ($this->request->isAJAX()) {
|
if ($this->request->isAJAX()) {
|
||||||
|
|
||||||
@ -584,7 +590,8 @@ class Pedido extends \App\Controllers\BaseResourceController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private function obtenerDatosFormulario(&$pedidoEntity){
|
private function obtenerDatosFormulario(&$pedidoEntity)
|
||||||
|
{
|
||||||
|
|
||||||
$datos = $this->model->obtenerDatosForm($pedidoEntity->id);
|
$datos = $this->model->obtenerDatosForm($pedidoEntity->id);
|
||||||
|
|
||||||
@ -618,6 +625,7 @@ class Pedido extends \App\Controllers\BaseResourceController
|
|||||||
{
|
{
|
||||||
$serviceProduction = service('production');
|
$serviceProduction = service('production');
|
||||||
$pedido = $this->model->find($pedido_id);
|
$pedido = $this->model->find($pedido_id);
|
||||||
|
$cliente = $pedido->presupuesto()->cliente_id;
|
||||||
$serviceProduction->setPedido($pedido);
|
$serviceProduction->setPedido($pedido);
|
||||||
if ($pedido->orden_trabajo()) {
|
if ($pedido->orden_trabajo()) {
|
||||||
return $this->response->setJSON(["status" => false, "data" => $pedido->orden_trabajo(), "message" => "Ya existe una orden de trabajo para este pedido"]);
|
return $this->response->setJSON(["status" => false, "data" => $pedido->orden_trabajo(), "message" => "Ya existe una orden de trabajo para este pedido"]);
|
||||||
@ -625,9 +633,23 @@ class Pedido extends \App\Controllers\BaseResourceController
|
|||||||
} else {
|
} else {
|
||||||
$r = $serviceProduction->createOrdenTrabajo();
|
$r = $serviceProduction->createOrdenTrabajo();
|
||||||
$this->model->set(['estado' => 'produccion'])->where('id', $pedido_id)->update();
|
$this->model->set(['estado' => 'produccion'])->where('id', $pedido_id)->update();
|
||||||
|
$clienteModel = model('App\Models\Clientes\ClienteModel');
|
||||||
|
$cliente = $clienteModel->find($cliente);
|
||||||
|
if ($cliente) {
|
||||||
|
if ($cliente->tirada_flexible == 1) {
|
||||||
|
$ejemplares_tirada_flexible = intval($pedido->total_tirada * 0.05);
|
||||||
|
$comentario = lang('OrdenTrabajo.tiradaFlexible', [
|
||||||
|
'unidades' => $ejemplares_tirada_flexible
|
||||||
|
]) . "\n" . trim($cliente->comentarios_tirada_flexible);
|
||||||
|
|
||||||
|
$serviceProduction->init($r->id)->updateOrdenTrabajoData([
|
||||||
|
'name' => 'comment_logistica',
|
||||||
|
'comment_logistica' => $comentario
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
return $this->response->setJSON(["status" => true, "data" => $r, "message" => "Orden trabajo creada correctamente"]);
|
return $this->response->setJSON(["status" => true, "data" => $r, "message" => "Orden trabajo creada correctamente"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Database\Migrations;
|
||||||
|
|
||||||
|
use CodeIgniter\Database\Migration;
|
||||||
|
|
||||||
|
class AddAliasOtColumnMaquinasTable extends Migration
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
$this->forge->addColumn('albaranes_lineas', [
|
||||||
|
'cajas' => [
|
||||||
|
'type' => 'INT',
|
||||||
|
'constraint' => 11,
|
||||||
|
'null' => true,
|
||||||
|
],
|
||||||
|
'unidades_cajas' => [
|
||||||
|
'type' => 'INT',
|
||||||
|
'constraint' => 11,
|
||||||
|
'null' => true,
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
$this->forge->dropColumn('albaranes_lineas', ['cajas', 'unidades_cajas']);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -21,6 +21,7 @@ class AlbaranEntity extends \CodeIgniter\Entity\Entity
|
|||||||
'updated_at' => null,
|
'updated_at' => null,
|
||||||
'deleted_at' => null,
|
'deleted_at' => null,
|
||||||
'cajas' => null,
|
'cajas' => null,
|
||||||
|
'unidades_cajas' => null,
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $dates = ['created_at', 'updated_at', 'deleted_at'];
|
protected $dates = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
@ -40,6 +41,7 @@ class AlbaranEntity extends \CodeIgniter\Entity\Entity
|
|||||||
'user_created_id' => 'integer',
|
'user_created_id' => 'integer',
|
||||||
'user_updated_id' => 'integer',
|
'user_updated_id' => 'integer',
|
||||||
'fecha_albaran' => '?datetime',
|
'fecha_albaran' => '?datetime',
|
||||||
|
'cajas' => '?integer',
|
||||||
];
|
];
|
||||||
|
|
||||||
// Agrega tus métodos personalizados aquí
|
// Agrega tus métodos personalizados aquí
|
||||||
|
|||||||
@ -21,6 +21,8 @@ class AlbaranLineaEntity extends \CodeIgniter\Entity\Entity
|
|||||||
'created_at' => null,
|
'created_at' => null,
|
||||||
'updated_at' => null,
|
'updated_at' => null,
|
||||||
'deleted_at' => null,
|
'deleted_at' => null,
|
||||||
|
'cajas' => null,
|
||||||
|
'unidades_cajas' => null,
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
@ -36,5 +38,8 @@ class AlbaranLineaEntity extends \CodeIgniter\Entity\Entity
|
|||||||
'iva_reducido' => '?boolean',
|
'iva_reducido' => '?boolean',
|
||||||
'user_created_id' => 'integer',
|
'user_created_id' => 'integer',
|
||||||
'user_updated_id' => 'integer',
|
'user_updated_id' => 'integer',
|
||||||
|
'cajas' => '?integer',
|
||||||
|
'unidades_cajas' => '?integer',
|
||||||
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -13,6 +13,7 @@ return [
|
|||||||
'att' => 'Att',
|
'att' => 'Att',
|
||||||
'direccion' => 'Dirección',
|
'direccion' => 'Dirección',
|
||||||
'cajas' => 'Cajas',
|
'cajas' => 'Cajas',
|
||||||
|
'unidadesCaja' => 'Unidades/Caja',
|
||||||
'acciones' => 'Acciones',
|
'acciones' => 'Acciones',
|
||||||
|
|
||||||
'unidades' => 'Unidades',
|
'unidades' => 'Unidades',
|
||||||
|
|||||||
6
ci4/app/Language/es/OrdenTrabajo.php
Normal file
6
ci4/app/Language/es/OrdenTrabajo.php
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
return [
|
||||||
|
'tiradaFlexible' => 'El cliente tiene opción de tirada flexible: ±{unidades, number, integer} unidades.',
|
||||||
|
];
|
||||||
@ -30,6 +30,8 @@ class AlbaranLineaModel extends \App\Models\BaseModel
|
|||||||
'created_at',
|
'created_at',
|
||||||
'updated_at',
|
'updated_at',
|
||||||
'deleted_at',
|
'deleted_at',
|
||||||
|
'cajas',
|
||||||
|
'unidades_cajas',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $useSoftDeletes = true;
|
protected $useSoftDeletes = true;
|
||||||
@ -70,7 +72,7 @@ class AlbaranLineaModel extends \App\Models\BaseModel
|
|||||||
->table($this->table . " t1")
|
->table($this->table . " t1")
|
||||||
->select(
|
->select(
|
||||||
"t1.id, t1.titulo as titulo, t1.isbn as isbn, t1.ref_cliente as ref_cliente,
|
"t1.id, t1.titulo as titulo, t1.isbn as isbn, t1.ref_cliente as ref_cliente,
|
||||||
t1.cantidad as unidades, t1.precio_unidad as precio_unidad, t1.iva_reducido as iva_reducido,
|
t1.cantidad as unidades, t1.cajas, t1.unidades_cajas, t1.precio_unidad as precio_unidad, t1.iva_reducido as iva_reducido,
|
||||||
t1.total as total, pedidos.id AS pedido"
|
t1.total as total, pedidos.id AS pedido"
|
||||||
)
|
)
|
||||||
->join("pedidos_linea", "t1.pedido_linea_id = pedidos_linea.id", "left")
|
->join("pedidos_linea", "t1.pedido_linea_id = pedidos_linea.id", "left")
|
||||||
|
|||||||
@ -253,7 +253,8 @@ class PresupuestoService extends BaseService
|
|||||||
$linea['fields']['precio_libro'] = $linea['fields']['pliegos_libro'] * $linea['fields']['precios_pliegos'];
|
$linea['fields']['precio_libro'] = $linea['fields']['pliegos_libro'] * $linea['fields']['precios_pliegos'];
|
||||||
// Precio papel pedido
|
// Precio papel pedido
|
||||||
$linea['fields']['precio_pedido'] = $linea['fields']['precio_libro'] * ($datosPedido->tirada + $datosPedido->merma);
|
$linea['fields']['precio_pedido'] = $linea['fields']['precio_libro'] * ($datosPedido->tirada + $datosPedido->merma);
|
||||||
$linea['fields']['margen_papel_pedido'] = $linea['fields']['pliegos_libro'] * $margen_pliego_impresion * ($datosPedido->tirada + $datosPedido->merma);;
|
$linea['fields']['margen_papel_pedido'] = $linea['fields']['pliegos_libro'] * $margen_pliego_impresion * ($datosPedido->tirada + $datosPedido->merma);
|
||||||
|
;
|
||||||
|
|
||||||
$linea['fields']['a_favor_fibra'] = $parametrosRotativa->a_favor_fibra;
|
$linea['fields']['a_favor_fibra'] = $parametrosRotativa->a_favor_fibra;
|
||||||
$linea['fields']['maquina'] = $maquina->maquina;
|
$linea['fields']['maquina'] = $maquina->maquina;
|
||||||
@ -1913,6 +1914,23 @@ class PresupuestoService extends BaseService
|
|||||||
|
|
||||||
$r = $serviceProduction->createOrdenTrabajo($isImported);
|
$r = $serviceProduction->createOrdenTrabajo($isImported);
|
||||||
$modelPedido->set(['estado' => 'produccion'])->where('id', $pedido_id)->update();
|
$modelPedido->set(['estado' => 'produccion'])->where('id', $pedido_id)->update();
|
||||||
|
|
||||||
|
$clienteModel = model('App\Models\Clientes\ClienteModel');
|
||||||
|
$cliente = $clienteModel->find($datos_presupuesto->cliente_id);
|
||||||
|
$clienteModel = model('App\Models\Clientes\ClienteModel');
|
||||||
|
|
||||||
|
if ($cliente) {
|
||||||
|
if ($cliente->tirada_flexible == 1) {
|
||||||
|
$ejemplares_tirada_flexible = intval($datos_presupuesto->tirada * 0.05);
|
||||||
|
$comentario = lang('OrdenTrabajo.tiradaFlexible', [
|
||||||
|
'unidades' => $ejemplares_tirada_flexible
|
||||||
|
]) . "\n" . trim($cliente->comentarios_tirada_flexible);
|
||||||
|
$serviceProduction->init($r->id)->updateOrdenTrabajoData([
|
||||||
|
'name' => 'comment_logistica',
|
||||||
|
'comment_logistica' => $comentario
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -1157,6 +1157,16 @@ class ProductionService extends BaseService
|
|||||||
$this->updateProgress();
|
$this->updateProgress();
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function updateOrdenTrabajoData($data)
|
||||||
|
{
|
||||||
|
$result = $this->otModel->where('id', $this->ot->id)
|
||||||
|
->set($data['name'], $data[$data['name']])
|
||||||
|
->update();
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
public function emptyOrdenTrabajoDate(int $orden_trabajo_id, string $dateName)
|
public function emptyOrdenTrabajoDate(int $orden_trabajo_id, string $dateName)
|
||||||
{
|
{
|
||||||
$status = $this->otDate->where('orden_trabajo_id', $orden_trabajo_id)
|
$status = $this->otDate->where('orden_trabajo_id', $orden_trabajo_id)
|
||||||
|
|||||||
@ -240,7 +240,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-sm-3 px-3 d-flex flex-column justify-content-end">
|
<div class="col-sm-2 px-3 d-flex flex-column justify-content-end">
|
||||||
<div class="d-flex flex-column justify-content-end h-100">
|
<div class="d-flex flex-column justify-content-end h-100">
|
||||||
<label for="impresoraEtiquetas" class="form-label">
|
<label for="impresoraEtiquetas" class="form-label">
|
||||||
<?= lang("Logistica.impresoraEtiquetas") ?>
|
<?= lang("Logistica.impresoraEtiquetas") ?>
|
||||||
|
|||||||
@ -153,6 +153,8 @@ class AlbaranComponent {
|
|||||||
$('<th>', { class: 'lp-header', scope: 'col' }).css({ 'font-size': 'smaller' }).text(window.language.Albaran.titulo),
|
$('<th>', { class: 'lp-header', scope: 'col' }).css({ 'font-size': 'smaller' }).text(window.language.Albaran.titulo),
|
||||||
$('<th>', { class: 'lp-header', scope: 'col' }).css({ 'font-size': 'smaller', 'max-width':'15%' }).text(window.language.Albaran.ISBN),
|
$('<th>', { class: 'lp-header', scope: 'col' }).css({ 'font-size': 'smaller', 'max-width':'15%' }).text(window.language.Albaran.ISBN),
|
||||||
$('<th>', { class: 'lp-header', scope: 'col' }).css({ 'font-size': 'smaller', 'max-width':'15%' }).text(window.language.Albaran.refCliente),
|
$('<th>', { class: 'lp-header', scope: 'col' }).css({ 'font-size': 'smaller', 'max-width':'15%' }).text(window.language.Albaran.refCliente),
|
||||||
|
$('<th>', { class: 'lp-header', scope: 'col' }).css({ 'font-size': 'smaller', 'max-width':'15%' }).text(window.language.Albaran.cajas),
|
||||||
|
$('<th>', { class: 'lp-header', scope: 'col' }).css({ 'font-size': 'smaller', 'max-width':'15%' }).text(window.language.Albaran.unidadesCaja),
|
||||||
$('<th>', { class: 'lp-header', scope: 'col' }).css({ 'font-size': 'smaller', 'max-width':'8%' }).text(window.language.Albaran.precioU),
|
$('<th>', { class: 'lp-header', scope: 'col' }).css({ 'font-size': 'smaller', 'max-width':'8%' }).text(window.language.Albaran.precioU),
|
||||||
$('<th>', { class: 'lp-header', scope: 'col' }).css({ 'font-size': 'smaller', 'max-width':'8%' }).text(window.language.Albaran.subtotal),
|
$('<th>', { class: 'lp-header', scope: 'col' }).css({ 'font-size': 'smaller', 'max-width':'8%' }).text(window.language.Albaran.subtotal),
|
||||||
$('<th>'),
|
$('<th>'),
|
||||||
@ -230,6 +232,8 @@ class AlbaranComponent {
|
|||||||
{ data: "titulo" },
|
{ data: "titulo" },
|
||||||
{ data: "isbn" },
|
{ data: "isbn" },
|
||||||
{ data: "ref_cliente" },
|
{ data: "ref_cliente" },
|
||||||
|
{ data: "cajas"},
|
||||||
|
{ data: "unidades_cajas"},
|
||||||
{ data: "precio_unidad" },
|
{ data: "precio_unidad" },
|
||||||
{ data: "total" },
|
{ data: "total" },
|
||||||
{ data: "iva_reducido", visible: false },
|
{ data: "iva_reducido", visible: false },
|
||||||
@ -244,13 +248,13 @@ class AlbaranComponent {
|
|||||||
drawCallback: (settings) => {
|
drawCallback: (settings) => {
|
||||||
if ($('#mostrar_precios_' + this.id).is(':checked')) {
|
if ($('#mostrar_precios_' + this.id).is(':checked')) {
|
||||||
this.table
|
this.table
|
||||||
.column(7).visible(true)
|
.column(9).visible(true)
|
||||||
.column(8).visible(true);
|
.column(10).visible(true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.table
|
this.table
|
||||||
.column(7).visible(false)
|
.column(9).visible(false)
|
||||||
.column(8).visible(false);
|
.column(10).visible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
requestAnimationFrame(() => {
|
requestAnimationFrame(() => {
|
||||||
@ -316,12 +320,12 @@ class AlbaranComponent {
|
|||||||
const checked = $(e.currentTarget).is(':checked');
|
const checked = $(e.currentTarget).is(':checked');
|
||||||
if (checked) {
|
if (checked) {
|
||||||
this.table
|
this.table
|
||||||
.column(7).visible(true)
|
.column(9).visible(true)
|
||||||
.column(8).visible(true);
|
.column(10).visible(true);
|
||||||
} else {
|
} else {
|
||||||
this.table
|
this.table
|
||||||
.column(7).visible(false)
|
.column(9).visible(false)
|
||||||
.column(8).visible(false);
|
.column(10).visible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
$.post('/albaranes/updateAlbaran', {
|
$.post('/albaranes/updateAlbaran', {
|
||||||
|
|||||||
Reference in New Issue
Block a user