mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Compare commits
17 Commits
feat/view-
...
feat/sk-44
| Author | SHA1 | Date | |
|---|---|---|---|
| 4d8332e625 | |||
| c75d08b3c3 | |||
| 45e41c77e4 | |||
| 9a6a4f89a2 | |||
| 7f31e65960 | |||
| 5aa2a2e6c9 | |||
| dfbcb13ba5 | |||
| 25b6d14423 | |||
| 96bd24ae8b | |||
| b5b86b4164 | |||
| ef173ab0fc | |||
| f473caf06c | |||
| 5e8a7f8bd4 | |||
| 905112334f | |||
| d0f37cb714 | |||
| 151e4a2d7a | |||
| 05ebfa06df |
@ -65,7 +65,7 @@ class OrdenTrabajo extends BaseConfig
|
|||||||
["bg" => "yellow", "color" => "black"],
|
["bg" => "yellow", "color" => "black"],
|
||||||
["bg" => "purple", "color" => "white"],
|
["bg" => "purple", "color" => "white"],
|
||||||
["bg" => "orange", "color" => "white"],
|
["bg" => "orange", "color" => "white"],
|
||||||
["bg" => "blue", "color" => "black"],
|
["bg" => "blue", "color" => "white"],
|
||||||
["bg" => "pink", "color" => "black"],
|
["bg" => "pink", "color" => "black"],
|
||||||
["bg" => "#FFFFFF", "color" => "black"],
|
["bg" => "#FFFFFF", "color" => "black"],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -522,6 +522,9 @@ $routes->group('albaranes', ['namespace' => 'App\Controllers\Albaranes'], functi
|
|||||||
$routes->post('updateAlbaranLinea', 'Albaran::updateAlbaranLinea');
|
$routes->post('updateAlbaranLinea', 'Albaran::updateAlbaranLinea');
|
||||||
$routes->post('addIvaAlbaran', 'Albaran::addLineasIva');
|
$routes->post('addIvaAlbaran', 'Albaran::addLineasIva');
|
||||||
$routes->post('nuevaLineaAlbaran', 'Albaran::addBlankLineaAlbaran');
|
$routes->post('nuevaLineaAlbaran', 'Albaran::addBlankLineaAlbaran');
|
||||||
|
$routes->get('datatable', 'Albaran::datatable', ['as' => 'dataTableOfAlbaranes']);
|
||||||
|
$routes->get('getAlbaran', 'Albaran::getAlbaran');
|
||||||
|
$routes->get('edit/(:num)', 'Albaran::editAlbaran/$1', ['as' => 'editarAlbaran']);
|
||||||
});
|
});
|
||||||
$routes->resource('albaranes', ['namespace' => 'App\Controllers\Pedidos', 'controller' => 'Albaran', 'except' => 'show,new,create,update']);
|
$routes->resource('albaranes', ['namespace' => 'App\Controllers\Pedidos', 'controller' => 'Albaran', 'except' => 'show,new,create,update']);
|
||||||
|
|
||||||
@ -744,8 +747,8 @@ $routes->group('produccion', ['namespace' => 'App\Controllers\Produccion'], func
|
|||||||
$routes->get('datatable_ferro_pendiente', 'Ordentrabajo::datatable_ferro_pendiente');
|
$routes->get('datatable_ferro_pendiente', 'Ordentrabajo::datatable_ferro_pendiente');
|
||||||
$routes->get('datatable_ferro_ok', 'Ordentrabajo::datatable_ferro_ok');
|
$routes->get('datatable_ferro_ok', 'Ordentrabajo::datatable_ferro_ok');
|
||||||
$routes->get('tareas/datatable/(:num)', 'Ordentrabajo::tareas_datatable/$1', ['as' => 'datatableTareasOrdenTrabajo']);
|
$routes->get('tareas/datatable/(:num)', 'Ordentrabajo::tareas_datatable/$1', ['as' => 'datatableTareasOrdenTrabajo']);
|
||||||
$routes->get("tarea/progress/(:num)","Ordentrabajo::get_orden_trabajo_progress_date/$1");
|
$routes->get("tarea/progress/(:num)", "Ordentrabajo::get_orden_trabajo_progress_date/$1");
|
||||||
|
$routes->get('tarea/(:num)', 'Ordentrabajo::find_tarea/$1');
|
||||||
/**======================
|
/**======================
|
||||||
* UPDATES
|
* UPDATES
|
||||||
*========================**/
|
*========================**/
|
||||||
@ -760,15 +763,16 @@ $routes->group('produccion', ['namespace' => 'App\Controllers\Produccion'], func
|
|||||||
$routes->post("upload/portada", 'Ordentrabajo::upload_orden_trabajo_portada');
|
$routes->post("upload/portada", 'Ordentrabajo::upload_orden_trabajo_portada');
|
||||||
$routes->delete("portada/(:num)", 'Ordentrabajo::delete_orden_trabajo_portada/$1');
|
$routes->delete("portada/(:num)", 'Ordentrabajo::delete_orden_trabajo_portada/$1');
|
||||||
$routes->get("color/(:num)", 'Ordentrabajo::get_orden_trabajo_color_status/$1');
|
$routes->get("color/(:num)", 'Ordentrabajo::get_orden_trabajo_color_status/$1');
|
||||||
$routes->post("update/tarea/progress","Ordentrabajo::store_orden_trabajo_progress_date");
|
$routes->post("update/tarea/progress", "Ordentrabajo::store_orden_trabajo_progress_date");
|
||||||
$routes->delete("tarea/progress/(:num)","Ordentrabajo::delete_orden_trabajo_progress_date/$1");
|
$routes->post("update/tarea/pliegos", "Ordentrabajo::update_orden_trabajo_pliegos");
|
||||||
|
$routes->delete("tarea/progress/(:num)", "Ordentrabajo::delete_orden_trabajo_progress_date/$1");
|
||||||
|
|
||||||
/**======================
|
/**======================
|
||||||
* FILES
|
* FILES
|
||||||
*========================**/
|
*========================**/
|
||||||
$routes->post('get_files', 'Ordentrabajo::get_files');
|
$routes->post('get_files', 'Ordentrabajo::get_files');
|
||||||
$routes->post('upload_files', 'Ordentrabajo::upload_files');
|
$routes->post('upload_files', 'Ordentrabajo::upload_files');
|
||||||
$routes->get('barcode/(:num)', 'Ordentrabajo::imprimir_codigo_safekat/$1',['as' => "getOrdenTrabajoBarCode"]);
|
$routes->get('barcode/(:num)', 'Ordentrabajo::imprimir_codigo_safekat/$1', ['as' => "getOrdenTrabajoBarCode"]);
|
||||||
/**======================
|
/**======================
|
||||||
* PDF
|
* PDF
|
||||||
*========================**/
|
*========================**/
|
||||||
@ -817,8 +821,12 @@ $routes->group('logistica', ['namespace' => 'App\Controllers\Logistica'], functi
|
|||||||
$routes->post('updateProveedorEnvio', 'LogisticaController::updateProveedorEnvio');
|
$routes->post('updateProveedorEnvio', 'LogisticaController::updateProveedorEnvio');
|
||||||
$routes->post('finalizarEnvio', 'LogisticaController::finalizarEnvio');
|
$routes->post('finalizarEnvio', 'LogisticaController::finalizarEnvio');
|
||||||
$routes->post('generateEnvio', 'LogisticaController::generarEnvio');
|
$routes->post('generateEnvio', 'LogisticaController::generarEnvio');
|
||||||
$routes->get('selectPedidosForEnvio', 'LogisticaController::findPedidosNewEnvio');
|
$routes->get('selectForNewEnvio', 'LogisticaController::findForNewEnvio');
|
||||||
$routes->get('selectDireccionForEnvio', 'LogisticaController::selectDireccionForEnvio');
|
$routes->get('selectDireccionForEnvio', 'LogisticaController::selectDireccionForEnvio');
|
||||||
|
$routes->post('imprimirEtiquetas', 'LogisticaController::imprimirEtiquetas');
|
||||||
|
|
||||||
|
$routes->get('listAlbaranes', 'LogisticaController::listAlbaranes', ['as' => 'albaranesList']);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -47,6 +47,18 @@ class Albaran extends \App\Controllers\BaseResourceController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function editAlbaran($albaran_id){
|
||||||
|
|
||||||
|
$albaran = $this->model->find($albaran_id);
|
||||||
|
if ($albaran == false) {
|
||||||
|
return redirect()->to(base_url('albaranesList'));
|
||||||
|
}
|
||||||
|
$this->viewData['boxTitle'] = lang('Albaran.editAlbaran') . ' ' . $albaran->numero_albaran;
|
||||||
|
$this->viewData['albaranId'] = $albaran_id;
|
||||||
|
|
||||||
|
return view('themes/vuexy/form/logistica/albaranes/viewAlbaranesEdit', $this->viewData);
|
||||||
|
}
|
||||||
|
|
||||||
public function addLinea($albaran_id)
|
public function addLinea($albaran_id)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -305,6 +317,23 @@ class Albaran extends \App\Controllers\BaseResourceController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getAlbaran()
|
||||||
|
{
|
||||||
|
|
||||||
|
if ($this->request->isAJAX()) {
|
||||||
|
|
||||||
|
$id = $this->request->getGet('id');
|
||||||
|
$albaran = $this->model->getAlbaranData($id);
|
||||||
|
$data = [
|
||||||
|
'success' => true,
|
||||||
|
'data' => $albaran,
|
||||||
|
];
|
||||||
|
return $this->respond($data);
|
||||||
|
} else {
|
||||||
|
return $this->failUnauthorized('Invalid request', 403);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function generateAlbaran()
|
public function generateAlbaran()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -324,6 +353,32 @@ class Albaran extends \App\Controllers\BaseResourceController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function datatable(){
|
||||||
|
|
||||||
|
$pedidosFilter = $this->request->getGet('pedidosFilter');
|
||||||
|
$q = $this->model->getDatatableQuery();
|
||||||
|
|
||||||
|
if($pedidosFilter != null && !empty($pedidosFilter)) {
|
||||||
|
$q->groupStart();
|
||||||
|
$q->like('t4.id', $pedidosFilter);
|
||||||
|
$q->groupEnd();
|
||||||
|
}
|
||||||
|
$result = DataTable::of($q)
|
||||||
|
->add(
|
||||||
|
"action",
|
||||||
|
callback: function ($q) {
|
||||||
|
return '
|
||||||
|
<div class="btn-group btn-group-sm">
|
||||||
|
<a href="javascript:void(0);"><i class="ti ti-pencil ti-sm btn-edit mx-2" data-id="' . $q->id . '"></i></a>
|
||||||
|
<a href="javascript:void(0);"><i class="ti ti-trash ti-sm btn-delete mx-2" data-id="' . $q->id . '"></i></a>
|
||||||
|
</div>
|
||||||
|
';
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
return $result->toJson(returnAsObject: true);
|
||||||
|
}
|
||||||
|
|
||||||
public function datatablesLineasAlbaran()
|
public function datatablesLineasAlbaran()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@ -69,12 +69,23 @@ class LogisticaController extends BaseController
|
|||||||
return view(static::$viewPath . 'viewLogisticaSelectEnvios', $viewData);
|
return view(static::$viewPath . 'viewLogisticaSelectEnvios', $viewData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function listAlbaranes(){
|
||||||
|
$viewData = [
|
||||||
|
'currentModule' => static::$controllerSlug,
|
||||||
|
'boxTitle' => lang('Albaran.albaranes'),
|
||||||
|
'usingServerSideDataTable' => true,
|
||||||
|
];
|
||||||
|
|
||||||
public function findPedidosNewEnvio()
|
$viewData = array_merge($this->viewData, $viewData); // merge any possible values from the parent controller class
|
||||||
|
|
||||||
|
return view(static::$viewPath . '/albaranes/viewAlbaranesList', $viewData);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function findForNewEnvio()
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->request->isAJAX()) {
|
if ($this->request->isAJAX()) {
|
||||||
$query = LogisticaService::findPedidosNewEnvio();
|
$query = LogisticaService::findForNewEnvio();
|
||||||
if ($this->request->getGet("q")) {
|
if ($this->request->getGet("q")) {
|
||||||
$query->groupStart()
|
$query->groupStart()
|
||||||
->orLike("id", $this->request->getGet("q"))
|
->orLike("id", $this->request->getGet("q"))
|
||||||
@ -109,21 +120,6 @@ class LogisticaController extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function searchPedidoOrISBN($search = "", $envio_id = null)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (empty($search)) {
|
|
||||||
$result = [
|
|
||||||
'status' => false,
|
|
||||||
'message' => lang('Logistica.errors.noDataToFind'),
|
|
||||||
];
|
|
||||||
return $this->response->setJSON($result);
|
|
||||||
}
|
|
||||||
$result = LogisticaService::findPedidoOrISBN($search);
|
|
||||||
return $this->response->setJSON($result);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public function generarEnvio()
|
public function generarEnvio()
|
||||||
{
|
{
|
||||||
if ($this->request->isAJAX()) {
|
if ($this->request->isAJAX()) {
|
||||||
@ -137,6 +133,65 @@ class LogisticaController extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function imprimirEtiquetas()
|
||||||
|
{
|
||||||
|
if ($this->request->isAJAX()) {
|
||||||
|
$envio_id = $this->request->getPost('envio_id');
|
||||||
|
$ids = $this->request->getPost('envio_lineas');
|
||||||
|
$cajas = $this->request->getPost('cajas');
|
||||||
|
$printer_id = $this->request->getPost('printer_id');
|
||||||
|
|
||||||
|
if($cajas == null || $cajas == 0){
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'status' => false,
|
||||||
|
'message' => 'Cajas no válidas'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$model = model('App\Models\Logistica\EnvioModel');
|
||||||
|
$envio = $model->select('envios.*, clientes.nombre as cliente')
|
||||||
|
->join('clientes', 'clientes.id = envios.cliente_id', 'left')
|
||||||
|
->where('envios.id', $envio_id)
|
||||||
|
->first();
|
||||||
|
if($envio == null){
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'status' => false,
|
||||||
|
'message' => 'Envio no válido'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$model = model('App\Models\Logistica\EnvioLineaModel');
|
||||||
|
$lineas = $model->select('envios_lineas.*, presupuestos.titulo as titulo, presupuestos.referencia_cliente as referencia_cliente')
|
||||||
|
->join('presupuestos', 'presupuestos.id = envios_lineas.presupuesto_id', 'left')
|
||||||
|
->whereIn('envios_lineas.id', $ids)->findAll();
|
||||||
|
if($lineas == null){
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'status' => false,
|
||||||
|
'message' => 'Lineas no válidas'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$modelImpresora = model('App\Models\Configuracion\ImpresoraEtiquetaModel');
|
||||||
|
$impresora = $modelImpresora->select('id, name')
|
||||||
|
->where('deleted_at', null)
|
||||||
|
->where('id', $printer_id)
|
||||||
|
->orderBy('name', 'asc')
|
||||||
|
->first();
|
||||||
|
if($impresora == null){
|
||||||
|
return $this->response->setJSON([
|
||||||
|
'status' => false,
|
||||||
|
'message' => 'Impresora no válida'
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$response = LogisticaService::generateEtiquetasTitulos($envio, $lineas, $impresora, $cajas);
|
||||||
|
return $this->response->setJSON($response);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
return $this->failUnauthorized('Invalid request', 403);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function selectAddEnvioLinea()
|
public function selectAddEnvioLinea()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -176,9 +231,18 @@ class LogisticaController extends BaseController
|
|||||||
|
|
||||||
public function datatable_envios()
|
public function datatable_envios()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$otsFilter = $this->request->getGetPost('otsFilter');
|
||||||
|
|
||||||
$model = model('App\Models\Logistica\EnvioModel');
|
$model = model('App\Models\Logistica\EnvioModel');
|
||||||
$q = $model->getDatatableQuery();
|
$q = $model->getDatatableQuery();
|
||||||
|
|
||||||
|
if (!empty($otsFilter)) {
|
||||||
|
$q->groupStart();
|
||||||
|
$q->like('t5.id', $otsFilter);
|
||||||
|
$q->groupEnd();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$result = DataTable::of($q)
|
$result = DataTable::of($q)
|
||||||
->edit(
|
->edit(
|
||||||
@ -227,6 +291,14 @@ class LogisticaController extends BaseController
|
|||||||
$envioEntity->proveedor_nombre = $proveedor->nombre;
|
$envioEntity->proveedor_nombre = $proveedor->nombre;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$modelImpresora = model('App\Models\Configuracion\ImpresoraEtiquetaModel');
|
||||||
|
$impresoras = $modelImpresora->select('id, name')
|
||||||
|
->where('deleted_at', null)
|
||||||
|
->where('tipo', 1)
|
||||||
|
->orderBy('name', 'asc')
|
||||||
|
->findAll();
|
||||||
|
$envioEntity->impresoras = $impresoras;
|
||||||
|
|
||||||
$viewData = [
|
$viewData = [
|
||||||
'currentModule' => static::$controllerSlug,
|
'currentModule' => static::$controllerSlug,
|
||||||
'boxTitle' => '<i class="ti ti-truck ti-xl"></i>' . ' ' . lang('Logistica.envio') . ' [' . $envioEntity->id . ']: ' . $envioEntity->direccion,
|
'boxTitle' => '<i class="ti ti-truck ti-xl"></i>' . ' ' . lang('Logistica.envio') . ' [' . $envioEntity->id . ']: ' . $envioEntity->direccion,
|
||||||
|
|||||||
@ -70,6 +70,11 @@ class Ordentrabajo extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function find_tarea($orden_trabajo_tarea_id)
|
||||||
|
{
|
||||||
|
$t = $this->otTarea->find($orden_trabajo_tarea_id);
|
||||||
|
return $this->response->setJSON($t);
|
||||||
|
}
|
||||||
public function get_orden_trabajo_summary($orden_trabajo_id)
|
public function get_orden_trabajo_summary($orden_trabajo_id)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
@ -100,7 +105,7 @@ class Ordentrabajo extends BaseController
|
|||||||
public function update_orden_trabajo_tarea()
|
public function update_orden_trabajo_tarea()
|
||||||
{
|
{
|
||||||
$bodyData = $this->request->getPost();
|
$bodyData = $this->request->getPost();
|
||||||
// return $this->response->setJSON(["message" => lang("App.global_alert_save_success"), "data" => $bodyData]);
|
return $this->response->setJSON(["message" => lang("App.global_alert_save_success"), "data" => $bodyData]);
|
||||||
$validated = $this->validation->run($bodyData, "orden_trabajo_tarea");
|
$validated = $this->validation->run($bodyData, "orden_trabajo_tarea");
|
||||||
if ($validated) {
|
if ($validated) {
|
||||||
$r = $this->produccionService->updateOrdenTrabajoTarea($bodyData["orden_trabajo_tarea_id"], $bodyData);
|
$r = $this->produccionService->updateOrdenTrabajoTarea($bodyData["orden_trabajo_tarea_id"], $bodyData);
|
||||||
@ -109,6 +114,18 @@ class Ordentrabajo extends BaseController
|
|||||||
return $this->response->setJSON(["errors" => $this->validation->getErrors()])->setStatusCode(400);
|
return $this->response->setJSON(["errors" => $this->validation->getErrors()])->setStatusCode(400);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public function update_orden_trabajo_pliegos()
|
||||||
|
{
|
||||||
|
$bodyData = $this->request->getPost();
|
||||||
|
// return $this->response->setJSON(["message" => lang("App.global_alert_save_success"), "data" => $bodyData]);
|
||||||
|
$validated = $this->validation->run($bodyData, "orden_trabajo");
|
||||||
|
if ($validated) {
|
||||||
|
$r = $this->produccionService->init($bodyData["orden_trabajo_id"])->updateOrdenTrabajoTareaPliegos($bodyData);
|
||||||
|
return $this->response->setJSON(["message" => lang("App.global_alert_save_success"), "status" => $r, "data" => $bodyData]);
|
||||||
|
} else {
|
||||||
|
return $this->response->setJSON(["errors" => $this->validation->getErrors()])->setStatusCode(400);
|
||||||
|
}
|
||||||
|
}
|
||||||
public function update_orden_trabajo_date()
|
public function update_orden_trabajo_date()
|
||||||
{
|
{
|
||||||
$bodyData = $this->request->getPost();
|
$bodyData = $this->request->getPost();
|
||||||
@ -128,7 +145,7 @@ class Ordentrabajo extends BaseController
|
|||||||
$validated = $this->validation->run($bodyData, "orden_trabajo_date");
|
$validated = $this->validation->run($bodyData, "orden_trabajo_date");
|
||||||
if ($validated) {
|
if ($validated) {
|
||||||
$validatedData = $bodyData;
|
$validatedData = $bodyData;
|
||||||
$r = $this->produccionService->emptyOrdenTrabajoDate($validatedData['orden_trabajo_id'],$validatedData['name']);
|
$r = $this->produccionService->emptyOrdenTrabajoDate($validatedData['orden_trabajo_id'], $validatedData['name']);
|
||||||
return $this->response->setJSON(["message" => lang("App.global_alert_save_success"), "status" => $r, "user" => auth()->user(), "data" => $bodyData]);
|
return $this->response->setJSON(["message" => lang("App.global_alert_save_success"), "status" => $r, "user" => auth()->user(), "data" => $bodyData]);
|
||||||
} else {
|
} else {
|
||||||
return $this->response->setJSON(["errors" => $this->validation->getErrors()])->setStatusCode(400);
|
return $this->response->setJSON(["errors" => $this->validation->getErrors()])->setStatusCode(400);
|
||||||
@ -524,10 +541,10 @@ class Ordentrabajo extends BaseController
|
|||||||
{
|
{
|
||||||
return view(static::$viewPath . '/maquinista/viewMaquinistaPlanningList', $this->viewData);
|
return view(static::$viewPath . '/maquinista/viewMaquinistaPlanningList', $this->viewData);
|
||||||
}
|
}
|
||||||
public function maquinista_maquina_tareas_datatable(string $content , int $maquina_id)
|
public function maquinista_maquina_tareas_datatable(string $content, int $maquina_id)
|
||||||
{
|
{
|
||||||
$pm = $this->produccionService->getMaquinaImpresionTareasList($maquina_id);
|
$pm = $this->produccionService->getMaquinaImpresionTareasList($maquina_id);
|
||||||
if($content == 'today'){
|
if ($content == 'today') {
|
||||||
$pm->like('pedidos.fecha_impresion', Time::now()->format('Y-m-d'));
|
$pm->like('pedidos.fecha_impresion', Time::now()->format('Y-m-d'));
|
||||||
}
|
}
|
||||||
return DataTable::of($pm)
|
return DataTable::of($pm)
|
||||||
|
|||||||
@ -80,7 +80,7 @@ class CreateCatalogoLibros extends Migration
|
|||||||
$this->forge->addUniqueKey('isk');
|
$this->forge->addUniqueKey('isk');
|
||||||
$this->forge->addForeignKey('cliente_id', 'clientes', 'id');
|
$this->forge->addForeignKey('cliente_id', 'clientes', 'id');
|
||||||
|
|
||||||
$this->forge->createTable('catalogo_libros');
|
$this->forge->createTable('catalogo_libros',true);
|
||||||
|
|
||||||
$this->db->query('SET foreign_key_checks = 1');
|
$this->db->query('SET foreign_key_checks = 1');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Database\Migrations;
|
||||||
|
|
||||||
|
use App\Models\OrdenTrabajo\OrdenTrabajoTarea;
|
||||||
|
use CodeIgniter\Database\Migration;
|
||||||
|
use CodeIgniter\Database\RawSql;
|
||||||
|
use CodeIgniter\I18n\Time;
|
||||||
|
|
||||||
|
class AddClickColumnOrdenTrabajoTarea extends Migration
|
||||||
|
{
|
||||||
|
|
||||||
|
protected array $COLUMNS = [
|
||||||
|
"click_init" => [
|
||||||
|
"type" => "INT",
|
||||||
|
"unsigned" => true,
|
||||||
|
"default" => 0,
|
||||||
|
"comment" => "Click iniciales de una tarea de impresion"
|
||||||
|
],
|
||||||
|
"click_end" => [
|
||||||
|
"type" => "INT",
|
||||||
|
"unsigned" => true,
|
||||||
|
"default" => 0,
|
||||||
|
"comment" => "Click finales de una tarea de impresion"
|
||||||
|
],
|
||||||
|
];
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
$this->forge->addColumn('orden_trabajo_tareas', $this->COLUMNS);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
$this->forge->dropColumn('orden_trabajo_tareas', array_keys($this->COLUMNS));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Database\Migrations;
|
||||||
|
|
||||||
|
use CodeIgniter\Database\Migration;
|
||||||
|
|
||||||
|
class AddPliegoColumnOrdenTrabajoTarea extends Migration
|
||||||
|
{
|
||||||
|
|
||||||
|
protected array $COLUMNS = [
|
||||||
|
"pliego_1" => [
|
||||||
|
"type" => "INT",
|
||||||
|
"unsigned" => true,
|
||||||
|
"default" => 0,
|
||||||
|
],
|
||||||
|
"pliego_1_total" => [
|
||||||
|
"type" => "INT",
|
||||||
|
"unsigned" => true,
|
||||||
|
"default" => 0,
|
||||||
|
],
|
||||||
|
"pliego_2" => [
|
||||||
|
"type" => "INT",
|
||||||
|
"unsigned" => true,
|
||||||
|
"default" => 0,
|
||||||
|
],
|
||||||
|
"pliego_2_total" => [
|
||||||
|
"type" => "INT",
|
||||||
|
"unsigned" => true,
|
||||||
|
"default" => 0,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
$this->forge->addColumn('orden_trabajo_tareas', $this->COLUMNS);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
$this->forge->dropColumn('orden_trabajo_tareas', array_keys($this->COLUMNS));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Database\Migrations;
|
||||||
|
|
||||||
|
use CodeIgniter\Database\Migration;
|
||||||
|
|
||||||
|
class AddPliegoColumnOrdenTrabajoTarea extends Migration
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
$this->forge->dropForeignKey('orden_trabajo_tarea_progress_dates','orden_trabajo_tarea_progress_dates_ot_tarea_id_foreign');
|
||||||
|
$this->forge->addForeignKey("ot_tarea_id","orden_trabajo_tareas","id",'CASCADE','CASCADE');
|
||||||
|
$this->forge->processIndexes('orden_trabajo_tarea_progress_dates');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
$this->forge->dropForeignKey('orden_trabajo_tarea_progress_dates','orden_trabajo_tarea_progress_dates_ot_tarea_id_foreign');
|
||||||
|
$this->forge->addForeignKey("ot_tarea_id","orden_trabajo_tareas","id");
|
||||||
|
$this->forge->processIndexes('orden_trabajo_tarea_progress_dates');
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -194,39 +194,75 @@ class PresupuestoLineaEntity extends \CodeIgniter\Entity\Entity
|
|||||||
return $m->find($this->attributes['tarifa_impresion_id']);
|
return $m->find($this->attributes['tarifa_impresion_id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function get_impresion_logo(){
|
public function get_impresion_logo()
|
||||||
|
{
|
||||||
$logo = config(LogoImpresion::class);
|
$logo = config(LogoImpresion::class);
|
||||||
return $logo->get_logo_path($this->attributes["tipo"]);
|
return $logo->get_logo_path($this->attributes["tipo"]);
|
||||||
}
|
}
|
||||||
public function get_nombre_tarea() : ?string
|
public function get_nombre_tarea(): ?string
|
||||||
{
|
{
|
||||||
$nombre = null;
|
$nombre = null;
|
||||||
$impresion_bn = ["lp_bn","lp_bnhq","lp_rot_bn"];
|
$impresion_bn = ["lp_bn", "lp_bnhq", "lp_rot_bn"];
|
||||||
$impresion_color = ["lp_color","lp_colorhq","lp_rot_color"];
|
$impresion_color = ["lp_color", "lp_colorhq", "lp_rot_color"];
|
||||||
$impresion_cubierta = ["lp_cubierta"];
|
$impresion_cubierta = ["lp_cubierta"];
|
||||||
$impresion_guardas = ["lp_guardas"];
|
$impresion_guardas = ["lp_guardas"];
|
||||||
$impresion_sobrecubierta = ["lp_sobrecubierta"];
|
$impresion_sobrecubierta = ["lp_sobrecubierta"];
|
||||||
|
|
||||||
$is_bn = in_array($this->attributes["tipo"],$impresion_bn);
|
$is_bn = in_array($this->attributes["tipo"], $impresion_bn);
|
||||||
$is_color = in_array($this->attributes["tipo"],$impresion_color);
|
$is_color = in_array($this->attributes["tipo"], $impresion_color);
|
||||||
$is_impresion_cubierta = in_array($this->attributes["tipo"],$impresion_cubierta);
|
$is_impresion_cubierta = in_array($this->attributes["tipo"], $impresion_cubierta);
|
||||||
$is_impresion_guarda = in_array($this->attributes["tipo"],$impresion_guardas);
|
$is_impresion_guarda = in_array($this->attributes["tipo"], $impresion_guardas);
|
||||||
$is_impresion_sobrecubierta = in_array($this->attributes["tipo"],$impresion_sobrecubierta);
|
$is_impresion_sobrecubierta = in_array($this->attributes["tipo"], $impresion_sobrecubierta);
|
||||||
|
|
||||||
if($is_bn) $nombre ="Impresión B/N";
|
if ($is_bn) $nombre = "Impresión B/N";
|
||||||
if($is_color) $nombre ="Impresión color";
|
if ($is_color) $nombre = "Impresión color";
|
||||||
if($is_impresion_cubierta) $nombre ="Impresión cubierta";
|
if ($is_impresion_cubierta) $nombre = "Impresión cubierta";
|
||||||
if($is_impresion_guarda) $nombre ="Impresión guarda";
|
if ($is_impresion_guarda) $nombre = "Impresión guarda";
|
||||||
if($is_impresion_sobrecubierta) $nombre ="Impresión sobrecubierta";
|
if ($is_impresion_sobrecubierta) $nombre = "Impresión sobrecubierta";
|
||||||
|
|
||||||
return $nombre;
|
return $nombre;
|
||||||
}
|
}
|
||||||
public function isRotativa() : bool
|
public function isGuarda(): bool
|
||||||
{
|
{
|
||||||
return in_array($this->attributes['tipo'],['lp_rot_color','lp_rot_bn']);
|
return in_array($this->attributes["tipo"], ["lp_guardas"]);
|
||||||
}
|
}
|
||||||
public function isColor():bool {
|
public function isCubierta(): bool
|
||||||
return in_array($this->attributes['tipo'],['lp_color','lp_colorhq','lp_rot_color']);
|
{
|
||||||
|
return in_array($this->attributes["tipo"], ["lp_cubierta"]);
|
||||||
|
}
|
||||||
|
public function isSobreCubierta(): bool
|
||||||
|
{
|
||||||
|
return in_array($this->attributes["tipo"], ["lp_sobrecubierta"]);
|
||||||
|
}
|
||||||
|
public function isRotativa(): bool
|
||||||
|
{
|
||||||
|
return in_array($this->attributes['tipo'], ['lp_rot_color', 'lp_rot_bn']);
|
||||||
|
}
|
||||||
|
public function isColor(): bool
|
||||||
|
{
|
||||||
|
return in_array($this->attributes['tipo'], ['lp_color', 'lp_colorhq', 'lp_rot_color']);
|
||||||
|
}
|
||||||
|
public function isBN(): bool
|
||||||
|
{
|
||||||
|
return in_array($this->attributes['tipo'], ["lp_bn", "lp_bnhq", "lp_rot_bn"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function tinta(): string
|
||||||
|
{
|
||||||
|
$tinta = "";
|
||||||
|
if ($this->isCubierta()) {
|
||||||
|
$paginas = $this->attributes['paginas'];
|
||||||
|
if ($paginas / 2 == 1) {
|
||||||
|
$tinta = '4/0';
|
||||||
|
}
|
||||||
|
if ($paginas / 2 == 2) {
|
||||||
|
$tinta = '4/4';
|
||||||
|
}
|
||||||
|
} elseif ($this->isColor()) {
|
||||||
|
$tinta = '4/4';
|
||||||
|
} elseif ($this->isBN()) {
|
||||||
|
$tinta = '4/0';
|
||||||
|
}
|
||||||
|
return $tinta;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -68,7 +68,7 @@ class OrdenTrabajoEntity extends Entity
|
|||||||
/**
|
/**
|
||||||
* Devuelve las tareas de la orden de trabajo.
|
* Devuelve las tareas de la orden de trabajo.
|
||||||
*
|
*
|
||||||
* @return array<OrdenTrabajoTarea>
|
* @return array<OrdenTrabajoTareaEntity>
|
||||||
*/
|
*/
|
||||||
public function tareas(): array
|
public function tareas(): array
|
||||||
{
|
{
|
||||||
|
|||||||
@ -34,8 +34,11 @@ class OrdenTrabajoTareaEntity extends Entity
|
|||||||
"comment" => null,
|
"comment" => null,
|
||||||
"click_init" => null,
|
"click_init" => null,
|
||||||
"click_end" => null,
|
"click_end" => null,
|
||||||
|
"pliego_1" => null,
|
||||||
|
"pliego_1_total" => null,
|
||||||
|
"pliego_2" => null,
|
||||||
|
"pliego_2_total" => null,
|
||||||
];
|
];
|
||||||
protected $datamap = [];
|
|
||||||
protected $dates = ['created_at', 'updated_at', 'deleted_at'];
|
protected $dates = ['created_at', 'updated_at', 'deleted_at'];
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
"id" => "integer",
|
"id" => "integer",
|
||||||
@ -52,6 +55,10 @@ class OrdenTrabajoTareaEntity extends Entity
|
|||||||
"comment" => "?string",
|
"comment" => "?string",
|
||||||
"click_init" => "integer",
|
"click_init" => "integer",
|
||||||
"click_end" => "integer",
|
"click_end" => "integer",
|
||||||
|
"pliego_1" => "integer",
|
||||||
|
"pliego_1_total" => "integer",
|
||||||
|
"pliego_2" => "integer",
|
||||||
|
"pliego_2_total" => "integer",
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -113,6 +120,20 @@ class OrdenTrabajoTareaEntity extends Entity
|
|||||||
$m = model(PresupuestoAcabadosModel::class);
|
$m = model(PresupuestoAcabadosModel::class);
|
||||||
return $m->find($this->attributes["presupuesto_linea_id"]);
|
return $m->find($this->attributes["presupuesto_linea_id"]);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Devuelve el presupuesto acabado origen de esta tarea
|
||||||
|
*
|
||||||
|
* @return ?PresupuestoManipuladosEntity
|
||||||
|
*/
|
||||||
|
public function presupuesto_manipulado(): ?PresupuestoManipuladosEntity
|
||||||
|
{
|
||||||
|
$m = model(PresupuestoManipuladosModel::class);
|
||||||
|
$p = null;
|
||||||
|
if ($this->attributes['presupuesto_manipulado_id']) {
|
||||||
|
$p = $m->find($this->attributes["presupuesto_manipulado_id"]);
|
||||||
|
}
|
||||||
|
return $p;
|
||||||
|
}
|
||||||
public function imposicion(): ?Imposicion
|
public function imposicion(): ?Imposicion
|
||||||
{
|
{
|
||||||
$m = model(ImposicionModel::class);
|
$m = model(ImposicionModel::class);
|
||||||
@ -152,5 +173,13 @@ class OrdenTrabajoTareaEntity extends Entity
|
|||||||
{
|
{
|
||||||
return $this->attributes['click_end'] - $this->attributes['click_init'];
|
return $this->attributes['click_end'] - $this->attributes['click_init'];
|
||||||
}
|
}
|
||||||
|
public function isCosido(): bool
|
||||||
|
{
|
||||||
|
$isTareaCosido = false;
|
||||||
|
$pm = $this->presupuesto_manipulado();
|
||||||
|
if ($pm) {
|
||||||
|
$isTareaCosido = $pm->tarifa()->isCosido();
|
||||||
|
}
|
||||||
|
return $isTareaCosido;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,4 +33,9 @@ class TarifaManipuladoEntity extends \CodeIgniter\Entity\Entity
|
|||||||
"user_updated_id" => "int",
|
"user_updated_id" => "int",
|
||||||
"is_deleted" => "int",
|
"is_deleted" => "int",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public function isCosido(): bool
|
||||||
|
{
|
||||||
|
return in_array($this->attributes['id'], [3, 17]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,13 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
return [
|
return [
|
||||||
|
'id' => 'ID',
|
||||||
'fechaCreacion' => 'Fecha de creación',
|
'fechaCreacion' => 'Fecha de creación',
|
||||||
"fechaAlbaran" => 'Fecha de albarán',
|
"fechaAlbaran" => 'Fecha de albarán',
|
||||||
'numEnvio' => 'Número de envío',
|
'numEnvio' => 'Número de envío',
|
||||||
'cliente' => 'Cliente',
|
'cliente' => 'Cliente',
|
||||||
'albaran' => 'Albarán',
|
'albaran' => 'Albarán',
|
||||||
|
'numAlbaran' => 'Número de albarán',
|
||||||
|
'numPedidos' => 'Número de Pedidos',
|
||||||
|
'unidadesTotal' => 'Unidades Totales',
|
||||||
|
'albaranes' => 'Albaranes',
|
||||||
'att' => 'Att',
|
'att' => 'Att',
|
||||||
'direccion' => 'Dirección',
|
'direccion' => 'Dirección',
|
||||||
'cajas' => 'Cajas',
|
'cajas' => 'Cajas',
|
||||||
|
'acciones' => 'Acciones',
|
||||||
|
|
||||||
'unidades' => 'Unidades',
|
'unidades' => 'Unidades',
|
||||||
'titulo' => 'Título',
|
'titulo' => 'Título',
|
||||||
@ -28,4 +34,6 @@ return [
|
|||||||
|
|
||||||
'iva4' => 'IVA 4%',
|
'iva4' => 'IVA 4%',
|
||||||
'iva21' => 'IVA 21%',
|
'iva21' => 'IVA 21%',
|
||||||
|
|
||||||
|
'editAlbaran' => 'Editar albarán',
|
||||||
];
|
];
|
||||||
@ -9,12 +9,13 @@ return [
|
|||||||
'albaranes' => 'Albaranes',
|
'albaranes' => 'Albaranes',
|
||||||
'envioSimpleMultiple' => 'Envío simple/múltiple',
|
'envioSimpleMultiple' => 'Envío simple/múltiple',
|
||||||
'nuevoEnvio' => 'Nuevo envío',
|
'nuevoEnvio' => 'Nuevo envío',
|
||||||
'buscadorPedidosTitle' => 'Código Pedido o ISBN',
|
'buscadorPedidosTitle' => 'Código OT o ISBN',
|
||||||
'buscadorPedidosTitle2' => 'Código Pedido o título',
|
'buscadorPedidosTitle2' => 'Código OT o título',
|
||||||
'selectDirecciones' => 'Dirección de envio',
|
'selectDirecciones' => 'Dirección de envio',
|
||||||
'listadoEnvios' => 'Listado de envíos',
|
'listadoEnvios' => 'Listado de envíos',
|
||||||
'idEnvio' => 'ID Envío',
|
'idEnvio' => 'ID Envío',
|
||||||
'numeroPedidos' => 'Nº Pedidos',
|
'numeroPedidos' => 'Nº Pedidos',
|
||||||
|
'numeroOts' => 'Nº OTs',
|
||||||
'numeroLineas' => 'Nº Líneas',
|
'numeroLineas' => 'Nº Líneas',
|
||||||
'att' => 'Att',
|
'att' => 'Att',
|
||||||
'direccion' => 'Dirección',
|
'direccion' => 'Dirección',
|
||||||
@ -28,6 +29,8 @@ return [
|
|||||||
'backToPanel' => 'Volver al panel',
|
'backToPanel' => 'Volver al panel',
|
||||||
'no' => 'No',
|
'no' => 'No',
|
||||||
'si' => 'Sí',
|
'si' => 'Sí',
|
||||||
|
'todos' => 'Todos',
|
||||||
|
'impresoraEtiquetas' => 'Impresora de etiquetas',
|
||||||
|
|
||||||
'envio' => 'Envío',
|
'envio' => 'Envío',
|
||||||
'addLineasEnvio' => 'Añadir líneas al envío',
|
'addLineasEnvio' => 'Añadir líneas al envío',
|
||||||
|
|||||||
@ -50,6 +50,7 @@ return [
|
|||||||
"pendientes" => "Pendientes",
|
"pendientes" => "Pendientes",
|
||||||
"ferro_ok" => "Ferro ok",
|
"ferro_ok" => "Ferro ok",
|
||||||
"envio" => "Envío",
|
"envio" => "Envío",
|
||||||
|
"ferro" => "Ferro",
|
||||||
"ot" => "Orden trabajo",
|
"ot" => "Orden trabajo",
|
||||||
"ots" => "Órdenes trabajo",
|
"ots" => "Órdenes trabajo",
|
||||||
"tiempo_procesamiento" => "Tiempo procesamiento",
|
"tiempo_procesamiento" => "Tiempo procesamiento",
|
||||||
@ -121,8 +122,9 @@ return [
|
|||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
|
"progress_ferro" => "Ferro",
|
||||||
"progress_preimpresion" => "Preimpresión",
|
"progress_preimpresion" => "Preimpresión",
|
||||||
"progress_logistica" => "Ferro/Logística",
|
"progress_logistica" => "Logística",
|
||||||
"progress_impresion" => "Impresión",
|
"progress_impresion" => "Impresión",
|
||||||
"progress_manipulado" => "Manipulado/Acabado",
|
"progress_manipulado" => "Manipulado/Acabado",
|
||||||
|
|
||||||
|
|||||||
@ -173,6 +173,37 @@ class AlbaranModel extends \App\Models\BaseModel
|
|||||||
return $albaran_data;
|
return $albaran_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getAlbaranData($albaran_id=null){
|
||||||
|
if (!$albaran_id) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
$albaran_data = $this->db->table('albaranes t1')
|
||||||
|
->select("
|
||||||
|
t1.id,
|
||||||
|
t1.att_albaran AS att,
|
||||||
|
t1.direccion_albaran AS direccion,
|
||||||
|
t1.envio_id,
|
||||||
|
t1.numero_albaran AS numero_albaran,
|
||||||
|
DATE_FORMAT(t1.created_at, '%d/%m/%Y') AS fecha_creacion,
|
||||||
|
DATE_FORMAT(t1.fecha_albaran, '%d/%m/%Y') AS fecha_albaran,
|
||||||
|
t1.mostrar_precios AS mostrar_precios,
|
||||||
|
t2.nombre AS cliente,
|
||||||
|
t1.cajas AS cajas
|
||||||
|
")
|
||||||
|
->join('clientes t2', 't1.cliente_id = t2.id', 'left')
|
||||||
|
->where('t1.id', $albaran_id)
|
||||||
|
->where('t1.deleted_at IS NULL')
|
||||||
|
->get()
|
||||||
|
->getResultObject();
|
||||||
|
if (count($albaran_data) == 0) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $albaran_data[0];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get resource data for creating PDFs.
|
* Get resource data for creating PDFs.
|
||||||
*
|
*
|
||||||
@ -203,4 +234,25 @@ class AlbaranModel extends \App\Models\BaseModel
|
|||||||
|
|
||||||
return $builder;
|
return $builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getDatatableQuery()
|
||||||
|
{
|
||||||
|
$builder = $this->db
|
||||||
|
->table($this->table . " t1")
|
||||||
|
->select(
|
||||||
|
"t1.id, t1.numero_albaran as numero_albaran, t1.envio_id as envio_id, GROUP_CONCAT(DISTINCT t4.id) AS pedidos,
|
||||||
|
t5.nombre as cliente, t1.att_albaran as att, t1.direccion_albaran as direccion, SUM(t2.cantidad) as unidades_total,
|
||||||
|
t1.cajas as cajas"
|
||||||
|
)
|
||||||
|
->join("albaranes_lineas t2", "t1.id = t2.albaran_id", "left")
|
||||||
|
->join("pedidos_linea t3", "t2.pedido_linea_id = t3.id", "left")
|
||||||
|
->join("pedidos t4", "t3.pedido_id = t4.id", "left")
|
||||||
|
->join("clientes t5", "t1.cliente_id = t5.id", "left");
|
||||||
|
|
||||||
|
$builder->where("t1.deleted_at IS NULL");
|
||||||
|
$builder->where("t2.deleted_at IS NULL");
|
||||||
|
$builder->groupBy("t1.id");
|
||||||
|
|
||||||
|
return $builder;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -43,12 +43,14 @@ class EnvioModel extends Model
|
|||||||
$builder = $this->db
|
$builder = $this->db
|
||||||
->table($this->table . " t1")
|
->table($this->table . " t1")
|
||||||
->select(
|
->select(
|
||||||
"t1.id, GROUP_CONCAT(DISTINCT t2.pedido_id) AS pedidos,
|
"t1.id, GROUP_CONCAT(DISTINCT t5.id) AS ots,
|
||||||
COUNT(t2.id) AS num_lineas,
|
COUNT(t2.id) AS num_lineas,
|
||||||
t1.att, t1.direccion, t1.ciudad, t3.nombre as pais, t1.cp, t1.email, t1.telefono, t1.finalizado"
|
t1.att, t1.direccion, t1.ciudad, t3.nombre as pais, t1.cp, t1.email, t1.telefono, t1.finalizado"
|
||||||
);
|
);
|
||||||
$builder->join("envios_lineas t2", "t2.envio_id = t1.id", "left");
|
$builder->join("envios_lineas t2", "t2.envio_id = t1.id", "left");
|
||||||
$builder->join("lg_paises t3", "t3.id = t1.pais_id", "left");
|
$builder->join("lg_paises t3", "t3.id = t1.pais_id", "left");
|
||||||
|
$builder->join("pedidos t4", "t4.id = t2.pedido_id", "left");
|
||||||
|
$builder->join('ordenes_trabajo t5', 't5.pedido_id = t4.id');
|
||||||
|
|
||||||
$builder->groupBy("t1.id");
|
$builder->groupBy("t1.id");
|
||||||
return $builder;
|
return $builder;
|
||||||
|
|||||||
@ -32,7 +32,11 @@ class OrdenTrabajoTarea extends Model
|
|||||||
"tipo_corte",
|
"tipo_corte",
|
||||||
"comment",
|
"comment",
|
||||||
"click_init",
|
"click_init",
|
||||||
"click_end"
|
"click_end",
|
||||||
|
"pliego_1",
|
||||||
|
"pliego_1_total",
|
||||||
|
"pliego_2",
|
||||||
|
"pliego_2_total"
|
||||||
];
|
];
|
||||||
|
|
||||||
protected bool $allowEmptyInserts = false;
|
protected bool $allowEmptyInserts = false;
|
||||||
|
|||||||
@ -57,7 +57,7 @@ class ImpresoraEtiquetaService extends BaseService
|
|||||||
return ["impresora" => $impresora, "content" => $th->getMessage(), "status" => $status];
|
return ["impresora" => $impresora, "content" => $th->getMessage(), "status" => $status];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected function createEtiqueta(array $data_label = []): ?string
|
public function createEtiqueta(array $data_label = []): ?string
|
||||||
{
|
{
|
||||||
$xml = new DOMDocument('1.0', 'utf-8');
|
$xml = new DOMDocument('1.0', 'utf-8');
|
||||||
$labels = $xml->createElement("labels");
|
$labels = $xml->createElement("labels");
|
||||||
@ -76,7 +76,7 @@ class ImpresoraEtiquetaService extends BaseService
|
|||||||
$xml->appendChild($labels);
|
$xml->appendChild($labels);
|
||||||
return $xml->saveXML();
|
return $xml->saveXML();
|
||||||
}
|
}
|
||||||
protected function sendToImpresoraEtiqueta(string $name, string $content, ImpresoraEtiquetaEntity $impresoraEtiqueta): bool
|
public function sendToImpresoraEtiqueta(string $name, string $content, ImpresoraEtiquetaEntity $impresoraEtiqueta): bool
|
||||||
{
|
{
|
||||||
$tmpFile = tmpfile();
|
$tmpFile = tmpfile();
|
||||||
|
|
||||||
|
|||||||
@ -7,111 +7,6 @@ use Config\Services;
|
|||||||
|
|
||||||
class LogisticaService
|
class LogisticaService
|
||||||
{
|
{
|
||||||
public static function findPedidoOrISBN($search)
|
|
||||||
{
|
|
||||||
$multienvio = false;
|
|
||||||
$direcciones = [];
|
|
||||||
|
|
||||||
$modelPedido = model('App\Models\Pedidos\PedidoModel');
|
|
||||||
|
|
||||||
$search = trim($search);
|
|
||||||
$searchClean = str_replace('-', '', $search);
|
|
||||||
$modelPedido = model('App\Models\Pedidos\PedidoModel');
|
|
||||||
|
|
||||||
$builder = $modelPedido->builder();
|
|
||||||
|
|
||||||
$builder->select([
|
|
||||||
'pedidos.id as pedido_id',
|
|
||||||
'pedidos_linea.id as linea_id',
|
|
||||||
'pedidos_linea.cantidad as cantidad_linea',
|
|
||||||
'presupuestos.id as presupuesto_id',
|
|
||||||
]);
|
|
||||||
|
|
||||||
$builder->join('pedidos_linea', 'pedidos_linea.pedido_id = pedidos.id', 'left');
|
|
||||||
$builder->join('presupuestos', 'presupuestos.id = pedidos_linea.presupuesto_id', 'left');
|
|
||||||
$builder->join('envios_lineas', 'envios_lineas.pedido_id = pedidos_linea.pedido_id', 'left');
|
|
||||||
|
|
||||||
$builder->groupStart()
|
|
||||||
->where('pedidos.id', $search)
|
|
||||||
->whereIn('pedidos.estado', ['finalizado', 'produccion'])
|
|
||||||
->orWhere("REPLACE(presupuestos.isbn, '-', '')", $searchClean)
|
|
||||||
->groupEnd();
|
|
||||||
|
|
||||||
$builder->groupBy('pedidos_linea.id');
|
|
||||||
$builder->having('IFNULL(SUM(envios_lineas.unidades_envio), 0) < cantidad_linea', null, false);
|
|
||||||
|
|
||||||
|
|
||||||
$result = $builder->get()->getResult();
|
|
||||||
|
|
||||||
if (empty($result)) {
|
|
||||||
$response = [
|
|
||||||
'status' => false,
|
|
||||||
'message' => lang('Logistica.errors.notFound'),
|
|
||||||
];
|
|
||||||
return $response;
|
|
||||||
}
|
|
||||||
|
|
||||||
$PresupuestoDireccionesModel = model('App\Models\Presupuestos\PresupuestoDireccionesModel');
|
|
||||||
$numDirecciones = $PresupuestoDireccionesModel->where('presupuesto_id', $result[0]->presupuesto_id)
|
|
||||||
->countAllResults();
|
|
||||||
if ($numDirecciones == 0) {
|
|
||||||
$response = [
|
|
||||||
'status' => false,
|
|
||||||
'message' => lang('Logistica.errors.noAddresses'),
|
|
||||||
];
|
|
||||||
return $response;
|
|
||||||
} else if ($numDirecciones > 1) {
|
|
||||||
$multienvio = true;
|
|
||||||
$dirs = $PresupuestoDireccionesModel->select('direccion')->where('presupuesto_id', $result[0]->presupuesto_id)
|
|
||||||
->findAll();
|
|
||||||
foreach ($dirs as $key => $direccion) {
|
|
||||||
$modelEnvioLineasModel = model('App\Models\Logistica\EnvioLineaModel');
|
|
||||||
$unidades_en_direccion = $modelEnvioLineasModel->select('SUM(envios_lineas.unidades_envio) as unidades_enviadas,
|
|
||||||
envios_lineas.unidades_total')
|
|
||||||
->join('envios', 'envios.id = envios_lineas.envio_id')
|
|
||||||
->where('pedido_id', $result[0]->pedido_id)
|
|
||||||
->where('envios.direccion', $direccion->direccion)
|
|
||||||
->where('envios.finalizado', 1)
|
|
||||||
->groupBy('pedido_id')->get()->getResult();
|
|
||||||
if (count($unidades_en_direccion) == 0 || $unidades_en_direccion[0]->unidades_enviadas < $unidades_en_direccion[0]->unidades_total) {
|
|
||||||
array_push($direcciones, $direccion->direccion);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$response = [
|
|
||||||
'status' => true,
|
|
||||||
'data' => $result[0],
|
|
||||||
];
|
|
||||||
|
|
||||||
if ($multienvio) {
|
|
||||||
$response_envio = [
|
|
||||||
'status' => true,
|
|
||||||
'multienvio' => true,
|
|
||||||
'direcciones' => $direcciones,
|
|
||||||
'pedido_id' => $result[0]->pedido_id,
|
|
||||||
];
|
|
||||||
return $response_envio;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$direccion = $PresupuestoDireccionesModel->select('direccion')->where('presupuesto_id', $result[0]->presupuesto_id)
|
|
||||||
->first()->direccion;
|
|
||||||
$response_envio = LogisticaService::generateEnvio($result[0]->pedido_id, $direccion);
|
|
||||||
if ($response_envio['status'] == false) {
|
|
||||||
$response = [
|
|
||||||
'status' => false,
|
|
||||||
'message' => $response_envio['message'],
|
|
||||||
];
|
|
||||||
return $response;
|
|
||||||
} else {
|
|
||||||
$response['data']->id_envio = $response_envio['data']['id_envio'];
|
|
||||||
$response['data']->multienvio = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $response;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static function findLineaEnvioPorEnvio(int $envio_id)
|
public static function findLineaEnvioPorEnvio(int $envio_id)
|
||||||
@ -142,8 +37,8 @@ class LogisticaService
|
|||||||
// 3. Subconsulta principal
|
// 3. Subconsulta principal
|
||||||
$subBuilder = $db->table('pedidos_linea pl')
|
$subBuilder = $db->table('pedidos_linea pl')
|
||||||
->select("
|
->select("
|
||||||
pl.id AS id,
|
ot.id AS id,
|
||||||
CONCAT('[', p.id, '] - ', pr.titulo) AS name,
|
CONCAT('[', ot.id, '] - ', pr.titulo) AS name,
|
||||||
(
|
(
|
||||||
SELECT IFNULL(SUM(el.unidades_envio), 0)
|
SELECT IFNULL(SUM(el.unidades_envio), 0)
|
||||||
FROM envios_lineas el
|
FROM envios_lineas el
|
||||||
@ -183,15 +78,15 @@ class LogisticaService
|
|||||||
return $builder;
|
return $builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function findPedidosNewEnvio()
|
public static function findForNewEnvio()
|
||||||
{
|
{
|
||||||
$db = \Config\Database::connect();
|
$db = \Config\Database::connect();
|
||||||
|
|
||||||
// 3. Subconsulta principal
|
// 3. Subconsulta principal
|
||||||
$subBuilder = $db->table('pedidos_linea pl')
|
$subBuilder = $db->table('pedidos_linea pl')
|
||||||
->select("
|
->select("
|
||||||
pl.id AS id,
|
ot.id AS id,
|
||||||
CONCAT('[', p.id, '] - ', pr.titulo) AS name,
|
CONCAT('[', ot.id, '] - ', pr.titulo) AS name,
|
||||||
(
|
(
|
||||||
SELECT IFNULL(SUM(el.unidades_envio), 0)
|
SELECT IFNULL(SUM(el.unidades_envio), 0)
|
||||||
FROM envios_lineas el
|
FROM envios_lineas el
|
||||||
@ -437,7 +332,6 @@ class LogisticaService
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static function finalizarEnvio($envio_id, $finalizar_ot = false)
|
public static function finalizarEnvio($envio_id, $finalizar_ot = false)
|
||||||
{
|
{
|
||||||
// hay que comprobar que para todas las lineas de envio de este envio
|
// hay que comprobar que para todas las lineas de envio de este envio
|
||||||
@ -524,4 +418,66 @@ class LogisticaService
|
|||||||
}
|
}
|
||||||
return $data_return;
|
return $data_return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function generateEtiquetasTitulos($envio, $lineas, $printer, $cajas)
|
||||||
|
{
|
||||||
|
$data = [
|
||||||
|
"printer" => $printer->name,
|
||||||
|
"header" => [
|
||||||
|
"_FORMAT" => "E:PEDIDO.ZPL",
|
||||||
|
"_QUANTITY" => 1,
|
||||||
|
"_PRINBTERNAME" => $printer->name,
|
||||||
|
"_JOBNAME" => "LBL101"
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach ($lineas as $linea) {
|
||||||
|
$data["labels"][] = [
|
||||||
|
"cliente" => $envio->cliente,
|
||||||
|
"titulo" => "[" . $linea->pedido_id . "] - " . $linea->titulo,
|
||||||
|
"cantidad" => $linea->unidades_envio,
|
||||||
|
"tirada" => $linea->unidades_total,
|
||||||
|
"cajas" => $cajas,
|
||||||
|
"ean" => null,
|
||||||
|
"nombre" => $envio->att,
|
||||||
|
"direccion" => $envio->direccion,
|
||||||
|
"notas" => "",
|
||||||
|
"refcliente" => $linea->refcliente,
|
||||||
|
"npedido" => $linea->pedido_id
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
$servicioImpresora = new ImpresoraEtiquetaService();
|
||||||
|
$xml = $servicioImpresora->createEtiqueta($data);
|
||||||
|
if($xml == null){
|
||||||
|
return [
|
||||||
|
'status' => false,
|
||||||
|
'message' => lang('Logistica.errors.noEtiquetas'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
$sk_environment = getenv('SK_ENVIRONMENT');
|
||||||
|
if($sk_environment == 'production'){
|
||||||
|
|
||||||
|
$status = $servicioImpresora->sendToImpresoraEtiqueta("ETIQUETA", $xml, $printer);
|
||||||
|
if ($status) {
|
||||||
|
return [
|
||||||
|
'status' => true,
|
||||||
|
'message' => lang('Logistica.success.imprimirEtiquetas'),
|
||||||
|
'data' => $xml
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
return [
|
||||||
|
'status' => false,
|
||||||
|
'message' => lang('Logistica.errors.noEtiquetas'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
return [
|
||||||
|
'status' => true,
|
||||||
|
'message' => lang('Logistica.success.imprimirEtiquetas'),
|
||||||
|
'data' => $xml
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -98,6 +98,13 @@ class ProductionService extends BaseService
|
|||||||
* @var boolean
|
* @var boolean
|
||||||
*/
|
*/
|
||||||
public bool $isGofrado = false; //* CHECK DONE
|
public bool $isGofrado = false; //* CHECK DONE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indica si la orden de trabajo contiene cosido
|
||||||
|
* Se usa para mostrar la fecha correspondiente en la vista y pliegos
|
||||||
|
* @var boolean
|
||||||
|
*/
|
||||||
|
public bool $isCosido = false; //* CHECK DONE
|
||||||
/**
|
/**
|
||||||
* Indica si la orden de trabajo contiene gofrado
|
* Indica si la orden de trabajo contiene gofrado
|
||||||
* Se usa para mostrar la fecha correspondiente en la vista
|
* Se usa para mostrar la fecha correspondiente en la vista
|
||||||
@ -222,7 +229,6 @@ class ProductionService extends BaseService
|
|||||||
{
|
{
|
||||||
return $this->ot;
|
return $this->ot;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Crea una instancia de la orden de trabajo
|
* Crea una instancia de la orden de trabajo
|
||||||
*
|
*
|
||||||
@ -814,6 +820,7 @@ class ProductionService extends BaseService
|
|||||||
"tareas_impresion" => $this->tareas_impresion(),
|
"tareas_impresion" => $this->tareas_impresion(),
|
||||||
"tiempo_procesamiento" => $this->getTiempoProcesamientoHHMM(),
|
"tiempo_procesamiento" => $this->getTiempoProcesamientoHHMM(),
|
||||||
"statusColor" => $this->getOtColorStatus(),
|
"statusColor" => $this->getOtColorStatus(),
|
||||||
|
"tareaCosido" => $this->getTareaCosido(),
|
||||||
];
|
];
|
||||||
return $summary;
|
return $summary;
|
||||||
}
|
}
|
||||||
@ -842,8 +849,8 @@ class ProductionService extends BaseService
|
|||||||
"tiempo_impresion" => $this->getTiempoTareasImpresionHHMM(),
|
"tiempo_impresion" => $this->getTiempoTareasImpresionHHMM(),
|
||||||
"colors" => $this->getPdfColors(),
|
"colors" => $this->getPdfColors(),
|
||||||
"isPOD" => $this->isPOD,
|
"isPOD" => $this->isPOD,
|
||||||
"uvi" => $this->getUVI()
|
"uvi" => $this->getUVI(),
|
||||||
|
"tareaCosido" => $this->getTareaCosido(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
public function getImposicionTareaImpresion(): ?Imposicion
|
public function getImposicionTareaImpresion(): ?Imposicion
|
||||||
@ -894,27 +901,27 @@ class ProductionService extends BaseService
|
|||||||
public function getPresupuestoLineaImpresion() {}
|
public function getPresupuestoLineaImpresion() {}
|
||||||
public function tareas_acabado(): array
|
public function tareas_acabado(): array
|
||||||
{
|
{
|
||||||
$q = $this->otTarea->where("presupuesto_acabado_id IS NOT NULL", NULL, FALSE)->findAll();
|
$q = $this->otTarea->where('orden_trabajo_id', $this->ot->id)->where("presupuesto_acabado_id IS NOT NULL", NULL, FALSE)->findAll();
|
||||||
return $q;
|
return $q;
|
||||||
}
|
}
|
||||||
public function tareas_impresion(): array
|
public function tareas_impresion(): array
|
||||||
{
|
{
|
||||||
$q = $this->otTarea->where("presupuesto_linea_id IS NOT NULL", NULL, FALSE)->findAll();
|
$q = $this->otTarea->where('orden_trabajo_id', $this->ot->id)->where("presupuesto_linea_id IS NOT NULL", NULL, FALSE)->findAll();
|
||||||
return $q;
|
return $q;
|
||||||
}
|
}
|
||||||
public function tareas_encuadernacion(): array
|
public function tareas_encuadernacion(): array
|
||||||
{
|
{
|
||||||
$q = $this->otTarea->where("presupuesto_encuadernado_id IS NOT NULL", NULL, FALSE)->findAll();
|
$q = $this->otTarea->where('orden_trabajo_id', $this->ot->id)->where("presupuesto_encuadernado_id IS NOT NULL", NULL, FALSE)->findAll();
|
||||||
return $q;
|
return $q;
|
||||||
}
|
}
|
||||||
public function tareas_preimpresion(): array
|
public function tareas_preimpresion(): array
|
||||||
{
|
{
|
||||||
$q = $this->otTarea->where("presupuesto_preimpresion_id IS NOT NULL", NULL, FALSE)->findAll();
|
$q = $this->otTarea->where('orden_trabajo_id', $this->ot->id)->where("presupuesto_preimpresion_id IS NOT NULL", NULL, FALSE)->findAll();
|
||||||
return $q;
|
return $q;
|
||||||
}
|
}
|
||||||
public function tareas_manipulado(): array
|
public function tareas_manipulado(): array
|
||||||
{
|
{
|
||||||
$q = $this->otTarea->where("presupuesto_manipulado_id IS NOT NULL", NULL, FALSE)->findAll();
|
$q = $this->otTarea->where('orden_trabajo_id', $this->ot->id)->where("presupuesto_manipulado_id IS NOT NULL", NULL, FALSE)->findAll();
|
||||||
return $q;
|
return $q;
|
||||||
}
|
}
|
||||||
/**========================================================================
|
/**========================================================================
|
||||||
@ -929,6 +936,18 @@ class ProductionService extends BaseService
|
|||||||
}
|
}
|
||||||
return $this->otTarea->update($tarea_id, $data);
|
return $this->otTarea->update($tarea_id, $data);
|
||||||
}
|
}
|
||||||
|
public function updateOrdenTrabajoTareaPliegos($data_pliegos): bool
|
||||||
|
{
|
||||||
|
$flag = false;
|
||||||
|
$tareas = $this->ot->tareas();
|
||||||
|
foreach ($tareas as $key => $tarea) {
|
||||||
|
if ($tarea->isCosido()) {
|
||||||
|
$flag = $this->otTarea->update($tarea->id, $data_pliegos);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $flag;
|
||||||
|
}
|
||||||
public function storeOrdenTrabajoTareaProgressDate($data): bool
|
public function storeOrdenTrabajoTareaProgressDate($data): bool
|
||||||
{
|
{
|
||||||
$data["action_at"] = Time::now()->format('Y-m-d H:i:s');
|
$data["action_at"] = Time::now()->format('Y-m-d H:i:s');
|
||||||
@ -1618,7 +1637,8 @@ class ProductionService extends BaseService
|
|||||||
"isColor" => $this->isColor,
|
"isColor" => $this->isColor,
|
||||||
"isBN" => $this->isBN,
|
"isBN" => $this->isBN,
|
||||||
"isCorte" => $this->corte(),
|
"isCorte" => $this->corte(),
|
||||||
"isGrapado" => $this->isGrapado
|
"isGrapado" => $this->isGrapado,
|
||||||
|
"isCosido" => $this->cosido(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
public function gofrado(): bool
|
public function gofrado(): bool
|
||||||
@ -1638,6 +1658,20 @@ class ProductionService extends BaseService
|
|||||||
$this->isGofrado = $flag;
|
$this->isGofrado = $flag;
|
||||||
return $this->isGofrado;
|
return $this->isGofrado;
|
||||||
}
|
}
|
||||||
|
public function cosido(): bool
|
||||||
|
{
|
||||||
|
$flag = false;
|
||||||
|
$manipulados = $this->presupuesto->manipulados();
|
||||||
|
foreach ($manipulados as $key => $manipulado) {
|
||||||
|
$tarifa_manipulado = $manipulado->tarifa();
|
||||||
|
if ($tarifa_manipulado->isCosido()) {
|
||||||
|
$flag = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->isCosido = $flag;
|
||||||
|
return $this->isCosido;
|
||||||
|
}
|
||||||
public function uvi(): bool
|
public function uvi(): bool
|
||||||
{
|
{
|
||||||
$flag = false;
|
$flag = false;
|
||||||
@ -1737,4 +1771,16 @@ class ProductionService extends BaseService
|
|||||||
$url = route_to("viewProduccionMaquinistaTareaView", $id);
|
$url = route_to("viewProduccionMaquinistaTareaView", $id);
|
||||||
return "<a type='button' href='$url' class='maquina-btn btn btn-primary btn-md'><span class='ti ti-arrow-big-right'></span></a>";
|
return "<a type='button' href='$url' class='maquina-btn btn btn-primary btn-md'><span class='ti ti-arrow-big-right'></span></a>";
|
||||||
}
|
}
|
||||||
|
public function getTareaCosido(): ?OrdenTrabajoTareaEntity
|
||||||
|
{
|
||||||
|
$tareaCosido = null;
|
||||||
|
$tareas = $this->ot->tareas();
|
||||||
|
foreach ($tareas as $key => $tarea) {
|
||||||
|
if ($tarea->isCosido()) {
|
||||||
|
$tareaCosido = $tarea;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $tareaCosido;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,35 @@
|
|||||||
|
<?= $this->include("themes/_commonPartialsBs/sweetalert") ?>
|
||||||
|
<?= $this->include('themes/_commonPartialsBs/datatables') ?>
|
||||||
|
<?= $this->include("themes/_commonPartialsBs/select2bs5") ?>
|
||||||
|
<?= $this->extend('themes/vuexy/main/defaultlayout') ?>
|
||||||
|
|
||||||
|
<?= $this->section('content'); ?>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h4><?= $boxTitle ?></h4>
|
||||||
|
</div>
|
||||||
|
<div id="albaranContainer" class="card-body">
|
||||||
|
|
||||||
|
<input type="hidden" id="id" value="<?= $albaranId ?>">
|
||||||
|
|
||||||
|
<?= view("themes/_commonPartialsBs/_alertBoxes") ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<?= $this->endSection() ?>
|
||||||
|
|
||||||
|
|
||||||
|
<?= $this->section('css') ?>
|
||||||
|
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.css') ?>" />
|
||||||
|
<?= $this->endSection() ?>
|
||||||
|
|
||||||
|
<?= $this->section('additionalExternalJs') ?>
|
||||||
|
<script src="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.js') ?>"></script>
|
||||||
|
<script type="module" src="<?= site_url("assets/js/safekat/pages/albaranes/edit.js") ?>"></script>
|
||||||
|
<?= $this->endSection() ?>
|
||||||
@ -0,0 +1,65 @@
|
|||||||
|
<?= $this->include("themes/_commonPartialsBs/sweetalert") ?>
|
||||||
|
<?= $this->include('themes/_commonPartialsBs/datatables') ?>
|
||||||
|
<?= $this->include("themes/_commonPartialsBs/select2bs5") ?>
|
||||||
|
<?= $this->extend('themes/vuexy/main/defaultlayout') ?>
|
||||||
|
|
||||||
|
<?= $this->section('content'); ?>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h4><?= $boxTitle ?></h4>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
|
<?= view("themes/_commonPartialsBs/_alertBoxes") ?>
|
||||||
|
|
||||||
|
<table id="tableOfAlbaranes" class="table table-striped table-hover w-100">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th><?= lang('Albaran.id') ?></th>
|
||||||
|
<th><?= lang('Albaran.numAlbaran') ?></th>
|
||||||
|
<th><?= lang('Albaran.numEnvio') ?></th>
|
||||||
|
<th><?= lang('Albaran.numPedidos') ?></th>
|
||||||
|
<th><?= lang('Albaran.cliente') ?></th>
|
||||||
|
<th><?= lang('Albaran.att') ?></th>
|
||||||
|
<th><?= lang('Albaran.direccion') ?></th>
|
||||||
|
<th><?= lang('Albaran.unidadesTotal') ?></th>
|
||||||
|
<th><?= lang('Albaran.cajas') ?></th>
|
||||||
|
<th><?= lang('Albaran.acciones') ?? 'Acciones' ?></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th><input type="text" class="form-control albaran-filter" name="id"></th>
|
||||||
|
<th><input type="text" class="form-control albaran-filter" name="numero_albaran"></th>
|
||||||
|
<th><input type="text" class="form-control albaran-filter" name="envio_id"></th>
|
||||||
|
<th><input type="text" class="form-control albaran-filter-pedidos" name="pedidos"></th>
|
||||||
|
<th><input type="text" class="form-control albaran-filter" name="cliente"></th>
|
||||||
|
<th><input type="text" class="form-control albaran-filter" name="att"></th>
|
||||||
|
<th><input type="text" class="form-control albaran-filter" name="direccion"></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<?= $this->endSection() ?>
|
||||||
|
|
||||||
|
|
||||||
|
<?= $this->section('css') ?>
|
||||||
|
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.css') ?>" />
|
||||||
|
<?= $this->endSection() ?>
|
||||||
|
|
||||||
|
<?= $this->section('additionalExternalJs') ?>
|
||||||
|
<script src="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.js') ?>"></script>
|
||||||
|
<script type="module" src="<?= site_url("assets/js/safekat/pages/albaranes/list.js") ?>"></script>
|
||||||
|
<?= $this->endSection() ?>
|
||||||
@ -9,7 +9,9 @@
|
|||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h4><?= $boxTitle ?> <?= ($envioEntity->finalizado == 0)?'':'<span class="badge text-bg-success fw-lg">FINALIZADO</span>' ?></h4>
|
<h4><?= $boxTitle ?>
|
||||||
|
<?= ($envioEntity->finalizado == 0) ? '' : '<span class="badge text-bg-success fw-lg">FINALIZADO</span>' ?>
|
||||||
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
||||||
@ -162,7 +164,7 @@
|
|||||||
<div class="d-flex flex-row">
|
<div class="d-flex flex-row">
|
||||||
<p><?= lang('Logistica.buttonsActions') ?></p>
|
<p><?= lang('Logistica.buttonsActions') ?></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex flex-row mb-3">
|
<div class="d-flex flex-row mb-3 align-items-end">
|
||||||
<div class="col-sm-2 px-3">
|
<div class="col-sm-2 px-3">
|
||||||
<button id="btnSelectAll" name="btnSelectAll" tabindex="1"
|
<button id="btnSelectAll" name="btnSelectAll" tabindex="1"
|
||||||
class="btn btn-primary w-100">
|
class="btn btn-primary w-100">
|
||||||
@ -194,6 +196,22 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<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">
|
||||||
|
<label for="impresoraEtiquetas" class="form-label">
|
||||||
|
<?= lang("Logistica.impresoraEtiquetas") ?>
|
||||||
|
</label>
|
||||||
|
<select id="impresoraEtiquetas" name="impresora_etiquetas" tabindex="1"
|
||||||
|
maxlength="50" class="form-control select2bs2" style="width: 100%;">
|
||||||
|
<?php foreach ($envioEntity->impresoras as $impresora): ?>
|
||||||
|
<option value="<?= $impresora->id ?>">
|
||||||
|
<?= $impresora->name ?>
|
||||||
|
</option>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
|
|
||||||
@ -288,9 +306,8 @@
|
|||||||
<?= lang("Logistica.codigoSeguimiento") ?>
|
<?= lang("Logistica.codigoSeguimiento") ?>
|
||||||
</label>
|
</label>
|
||||||
<input type="text" id="codigoSeguimiento" name="codigo_seguimiento" tabindex="1"
|
<input type="text" id="codigoSeguimiento" name="codigo_seguimiento" tabindex="1"
|
||||||
maxlength="100" class="form-control"
|
maxlength="100" class="form-control" <?= ($envioEntity->finalizado == 0) ? '' : 'readonly' ?>
|
||||||
<?= ($envioEntity->finalizado == 0) ? "" : "readonly" ?>
|
value="<?= esc(old('codigo_seguimiento', $envioEntity->codigo_seguimiento)) ?>">
|
||||||
value="<?= old('codigo_seguimiento', $envioEntity->codigo_seguimiento) ?>">
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-3 px-3">
|
<div class="col-sm-3 px-3">
|
||||||
<label for="empresaMensajeria" class="form-label">
|
<label for="empresaMensajeria" class="form-label">
|
||||||
|
|||||||
@ -50,7 +50,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= lang('Logistica.idEnvio') ?? 'ID Envío' ?></th>
|
<th><?= lang('Logistica.idEnvio') ?? 'ID Envío' ?></th>
|
||||||
<th><?= lang('Logistica.numeroPedidos') ?? 'Nº Pedidos' ?></th>
|
<th><?= lang('Logistica.numeroOts') ?? 'Nº OTs' ?></th>
|
||||||
<th><?= lang('Logistica.numeroLineas') ?? 'Nº Líneas' ?></th>
|
<th><?= lang('Logistica.numeroLineas') ?? 'Nº Líneas' ?></th>
|
||||||
<th><?= lang('Logistica.att') ?? 'Att' ?></th>
|
<th><?= lang('Logistica.att') ?? 'Att' ?></th>
|
||||||
<th><?= lang('Logistica.direccion') ?? 'Dirección' ?></th>
|
<th><?= lang('Logistica.direccion') ?? 'Dirección' ?></th>
|
||||||
|
|||||||
@ -71,7 +71,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= lang('Logistica.idEnvio') ?? 'ID Envío' ?></th>
|
<th><?= lang('Logistica.idEnvio') ?? 'ID Envío' ?></th>
|
||||||
<th><?= lang('Logistica.numeroPedidos') ?? 'Nº Pedidos' ?></th>
|
<th><?= lang('Logistica.numeroOts') ?? 'Nº OTs' ?></th>
|
||||||
<th><?= lang('Logistica.numeroLineas') ?? 'Nº Líneas' ?></th>
|
<th><?= lang('Logistica.numeroLineas') ?? 'Nº Líneas' ?></th>
|
||||||
<th><?= lang('Logistica.att') ?? 'Att' ?></th>
|
<th><?= lang('Logistica.att') ?? 'Att' ?></th>
|
||||||
<th><?= lang('Logistica.direccion') ?? 'Dirección' ?></th>
|
<th><?= lang('Logistica.direccion') ?? 'Dirección' ?></th>
|
||||||
@ -83,6 +83,26 @@
|
|||||||
<th><?= lang('Logistica.finalizado') ?? 'Finalizado' ?></th>
|
<th><?= lang('Logistica.finalizado') ?? 'Finalizado' ?></th>
|
||||||
<th><?= lang('Logistica.acciones') ?? 'Acciones' ?></th>
|
<th><?= lang('Logistica.acciones') ?? 'Acciones' ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th><input type="text" class="form-control envio-filter" name="id"></th>
|
||||||
|
<th><input type="text" class="form-control envio-filter-ots" name="ots"></th>
|
||||||
|
<th></th>
|
||||||
|
<th><input type="text" class="form-control envio-filter" name="att"></th>
|
||||||
|
<th><input type="text" class="form-control envio-filter" name="direccion"></th>
|
||||||
|
<th><input type="text" class="form-control envio-filter" name="ciudad"></th>
|
||||||
|
<th><input type="text" class="form-control envio-filter" name="pais"></th>
|
||||||
|
<th><input type="text" class="form-control envio-filter" name="cp"></th>
|
||||||
|
<th><input type="text" class="form-control envio-filter" name="email"></th>
|
||||||
|
<th><input type="text" class="form-control envio-filter" name="telefono"></th>
|
||||||
|
<th>
|
||||||
|
<select class="form-control envio-filter-select" name="finalizado">
|
||||||
|
<option value=""><?= lang('Logistica.todos')?></option>
|
||||||
|
<option value="0"><?= lang('Basic.global.no') ?></option>
|
||||||
|
<option value="1"><?= lang('Basic.global.yes') ?></option>
|
||||||
|
</select>
|
||||||
|
</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
<img src="<?= site_url("assets/img/logistica/impresionEtiquetas.jpg") ?>" alt="Etiquetas de títulos">
|
<img src="<?= site_url("assets/img/logistica/impresionEtiquetas.jpg") ?>" alt="Etiquetas de títulos">
|
||||||
<div><span><?= lang("Logistica.etiquetasTitulos"); ?></span></div>
|
<div><span><?= lang("Logistica.etiquetasTitulos"); ?></span></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="item" onclick="location.href='<?= route_to('albaranesList') ?>'">
|
||||||
<img src="<?= site_url("assets/img/logistica/albaranes.png") ?>" alt="Albaranes">
|
<img src="<?= site_url("assets/img/logistica/albaranes.png") ?>" alt="Albaranes">
|
||||||
<div><span><?= lang("Logistica.albaranes"); ?></span></div>
|
<div><span><?= lang("Logistica.albaranes"); ?></span></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -23,11 +23,11 @@
|
|||||||
<?= $maquina["nombre"] ?>
|
<?= $maquina["nombre"] ?>
|
||||||
<?php if ($maquina["countTareas"] > 0): ?>
|
<?php if ($maquina["countTareas"] > 0): ?>
|
||||||
<span class="badge rounded-pill badge-center h-px-20 w-px-20 bg-secondary ms-1_5"><?= $maquina["countTareas"] ?></span>
|
<span class="badge rounded-pill badge-center h-px-20 w-px-20 bg-secondary ms-1_5"><?= $maquina["countTareas"] ?></span>
|
||||||
<? endif; ?>
|
<?php endif; ?>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<? endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -44,11 +44,11 @@
|
|||||||
<?= $maquina["nombre"] ?>
|
<?= $maquina["nombre"] ?>
|
||||||
<?php if ($maquina["countTareas"] > 0): ?>
|
<?php if ($maquina["countTareas"] > 0): ?>
|
||||||
<span class="badge rounded-pill badge-center h-px-20 w-px-20 bg-secondary ms-1_5"><?= $maquina["countTareas"] ?></span>
|
<span class="badge rounded-pill badge-center h-px-20 w-px-20 bg-secondary ms-1_5"><?= $maquina["countTareas"] ?></span>
|
||||||
<? endif; ?>
|
<?php endif; ?>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<? endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -65,11 +65,11 @@
|
|||||||
<?= $maquina["nombre"] ?>
|
<?= $maquina["nombre"] ?>
|
||||||
<?php if ($maquina["countTareas"] > 0): ?>
|
<?php if ($maquina["countTareas"] > 0): ?>
|
||||||
<span class="badge rounded-pill badge-center h-px-20 w-px-20 bg-secondary ms-1_5"><?= $maquina["countTareas"] ?></span>
|
<span class="badge rounded-pill badge-center h-px-20 w-px-20 bg-secondary ms-1_5"><?= $maquina["countTareas"] ?></span>
|
||||||
<? endif; ?>
|
<?php endif; ?>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<? endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -21,7 +21,95 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<div class="col-md-3 <?= $user_dates["pre_formato_at"]||$user_dates["pre_lomo_at"]||$user_dates["pre_solapa_at"]||$user_dates["pre_codbarras_at"]||$user_dates["pre_imposicion_at"] ? "" : "d-none" ?>">
|
||||||
|
<!-- PREIMPRESION -->
|
||||||
|
<!-- Preformato -->
|
||||||
|
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||||
|
<h4><?= lang("Produccion.progress_preimpresion") ?></h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $ot->revisar_formato ? "" : "d-none" ?>">
|
||||||
|
<label for="ot-preformato-btn" class="form-label"><?= @lang("Produccion.pre_formato") ?></label>
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_formato_at" id="ot-preformato-date" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||||
|
<button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
|
||||||
|
</div>
|
||||||
|
<div class="form-text"><?= $user_dates["pre_formato_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||||
|
</div>
|
||||||
|
<!-- Prelomo -->
|
||||||
|
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $ot->revisar_lomo ? "" : "d-none" ?>">
|
||||||
|
<label for="ot-prelomo-btn" class="form-label"><?= @lang("Produccion.pre_lomo") ?></label>
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_lomo_at" id="ot-prelomo-date" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||||
|
<button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
|
||||||
|
</div>
|
||||||
|
<div class="form-text"><?= $user_dates["pre_lomo_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- Presolapa -->
|
||||||
|
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $ot->revisar_solapa ? "" : "d-none" ?>">
|
||||||
|
<label for="ot-presolapa-btn" class="form-label"><?= @lang("Produccion.pre_solapa") ?></label>
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_solapa_at" id="ot-presolapa-date" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||||
|
<button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
|
||||||
|
</div>
|
||||||
|
<div class="form-text"><?= $user_dates["pre_solapa_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- Precodbarras -->
|
||||||
|
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $ot->revisar_codigo_barras ? "" : "d-none" ?>">
|
||||||
|
<label for="ot-precodbarras-btn" class="form-label"><?= @lang("Produccion.pre_codbarras") ?></label>
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_codbarras_at" id="ot-precodbarras-date" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||||
|
<button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
|
||||||
|
</div>
|
||||||
|
<div class="form-text"><?= $user_dates["pre_codbarras_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- Preimposicion -->
|
||||||
|
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $ot->realizar_imposicion ? "" : "d-none" ?>">
|
||||||
|
<label for="ot-preimposicion-btn" class="form-label"><?= @lang("Produccion.pre_imposicion") ?></label>
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_imposicion_at" id="ot-preimposicion-date" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||||
|
<button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
|
||||||
|
</div>
|
||||||
|
<div class="form-text"><?= $user_dates["pre_imposicion_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3 <?= $presupuesto->ferro ? "" : "d-none" ?>">
|
||||||
|
<!-- Progress -->
|
||||||
|
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||||
|
<h4><?= lang("Produccion.progress_ferro") ?></h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->ferro ? "" : "d-none" ?>">
|
||||||
|
<label for="ot-pendiente-ferro" class="form-label"><?= @lang("Produccion.pendiente_ferro") ?></label>
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" class="form-control ot-date" name="pendiente_ferro_at" placeholder="DD/MM/YYYY" id="ot-pendiente-ferro" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||||
|
<button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
|
||||||
|
</div>
|
||||||
|
<div class="form-text"><?= $user_dates["pendiente_ferro_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- Progress -->
|
||||||
|
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->ferro ? "" : "d-none" ?>">
|
||||||
|
<label for="ot-ferro-cliente" class="form-label"><?= @lang("Produccion.ferro_cliente") ?></label>
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" class="form-control ot-date" name="ferro_en_cliente_at" placeholder="DD/MM/YYYY" id="ot-ferro-cliente" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||||
|
<button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
|
||||||
|
</div>
|
||||||
|
<div class="form-text"><?= $user_dates["ferro_en_cliente_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||||
|
</div>
|
||||||
|
<!-- Progress -->
|
||||||
|
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->ferro ? "" : "d-none" ?>">
|
||||||
|
<label for="ot-ferro-ok" class="form-label"><?= @lang("Produccion.ferro_ok") ?></label>
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" class="form-control ot-date" name="ferro_ok_at" placeholder="DD/MM/YYYY" id="ot-ferro-ok" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
||||||
|
<button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
|
||||||
|
</div>
|
||||||
|
<div class="form-text"><?= $user_dates["ferro_ok_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<!-- Progress -->
|
<!-- Progress -->
|
||||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||||
@ -164,34 +252,7 @@
|
|||||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||||
<h4><?= lang("Produccion.progress_logistica") ?></h4>
|
<h4><?= lang("Produccion.progress_logistica") ?></h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->ferro ? "" : "d-none" ?>">
|
|
||||||
<label for="ot-pendiente-ferro" class="form-label"><?= @lang("Produccion.pendiente_ferro") ?></label>
|
|
||||||
<div class="input-group">
|
|
||||||
<input type="text" class="form-control ot-date" name="pendiente_ferro_at" placeholder="DD/MM/YYYY" id="ot-pendiente-ferro" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
|
||||||
<button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
|
|
||||||
</div>
|
|
||||||
<div class="form-text"><?= $user_dates["pendiente_ferro_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- Progress -->
|
|
||||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->ferro ? "" : "d-none" ?>">
|
|
||||||
<label for="ot-ferro-cliente" class="form-label"><?= @lang("Produccion.ferro_cliente") ?></label>
|
|
||||||
<div class="input-group">
|
|
||||||
<input type="text" class="form-control ot-date" name="ferro_en_cliente_at" placeholder="DD/MM/YYYY" id="ot-ferro-cliente" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
|
||||||
<button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
|
|
||||||
</div>
|
|
||||||
<div class="form-text"><?= $user_dates["ferro_en_cliente_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
|
||||||
</div>
|
|
||||||
<!-- Progress -->
|
|
||||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $presupuesto->ferro ? "" : "d-none" ?>">
|
|
||||||
<label for="ot-ferro-ok" class="form-label"><?= @lang("Produccion.ferro_ok") ?></label>
|
|
||||||
<div class="input-group">
|
|
||||||
<input type="text" class="form-control ot-date" name="ferro_ok_at" placeholder="DD/MM/YYYY" id="ot-ferro-ok" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
|
||||||
<button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
|
|
||||||
</div>
|
|
||||||
<div class="form-text"><?= $user_dates["ferro_ok_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- Progress -->
|
<!-- Progress -->
|
||||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||||
<label for="ot-embalaje" class="form-label"><?= @lang("Produccion.embalaje") ?></label>
|
<label for="ot-embalaje" class="form-label"><?= @lang("Produccion.embalaje") ?></label>
|
||||||
@ -214,61 +275,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
|
||||||
<!-- PREIMPRESION -->
|
|
||||||
<!-- Preformato -->
|
|
||||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
|
||||||
<h4><?= lang("Produccion.progress_preimpresion") ?></h4>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $ot->revisar_formato ? "" : "d-none" ?>">
|
|
||||||
<label for="ot-preformato-btn" class="form-label"><?= @lang("Produccion.pre_formato") ?></label>
|
|
||||||
<div class="input-group">
|
|
||||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_formato_at" id="ot-preformato-date" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
|
||||||
<button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
|
|
||||||
</div>
|
|
||||||
<div class="form-text"><?= $user_dates["pre_formato_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
|
||||||
</div>
|
|
||||||
<!-- Prelomo -->
|
|
||||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $ot->revisar_lomo ? "" : "d-none" ?>">
|
|
||||||
<label for="ot-prelomo-btn" class="form-label"><?= @lang("Produccion.pre_lomo") ?></label>
|
|
||||||
<div class="input-group">
|
|
||||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_lomo_at" id="ot-prelomo-date" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
|
||||||
<button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
|
|
||||||
</div>
|
|
||||||
<div class="form-text"><?= $user_dates["pre_lomo_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- Presolapa -->
|
|
||||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $ot->revisar_solapa ? "" : "d-none" ?>">
|
|
||||||
<label for="ot-presolapa-btn" class="form-label"><?= @lang("Produccion.pre_solapa") ?></label>
|
|
||||||
<div class="input-group">
|
|
||||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_solapa_at" id="ot-presolapa-date" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
|
||||||
<button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
|
|
||||||
</div>
|
|
||||||
<div class="form-text"><?= $user_dates["pre_solapa_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- Precodbarras -->
|
|
||||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $ot->revisar_codigo_barras ? "" : "d-none" ?>">
|
|
||||||
<label for="ot-precodbarras-btn" class="form-label"><?= @lang("Produccion.pre_codbarras") ?></label>
|
|
||||||
<div class="input-group">
|
|
||||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_codbarras_at" id="ot-precodbarras-date" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
|
||||||
<button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
|
|
||||||
</div>
|
|
||||||
<div class="form-text"><?= $user_dates["pre_codbarras_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- Preimposicion -->
|
|
||||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100 <?= $ot->realizar_imposicion ? "" : "d-none" ?>">
|
|
||||||
<label for="ot-preimposicion-btn" class="form-label"><?= @lang("Produccion.pre_imposicion") ?></label>
|
|
||||||
<div class="input-group">
|
|
||||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="pre_imposicion_at" id="ot-preimposicion-date" data-input <?= $is_finalizada ? "disabled" : "" ?>>
|
|
||||||
<button class="btn btn-outline-danger btn-erase-date" type="button"><i class="ti-eraser ti"></i></button>
|
|
||||||
</div>
|
|
||||||
<div class="form-text"><?= $user_dates["pre_imposicion_at"] ?? "<span class='ti-sm ti ti-alert-triangle me-1'></span>" ?></div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
@ -34,7 +34,23 @@
|
|||||||
<div class="tab-content p-0">
|
<div class="tab-content p-0">
|
||||||
<!-- TAREAS -->
|
<!-- TAREAS -->
|
||||||
<div class="tab-pane fade show active" id="nav-ot-task-general" role="tabpanel">
|
<div class="tab-pane fade show active" id="nav-ot-task-general" role="tabpanel">
|
||||||
<div class="row text-start">
|
<div class="row justify-content-end">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<?php if ($flags["isCosido"] && $tareaCosido): ?>
|
||||||
|
<div class="form-group text-start">
|
||||||
|
<label for="">Pliegos</label>
|
||||||
|
<div class="d-flex flex-row justify-content-start align-items-center gap-2">
|
||||||
|
<input type="text" id="pliegos-1" class="form-control ot-pliegos" name="pliego_1" value="<?= $tareaCosido->pliego_1 ?>">
|
||||||
|
<span>de</span>
|
||||||
|
<input type="text" id="pliegos-1-total" class="form-control ot-pliegos" name="pliego_1_total" value="<?= $tareaCosido->pliego_1_total ?>">
|
||||||
|
<input type="text" id="pliegos-2" class="form-control ot-pliegos" name="pliego_2" value="<?= $tareaCosido->pliego_2 ?>">
|
||||||
|
<span>de</span>
|
||||||
|
<input type="text" id="pliegos-2-total" class="form-control ot-pliegos" name="pliego_2_total" value="<?= $tareaCosido->pliego_2_total ?>">
|
||||||
|
<button type="button" id="btn-update-pliegos" class="btn btn-primary"><span class="ti ti-device-floppy"></span></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
<?= view("themes/vuexy/components/tables/ot_task_table", ["id" => "ot-task-table"]) ?>
|
<?= view("themes/vuexy/components/tables/ot_task_table", ["id" => "ot-task-table"]) ?>
|
||||||
@ -43,6 +59,7 @@
|
|||||||
|
|
||||||
<div class="row d-flex flex-row justify-content-between align-items-center mt-2 gap-2">
|
<div class="row d-flex flex-row justify-content-between align-items-center mt-2 gap-2">
|
||||||
<div class="col-md-3 text-start">
|
<div class="col-md-3 text-start">
|
||||||
|
|
||||||
<!-- <button type="button" class="btn btn-primary btn-md align-items-center" id="btn-add-tarea"><span class="ti ti-plus ti-sm me-1"></span> Insertar tarea</button> -->
|
<!-- <button type="button" class="btn btn-primary btn-md align-items-center" id="btn-add-tarea"><span class="ti ti-plus ti-sm me-1"></span> Insertar tarea</button> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 gap-2 text-end">
|
<div class="col-md-3 gap-2 text-end">
|
||||||
|
|||||||
@ -8,7 +8,7 @@ if (auth()->user()->can('catalogo.menu')) {
|
|||||||
<li class="menu-item">
|
<li class="menu-item">
|
||||||
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
<a href="javascript:void(0);" class="menu-link menu-toggle">
|
||||||
<i class="menu-icon tf-icons ti ti-book"></i>
|
<i class="menu-icon tf-icons ti ti-book"></i>
|
||||||
<?= lang("App.menu_catalogo") ?>
|
<div><?= lang("App.menu_catalogo") ?></div>
|
||||||
</a>
|
</a>
|
||||||
<ul class="menu-sub">
|
<ul class="menu-sub">
|
||||||
<?php if (auth()->user()->can('catalogo.menu')) { ?>
|
<?php if (auth()->user()->can('catalogo.menu')) { ?>
|
||||||
|
|||||||
30
ci4/app/Views/themes/vuexy/pdfs/encuadernados/CC2.php
Normal file
30
ci4/app/Views/themes/vuexy/pdfs/encuadernados/CC2.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<table>
|
||||||
|
<tr class="encuadernacion">
|
||||||
|
<th >Encuadernacion</th>
|
||||||
|
<th class="cell-50"></th>
|
||||||
|
<th class="cell-50"></th>
|
||||||
|
<th class="cell-50"></th>
|
||||||
|
<th class="cell-50"></th>
|
||||||
|
<th class="cell-50"></th>
|
||||||
|
<th class="cell-50">Retractilado</th>
|
||||||
|
<th class="cell-50">Marcapáginas</th>
|
||||||
|
</tr>
|
||||||
|
<?php if (count($encuadernaciones) > 0): ?>
|
||||||
|
<?php foreach ($encuadernaciones as $key => $value): ?>
|
||||||
|
<tr style="color: red;">
|
||||||
|
<td><?= $value->tarifa()->nombre ?></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td><?= $presupuesto->retractilado ? "SI" : "NO" ?></td>
|
||||||
|
<td><?= $presupuesto->marcapaginas ? "SI" : "NO" ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php else: ?>
|
||||||
|
<tr style="color: red;">
|
||||||
|
<td colspan="7">Sin encuadernación</td>
|
||||||
|
</tr>
|
||||||
|
<?php endif; ?>
|
||||||
|
</table>
|
||||||
30
ci4/app/Views/themes/vuexy/pdfs/encuadernados/CC2S.php
Normal file
30
ci4/app/Views/themes/vuexy/pdfs/encuadernados/CC2S.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<table>
|
||||||
|
<tr class="encuadernacion">
|
||||||
|
<th >Encuadernacion</th>
|
||||||
|
<th class="cell-50">Solapas</th>
|
||||||
|
<th class="cell-50"></th>
|
||||||
|
<th class="cell-50"></th>
|
||||||
|
<th class="cell-50"></th>
|
||||||
|
<th class="cell-50"></th>
|
||||||
|
<th class="cell-50">Retractilado</th>
|
||||||
|
<th class="cell-50">Marcapáginas</th>
|
||||||
|
</tr>
|
||||||
|
<?php if (count($encuadernaciones) > 0): ?>
|
||||||
|
<?php foreach ($encuadernaciones as $key => $value): ?>
|
||||||
|
<tr style="color: red;">
|
||||||
|
<td><?= $value->tarifa()->nombre ?></td>
|
||||||
|
<td><?= $presupuesto->solapas ? "SI ($presupuesto->solapas_ancho mm.)" : "NO" ?></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td><?= $presupuesto->retractilado ? "SI" : "NO" ?></td>
|
||||||
|
<td><?= $presupuesto->marcapaginas ? "SI" : "NO" ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php else: ?>
|
||||||
|
<tr style="color: red;">
|
||||||
|
<td colspan="7">Sin encuadernación</td>
|
||||||
|
</tr>
|
||||||
|
<?php endif; ?>
|
||||||
|
</table>
|
||||||
28
ci4/app/Views/themes/vuexy/pdfs/encuadernados/ESP.php
Normal file
28
ci4/app/Views/themes/vuexy/pdfs/encuadernados/ESP.php
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<table>
|
||||||
|
<tr class="encuadernacion">
|
||||||
|
<th class="cell-50">Encuadernacion</th>
|
||||||
|
<th class="cell-50">Tipo</th>
|
||||||
|
<th class="cell-50">Color</th>
|
||||||
|
<th class="cell-50">Plakenes</th>
|
||||||
|
<th class="cell-50">Plakene</th>
|
||||||
|
<th class="cell-50">Externo</th>
|
||||||
|
<th class="cell-50">Retractilado</th>
|
||||||
|
</tr>
|
||||||
|
<?php if (count($encuadernaciones) > 0): ?>
|
||||||
|
<?php foreach ($encuadernaciones as $key => $value): ?>
|
||||||
|
<tr style="color: red;">
|
||||||
|
<td><?= $value->tarifa()->nombre ?></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td><?= $presupuesto->retractilado ? "SI" : "NO" ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php else: ?>
|
||||||
|
<tr style="color: red;">
|
||||||
|
<td colspan="7">Sin encuadernación</td>
|
||||||
|
</tr>
|
||||||
|
<?php endif; ?>
|
||||||
|
</table>
|
||||||
30
ci4/app/Views/themes/vuexy/pdfs/encuadernados/RCHV.php
Normal file
30
ci4/app/Views/themes/vuexy/pdfs/encuadernados/RCHV.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<table>
|
||||||
|
<tr class="encuadernacion">
|
||||||
|
<th>Encuadernacion</th>
|
||||||
|
<th class="cell-50">Pliegos</th>
|
||||||
|
<th class="cell-50">Pliegos</th>
|
||||||
|
<th class="cell-50"></th>
|
||||||
|
<th class="cell-50">Sobrecubierta</th>
|
||||||
|
<th class="cell-50">Guardas</th>
|
||||||
|
<th class="cell-50">Retractilado</th>
|
||||||
|
<th class="cell-50">Marcapáginas</th>
|
||||||
|
</tr>
|
||||||
|
<?php if (count($encuadernaciones) > 0): ?>
|
||||||
|
<?php foreach ($encuadernaciones as $key => $value): ?>
|
||||||
|
<tr style="color: red;">
|
||||||
|
<td><?= $value->tarifa()->nombre ?></td>
|
||||||
|
<td><?=$tareaCosido->pliego_1." de ".$tareaCosido->pliego_1_total?></td>
|
||||||
|
<td><?=$tareaCosido->pliego_2." de ".$tareaCosido->pliego_2_total?></td>
|
||||||
|
<td></td>
|
||||||
|
<td><?= $presupuesto->hasSobrecubierta() ? "SI" : "NO" ?></td>
|
||||||
|
<td><?= $presupuesto->guardas ? "SI" : "NO" ?></td>
|
||||||
|
<td><?= $presupuesto->retractilado ? "SI" : "NO" ?></td>
|
||||||
|
<td><?= $presupuesto->marcapaginas ? "SI" : "NO" ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php else: ?>
|
||||||
|
<tr style="color: red;">
|
||||||
|
<td colspan="7">Sin encuadernación</td>
|
||||||
|
</tr>
|
||||||
|
<?php endif; ?>
|
||||||
|
</table>
|
||||||
30
ci4/app/Views/themes/vuexy/pdfs/encuadernados/RCHVS.php
Normal file
30
ci4/app/Views/themes/vuexy/pdfs/encuadernados/RCHVS.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<table>
|
||||||
|
<tr class="encuadernacion">
|
||||||
|
<th>Encuadernacion</th>
|
||||||
|
<th class="cell-50">Pliegos</th>
|
||||||
|
<th class="cell-50">Pliegos</th>
|
||||||
|
<th class="cell-50">Solapas</th>
|
||||||
|
<th class="cell-50">Sobrecubierta</th>
|
||||||
|
<th class="cell-50">Guardas</th>
|
||||||
|
<th class="cell-50">Retractilado</th>
|
||||||
|
<th class="cell-50">Marcapáginas</th>
|
||||||
|
</tr>
|
||||||
|
<?php if (count($encuadernaciones) > 0): ?>
|
||||||
|
<?php foreach ($encuadernaciones as $key => $value): ?>
|
||||||
|
<tr style="color: red;">
|
||||||
|
<td><?= $value->tarifa()->nombre ?></td>
|
||||||
|
<td><?=$tareaCosido->pliego_1." de ".$tareaCosido->pliego_1_total?></td>
|
||||||
|
<td><?=$tareaCosido->pliego_2." de ".$tareaCosido->pliego_2_total?></td>
|
||||||
|
<td><?= $presupuesto->solapas ? "SI ($presupuesto->solapas_ancho mm.)" : "NO" ?></td>
|
||||||
|
<td><?= $presupuesto->hasSobrecubierta() ? "SI" : "NO" ?></td>
|
||||||
|
<td><?= $presupuesto->guardas ? "SI" : "NO" ?></td>
|
||||||
|
<td><?= $presupuesto->retractilado ? "SI" : "NO" ?></td>
|
||||||
|
<td><?= $presupuesto->marcapaginas ? "SI" : "NO" ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php else: ?>
|
||||||
|
<tr style="color: red;">
|
||||||
|
<td colspan="7">Sin encuadernación</td>
|
||||||
|
</tr>
|
||||||
|
<?php endif; ?>
|
||||||
|
</table>
|
||||||
30
ci4/app/Views/themes/vuexy/pdfs/encuadernados/RF.php
Normal file
30
ci4/app/Views/themes/vuexy/pdfs/encuadernados/RF.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<table>
|
||||||
|
<tr class="encuadernacion">
|
||||||
|
<th >Encuadernacion</th>
|
||||||
|
<th class="cell-50"></th>
|
||||||
|
<th class="cell-50"></th>
|
||||||
|
<th class="cell-50"></th>
|
||||||
|
<th class="cell-50">Sobrecubierta</th>
|
||||||
|
<th class="cell-50">Guardas</th>
|
||||||
|
<th class="cell-50">Retractilado</th>
|
||||||
|
<th class="cell-50">Marcapáginas</th>
|
||||||
|
</tr>
|
||||||
|
<?php if (count($encuadernaciones) > 0): ?>
|
||||||
|
<?php foreach ($encuadernaciones as $key => $value): ?>
|
||||||
|
<tr style="color: red;">
|
||||||
|
<td><?= $value->tarifa()->nombre ?></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td><?= $presupuesto->hasSobrecubierta() ? "SI" : "NO" ?></td>
|
||||||
|
<td><?= $presupuesto->guardas ? "SI" : "NO" ?></td>
|
||||||
|
<td><?= $presupuesto->retractilado ? "SI" : "NO" ?></td>
|
||||||
|
<td><?= $presupuesto->marcapaginas ? "SI" : "NO" ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php else: ?>
|
||||||
|
<tr style="color: red;">
|
||||||
|
<td colspan="7">Sin encuadernación</td>
|
||||||
|
</tr>
|
||||||
|
<?php endif; ?>
|
||||||
|
</table>
|
||||||
30
ci4/app/Views/themes/vuexy/pdfs/encuadernados/RFS.php
Normal file
30
ci4/app/Views/themes/vuexy/pdfs/encuadernados/RFS.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<table>
|
||||||
|
<tr class="encuadernacion">
|
||||||
|
<th >Encuadernacion</th>
|
||||||
|
<th class="cell-50">Solapas</th>
|
||||||
|
<th class="cell-50"></th>
|
||||||
|
<th class="cell-50"></th>
|
||||||
|
<th class="cell-50">Sobrecubierta</th>
|
||||||
|
<th class="cell-50">Guardas</th>
|
||||||
|
<th class="cell-50">Retractilado</th>
|
||||||
|
<th class="cell-50">Marcapáginas</th>
|
||||||
|
</tr>
|
||||||
|
<?php if (count($encuadernaciones) > 0): ?>
|
||||||
|
<?php foreach ($encuadernaciones as $key => $value): ?>
|
||||||
|
<tr style="color: red;">
|
||||||
|
<td><?= $value->tarifa()->nombre ?></td>
|
||||||
|
<td><?= $presupuesto->solapas ? "SI ($presupuesto->solapas_ancho mm.)" : "NO" ?></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td><?= $presupuesto->hasSobrecubierta() ? "SI" : "NO" ?></td>
|
||||||
|
<td><?= $presupuesto->guardas ? "SI" : "NO" ?></td>
|
||||||
|
<td><?= $presupuesto->retractilado ? "SI" : "NO" ?></td>
|
||||||
|
<td><?= $presupuesto->marcapaginas ? "SI" : "NO" ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php else: ?>
|
||||||
|
<tr style="color: red;">
|
||||||
|
<td colspan="7">Sin encuadernación</td>
|
||||||
|
</tr>
|
||||||
|
<?php endif; ?>
|
||||||
|
</table>
|
||||||
36
ci4/app/Views/themes/vuexy/pdfs/encuadernados/TDC.php
Normal file
36
ci4/app/Views/themes/vuexy/pdfs/encuadernados/TDC.php
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th class="encuadernacion">Encuadernacion</th>
|
||||||
|
<th class="cell-50">Pliegos</th>
|
||||||
|
<th class="cell-50">Pliegos</th>
|
||||||
|
<th class="cell-50">Guardas</th>
|
||||||
|
<th class="cell-50">Guardas Impresion</th>
|
||||||
|
<th class="cell-50">Cabezada</th>
|
||||||
|
<th class="cell-50">Lomo</th>
|
||||||
|
</tr>
|
||||||
|
<?php if (count($encuadernaciones) > 0): ?>
|
||||||
|
<?php foreach ($encuadernaciones as $key => $value): ?>
|
||||||
|
<tr style="color: red;">
|
||||||
|
<td><?= $value->tarifa()->nombre ?></td>
|
||||||
|
<td><?=$tareaCosido->pliego_1." de ".$tareaCosido->pliego_1_total?></td>
|
||||||
|
<td><?=$tareaCosido->pliego_2." de ".$tareaCosido->pliego_2_total?></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td>Color/NO</td>
|
||||||
|
<td>Recto/Redondo</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="encuadernacion" colspan="1">Sobrecubierta</td>
|
||||||
|
<td style="color:red" colspan="2"><?= $linea_impresion->isSobreCubierta() ? "SI" : "NO" ?></td>
|
||||||
|
<td class="encuadernacion">Retractilado</td>
|
||||||
|
<td style="color:red"><?= $presupuesto->retractilado ? "SI" : "NO" ?></td>
|
||||||
|
<td class="encuadernacion">Marcapáginas</td>
|
||||||
|
<td style="color:red"><?= $presupuesto->marcapaginas ? "SI" : "NO" ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php else: ?>
|
||||||
|
<tr style="color: red;">
|
||||||
|
<td colspan="7">Sin encuadernación</td>
|
||||||
|
</tr>
|
||||||
|
<?php endif; ?>
|
||||||
|
</table>
|
||||||
30
ci4/app/Views/themes/vuexy/pdfs/encuadernados/TDF.php
Normal file
30
ci4/app/Views/themes/vuexy/pdfs/encuadernados/TDF.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<table>
|
||||||
|
<tr class="encuadernacion">
|
||||||
|
<th >Encuadernacion</th>
|
||||||
|
<th class="cell-50">Guardas</th>
|
||||||
|
<th class="cell-50">Guardas Imp.</th>
|
||||||
|
<th class="cell-50">Cabezada</th>
|
||||||
|
<th class="cell-50">Lomo</th>
|
||||||
|
<th class="cell-50">Sobrecubierta</th>
|
||||||
|
<th class="cell-50">Retractilado</th>
|
||||||
|
<th class="cell-50">Marcapáginas</th>
|
||||||
|
</tr>
|
||||||
|
<?php if (count($encuadernaciones) > 0): ?>
|
||||||
|
<?php foreach ($encuadernaciones as $key => $value): ?>
|
||||||
|
<tr style="color: red;">
|
||||||
|
<td><?= $value->tarifa()->nombre ?></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php else: ?>
|
||||||
|
<tr style="color: red;">
|
||||||
|
<td colspan="7">Sin encuadernación</td>
|
||||||
|
</tr>
|
||||||
|
<?php endif; ?>
|
||||||
|
</table>
|
||||||
29
ci4/app/Views/themes/vuexy/pdfs/encuadernados/WIO.php
Normal file
29
ci4/app/Views/themes/vuexy/pdfs/encuadernados/WIO.php
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<table>
|
||||||
|
<caption>
|
||||||
|
WIO
|
||||||
|
</caption>
|
||||||
|
<tr class="encuadernacion">
|
||||||
|
<th class="cell-50">Encuadernacion</th>
|
||||||
|
<th class="cell-50">Color</th>
|
||||||
|
<th class="cell-50">Plakenes</th>
|
||||||
|
<th class="cell-50">Plakene</th>
|
||||||
|
<th class="cell-50">Externo</th>
|
||||||
|
<th class="cell-50">Retractilado</th>
|
||||||
|
</tr>
|
||||||
|
<?php if (count($encuadernaciones) > 0): ?>
|
||||||
|
<?php foreach ($encuadernaciones as $key => $value): ?>
|
||||||
|
<tr style="color: red;">
|
||||||
|
<td><?= $value->tarifa()->nombre ?></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td><?= $presupuesto->retractilado ? "SI" : "NO" ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php else: ?>
|
||||||
|
<tr style="color: red;">
|
||||||
|
<td colspan="7">Sin encuadernación</td>
|
||||||
|
</tr>
|
||||||
|
<?php endif; ?>
|
||||||
|
</table>
|
||||||
@ -156,6 +156,12 @@ $settings = $session->get('settings');
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
<table class="h-50">
|
<table class="h-50">
|
||||||
|
<tr>
|
||||||
|
<th>IDSK</th>
|
||||||
|
<td class="t-cell">
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>CLIENTE</th>
|
<th>CLIENTE</th>
|
||||||
<td class="t-cell">
|
<td class="t-cell">
|
||||||
@ -229,9 +235,9 @@ $settings = $session->get('settings');
|
|||||||
<th>Tiempo</th>
|
<th>Tiempo</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $presupuesto->paginas * $presupuesto->tirada ?></td>
|
<td><?= $presupuesto->paginas ?></td> <!-- Páginas libro -->
|
||||||
<td><?= $presupuesto->tirada ?> </td>
|
<td><?= $presupuesto->tirada ?> </td>
|
||||||
<td>??</td>
|
<td><?= $linea_impresion->tinta() ?></td>
|
||||||
<td><?= json_decode($linea_impresion->formas)->formas ?></td>
|
<td><?= json_decode($linea_impresion->formas)->formas ?></td>
|
||||||
<td><strong><?= $linea_impresion->maquina()->nombre ?></strong></td>
|
<td><strong><?= $linea_impresion->maquina()->nombre ?></strong></td>
|
||||||
<td><?= $linea_impresion->rotativa_clicks_total ?></td>
|
<td><?= $linea_impresion->rotativa_clicks_total ?></td>
|
||||||
@ -275,7 +281,7 @@ $settings = $session->get('settings');
|
|||||||
<th>Tiempo</th>
|
<th>Tiempo</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>??</td>
|
<td><?= $linea_cubierta->tinta() ?></td>
|
||||||
<td><?= $presupuesto->tirada ?></td>
|
<td><?= $presupuesto->tirada ?></td>
|
||||||
<td><strong><?= $linea_cubierta->maquina()->nombre ?></strong></td>
|
<td><strong><?= $linea_cubierta->maquina()->nombre ?></strong></td>
|
||||||
<td><?= $presupuesto->marcapaginas ? "SI" : "NO" ?></td>
|
<td><?= $presupuesto->marcapaginas ? "SI" : "NO" ?></td>
|
||||||
@ -302,46 +308,41 @@ $settings = $session->get('settings');
|
|||||||
<div class="row mb-2">
|
<div class="row mb-2">
|
||||||
<div class="section-title encuadernacion">ENCUADERNACIÓN</div>
|
<div class="section-title encuadernacion">ENCUADERNACIÓN</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
<div class="col-1 w-10 mb-2 text-center" style="background-color: <?= $colors["ot"]["bg"] ?>;color:<?= $colors["ot"]["color"] ?>;">
|
||||||
|
<span class="fs-bold"><?= isset($encuadernaciones[0]) ? $encuadernaciones[0]->tarifa()->code ?? "?" : "?" ?></span>
|
||||||
|
</div>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="t-header" style="width: 10%;">Plastificado</th>
|
<td class="w-10 encuadernacion">Plastificado</td>
|
||||||
<td class="t-cell text-center"><?= $acabados[0]->tarifa()->nombre ?></td>
|
<td><?= $acabados[0]->tarifa()->nombre ?></td>
|
||||||
<th class="t-header" style="width: 10%;">UVI</th>
|
<td class="encuadernacion bg-encuadernacion" style="width: 100px;">UVI</td>
|
||||||
<td class="t-cell text-center"> <?= $uvi ? $uvi->code : "" ?> </td>
|
<td style="color:red;width:100px" class="bg-encuadernacion"> <?= $uvi ? 'SI' : "NO" ?> </td>
|
||||||
<th class="t-header" style="width: 10%;">Máquina</th>
|
<td class="encuadernacion bg-encuadernacion" style="width: 100px;">EXTERNO:</td>
|
||||||
<td class="t-cell text-center"><?= implode("/", array_map(fn($q) => $q->nombre, $acabados[0]->maquinas())) ?> </td>
|
<td class="bg-encuadernacion" style="width: 100px;"></td>
|
||||||
<th class="t-header " style="width: 10%;">Operario</th>
|
|
||||||
<td class="t-cell text-center"><?= $ot->users()?->plastificado_by?->getFullName() ?? null ?> </td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
|
||||||
<table>
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>Encuadernacion</th>
|
<td class="text-start" colspan="2">Meter datos de solapas y preparación guillotina</td>
|
||||||
<th>Solapas</th>
|
<td></td>
|
||||||
<th>Sobrecubierta</th>
|
<td></td>
|
||||||
<th>Plegado</th>
|
<td class="t-header">CORTE PIE:</td>
|
||||||
<th>Guardas</th>
|
<td></td>
|
||||||
<th>Retractilado</th>
|
|
||||||
<th>Marcapáginas</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
<?php if (count($encuadernaciones) > 0): ?>
|
|
||||||
<?php foreach ($encuadernaciones as $key => $value): ?>
|
|
||||||
<tr>
|
|
||||||
<td><?= $value->tarifa()->nombre ?></td>
|
|
||||||
<td><?= $presupuesto->solapas ? "SI" : "NO" ?></td>
|
|
||||||
<td><?= $presupuesto->hasSobrecubierta() ? "SI" : "NO" ?></td>
|
|
||||||
<td>_____<?= " " . lang("Produccion.pliegos_de") . " " ?>_____</td>
|
|
||||||
<td><?= $presupuesto->guardas ? "SI" : "NO" ?></td>
|
|
||||||
<td><?= $presupuesto->retractilado ? "SI" : "NO" ?></td>
|
|
||||||
<td><?= $presupuesto->marcapaginas ? "SI" : "NO" ?></td>
|
|
||||||
</tr>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
<?php else: ?>
|
|
||||||
<tr>
|
|
||||||
<td colspan="7">Sin encuadernación</td>
|
|
||||||
</tr>
|
|
||||||
<?php endif; ?>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$encuadernacion_code = isset($encuadernaciones[0]) ? $encuadernaciones[0]->tarifa()->code : null;
|
||||||
|
try {
|
||||||
|
if ($encuadernacion_code) {
|
||||||
|
echo view("/themes/vuexy/pdfs/encuadernados/$encuadernacion_code.php");
|
||||||
|
} else {
|
||||||
|
throw new Exception('No existe código de encuadernación.');
|
||||||
|
}
|
||||||
|
} catch (\Throwable $th) {
|
||||||
|
$error_message = $th->getMessage();
|
||||||
|
echo "<span style='color:red'>No se ha podido renderizar la tabla de encuadernación</span>";
|
||||||
|
echo "<br><span style='color:red'>$error_message</span>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
<?php if (count($encuadernaciones) > 0): ?>
|
<?php if (count($encuadernaciones) > 0): ?>
|
||||||
|
|
||||||
<div class="comments">
|
<div class="comments">
|
||||||
|
|||||||
@ -1,14 +1,17 @@
|
|||||||
import DatePicker from "./datepicker.js";
|
import DatePicker from "./datepicker.js";
|
||||||
class AlbaranComponent {
|
class AlbaranComponent {
|
||||||
|
|
||||||
constructor(item) {
|
constructor(item, url_after_delete = '') {
|
||||||
|
|
||||||
|
this.url_after_delete = url_after_delete;
|
||||||
|
|
||||||
this.item = item;
|
this.item = item;
|
||||||
this.id = item.id;
|
this.id = item.id;
|
||||||
this.numero = item.numero_albaran;
|
this.numero = item.numero_albaran;
|
||||||
this.cliente = item.cliente;
|
this.cliente = item.cliente;
|
||||||
this.att = item.att;
|
this.att = item.att;
|
||||||
this.direccion = item.direccion;
|
this.direccion = item.direccion;
|
||||||
this.envio_id = item.envio_id;
|
this.envio_id = item.envio_id != null ? item.envio_id : '';
|
||||||
this.fecha = null;
|
this.fecha = null;
|
||||||
if(this.item.fecha_albaran != null){
|
if(this.item.fecha_albaran != null){
|
||||||
const [dia, mes, anio] = item.fecha_albaran.split('/');
|
const [dia, mes, anio] = item.fecha_albaran.split('/');
|
||||||
@ -461,6 +464,9 @@ class AlbaranComponent {
|
|||||||
if (response.success) {
|
if (response.success) {
|
||||||
// quitar del dom el albarán
|
// quitar del dom el albarán
|
||||||
$(`#accordioAlbaran${albaranId}`).remove();
|
$(`#accordioAlbaran${albaranId}`).remove();
|
||||||
|
if(this.url_after_delete != ''){
|
||||||
|
window.location.href = this.url_after_delete;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: 'Error',
|
title: 'Error',
|
||||||
|
|||||||
43
httpdocs/assets/js/safekat/pages/albaranes/edit.js
Normal file
43
httpdocs/assets/js/safekat/pages/albaranes/edit.js
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
import Ajax from '../../components/ajax.js';
|
||||||
|
import AlbaranComponent from '../../components/albaranComponent.js';
|
||||||
|
|
||||||
|
$(() => {
|
||||||
|
|
||||||
|
const dropdown = document.querySelector(".dropdown-language");
|
||||||
|
const activeItem = dropdown.querySelector(".dropdown-menu .dropdown-item");
|
||||||
|
let locale = 'es';
|
||||||
|
if (activeItem) {
|
||||||
|
locale = activeItem.getAttribute("data-language");
|
||||||
|
}
|
||||||
|
|
||||||
|
new Ajax('/translate/getTranslation', { locale: locale, translationFile: ['Albaran'] }, {},
|
||||||
|
function (translations) {
|
||||||
|
window.language = JSON.parse(translations);
|
||||||
|
new Ajax(
|
||||||
|
'/albaranes/getAlbaran',
|
||||||
|
{
|
||||||
|
id: $('#id').val()
|
||||||
|
},
|
||||||
|
{},
|
||||||
|
function (data, headers, success, error, type) {
|
||||||
|
if (success) {
|
||||||
|
const albaran = new AlbaranComponent(data.data, '/logistica/listAlbaranes');
|
||||||
|
albaran.mount('#albaranContainer');
|
||||||
|
$('.accordion-button').trigger('click');
|
||||||
|
|
||||||
|
} else {
|
||||||
|
popErrorAlert(error);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
function (data, headers, success, error, type) {
|
||||||
|
popErrorAlert(error);
|
||||||
|
}
|
||||||
|
).get();
|
||||||
|
},
|
||||||
|
function (error) {
|
||||||
|
console.log("Error getting translations:", error);
|
||||||
|
}
|
||||||
|
).post();
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
160
httpdocs/assets/js/safekat/pages/albaranes/list.js
Normal file
160
httpdocs/assets/js/safekat/pages/albaranes/list.js
Normal file
@ -0,0 +1,160 @@
|
|||||||
|
import Ajax from "../../components/ajax.js";
|
||||||
|
|
||||||
|
$(() => {
|
||||||
|
|
||||||
|
let pedidosFilter = '';
|
||||||
|
|
||||||
|
const dropdown = document.querySelector(".dropdown-language");
|
||||||
|
const activeItem = dropdown.querySelector(".dropdown-menu .dropdown-item");
|
||||||
|
let locale = 'es';
|
||||||
|
if (activeItem) {
|
||||||
|
locale = activeItem.getAttribute("data-language");
|
||||||
|
}
|
||||||
|
|
||||||
|
new Ajax('/translate/getTranslation', { locale: locale, translationFile: ['Albaran'] }, {},
|
||||||
|
function (translations) {
|
||||||
|
window.language = JSON.parse(translations);
|
||||||
|
},
|
||||||
|
function (error) {
|
||||||
|
console.log("Error getting translations:", error);
|
||||||
|
}
|
||||||
|
).post();
|
||||||
|
|
||||||
|
|
||||||
|
$('#btnAddEnvio').on('click', () => {
|
||||||
|
const pedido_id = selectPedidos.getVal();
|
||||||
|
const direccionSeleccionada = selectDirecciones.getText();
|
||||||
|
$.post('/albaranes/datatable', {
|
||||||
|
pedido_id: pedido_id,
|
||||||
|
direccion: direccionSeleccionada
|
||||||
|
}, function (response) {
|
||||||
|
if (response.status) {
|
||||||
|
window.open(`${window.location.origin}/logistica/envio/${response.data.id_envio}`);
|
||||||
|
selectDirecciones.empty();
|
||||||
|
selectPedidos.empty();
|
||||||
|
$('.select-direcciones').addClass('d-none');
|
||||||
|
$('.add-envio').addClass('d-none');
|
||||||
|
} else {
|
||||||
|
popErrorAlert(response.message);
|
||||||
|
}
|
||||||
|
}).fail(function (xhr, status, error) {
|
||||||
|
popErrorAlert(error);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const tableAlbaranes = $('#tableOfAlbaranes').DataTable({
|
||||||
|
processing: true,
|
||||||
|
serverSide: true,
|
||||||
|
autoWidth: true,
|
||||||
|
responsive: true,
|
||||||
|
scrollX: true,
|
||||||
|
orderCellsTop: true,
|
||||||
|
lengthMenu: [5, 10, 25, 50, 75, 100, 250, 500, 1000, 2500],
|
||||||
|
pageLength: 50,
|
||||||
|
"dom": 'lBrtip',
|
||||||
|
"ajax": {
|
||||||
|
"url": "/albaranes/datatable",
|
||||||
|
"data": function (d) {
|
||||||
|
d.pedidosFilter = pedidosFilter;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"columns": [
|
||||||
|
{ "data": "id" },
|
||||||
|
{ "data": "numero_albaran" },
|
||||||
|
{ "data": "envio_id" },
|
||||||
|
{ "data": "pedidos" },
|
||||||
|
{ "data": "cliente" },
|
||||||
|
{ "data": "att" },
|
||||||
|
{ "data": "direccion" },
|
||||||
|
{ "data": "unidades_total" },
|
||||||
|
{ "data": "cajas" },
|
||||||
|
{ "data": "action" }
|
||||||
|
|
||||||
|
],
|
||||||
|
"language": {
|
||||||
|
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
||||||
|
},
|
||||||
|
"columnDefs": [
|
||||||
|
{
|
||||||
|
orderable: false,
|
||||||
|
searchable: false,
|
||||||
|
targets: [9]
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"order": [[0, "desc"]],
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('click', '.btn-delete', function (e) {
|
||||||
|
const data = {
|
||||||
|
albaranId: $(this).attr('data-id')
|
||||||
|
};
|
||||||
|
const url = '/albaranes/borrarAlbaran';
|
||||||
|
|
||||||
|
Swal.fire({
|
||||||
|
title: window.language.Albaran.borrarAlbaran,
|
||||||
|
text: window.language.Albaran.borrarAlbaranConfirm,
|
||||||
|
icon: 'warning',
|
||||||
|
showCancelButton: true,
|
||||||
|
confirmButtonColor: '#3085d6',
|
||||||
|
cancelButtonColor: '#d33',
|
||||||
|
confirmButtonText: window.language.Albaran.borrar,
|
||||||
|
cancelButtonText: window.language.Albaran.cancelar,
|
||||||
|
customClass: {
|
||||||
|
confirmButton: 'btn btn-primary me-1',
|
||||||
|
cancelButton: 'btn btn-outline-secondary'
|
||||||
|
},
|
||||||
|
buttonsStyling: false
|
||||||
|
}).then((result) => {
|
||||||
|
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: url,
|
||||||
|
type: 'POST',
|
||||||
|
data: data,
|
||||||
|
success: (response) => {
|
||||||
|
if (response.success) {
|
||||||
|
tableAlbaranes.draw();
|
||||||
|
} else {
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Error',
|
||||||
|
text: 'No se ha podido borrar el albarán',
|
||||||
|
icon: 'error',
|
||||||
|
showCancelButton: false,
|
||||||
|
confirmButtonColor: '#3085d6',
|
||||||
|
confirmButtonText: 'Ok',
|
||||||
|
customClass: {
|
||||||
|
confirmButton: 'btn btn-primary me-1',
|
||||||
|
},
|
||||||
|
buttonsStyling: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: (xhr, status, error) => {
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$(document).on('click', '.btn-edit', function (e) {
|
||||||
|
window.location.href = '/albaranes/edit/' + $(this).attr('data-id');
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on("keyup", ".albaran-filter", (event) => {
|
||||||
|
let columnName = $(event.currentTarget).attr("name");
|
||||||
|
let columnIndex = $('#tableOfAlbaranes').DataTable().columns().eq(0).filter(function (index) {
|
||||||
|
return $('#tableOfAlbaranes').DataTable().column(index).dataSrc() === columnName;
|
||||||
|
})[0];
|
||||||
|
$('#tableOfAlbaranes').DataTable().column(columnIndex).search($(event.currentTarget).val()).draw()
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
$(document).on("keyup", ".albaran-filter-pedidos", (event) => {
|
||||||
|
pedidosFilter = $(event.currentTarget).val();
|
||||||
|
$('#tableOfAlbaranes').DataTable().ajax.reload();
|
||||||
|
})
|
||||||
|
|
||||||
|
});
|
||||||
@ -3,8 +3,9 @@ import ClassSelect from '../../components/select2.js';
|
|||||||
|
|
||||||
$(() => {
|
$(() => {
|
||||||
|
|
||||||
|
let otsFilter = '';
|
||||||
|
|
||||||
const selectPedidos = new ClassSelect($('#buscadorPedidos'), '/logistica/selectPedidosForEnvio', "");
|
const selectPedidos = new ClassSelect($('#buscadorPedidos'), '/logistica/selectForNewEnvio', "");
|
||||||
selectPedidos.init();
|
selectPedidos.init();
|
||||||
const selectDirecciones = new ClassSelect($('#selectDirecciones'), '/logistica/selectDireccionForEnvio', "", true, {
|
const selectDirecciones = new ClassSelect($('#selectDirecciones'), '/logistica/selectDireccionForEnvio', "", true, {
|
||||||
pedido_id: () => selectPedidos.getVal()
|
pedido_id: () => selectPedidos.getVal()
|
||||||
@ -63,10 +64,13 @@ $(() => {
|
|||||||
"dom": 'lBrtip',
|
"dom": 'lBrtip',
|
||||||
"ajax": {
|
"ajax": {
|
||||||
"url": "/logistica/datatableEnvios",
|
"url": "/logistica/datatableEnvios",
|
||||||
|
"data": function (d) {
|
||||||
|
d.otsFilter = otsFilter;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"columns": [
|
"columns": [
|
||||||
{ "data": "id" },
|
{ "data": "id" },
|
||||||
{ "data": "pedidos" },
|
{ "data": "ots" },
|
||||||
{ "data": "num_lineas" },
|
{ "data": "num_lineas" },
|
||||||
{ "data": "att" },
|
{ "data": "att" },
|
||||||
{ "data": "direccion" },
|
{ "data": "direccion" },
|
||||||
@ -99,6 +103,26 @@ $(() => {
|
|||||||
window.location.href = '/logistica/envio/' + $(this).attr('data-id');
|
window.location.href = '/logistica/envio/' + $(this).attr('data-id');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).on("keyup", ".envio-filter", (event) => {
|
||||||
|
let columnName = $(event.currentTarget).attr("name");
|
||||||
|
let columnIndex = $('#tableOfEnvios').DataTable().columns().eq(0).filter(function (index) {
|
||||||
|
return $('#tableOfEnvios').DataTable().column(index).dataSrc() === columnName;
|
||||||
|
})[0];
|
||||||
|
$('#tableOfEnvios').DataTable().column(columnIndex).search($(event.currentTarget).val()).draw()
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
$(document).on("keyup", ".envio-filter-ots", (event) => {
|
||||||
|
otsFilter = $(event.currentTarget).val();
|
||||||
|
$('#tableOfEnvios').DataTable().ajax.reload();
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).on("change", ".envio-filter-select", (event) => {
|
||||||
|
let columnName = $(event.currentTarget).attr("name");
|
||||||
|
let columnIndex = $('#tableOfEnvios').DataTable().columns().eq(0).filter(function (index) {
|
||||||
|
return $('#tableOfEnvios').DataTable().column(index).dataSrc() === columnName;
|
||||||
|
})[0];
|
||||||
|
$('#tableOfEnvios').DataTable().column(columnIndex).search($(event.currentTarget).val()).draw();
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -32,6 +32,8 @@ class EnvioEdit {
|
|||||||
if (!$("#empresaMensajeriaInput").length) {
|
if (!$("#empresaMensajeriaInput").length) {
|
||||||
this.proveedor = new ClassSelect($("#empresaMensajeria"), '/compras/proveedores/getProveedores', "", true, { 'tipo_id': 2 });
|
this.proveedor = new ClassSelect($("#empresaMensajeria"), '/compras/proveedores/getProveedores', "", true, { 'tipo_id': 2 });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.impresoraEtiquetas = $("#impresoraEtiquetas");
|
||||||
}
|
}
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
@ -92,6 +94,63 @@ class EnvioEdit {
|
|||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#btnImprimirEtiquetas').on('click', () => {
|
||||||
|
const table = this.table;
|
||||||
|
const selectedRows = table.rows({ page: 'current' }).nodes().filter((node) => {
|
||||||
|
const checkbox = $(node).find('.checkbox-linea-envio');
|
||||||
|
return checkbox.is(':checked');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
const ids = selectedRows.map((node) => {
|
||||||
|
const rowData = table.row(node).data();
|
||||||
|
return rowData.id;
|
||||||
|
}).toArray();
|
||||||
|
if (ids.length <= 0) {
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Atención!',
|
||||||
|
text: 'Debe seleccionar al menos una línea de envío para imprimir etiquetas.',
|
||||||
|
icon: 'info',
|
||||||
|
confirmButtonColor: '#3085d6',
|
||||||
|
confirmButtonText: 'Ok',
|
||||||
|
customClass: {
|
||||||
|
confirmButton: 'btn btn-primary me-1',
|
||||||
|
},
|
||||||
|
buttonsStyling: false
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const idEnvio = $('#id').val();
|
||||||
|
let num_cajas = this.cajas.val();
|
||||||
|
if(ids.length != table.rows().count()){
|
||||||
|
// se preguntará el numero de cajas en un swal con un input para obtener el valor
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Atención!',
|
||||||
|
text: 'No se ha seleccionado todas las líneas de envío. Ingrese el número de cajas a imprimir.',
|
||||||
|
icon: 'info',
|
||||||
|
input: 'text',
|
||||||
|
inputLabel: 'Número de cajas',
|
||||||
|
inputValue: num_cajas,
|
||||||
|
showCancelButton: true,
|
||||||
|
confirmButtonColor: '#3085d6',
|
||||||
|
confirmButtonText: 'Imprimir etiquetas',
|
||||||
|
cancelButtonText: 'Cancelar',
|
||||||
|
customClass: {
|
||||||
|
confirmButton: 'btn btn-primary me-1',
|
||||||
|
cancelButton: 'btn btn-secondary'
|
||||||
|
},
|
||||||
|
buttonsStyling: false
|
||||||
|
}).then((result) => {
|
||||||
|
if (result.isConfirmed) {
|
||||||
|
num_cajas = result.value;
|
||||||
|
this._imprimirEtiquetas(idEnvio, ids, num_cajas);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this._imprimirEtiquetas(idEnvio, ids, num_cajas);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
this.cajas.on('change', (e) => {
|
this.cajas.on('change', (e) => {
|
||||||
const value = $(e.currentTarget).val();
|
const value = $(e.currentTarget).val();
|
||||||
if (value < 0) {
|
if (value < 0) {
|
||||||
@ -429,6 +488,71 @@ class EnvioEdit {
|
|||||||
this._getAlbaranes();
|
this._getAlbaranes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_imprimirEtiquetas(envio_id, ids, num_cajas) {
|
||||||
|
|
||||||
|
$.post('/logistica/imprimirEtiquetas', {
|
||||||
|
|
||||||
|
envio_id: envio_id,
|
||||||
|
envio_lineas: ids,
|
||||||
|
cajas: num_cajas,
|
||||||
|
printer_id: this.impresoraEtiquetas.val(),
|
||||||
|
|
||||||
|
}, function (response) {
|
||||||
|
if (response.status) {
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Etiquetas generadas',
|
||||||
|
text: 'Las etiquetas se han generado correctamente.',
|
||||||
|
icon: 'success',
|
||||||
|
confirmButtonColor: '#3085d6',
|
||||||
|
confirmButtonText: 'Ok',
|
||||||
|
customClass: {
|
||||||
|
confirmButton: 'btn btn-primary me-1',
|
||||||
|
},
|
||||||
|
buttonsStyling: false
|
||||||
|
}).then(() => {
|
||||||
|
if(response.data){
|
||||||
|
// show xml in a new tab
|
||||||
|
const blob = new Blob([response.data], { type: 'application/xml' });
|
||||||
|
const url = URL.createObjectURL(blob);
|
||||||
|
const a = document.createElement('a');
|
||||||
|
a.href = url;
|
||||||
|
a.download = 'etiquetas.xml';
|
||||||
|
a.click();
|
||||||
|
URL.revokeObjectURL(url);
|
||||||
|
a.remove();
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Error',
|
||||||
|
text: response.message,
|
||||||
|
icon: 'error',
|
||||||
|
confirmButtonColor: '#3085d6',
|
||||||
|
confirmButtonText: 'Ok',
|
||||||
|
customClass: {
|
||||||
|
confirmButton: 'btn btn-primary me-1',
|
||||||
|
},
|
||||||
|
buttonsStyling: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
).fail(() => {
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Error',
|
||||||
|
text: 'No se pudo generar las etiquetas.',
|
||||||
|
icon: 'error',
|
||||||
|
confirmButtonColor: '#3085d6',
|
||||||
|
confirmButtonText: 'Ok',
|
||||||
|
customClass: {
|
||||||
|
confirmButton: 'btn btn-primary me-1',
|
||||||
|
},
|
||||||
|
buttonsStyling: false
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
_checkDatosFinalizar() {
|
_checkDatosFinalizar() {
|
||||||
|
|
||||||
if (this.codigoSeguimiento.val().length <= 0 || this.proveedor.getVal() <= 0) {
|
if (this.codigoSeguimiento.val().length <= 0 || this.proveedor.getVal() <= 0) {
|
||||||
|
|||||||
@ -154,6 +154,7 @@ class OrdenTrabajo {
|
|||||||
this.otForm.on("click", ".ot-tarea-comment", this.handleNoteTarea.bind(this))
|
this.otForm.on("click", ".ot-tarea-comment", this.handleNoteTarea.bind(this))
|
||||||
$("#btn-update-tarea-comment").on("click", this.handleTareaNoteSubmit.bind(this))
|
$("#btn-update-tarea-comment").on("click", this.handleTareaNoteSubmit.bind(this))
|
||||||
this.otForm.on("change", "#ot-comment", this.handleOtComment.bind(this))
|
this.otForm.on("change", "#ot-comment", this.handleOtComment.bind(this))
|
||||||
|
$("#btn-update-pliegos").on('click', this.handleUpdatePliegos.bind(this))
|
||||||
|
|
||||||
this._handleGetData()
|
this._handleGetData()
|
||||||
this.handleGetPortada()
|
this.handleGetPortada()
|
||||||
@ -162,14 +163,9 @@ class OrdenTrabajo {
|
|||||||
this.datatableTareas = this.tareasTableItem.DataTable({
|
this.datatableTareas = this.tareasTableItem.DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
paging: false,
|
paging: false,
|
||||||
layout: {
|
|
||||||
topStart: 'pageLength',
|
|
||||||
topEnd: 'search',
|
|
||||||
bottomStart: 'info',
|
|
||||||
bottomEnd: 'paging'
|
|
||||||
},
|
|
||||||
serverSide: true,
|
serverSide: true,
|
||||||
responsive: true,
|
responsive: true,
|
||||||
|
bFilter: false,
|
||||||
createdRow: this.filterCreatedRow.bind(this),
|
createdRow: this.filterCreatedRow.bind(this),
|
||||||
pageLength: 10,
|
pageLength: 10,
|
||||||
language: {
|
language: {
|
||||||
@ -236,7 +232,7 @@ class OrdenTrabajo {
|
|||||||
}
|
}
|
||||||
createSelectMaquinaTarea() {
|
createSelectMaquinaTarea() {
|
||||||
try {
|
try {
|
||||||
this.summaryData.tasks.forEach(element => {
|
this.summaryData.tasks.forEach(async (element) => {
|
||||||
let selectItem = this.item.find("#select-maquina-tarea-" + element.id);
|
let selectItem = this.item.find("#select-maquina-tarea-" + element.id);
|
||||||
if (element.presupuesto_linea_id && element.is_corte == false) this.createSelectMaquinaImpresion(selectItem)
|
if (element.presupuesto_linea_id && element.is_corte == false) this.createSelectMaquinaImpresion(selectItem)
|
||||||
if (element.presupuesto_acabado_id) this.createSelectMaquinaAcabado(selectItem)
|
if (element.presupuesto_acabado_id) this.createSelectMaquinaAcabado(selectItem)
|
||||||
@ -322,7 +318,7 @@ class OrdenTrabajo {
|
|||||||
maquinaSelects.reset()
|
maquinaSelects.reset()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
createSelectImposicion(selectItem) {
|
async createSelectImposicion(selectItem) {
|
||||||
let imposicionId = selectItem.data("imposicion-id")
|
let imposicionId = selectItem.data("imposicion-id")
|
||||||
let imposicionSelect = new ClassSelect(selectItem, `/imposiciones/select`, "Seleccione una imposición", true);
|
let imposicionSelect = new ClassSelect(selectItem, `/imposiciones/select`, "Seleccione una imposición", true);
|
||||||
|
|
||||||
@ -359,9 +355,11 @@ class OrdenTrabajo {
|
|||||||
this.otForm.off("change", ".ot-pedido")
|
this.otForm.off("change", ".ot-pedido")
|
||||||
this.otForm.off("change", ".ot-pedido-check")
|
this.otForm.off("change", ".ot-pedido-check")
|
||||||
this.otForm.off("change", ".ot-preview")
|
this.otForm.off("change", ".ot-preview")
|
||||||
|
|
||||||
this.fillOtDetails()
|
this.fillOtDetails()
|
||||||
this.fillOtDates()
|
this.fillOtDates()
|
||||||
this.fillPreimpresionReview()
|
this.fillPreimpresionReview()
|
||||||
|
this.fillPliegos()
|
||||||
this.isOtFinalizada = this.summaryData.ot.estado == "F";
|
this.isOtFinalizada = this.summaryData.ot.estado == "F";
|
||||||
this.datatableTareas.ajax.reload()
|
this.datatableTareas.ajax.reload()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -393,6 +391,15 @@ class OrdenTrabajo {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
fillPliegos() {
|
||||||
|
// if (this.summaryData.tareaCosido) {
|
||||||
|
// const tareaCosido = this.summaryData.tareaCosido
|
||||||
|
// this.otForm.find('input[name=pliego_1]').val(tareaCosido.pliego_1)
|
||||||
|
// this.otForm.find('input[name=pliego_1_total]').val(tareaCosido.pliego_1_total)
|
||||||
|
// this.otForm.find('input[name=pliego_2]').val(tareaCosido.pliego_2)
|
||||||
|
// this.otForm.find('input[name=pliego_2_total]').val(tareaCosido.pliego_2_total)
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
fillOtDetails() {
|
fillOtDetails() {
|
||||||
const progreso = this.summaryData.ot.progreso
|
const progreso = this.summaryData.ot.progreso
|
||||||
@ -823,6 +830,40 @@ class OrdenTrabajo {
|
|||||||
this._handleGetData()
|
this._handleGetData()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getTarea(tarea_id) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
let ajax = new Ajax(`/produccion/ordentrabajo/tarea/${tarea_id}`, null, null, (response) => {
|
||||||
|
resolve(response)
|
||||||
|
},
|
||||||
|
(error) => {
|
||||||
|
resolve(error)
|
||||||
|
})
|
||||||
|
ajax.get()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
getDataPliegos() {
|
||||||
|
return {
|
||||||
|
orden_trabajo_id: this.modelId,
|
||||||
|
pliego_1: $("#pliegos-1").val(),
|
||||||
|
pliego_1_total: $("#pliegos-1-total").val(),
|
||||||
|
pliego_2: $("#pliegos-2").val(),
|
||||||
|
pliego_2_total: $("#pliegos-2-total").val(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
handleUpdatePliegos() {
|
||||||
|
|
||||||
|
let ajax = new Ajax(`/produccion/ordentrabajo/update/tarea/pliegos`,
|
||||||
|
this.getDataPliegos(),
|
||||||
|
null,
|
||||||
|
(response) => {
|
||||||
|
alertSuccess(response.message).fire()
|
||||||
|
},
|
||||||
|
(error) => {
|
||||||
|
alertError(error.message).fire()
|
||||||
|
})
|
||||||
|
ajax.post()
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,182 +1,192 @@
|
|||||||
@page {
|
@page {
|
||||||
size: A4;
|
size: A4;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
@media print {
|
@media print {
|
||||||
body,html {
|
body,
|
||||||
width: 210mm;
|
html {
|
||||||
height: 297mm;
|
|
||||||
max-width: 210mm;
|
|
||||||
max-height: 297mm;
|
|
||||||
print-color-adjust: exact;
|
|
||||||
}
|
|
||||||
/* ... the rest of the rules ... */
|
|
||||||
}
|
|
||||||
html {
|
|
||||||
font-family: Arial, sans-serif;
|
|
||||||
width: 210mm;
|
width: 210mm;
|
||||||
height: 297mm;
|
height: 297mm;
|
||||||
max-width: 210mm;
|
max-width: 210mm;
|
||||||
font-size : 11px;
|
|
||||||
max-height: 297mm;
|
max-height: 297mm;
|
||||||
background-color: white;
|
print-color-adjust: exact;
|
||||||
|
}
|
||||||
|
/* ... the rest of the rules ... */
|
||||||
}
|
}
|
||||||
body{
|
html {
|
||||||
border: 0px solid;
|
font-family: Arial, sans-serif;
|
||||||
padding: 10px;
|
width: 210mm;
|
||||||
max-width: 210mm;
|
height: 297mm;
|
||||||
max-height: 297mm;
|
max-width: 210mm;
|
||||||
background-color : white;
|
font-size: 11px;
|
||||||
|
max-height: 297mm;
|
||||||
|
background-color: white;
|
||||||
}
|
}
|
||||||
.portada-img{
|
body {
|
||||||
border-style: solid;
|
border: 0px solid;
|
||||||
height: 100%;
|
padding: 10px;
|
||||||
border: 2px solid;
|
margin : 10px;
|
||||||
|
max-width: 210mm;
|
||||||
|
max-height: 297mm;
|
||||||
|
background-color: white;
|
||||||
}
|
}
|
||||||
.square{
|
.portada-img {
|
||||||
align-items: center;
|
border-style: solid;
|
||||||
align-content : center;
|
height: 100%;
|
||||||
justify-content: center;
|
border: 2px solid;
|
||||||
font-weight: bold;
|
|
||||||
font-size : 14px;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.esquema{
|
.square {
|
||||||
|
align-items: center;
|
||||||
|
align-content: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
.pagina-imposicion-outer-start{
|
.esquema {
|
||||||
border-top: 2px solid;
|
|
||||||
border-left: 2px solid;
|
|
||||||
border-bottom: 2px solid;
|
|
||||||
width: 50px;
|
|
||||||
height: 100px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
}
|
||||||
.pagina-imposicion-outer-end{
|
.pagina-imposicion-outer-start {
|
||||||
border-top: 2px solid;
|
border-top: 2px solid;
|
||||||
border-right: 2px solid;
|
border-left: 2px solid;
|
||||||
border-bottom: 2px solid;
|
border-bottom: 2px solid;
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.pagina-imposicion-outer{
|
.pagina-imposicion-outer-end {
|
||||||
border-top: 2px solid;
|
border-top: 2px solid;
|
||||||
border-bottom: 2px solid;
|
border-right: 2px solid;
|
||||||
width: 50px;
|
border-bottom: 2px solid;
|
||||||
height: 100px;
|
width: 50px;
|
||||||
display: flex;
|
height: 100px;
|
||||||
align-items: center;
|
display: flex;
|
||||||
justify-content: center;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.pagina-imposicion-inner{
|
.pagina-imposicion-outer {
|
||||||
border: 2px solid;
|
border-top: 2px solid;
|
||||||
font-size: 25px;
|
border-bottom: 2px solid;
|
||||||
width: 40px;
|
width: 50px;
|
||||||
height: 90px;
|
height: 100px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
}
|
}
|
||||||
.esquema-imposicion-wrapper{
|
.pagina-imposicion-inner {
|
||||||
|
border: 2px solid;
|
||||||
|
font-size: 25px;
|
||||||
|
width: 40px;
|
||||||
|
height: 90px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.imposicion{
|
.esquema-imposicion-wrapper {
|
||||||
display: flex;
|
}
|
||||||
align-items: center;
|
.imposicion {
|
||||||
justify-content: center;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.section-title {
|
.section-title {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
.cubierta{
|
.cubierta {
|
||||||
color: #007bff;
|
color: #007bff;
|
||||||
}
|
}
|
||||||
.encuadernacion{
|
.encuadernacion {
|
||||||
color: green;
|
color: green;
|
||||||
}
|
}
|
||||||
.impresion{
|
.impresion {
|
||||||
color: #ff4000;
|
color: #ff4000;
|
||||||
}
|
}
|
||||||
.comments {
|
.comments {
|
||||||
color: #555;
|
color: #555;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
margin-top: 0.2rem;
|
margin-top: 0.2rem;
|
||||||
}
|
}
|
||||||
.comment-content {
|
.comment-content {
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
border: solid;
|
border: solid;
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
table td {
|
table td {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
table,th,td{
|
table,
|
||||||
border: 0.1px solid rgb(0, 0, 0);
|
th,
|
||||||
border-collapse: collapse;
|
td {
|
||||||
|
border: 0.1px solid rgb(0, 0, 0);
|
||||||
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
table th {
|
table th {
|
||||||
background-color: #f4f4f4;
|
font-weight: bold;
|
||||||
font-weight: bold;
|
color: black;
|
||||||
color : black;
|
text-align: center;
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
table td{
|
table td {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.comments {
|
.comments {
|
||||||
color: #555;
|
color: #555;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
margin-top: 0.2rem;
|
margin-top: 0.2rem;
|
||||||
}
|
}
|
||||||
.t-header{
|
.t-header {
|
||||||
color: black;
|
color: black;
|
||||||
width: 25%;
|
width: 25%;
|
||||||
}
|
}
|
||||||
.t-cell{
|
.t-cell {
|
||||||
background-color: white;
|
color: black;
|
||||||
color: black;
|
text-align: start;
|
||||||
text-align: start;
|
padding-left: 0.2rem;
|
||||||
padding-left: 0.2rem;
|
|
||||||
}
|
}
|
||||||
.t-row{
|
.t-row {
|
||||||
font-size: 8px;
|
font-size: 8px;
|
||||||
width : 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.bicolor{
|
.bicolor {
|
||||||
background: linear-gradient( to right, #00b5fc 0%, #00b5fc 45%, #000000 55%, #000000 100%);
|
background: linear-gradient(
|
||||||
color: white;
|
to right,
|
||||||
|
#00b5fc 0%,
|
||||||
|
#00b5fc 45%,
|
||||||
|
#000000 55%,
|
||||||
|
#000000 100%
|
||||||
|
);
|
||||||
|
color: white;
|
||||||
}
|
}
|
||||||
.cmyk{
|
.cmyk {
|
||||||
background-image: url('/themes/vuexy/img/safekat/presupuestos/cmyk.png');
|
background-image: url("/themes/vuexy/img/safekat/presupuestos/cmyk.png");
|
||||||
background-size: 110px;
|
background-size: 110px;
|
||||||
color : white;
|
color: white;
|
||||||
text-shadow: 0px 0px 2px black;
|
text-shadow: 0px 0px 2px black;
|
||||||
stroke:white;
|
stroke: white;
|
||||||
}
|
}
|
||||||
.bn{
|
.bn {
|
||||||
background : black;
|
background: black;
|
||||||
color: white;
|
color: white;
|
||||||
|
}
|
||||||
|
.footer {
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
.bg-encuadernacion {
|
||||||
|
background-color: #bbd8a3;
|
||||||
|
}
|
||||||
|
.encuadernacion th {
|
||||||
|
color: green;
|
||||||
|
}
|
||||||
|
.cell-50 {
|
||||||
|
width: 50px;
|
||||||
}
|
}
|
||||||
.footer{
|
|
||||||
font-size : 10px
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user