From d2646aebbc19ee9d04e28e2ee5fb5226e7cd2ed2 Mon Sep 17 00:00:00 2001 From: Jaime Jimenez Date: Fri, 8 Sep 2023 12:27:19 +0200 Subject: [PATCH 01/16] Primeros cambios en cosido tapa blanda --- ci4/app/Config/Routes.php | 14 + .../Presupuestos/Cosidotapablanda.php | 879 +++++++++- .../Presupuestos/PresupuestoEntity.php | 317 ++++ .../Presupuestos/PresupuestoEstadoEntity.php | 19 + ci4/app/Language/en/Presupuestos.php | 772 +++++++++ ci4/app/Language/es/Presupuestos.php | 772 +++++++++ .../Presupuestos/PresupuestoEstadoModel.php | 88 + .../Models/Presupuestos/PresupuestoModel.php | 1101 ++++++++++++ .../_cosidotapablandaFormItems.php | 1498 +++++++++++++++++ .../viewCosidotapablandaForm.php | 783 +++++++++ .../viewCosidotapablandaList.php | 202 +++ 11 files changed, 6437 insertions(+), 8 deletions(-) create mode 100644 ci4/app/Entities/Presupuestos/PresupuestoEntity.php create mode 100644 ci4/app/Entities/Presupuestos/PresupuestoEstadoEntity.php create mode 100644 ci4/app/Language/en/Presupuestos.php create mode 100644 ci4/app/Language/es/Presupuestos.php create mode 100644 ci4/app/Models/Presupuestos/PresupuestoEstadoModel.php create mode 100644 ci4/app/Models/Presupuestos/PresupuestoModel.php create mode 100644 ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_cosidotapablandaFormItems.php create mode 100644 ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaForm.php create mode 100644 ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaList.php diff --git a/ci4/app/Config/Routes.php b/ci4/app/Config/Routes.php index 01b4b1e4..a55dbbde 100644 --- a/ci4/app/Config/Routes.php +++ b/ci4/app/Config/Routes.php @@ -456,6 +456,20 @@ $routes->group('clientecontactos', ['namespace' => 'App\Controllers\Clientes'], }); $routes->resource('ClienteContactos', ['namespace' => 'App\Controllers\Tarifas', 'controller' => 'ClienteContactos', 'except' => 'show,new,create,update']); + +$routes->group('Cosidotapablanda', ['namespace' => 'App\Controllers\Presupuestos'], function ($routes) { + $routes->get('', 'Cosidotapablanda::index', ['as' => 'cosidotapablandaList']); + $routes->get('add', 'Cosidotapablanda::add', ['as' => 'newCosidotapablanda']); + $routes->post('add', 'Cosidotapablanda::add', ['as' => 'createCosidotapablanda']); + $routes->post('create', 'Cosidotapablanda::create', ['as' => 'ajaxCreateCosidotapablanda']); + $routes->put('(:num)/update', 'Cosidotapablanda::update/$1', ['as' => 'ajaxUpdateCosidotapablanda']); + $routes->post('(:num)/edit', 'Cosidotapablanda::edit/$1', ['as' => 'updateCosidotapablanda']); + $routes->post('datatable', 'Cosidotapablanda::datatable', ['as' => 'dataTableOfCosidotapablanda']); + $routes->post('allmenuitems', 'Cosidotapablanda::allItemsSelect', ['as' => 'select2ItemsOfCosidotapablanda']); + $routes->post('menuitems', 'Cosidotapablanda::menuItems', ['as' => 'menuItemsOfCosidotapablanda']); +}); +$routes->resource('Cosidotapablanda', ['namespace' => 'App\Controllers\Presupuestos', 'controller' => 'Cosidotapablanda', 'except' => 'show,new,create,update']); + /* * -------------------------------------------------------------------- * Additional Routing diff --git a/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php b/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php index 234d3696..f2304cee 100644 --- a/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php +++ b/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php @@ -1,19 +1,882 @@ viewData['pageTitle'] = lang('Presupuestos.moduleTitle'); + $this->viewData['usingSweetAlert'] = true; + parent::initController($request, $response, $logger); + $this->model = new PresupuestoModel(); } + public function index() { - echo 'Presupuesto >> Libros >> Cosido tapa blanda [en desarrollo].'; + + $viewData = [ + 'currentModule' => static::$controllerSlug, + 'pageSubTitle' => lang('Basic.global.ManageAllRecords', [lang('Presupuestos.presupuesto')]), + 'presupuestoEntity' => new PresupuestoEntity(), + 'usingServerSideDataTable' => true, + + ]; + + // Se indica que este controlador trabaja con soft_delete + $this->soft_delete = true; + // Se indica el flag para los ficheros borrados + $this->delete_flag = 1; + + $this->viewData = ['usingServerSideDataTable' => true]; // JJO + + $viewData = array_merge($this->viewData, $viewData); // merge any possible values from the parent controller class + + return view(static::$viewPath . 'viewCosidotapablandaList', $viewData); + } + + + public function add() + { + + // JJO + $session = session(); + + $requestMethod = $this->request->getMethod(); + + if ($requestMethod === 'post') : + + $nullIfEmpty = true; // !(phpversion() >= '8.1'); + + $postData = $this->request->getPost(); + + $sanitizedData = $this->sanitized($postData, $nullIfEmpty); + + // JJO + $sanitizedData['user_created_id'] = $session->id_user; + + $noException = true; + if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) : + + + if ($this->canValidate()) : + try { + $successfulResult = $this->model->skipValidation(true)->save($sanitizedData); + } catch (\Exception $e) { + $noException = false; + $this->dealWithException($e); + } + else : + $this->viewData['errorMessage'] = lang('Basic.global.formErr1', [mb_strtolower(lang('Presupuestos.presupuesto'))]); + $this->session->setFlashdata('formErrors', $this->model->errors()); + endif; + + $thenRedirect = true; // Change this to false if you want your user to stay on the form after submission + endif; + if ($noException && $successfulResult) : + + $id = $this->model->db->insertID(); + + $message = lang('Basic.global.saveSuccess', [mb_strtolower(lang('Presupuestos.presupuesto'))]) . '.'; + $message .= anchor("admin/presupuestos/{$id}/edit", lang('Basic.global.continueEditing') . '?'); + $message = ucfirst(str_replace("'", "\'", $message)); + + if ($thenRedirect) : + if (!empty($this->indexRoute)) : + //return redirect()->to(route_to( $this->indexRoute ) )->with('sweet-success', $message); + return redirect()->to(site_url('presupuestos/presupuestos/edit/' . $id))->with('sweet-success', $message); + else : + return $this->redirect2listView('sweet-success', $message); + endif; + else : + $this->session->setFlashData('sweet-success', $message); + endif; + + endif; // $noException && $successfulResult + + endif; // ($requestMethod === 'post') + + $this->viewData['presupuestoEntity'] = isset($sanitizedData) ? new PresupuestoEntity($sanitizedData) : new PresupuestoEntity(); + $this->viewData['clienteList'] = $this->getClienteListItems($presupuestoEntity->cliente_id ?? null); + $this->viewData['formaPagoList'] = $this->getFormaPagoListItems(); + $this->viewData['tiposImpresionList'] = $this->getTiposImpresionListItems($presupuestoEntity->tipo_impresion_id ?? null); + $this->viewData['tipologiasLibroList'] = $this->getTipologiasLibroListItems($presupuestoEntity->tipologia_id ?? null); + $this->viewData['paisList'] = $this->getPaisListItems(); + $this->viewData['ubicacionLibroList'] = $this->getUbicacionLibroListItems($presupuestoEntity->ubicacion_id ?? null); + $this->viewData['presupuestoEstadoList'] = $this->getPresupuestoEstadoListItems($presupuestoEntity->estado_id ?? null); + $this->viewData['papelFormatoList'] = $this->getPapelFormatoListItems($presupuestoEntity->papel_formato_id ?? null); + $this->viewData['papelGenericoList'] = $this->getPapelGenericoListItems($presupuestoEntity->paginas_negro_papel_id ?? null); + $this->viewData['papelImpresionList'] = $this->getPapelImpresionListItems($presupuestoEntity->paginas_negro_papel_impresion_id ?? null); + $this->viewData['maquinaList'] = $this->getMaquinaListItems($presupuestoEntity->paginas_negro_maquina_id ?? null); + $this->viewData['maquinasTarifasImpresionList'] = $this->getMaquinasTarifasImpresionListItems($presupuestoEntity->paginas_negro_tarifa_impresion_id ?? null); + $this->viewData['papelGenericoList2'] = $this->getPapelGenericoListItems2($presupuestoEntity->paginas_color_papel_id ?? null); + $this->viewData['papelImpresionList2'] = $this->getPapelImpresionListItems2($presupuestoEntity->paginas_color_papel_impresion_id ?? null); + $this->viewData['maquinaList2'] = $this->getMaquinaListItems2($presupuestoEntity->paginas_color_maquina_id ?? null); + $this->viewData['maquinasTarifasImpresionList2'] = $this->getMaquinasTarifasImpresionListItems2($presupuestoEntity->paginas_color_tarifa_impresion_id ?? null); + $this->viewData['papelGenericoList3'] = $this->getPapelGenericoListItems3($presupuestoEntity->paginas_portada_papel_id ?? null); + $this->viewData['papelImpresionList3'] = $this->getPapelImpresionListItems3($presupuestoEntity->paginas_portada_papel_impresion_id ?? null); + $this->viewData['maquinaList3'] = $this->getMaquinaListItems3($presupuestoEntity->paginas_portada_maquina_id ?? null); + $this->viewData['maquinasTarifasImpresionList3'] = $this->getMaquinasTarifasImpresionListItems3($presupuestoEntity->paginas_portada_tarifa_impresion_id ?? null); + $this->viewData['papelGenericoList4'] = $this->getPapelGenericoListItems4($presupuestoEntity->paginas_cubierta_papel_id ?? null); + $this->viewData['papelImpresionList4'] = $this->getPapelImpresionListItems4($presupuestoEntity->paginas_cubierta_papel_impresion_id ?? null); + $this->viewData['maquinaList4'] = $this->getMaquinaListItems4($presupuestoEntity->paginas_cubierta_maquina_id ?? null); + $this->viewData['maquinasTarifasImpresionList4'] = $this->getMaquinasTarifasImpresionListItems4($presupuestoEntity->paginas_cubierta_tarifa_impresion_id ?? null); + $this->viewData['userList'] = $this->getUserListItems($presupuestoEntity->total_confirmado_user_id ?? null); + $this->viewData['userList2'] = $this->getUserListItems2($presupuestoEntity->aprobado_user_id ?? null); + $this->viewData['userList3'] = $this->getUserListItems3($presupuestoEntity->pedido_espera_user_id ?? null); + $this->viewData['paginasCubiertaList'] = $this->getPaginasCubiertaOptions(); + $this->viewData['paginasPortadaList'] = $this->getPaginasPortadaOptions(); + + $this->viewData['formAction'] = route_to('createPresupuesto'); + + $this->viewData['boxTitle'] = lang('Basic.global.addNew') . ' ' . lang('Presupuestos.moduleTitle') . ' ' . lang('Basic.global.addNewSuffix'); + + + return $this->displayForm(__METHOD__); + } // end function add() + + public function edit($requestedId = null) + { + + // JJO + $session = session(); + + if ($requestedId == null) : + return $this->redirect2listView(); + endif; + $id = filter_var($requestedId, FILTER_SANITIZE_URL); + $presupuestoEntity = $this->model->find($id); + + if ($presupuestoEntity == false) : + $message = lang('Basic.global.notFoundWithIdErr', [mb_strtolower(lang('Presupuestos.presupuesto')), $id]); + return $this->redirect2listView('sweet-error', $message); + endif; + + $requestMethod = $this->request->getMethod(); + + if ($requestMethod === 'post') : + + $nullIfEmpty = true; // !(phpversion() >= '8.1'); + + $postData = $this->request->getPost(); + + $sanitizedData = $this->sanitized($postData, $nullIfEmpty); + if ($this->request->getPost('recoger_en_taller') == null) { + $sanitizedData['recoger_en_taller'] = false; + } + if ($this->request->getPost('ferro') == null) { + $sanitizedData['ferro'] = false; + } + if ($this->request->getPost('ferro_digital') == null) { + $sanitizedData['ferro_digital'] = false; + } + if ($this->request->getPost('marcapaginas') == null) { + $sanitizedData['marcapaginas'] = false; + } + if ($this->request->getPost('papel_formato_personalizado') == null) { + $sanitizedData['papel_formato_personalizado'] = false; + } + if ($this->request->getPost('solapas') == null) { + $sanitizedData['solapas'] = false; + } + if ($this->request->getPost('cosido') == null) { + $sanitizedData['cosido'] = false; + } + if ($this->request->getPost('cubiertas') == null) { + $sanitizedData['cubiertas'] = false; + } + if ($this->request->getPost('imagenes_bn_interior') == null) { + $sanitizedData['imagenes_bn_interior'] = false; + } + if ($this->request->getPost('en_produccion') == null) { + $sanitizedData['en_produccion'] = false; + } + if ($this->request->getPost('en_espera') == null) { + $sanitizedData['en_espera'] = false; + } + if ($this->request->getPost('modo_comparador') == null) { + $sanitizedData['modo_comparador'] = false; + } + if ($this->request->getPost('paginas_negro_hq') == null) { + $sanitizedData['paginas_negro_hq'] = false; + } + if ($this->request->getPost('paginas_negro_check_papel_total') == null) { + $sanitizedData['paginas_negro_check_papel_total'] = false; + } + if ($this->request->getPost('paginas_negro_check_impresion_total') == null) { + $sanitizedData['paginas_negro_check_impresion_total'] = false; + } + if ($this->request->getPost('paginas_color_check_papel_total') == null) { + $sanitizedData['paginas_color_check_papel_total'] = false; + } + if ($this->request->getPost('paginas_color_check_impresion_total') == null) { + $sanitizedData['paginas_color_check_impresion_total'] = false; + } + if ($this->request->getPost('paginas_portada_check_papel_total') == null) { + $sanitizedData['paginas_portada_check_papel_total'] = false; + } + if ($this->request->getPost('paginas_portada_check_impresion_total') == null) { + $sanitizedData['paginas_portada_check_impresion_total'] = false; + } + if ($this->request->getPost('paginas_cubierta_papel_impresion_id') == null) { + $sanitizedData['paginas_cubierta_papel_impresion_id'] = false; + } + if ($this->request->getPost('paginas_cubierta_check_papel_total') == null) { + $sanitizedData['paginas_cubierta_check_papel_total'] = false; + } + if ($this->request->getPost('paginas_cubierta_check_impresion_total') == null) { + $sanitizedData['paginas_cubierta_check_impresion_total'] = false; + } + if ($this->request->getPost('isDig') == null) { + $sanitizedData['isDig'] = false; + } + if ($this->request->getPost('envios_recoge_cliente') == null) { + $sanitizedData['envios_recoge_cliente'] = false; + } + if ($this->request->getPost('fecha_entrega_real_warning') == null) { + $sanitizedData['fecha_entrega_real_warning'] = false; + } + + // JJO + $sanitizedData['user_updated_id'] = $session->id_user; + + $noException = true; + if ($successfulResult = $this->canValidate()) : // if ($successfulResult = $this->validate($this->formValidationRules) ) : + + + + if ($this->canValidate()) : + try { + $successfulResult = $this->model->skipValidation(true)->update($id, $sanitizedData); + } catch (\Exception $e) { + $noException = false; + $this->dealWithException($e); + } + else : + $this->viewData['warningMessage'] = lang('Basic.global.formErr1', [mb_strtolower(lang('Presupuestos.presupuesto'))]); + $this->session->setFlashdata('formErrors', $this->model->errors()); + + endif; + + $presupuestoEntity->fill($sanitizedData); + + $thenRedirect = true; + endif; + if ($noException && $successfulResult) : + $id = $presupuestoEntity->id ?? $id; + $message = lang('Basic.global.updateSuccess', [mb_strtolower(lang('Presupuestos.presupuesto'))]) . '.'; + $message .= anchor("admin/presupuestos/{$id}/edit", lang('Basic.global.continueEditing') . '?'); + $message = ucfirst(str_replace("'", "\'", $message)); + + if ($thenRedirect) : + if (!empty($this->indexRoute)) : + return redirect()->to(route_to($this->indexRoute))->with('sweet-success', $message); + else : + return $this->redirect2listView('sweet-success', $message); + endif; + else : + $this->session->setFlashData('sweet-success', $message); + endif; + + endif; // $noException && $successfulResult + endif; // ($requestMethod === 'post') + + $this->viewData['presupuestoEntity'] = $presupuestoEntity; + $this->viewData['clienteList'] = $this->getClienteListItems($presupuestoEntity->cliente_id ?? null); + $this->viewData['formaPagoList'] = $this->getFormaPagoListItems(); + $this->viewData['tiposImpresionList'] = $this->getTiposImpresionListItems($presupuestoEntity->tipo_impresion_id ?? null); + $this->viewData['tipologiasLibroList'] = $this->getTipologiasLibroListItems($presupuestoEntity->tipologia_id ?? null); + $this->viewData['paisList'] = $this->getPaisListItems(); + $this->viewData['ubicacionLibroList'] = $this->getUbicacionLibroListItems($presupuestoEntity->ubicacion_id ?? null); + $this->viewData['presupuestoEstadoList'] = $this->getPresupuestoEstadoListItems($presupuestoEntity->estado_id ?? null); + $this->viewData['papelFormatoList'] = $this->getPapelFormatoListItems($presupuestoEntity->papel_formato_id ?? null); + $this->viewData['papelGenericoList'] = $this->getPapelGenericoListItems($presupuestoEntity->paginas_negro_papel_id ?? null); + $this->viewData['papelImpresionList'] = $this->getPapelImpresionListItems($presupuestoEntity->paginas_negro_papel_impresion_id ?? null); + $this->viewData['maquinaList'] = $this->getMaquinaListItems($presupuestoEntity->paginas_negro_maquina_id ?? null); + $this->viewData['maquinasTarifasImpresionList'] = $this->getMaquinasTarifasImpresionListItems($presupuestoEntity->paginas_negro_tarifa_impresion_id ?? null); + $this->viewData['papelGenericoList2'] = $this->getPapelGenericoListItems2($presupuestoEntity->paginas_color_papel_id ?? null); + $this->viewData['papelImpresionList2'] = $this->getPapelImpresionListItems2($presupuestoEntity->paginas_color_papel_impresion_id ?? null); + $this->viewData['maquinaList2'] = $this->getMaquinaListItems2($presupuestoEntity->paginas_color_maquina_id ?? null); + $this->viewData['maquinasTarifasImpresionList2'] = $this->getMaquinasTarifasImpresionListItems2($presupuestoEntity->paginas_color_tarifa_impresion_id ?? null); + $this->viewData['papelGenericoList3'] = $this->getPapelGenericoListItems3($presupuestoEntity->paginas_portada_papel_id ?? null); + $this->viewData['papelImpresionList3'] = $this->getPapelImpresionListItems3($presupuestoEntity->paginas_portada_papel_impresion_id ?? null); + $this->viewData['maquinaList3'] = $this->getMaquinaListItems3($presupuestoEntity->paginas_portada_maquina_id ?? null); + $this->viewData['maquinasTarifasImpresionList3'] = $this->getMaquinasTarifasImpresionListItems3($presupuestoEntity->paginas_portada_tarifa_impresion_id ?? null); + $this->viewData['papelGenericoList4'] = $this->getPapelGenericoListItems4($presupuestoEntity->paginas_cubierta_papel_id ?? null); + $this->viewData['papelImpresionList4'] = $this->getPapelImpresionListItems4($presupuestoEntity->paginas_cubierta_papel_impresion_id ?? null); + $this->viewData['maquinaList4'] = $this->getMaquinaListItems4($presupuestoEntity->paginas_cubierta_maquina_id ?? null); + $this->viewData['maquinasTarifasImpresionList4'] = $this->getMaquinasTarifasImpresionListItems4($presupuestoEntity->paginas_cubierta_tarifa_impresion_id ?? null); + $this->viewData['userList'] = $this->getUserListItems($presupuestoEntity->total_confirmado_user_id ?? null); + $this->viewData['userList2'] = $this->getUserListItems2($presupuestoEntity->aprobado_user_id ?? null); + $this->viewData['userList3'] = $this->getUserListItems3($presupuestoEntity->pedido_espera_user_id ?? null); + $this->viewData['paginasCubiertaList'] = $this->getPaginasCubiertaOptions(); + $this->viewData['paginasPortadaList'] = $this->getPaginasPortadaOptions(); + + $this->viewData['formAction'] = route_to('updatePresupuesto', $id); + + $this->viewData['boxTitle'] = lang('Basic.global.edit2') . ' ' . lang('Presupuestos.moduleTitle') . ' ' . lang('Basic.global.edit3'); + + + return $this->displayForm(__METHOD__, $id); + } // end function edit(...) + + + + public function datatable() + { + if ($this->request->isAJAX()) { + $reqData = $this->request->getPost(); + if (!isset($reqData['draw']) || !isset($reqData['columns'])) { + $errstr = 'No data available in response to this specific request.'; + $response = $this->respond(Collection::datatable([], 0, 0, $errstr), 400, $errstr); + return $response; + } + $start = $reqData['start'] ?? 0; + $length = $reqData['length'] ?? 5; + $search = $reqData['search']['value']; + $requestedOrder = $reqData['order']['0']['column'] ?? 0; + $order = PresupuestoModel::SORTABLE[$requestedOrder >= 0 ? $requestedOrder : 0]; + $dir = $reqData['order']['0']['dir'] ?? 'asc'; + + $resourceData = $this->model->getResource($search)->orderBy($order, $dir)->limit($length, $start)->get()->getResultObject(); + foreach ($resourceData as $item) : + if (isset($item->comentarios_pdf) && strlen($item->comentarios_pdf) > 100) : + $item->comentarios_pdf = character_limiter($item->comentarios_pdf, 100); + endif; + if (isset($item->causa_cancelacion) && strlen($item->causa_cancelacion) > 100) : + $item->causa_cancelacion = character_limiter($item->causa_cancelacion, 100); + endif; + if (isset($item->comentarios) && strlen($item->comentarios) > 100) : + $item->comentarios = character_limiter($item->comentarios, 100); + endif; + if (isset($item->comentarios_safekat) && strlen($item->comentarios_safekat) > 100) : + $item->comentarios_safekat = character_limiter($item->comentarios_safekat, 100); + endif; + if (isset($item->comentarios_tarifa) && strlen($item->comentarios_tarifa) > 100) : + $item->comentarios_tarifa = character_limiter($item->comentarios_tarifa, 100); + endif; + if (isset($item->tirada_alternativa_json_data) && strlen($item->tirada_alternativa_json_data) > 100) : + $item->tirada_alternativa_json_data = character_limiter($item->tirada_alternativa_json_data, 100); + endif; + if (isset($item->titulo) && strlen($item->titulo) > 100) : + $item->titulo = character_limiter($item->titulo, 100); + endif; + if (isset($item->paginas_color_posicion) && strlen($item->paginas_color_posicion) > 100) : + $item->paginas_color_posicion = character_limiter($item->paginas_color_posicion, 100); + endif; + if (isset($item->aprobado_json_data) && strlen($item->aprobado_json_data) > 100) : + $item->aprobado_json_data = character_limiter($item->aprobado_json_data, 100); + endif; + if (isset($item->comparador_json_data) && strlen($item->comparador_json_data) > 100) : + $item->comparador_json_data = character_limiter($item->comparador_json_data, 100); + endif; + if (isset($item->ws_externo_json_data) && strlen($item->ws_externo_json_data) > 100) : + $item->ws_externo_json_data = character_limiter($item->ws_externo_json_data, 100); + endif; + endforeach; + + return $this->respond(Collection::datatable( + $resourceData, + $this->model->getResource()->countAllResults(), + $this->model->getResource($search)->countAllResults() + )); + } else { + return $this->failUnauthorized('Invalid request', 403); + } + } + + public function allItemsSelect() + { + if ($this->request->isAJAX()) { + $onlyActiveOnes = true; + $reqVal = $this->request->getPost('val') ?? 'id'; + $menu = $this->model->getAllForMenu($reqVal . ', titulo', 'titulo', $onlyActiveOnes, false); + $nonItem = new \stdClass; + $nonItem->id = ''; + $nonItem->titulo = '- ' . lang('Basic.global.None') . ' -'; + array_unshift($menu, $nonItem); + + $newTokenHash = csrf_hash(); + $csrfTokenName = csrf_token(); + $data = [ + 'menu' => $menu, + $csrfTokenName => $newTokenHash + ]; + return $this->respond($data); + } else { + return $this->failUnauthorized('Invalid request', 403); + } + } + + public function menuItems() + { + if ($this->request->isAJAX()) { + $searchStr = goSanitize($this->request->getPost('searchTerm'))[0]; + $reqId = goSanitize($this->request->getPost('id'))[0]; + $reqText = goSanitize($this->request->getPost('text'))[0]; + $onlyActiveOnes = false; + $columns2select = [$reqId ?? 'id', $reqText ?? 'titulo']; + $onlyActiveOnes = false; + $menu = $this->model->getSelect2MenuItems($columns2select, $columns2select[1], $onlyActiveOnes, $searchStr); + $nonItem = new \stdClass; + $nonItem->id = ''; + $nonItem->text = '- ' . lang('Basic.global.None') . ' -'; + array_unshift($menu, $nonItem); + + $newTokenHash = csrf_hash(); + $csrfTokenName = csrf_token(); + $data = [ + 'menu' => $menu, + $csrfTokenName => $newTokenHash + ]; + return $this->respond($data); + } else { + return $this->failUnauthorized('Invalid request', 403); + } + } + + + protected function getPaisListItems() + { + $paisModel = model('App\Models\Configuracion\PaisModel'); + $onlyActiveOnes = true; + $data = $paisModel->getAllForMenu('id, nombre', 'nombre', $onlyActiveOnes); + + return $data; + } + + + protected function getUbicacionLibroListItems($selId = null) + { + $data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('LgUbicacionesLibros.ubicacionLibro'))])]; + if (!empty($selId)) : + $ubicacionesLibroModel = model('App\Models\Configuracion\UbicacionesLibroModel'); + + $selOption = $ubicacionesLibroModel->where('id', $selId)->findColumn('nombre'); + if (!empty($selOption)) : + $data[$selId] = $selOption[0]; + endif; + endif; + return $data; + } + + + protected function getFormaPagoListItems() + { + $formasPagoModel = model('App\Models\Configuracion\FormasPagoModel'); + $onlyActiveOnes = true; + $data = $formasPagoModel->getAllForMenu('id, nombre', 'nombre', $onlyActiveOnes); + + return $data; + } + + + protected function getPapelImpresionListItems4($selId = null) + { + $data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('PapelImpresions.papelImpresion'))])]; + if (!empty($selId)) : + $papelImpresionModel = model('App\Models\Presupuestos\PapelImpresionModel'); + + $selOption = $papelImpresionModel->where('id', $selId)->findColumn('nombre'); + if (!empty($selOption)) : + $data[$selId] = $selOption[0]; + endif; + endif; + return $data; + } + + + protected function getPresupuestoEstadoListItems($selId = null) + { + $data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('PresupuestoEstados.presupuestoEstado'))])]; + if (!empty($selId)) : + $presupuestoEstadoModel = model('App\Models\Presupuestos\PresupuestoEstadoModel'); + + $selOption = $presupuestoEstadoModel->where('id', $selId)->findColumn('estado'); + if (!empty($selOption)) : + $data[$selId] = $selOption[0]; + endif; + endif; + return $data; + } + + + protected function getPapelGenericoListItems3($selId = null) + { + $data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('PapelGenericoes.papelGenerico'))])]; + if (!empty($selId)) : + $papelGenericoModel = model('App\Models\Presupuestos\PapelGenericoModel'); + + $selOption = $papelGenericoModel->where('id', $selId)->findColumn('nombre'); + if (!empty($selOption)) : + $data[$selId] = $selOption[0]; + endif; + endif; + return $data; + } + + + protected function getPapelImpresionListItems2($selId = null) + { + $data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('PapelImpresions.papelImpresion'))])]; + if (!empty($selId)) : + $papelImpresionModel = model('App\Models\Presupuestos\PapelImpresionModel'); + + $selOption = $papelImpresionModel->where('id', $selId)->findColumn('nombre'); + if (!empty($selOption)) : + $data[$selId] = $selOption[0]; + endif; + endif; + return $data; + } + + + protected function getMaquinaListItems3($selId = null) + { + $data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Maquinas.maquina'))])]; + if (!empty($selId)) : + $maquinaModel = model('App\Models\Presupuestos\MaquinaModel'); + + $selOption = $maquinaModel->where('id', $selId)->findColumn('nombre'); + if (!empty($selOption)) : + $data[$selId] = $selOption[0]; + endif; + endif; + return $data; + } + + + protected function getMaquinasTarifasImpresionListItems2($selId = null) + { + $data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('MaquinasTarifasImpresions.maquinasTarifasImpresion'))])]; + if (!empty($selId)) : + $maquinasTarifasImpresionModel = model('App\Models\Presupuestos\MaquinasTarifasImpresionModel'); + + $selOption = $maquinasTarifasImpresionModel->where('id', $selId)->findColumn('precio'); + if (!empty($selOption)) : + $data[$selId] = $selOption[0]; + endif; + endif; + return $data; + } + + + protected function getPapelGenericoListItems2($selId = null) + { + $data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('PapelGenericoes.papelGenerico'))])]; + if (!empty($selId)) : + $papelGenericoModel = model('App\Models\Presupuestos\PapelGenericoModel'); + + $selOption = $papelGenericoModel->where('id', $selId)->findColumn('nombre'); + if (!empty($selOption)) : + $data[$selId] = $selOption[0]; + endif; + endif; + return $data; + } + + + protected function getMaquinaListItems($selId = null) + { + $data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Maquinas.maquina'))])]; + if (!empty($selId)) : + $maquinaModel = model('App\Models\Presupuestos\MaquinaModel'); + + $selOption = $maquinaModel->where('id', $selId)->findColumn('nombre'); + if (!empty($selOption)) : + $data[$selId] = $selOption[0]; + endif; + endif; + return $data; + } + + + protected function getPapelFormatoListItems($selId = null) + { + $data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('LgPapelFormatoes.papelFormato'))])]; + if (!empty($selId)) : + $papelFormatoModel = model('App\Models\Configuracion\PapelFormatoModel'); + + $selOption = $papelFormatoModel->where('id', $selId)->findColumn('id'); + if (!empty($selOption)) : + $data[$selId] = $selOption[0]; + endif; + endif; + return $data; + } + + + protected function getMaquinaListItems2($selId = null) + { + $data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Maquinas.maquina'))])]; + if (!empty($selId)) : + $maquinaModel = model('App\Models\Presupuestos\MaquinaModel'); + + $selOption = $maquinaModel->where('id', $selId)->findColumn('nombre'); + if (!empty($selOption)) : + $data[$selId] = $selOption[0]; + endif; + endif; + return $data; + } + + + protected function getTipologiasLibroListItems($selId = null) + { + $data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('TipologiasLibros.tipologiasLibro'))])]; + if (!empty($selId)) : + $tipologiasLibroModel = model('App\Models\Presupuestos\TipologiasLibroModel'); + + $selOption = $tipologiasLibroModel->where('id', $selId)->findColumn('nombre'); + if (!empty($selOption)) : + $data[$selId] = $selOption[0]; + endif; + endif; + return $data; + } + + + protected function getPapelImpresionListItems3($selId = null) + { + $data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('PapelImpresions.papelImpresion'))])]; + if (!empty($selId)) : + $papelImpresionModel = model('App\Models\Presupuestos\PapelImpresionModel'); + + $selOption = $papelImpresionModel->where('id', $selId)->findColumn('nombre'); + if (!empty($selOption)) : + $data[$selId] = $selOption[0]; + endif; + endif; + return $data; + } + + + protected function getMaquinasTarifasImpresionListItems4($selId = null) + { + $data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('MaquinasTarifasImpresions.maquinasTarifasImpresion'))])]; + if (!empty($selId)) : + $maquinasTarifasImpresionModel = model('App\Models\Presupuestos\MaquinasTarifasImpresionModel'); + + $selOption = $maquinasTarifasImpresionModel->where('id', $selId)->findColumn('precio'); + if (!empty($selOption)) : + $data[$selId] = $selOption[0]; + endif; + endif; + return $data; + } + + + protected function getUserListItems($selId = null) + { + $data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Users.user'))])]; + if (!empty($selId)) : + $userModel = model('App\Models\Presupuestos\UserModel'); + + $selOption = $userModel->where('id_user', $selId)->findColumn('first_name'); + if (!empty($selOption)) : + $data[$selId] = $selOption[0]; + endif; + endif; + return $data; + } + + + protected function getMaquinasTarifasImpresionListItems3($selId = null) + { + $data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('MaquinasTarifasImpresions.maquinasTarifasImpresion'))])]; + if (!empty($selId)) : + $maquinasTarifasImpresionModel = model('App\Models\Presupuestos\MaquinasTarifasImpresionModel'); + + $selOption = $maquinasTarifasImpresionModel->where('id', $selId)->findColumn('id'); + if (!empty($selOption)) : + $data[$selId] = $selOption[0]; + endif; + endif; + return $data; + } + + + protected function getUserListItems3($selId = null) + { + $data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Users.user'))])]; + if (!empty($selId)) : + $userModel = model('App\Models\Presupuestos\UserModel'); + + $selOption = $userModel->where('id_user', $selId)->findColumn('first_name'); + if (!empty($selOption)) : + $data[$selId] = $selOption[0]; + endif; + endif; + return $data; + } + + + protected function getPapelImpresionListItems($selId = null) + { + $data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('PapelImpresions.papelImpresion'))])]; + if (!empty($selId)) : + $papelImpresionModel = model('App\Models\Presupuestos\PapelImpresionModel'); + + $selOption = $papelImpresionModel->where('id', $selId)->findColumn('nombre'); + if (!empty($selOption)) : + $data[$selId] = $selOption[0]; + endif; + endif; + return $data; + } + + + protected function getTiposImpresionListItems($selId = null) + { + $data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('TiposImpresions.tiposImpresion'))])]; + if (!empty($selId)) : + $tiposImpresionModel = model('App\Models\Presupuestos\TiposImpresionModel'); + + $selOption = $tiposImpresionModel->where('id', $selId)->findColumn('nombre'); + if (!empty($selOption)) : + $data[$selId] = $selOption[0]; + endif; + endif; + return $data; + } + + + protected function getMaquinasTarifasImpresionListItems($selId = null) + { + $data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('MaquinasTarifasImpresions.maquinasTarifasImpresion'))])]; + if (!empty($selId)) : + $maquinasTarifasImpresionModel = model('App\Models\Presupuestos\MaquinasTarifasImpresionModel'); + + $selOption = $maquinasTarifasImpresionModel->where('id', $selId)->findColumn('precio'); + if (!empty($selOption)) : + $data[$selId] = $selOption[0]; + endif; + endif; + return $data; + } + + + protected function getPapelGenericoListItems4($selId = null) + { + $data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('PapelGenericoes.papelGenerico'))])]; + if (!empty($selId)) : + $papelGenericoModel = model('App\Models\Presupuestos\PapelGenericoModel'); + + $selOption = $papelGenericoModel->where('id', $selId)->findColumn('nombre'); + if (!empty($selOption)) : + $data[$selId] = $selOption[0]; + endif; + endif; + return $data; + } + + + protected function getClienteListItems($selId = null) + { + $data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Clientes.cliente'))])]; + if (!empty($selId)) : + $clienteModel = model('App\Models\Clientes\ClienteModel'); + + $selOption = $clienteModel->where('id', $selId)->findColumn('nombre'); + if (!empty($selOption)) : + $data[$selId] = $selOption[0]; + endif; + endif; + return $data; + } + + + protected function getMaquinaListItems4($selId = null) + { + $data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Maquinas.maquina'))])]; + if (!empty($selId)) : + $maquinaModel = model('App\Models\Presupuestos\MaquinaModel'); + + $selOption = $maquinaModel->where('id', $selId)->findColumn('nombre'); + if (!empty($selOption)) : + $data[$selId] = $selOption[0]; + endif; + endif; + return $data; + } + + + protected function getUserListItems2($selId = null) + { + $data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Users.user'))])]; + if (!empty($selId)) : + $userModel = model('App\Models\Presupuestos\UserModel'); + + $selOption = $userModel->where('id_user', $selId)->findColumn('first_name'); + if (!empty($selOption)) : + $data[$selId] = $selOption[0]; + endif; + endif; + return $data; + } + + + protected function getPapelGenericoListItems($selId = null) + { + $data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('PapelGenericoes.papelGenerico'))])]; + if (!empty($selId)) : + $papelGenericoModel = model('App\Models\Presupuestos\PapelGenericoModel'); + + $selOption = $papelGenericoModel->where('id', $selId)->findColumn('nombre'); + if (!empty($selOption)) : + $data[$selId] = $selOption[0]; + endif; + endif; + return $data; + } + + + protected function getPaginasCubiertaOptions() + { + $paginasCubiertaOptions = [ + '' => lang('Basic.global.pleaseSelect'), + '4x0' => '4x0', + '4x4' => '4x4', + ]; + return $paginasCubiertaOptions; + } + + + + protected function getPaginasPortadaOptions() + { + $paginasPortadaOptions = [ + '' => lang('Basic.global.pleaseSelect'), + '4x0' => '4x0', + '4x4' => '4x4', + ]; + return $paginasPortadaOptions; } } - \ No newline at end of file diff --git a/ci4/app/Entities/Presupuestos/PresupuestoEntity.php b/ci4/app/Entities/Presupuestos/PresupuestoEntity.php new file mode 100644 index 00000000..84a6ea09 --- /dev/null +++ b/ci4/app/Entities/Presupuestos/PresupuestoEntity.php @@ -0,0 +1,317 @@ + null, + "pedido_libro_conjunto_id" => null, + "version" => 0, + "cliente_id" => null, + "tarifa_cliente_id" => null, + "user_created_id" => 1, + "user_update_id" => null, + "forma_pago_id" => null, + "factura_id" => null, + "tipo_impresion_id" => null, + "tipologia_id" => null, + "pais_id" => 1, + "ubicacion_id" => 1, + "serie_id" => null, + "catalogo_id" => null, + "estado_id" => 1, + "inc_rei" => null, + "causa_cancelacion" => null, + "recoger_en_taller" => false, + "ferro" => false, + "ferro_digital" => false, + "marcapaginas" => false, + "papel_formato_id" => null, + "papel_formato_personalizado" => false, + "papel_formato_ancho" => null, + "papel_formato_alto" => null, + "titulo" => "titulo", + "autor" => null, + "coleccion" => null, + "numero_edicion" => null, + "isbn" => null, + "referencia_cliente" => null, + "paginas" => null, + "tirada" => null, + "solapas" => false, + "solapas_ancho" => 0.0, + "cosido" => false, + "cubiertas" => false, + "cubiertas_ancho" => 0.0, + "merma" => null, + "merma_portada" => 6.0, + "imagenes_bn_interior" => false, + "comentarios" => null, + "comentarios_safekat" => null, + "comentarios_pdf" => null, + "comentarios_tarifa" => null, + "en_produccion" => false, + "en_espera" => false, + "modo_comparador" => false, + "paginas_negro" => null, + "paginas_negro_hq" => false, + "paginas_negro_papel_id" => null, + "paginas_negro_papel_impresion_id" => null, + "paginas_negro_forma_id" => null, + "paginas_negro_gramaje" => null, + "paginas_negro_pliegos_libro" => null, + "paginas_negro_pliegos_pedido" => null, + "paginas_negro_pliegos_precio" => null, + "paginas_negro_libro" => null, + "paginas_negro_pedido" => null, + "paginas_negro_mano" => null, + "paginas_negro_peso" => null, + "paginas_negro_maquina_id" => null, + "paginas_negro_tarifa_impresion_id" => null, + "paginas_negro_click" => null, + "paginas_negro_precio" => null, + "paginas_negro_check_papel_total" => true, + "paginas_negro_check_impresion_total" => true, + "paginas_color" => null, + "paginas_color_papel_id" => null, + "paginas_color_papel_impresion_id" => null, + "paginas_color_forma_id" => null, + "paginas_color_gramaje" => null, + "paginas_color_pliegos_libro" => null, + "paginas_color_pliegos_pedido" => null, + "paginas_color_pliegos_precio" => null, + "paginas_color_libro" => null, + "paginas_color_pedido" => null, + "paginas_color_mano" => null, + "paginas_color_peso" => null, + "paginas_color_maquina_id" => null, + "paginas_color_tarifa_impresion_id" => null, + "paginas_color_click" => null, + "paginas_color_precio" => null, + "paginas_color_check_papel_total" => true, + "paginas_color_check_impresion_total" => true, + "paginas_color_posicion" => null, + "paginas_portada" => null, + "paginas_portada_papel_id" => null, + "paginas_portada_papel_impresion_id" => null, + "paginas_portada_forma_id" => null, + "paginas_portada_gramaje" => null, + "paginas_portada_pliegos_libro" => null, + "paginas_portada_pliegos_pedido" => null, + "paginas_portada_pliegos_precio" => null, + "paginas_portada_libro" => null, + "paginas_portada_pedido" => null, + "paginas_portada_mano" => null, + "paginas_portada_peso" => null, + "paginas_portada_maquina_id" => null, + "paginas_portada_tarifa_impresion_id" => null, + "paginas_portada_click" => null, + "paginas_portada_precio" => null, + "paginas_portada_check_papel_total" => true, + "paginas_portada_check_impresion_total" => true, + "paginas_cubierta" => null, + "paginas_cubierta_papel_id" => null, + "paginas_cubierta_papel_impresion_id" => null, + "paginas_cubierta_forma_id" => null, + "paginas_cubierta_gramaje" => null, + "paginas_cubierta_pliegos_libro" => null, + "paginas_cubierta_pliegos_pedido" => null, + "paginas_cubierta_pliegos_precio" => null, + "paginas_cubierta_libro" => null, + "paginas_cubierta_pedido" => null, + "paginas_cubierta_mano" => null, + "paginas_cubierta_peso" => null, + "paginas_cubierta_maquina_id" => null, + "paginas_cubierta_tarifa_impresion_id" => null, + "paginas_cubierta_click" => null, + "paginas_cubierta_precio" => null, + "paginas_cubierta_check_papel_total" => true, + "paginas_cubierta_check_impresion_total" => true, + "lomo" => null, + "isDig" => false, + "total_presupuesto" => null, + "total_pedido" => null, + "total_peso" => null, + "total_click" => null, + "total_preimpresion" => null, + "total_preimpresion_margen" => null, + "total_manipulado" => null, + "total_acabado" => null, + "total_envios" => null, + "envios_recoge_cliente" => false, + "margen" => null, + "margen_extra" => 0.0, + "margen_manual" => null, + "descuento" => 0.0, + "base_imponible" => null, + "total_margen" => null, + "total_margen_extra" => null, + "total_descuento" => null, + "total" => null, + "forzar_total" => 0, + "total_calculado" => null, + "total_confirmado" => null, + "total_confirmado_user_id" => null, + "total_confirmado_update_at" => null, + "tirada_alternativa_json_data" => null, + "aprobado_user_id" => null, + "aprobado_at" => null, + "aprobado_json_data" => null, + "comparador_json_data" => null, + "ws_externo_json_data" => null, + "fecha_entrega_real_at" => null, + "fecha_entrega_real_warning" => false, + "fecha_impresion_at" => null, + "fecha_encuardenado_at" => null, + "fecha_externo_at" => null, + "fecha_ferro_subido_at" => null, + "responsable" => null, + "pedido_espera_fecha" => null, + "pedido_espera_user_id" => null, + "is_deleted" => 0, + "deleted_at" => null, + "created_at" => null, + "updated_at" => null, + ]; + protected $casts = [ + "pedido_libro_conjunto_id" => "?int", + "version" => "int", + "cliente_id" => "int", + "tarifa_cliente_id" => "?int", + "user_created_id" => "int", + "user_update_id" => "?int", + "forma_pago_id" => "?int", + "factura_id" => "?int", + "tipo_impresion_id" => "?int", + "tipologia_id" => "?int", + "pais_id" => "int", + "ubicacion_id" => "int", + "serie_id" => "?int", + "catalogo_id" => "?int", + "estado_id" => "int", + "inc_rei" => "?int", + "recoger_en_taller" => "boolean", + "ferro" => "boolean", + "ferro_digital" => "boolean", + "marcapaginas" => "boolean", + "papel_formato_id" => "int", + "papel_formato_personalizado" => "boolean", + "papel_formato_ancho" => "?float", + "papel_formato_alto" => "?float", + "paginas" => "int", + "tirada" => "int", + "solapas" => "boolean", + "solapas_ancho" => "float", + "cosido" => "boolean", + "cubiertas" => "boolean", + "cubiertas_ancho" => "float", + "merma" => "float", + "merma_portada" => "float", + "imagenes_bn_interior" => "boolean", + "en_produccion" => "boolean", + "en_espera" => "boolean", + "modo_comparador" => "boolean", + "paginas_negro" => "?int", + "paginas_negro_hq" => "boolean", + "paginas_negro_papel_id" => "?int", + "paginas_negro_papel_impresion_id" => "?int", + "paginas_negro_forma_id" => "?int", + "paginas_negro_gramaje" => "?float", + "paginas_negro_pliegos_libro" => "?float", + "paginas_negro_pliegos_pedido" => "?float", + "paginas_negro_pliegos_precio" => "?float", + "paginas_negro_libro" => "?float", + "paginas_negro_pedido" => "?float", + "paginas_negro_mano" => "?float", + "paginas_negro_peso" => "?float", + "paginas_negro_maquina_id" => "?int", + "paginas_negro_tarifa_impresion_id" => "?int", + "paginas_negro_click" => "?float", + "paginas_negro_precio" => "?float", + "paginas_negro_check_papel_total" => "boolean", + "paginas_negro_check_impresion_total" => "boolean", + "paginas_color" => "?int", + "paginas_color_papel_id" => "?int", + "paginas_color_papel_impresion_id" => "?int", + "paginas_color_forma_id" => "?int", + "paginas_color_gramaje" => "?float", + "paginas_color_pliegos_libro" => "?float", + "paginas_color_pliegos_pedido" => "?float", + "paginas_color_pliegos_precio" => "?float", + "paginas_color_libro" => "?float", + "paginas_color_pedido" => "?float", + "paginas_color_mano" => "?float", + "paginas_color_peso" => "?float", + "paginas_color_maquina_id" => "?int", + "paginas_color_tarifa_impresion_id" => "?int", + "paginas_color_click" => "?float", + "paginas_color_precio" => "?float", + "paginas_color_check_papel_total" => "boolean", + "paginas_color_check_impresion_total" => "boolean", + "paginas_portada_papel_id" => "?int", + "paginas_portada_papel_impresion_id" => "?int", + "paginas_portada_forma_id" => "?int", + "paginas_portada_gramaje" => "?float", + "paginas_portada_pliegos_libro" => "?float", + "paginas_portada_pliegos_pedido" => "?float", + "paginas_portada_pliegos_precio" => "?float", + "paginas_portada_libro" => "?float", + "paginas_portada_pedido" => "float", + "paginas_portada_mano" => "?float", + "paginas_portada_peso" => "?float", + "paginas_portada_maquina_id" => "?int", + "paginas_portada_tarifa_impresion_id" => "?int", + "paginas_portada_click" => "?float", + "paginas_portada_precio" => "?float", + "paginas_portada_check_papel_total" => "boolean", + "paginas_portada_check_impresion_total" => "boolean", + "paginas_cubierta_papel_id" => "?int", + "paginas_cubierta_papel_impresion_id" => "?int", + "paginas_cubierta_forma_id" => "?int", + "paginas_cubierta_gramaje" => "?float", + "paginas_cubierta_pliegos_libro" => "?float", + "paginas_cubierta_pliegos_pedido" => "?float", + "paginas_cubierta_pliegos_precio" => "?float", + "paginas_cubierta_libro" => "?float", + "paginas_cubierta_pedido" => "?float", + "paginas_cubierta_mano" => "?float", + "paginas_cubierta_peso" => "?float", + "paginas_cubierta_maquina_id" => "?int", + "paginas_cubierta_tarifa_impresion_id" => "?int", + "paginas_cubierta_click" => "?float", + "paginas_cubierta_precio" => "?float", + "paginas_cubierta_check_papel_total" => "boolean", + "paginas_cubierta_check_impresion_total" => "boolean", + "lomo" => "?int", + "isDig" => "boolean", + "total_presupuesto" => "?float", + "total_pedido" => "?float", + "total_peso" => "?float", + "total_click" => "?float", + "total_preimpresion" => "?float", + "total_preimpresion_margen" => "?float", + "total_manipulado" => "?float", + "total_acabado" => "?float", + "total_envios" => "?float", + "envios_recoge_cliente" => "boolean", + "margen" => "?float", + "margen_extra" => "float", + "margen_manual" => "?float", + "descuento" => "float", + "base_imponible" => "?float", + "total_margen" => "?float", + "total_margen_extra" => "?float", + "total_descuento" => "?float", + "total" => "?float", + "forzar_total" => "float", + "total_calculado" => "?float", + "total_confirmado" => "?float", + "total_confirmado_user_id" => "?int", + "aprobado_user_id" => "?int", + "fecha_entrega_real_warning" => "?boolean", + "pedido_espera_user_id" => "?int", + "is_deleted" => "int", + ]; +} diff --git a/ci4/app/Entities/Presupuestos/PresupuestoEstadoEntity.php b/ci4/app/Entities/Presupuestos/PresupuestoEstadoEntity.php new file mode 100644 index 00000000..b5858f56 --- /dev/null +++ b/ci4/app/Entities/Presupuestos/PresupuestoEstadoEntity.php @@ -0,0 +1,19 @@ + null, + "estado" => null, + "is_deleted" => 0, + "deleted_at" => null, + "created_at" => null, + "updated_at" => null, + ]; + protected $casts = [ + "is_deleted" => "int", + ]; +} diff --git a/ci4/app/Language/en/Presupuestos.php b/ci4/app/Language/en/Presupuestos.php new file mode 100644 index 00000000..eb0b401d --- /dev/null +++ b/ci4/app/Language/en/Presupuestos.php @@ -0,0 +1,772 @@ + '4x0', + '4x4' => '4x4', + 'aprobadoAt' => 'Aprobado At', + 'aprobadoJsonData' => 'Aprobado Json Data', + 'aprobadoUserId' => 'Aprobado User', + 'autor' => 'Autor', + 'baseImponible' => 'Base Imponible', + 'catalogoId' => 'Catalogo ID', + 'causaCancelacion' => 'Causa Cancelacion', + 'clienteId' => 'Cliente', + 'coleccion' => 'Coleccion', + 'comentarios' => 'Comentarios', + 'comentariosPdf' => 'Comentarios Pdf', + 'comentariosSafekat' => 'Comentarios Safekat', + 'comentariosTarifa' => 'Comentarios Tarifa', + 'comparadorJsonData' => 'Comparador Json Data', + 'cosido' => 'Cosido', + 'createdAt' => 'Created At', + 'cubiertas' => 'Cubiertas', + 'cubiertasAncho' => 'Cubiertas Ancho', + 'deletedAt' => 'Deleted At', + 'descuento' => 'Descuento', + 'enEspera' => 'EN Espera', + 'enProduccion' => 'EN Produccion', + 'enviosRecogeCliente' => 'Envios Recoge Cliente', + 'estadoId' => 'Estado', + 'facturaId' => 'Factura ID', + 'fechaEncuardenadoAt' => 'Fecha Encuardenado At', + 'fechaEntregaRealAt' => 'Fecha Entrega Real At', + 'fechaEntregaRealWarning' => 'Fecha Entrega Real Warning', + 'fechaExternoAt' => 'Fecha Externo At', + 'fechaFerroSubidoAt' => 'Fecha Ferro Subido At', + 'fechaImpresionAt' => 'Fecha Impresion At', + 'ferro' => 'Ferro', + 'ferroDigital' => 'Ferro Digital', + 'formaPagoId' => 'Forma Pago', + 'forzarTotal' => 'Forzar Total', + 'id' => 'ID', + 'imagenesBnInterior' => 'Imagenes Bn Interior', + 'incRei' => 'Inc Rei', + 'isDeleted' => 'Is Deleted', + 'isbn' => 'Isbn', + 'isdig' => 'Isdig', + 'lomo' => 'Lomo', + 'marcapaginas' => 'Marcapaginas', + 'margen' => 'Margen', + 'margenExtra' => 'Margen Extra', + 'margenManual' => 'Margen Manual', + 'merma' => 'Merma', + 'mermaPortada' => 'Merma Portada', + 'modoComparador' => 'Modo Comparador', + 'moduleTitle' => 'Presupuestos', + 'numeroEdicion' => 'Numero Edicion', + 'paginas' => 'Paginas', + 'paginasColor' => 'Paginas Color', + 'paginasColorCheckImpresionTotal' => 'Paginas Color Check Impresion Total', + 'paginasColorCheckPapelTotal' => 'Paginas Color Check Papel Total', + 'paginasColorClick' => 'Paginas Color Click', + 'paginasColorFormaId' => 'Paginas Color Forma ID', + 'paginasColorGramaje' => 'Paginas Color Gramaje', + 'paginasColorLibro' => 'Paginas Color Libro', + 'paginasColorMano' => 'Paginas Color Mano', + 'paginasColorMaquinaId' => 'Paginas Color Maquina', + 'paginasColorPapelId' => 'Paginas Color Papel', + 'paginasColorPapelImpresionId' => 'Paginas Color Papel Impresion', + 'paginasColorPedido' => 'Paginas Color Pedido', + 'paginasColorPeso' => 'Paginas Color Peso', + 'paginasColorPliegosLibro' => 'Paginas Color Pliegos Libro', + 'paginasColorPliegosPedido' => 'Paginas Color Pliegos Pedido', + 'paginasColorPliegosPrecio' => 'Paginas Color Pliegos Precio', + 'paginasColorPosicion' => 'Paginas Color Posicion', + 'paginasColorPrecio' => 'Paginas Color Precio', + 'paginasColorTarifaImpresionId' => 'Paginas Color Tarifa Impresion', + 'paginasCubierta' => 'Paginas Cubierta', + 'paginasCubiertaCheckImpresionTotal' => 'Paginas Cubierta Check Impresion Total', + 'paginasCubiertaCheckPapelTotal' => 'Paginas Cubierta Check Papel Total', + 'paginasCubiertaClick' => 'Paginas Cubierta Click', + 'paginasCubiertaFormaId' => 'Paginas Cubierta Forma ID', + 'paginasCubiertaGramaje' => 'Paginas Cubierta Gramaje', + 'paginasCubiertaLibro' => 'Paginas Cubierta Libro', + 'paginasCubiertaMano' => 'Paginas Cubierta Mano', + 'paginasCubiertaMaquinaId' => 'Paginas Cubierta Maquina', + 'paginasCubiertaPapelId' => 'Paginas Cubierta Papel', + 'paginasCubiertaPapelImpresionId' => 'Paginas Cubierta Papel Impresion', + 'paginasCubiertaPedido' => 'Paginas Cubierta Pedido', + 'paginasCubiertaPeso' => 'Paginas Cubierta Peso', + 'paginasCubiertaPliegosLibro' => 'Paginas Cubierta Pliegos Libro', + 'paginasCubiertaPliegosPedido' => 'Paginas Cubierta Pliegos Pedido', + 'paginasCubiertaPliegosPrecio' => 'Paginas Cubierta Pliegos Precio', + 'paginasCubiertaPrecio' => 'Paginas Cubierta Precio', + 'paginasCubiertaTarifaImpresionId' => 'Paginas Cubierta Tarifa Impresion', + 'paginasNegro' => 'Paginas Negro', + 'paginasNegroCheckImpresionTotal' => 'Paginas Negro Check Impresion Total', + 'paginasNegroCheckPapelTotal' => 'Paginas Negro Check Papel Total', + 'paginasNegroClick' => 'Paginas Negro Click', + 'paginasNegroFormaId' => 'Paginas Negro Forma ID', + 'paginasNegroGramaje' => 'Paginas Negro Gramaje', + 'paginasNegroHq' => 'Paginas Negro Hq', + 'paginasNegroLibro' => 'Paginas Negro Libro', + 'paginasNegroMano' => 'Paginas Negro Mano', + 'paginasNegroMaquinaId' => 'Paginas Negro Maquina', + 'paginasNegroPapelId' => 'Paginas Negro Papel', + 'paginasNegroPapelImpresionId' => 'Paginas Negro Papel Impresion', + 'paginasNegroPedido' => 'Paginas Negro Pedido', + 'paginasNegroPeso' => 'Paginas Negro Peso', + 'paginasNegroPliegosLibro' => 'Paginas Negro Pliegos Libro', + 'paginasNegroPliegosPedido' => 'Paginas Negro Pliegos Pedido', + 'paginasNegroPliegosPrecio' => 'Paginas Negro Pliegos Precio', + 'paginasNegroPrecio' => 'Paginas Negro Precio', + 'paginasNegroTarifaImpresionId' => 'Paginas Negro Tarifa Impresion', + 'paginasPortada' => 'Paginas Portada', + 'paginasPortadaCheckImpresionTotal' => 'Paginas Portada Check Impresion Total', + 'paginasPortadaCheckPapelTotal' => 'Paginas Portada Check Papel Total', + 'paginasPortadaClick' => 'Paginas Portada Click', + 'paginasPortadaFormaId' => 'Paginas Portada Forma ID', + 'paginasPortadaGramaje' => 'Paginas Portada Gramaje', + 'paginasPortadaLibro' => 'Paginas Portada Libro', + 'paginasPortadaMano' => 'Paginas Portada Mano', + 'paginasPortadaMaquinaId' => 'Paginas Portada Maquina', + 'paginasPortadaPapelId' => 'Paginas Portada Papel', + 'paginasPortadaPapelImpresionId' => 'Paginas Portada Papel Impresion', + 'paginasPortadaPedido' => 'Paginas Portada Pedido', + 'paginasPortadaPeso' => 'Paginas Portada Peso', + 'paginasPortadaPliegosLibro' => 'Paginas Portada Pliegos Libro', + 'paginasPortadaPliegosPedido' => 'Paginas Portada Pliegos Pedido', + 'paginasPortadaPliegosPrecio' => 'Paginas Portada Pliegos Precio', + 'paginasPortadaPrecio' => 'Paginas Portada Precio', + 'paginasPortadaTarifaImpresionId' => 'Paginas Portada Tarifa Impresion', + 'paisId' => 'Pais', + 'papelFormatoAlto' => 'Papel Formato Alto', + 'papelFormatoAncho' => 'Papel Formato Ancho', + 'papelFormatoId' => 'Papel Formato', + 'papelFormatoPersonalizado' => 'Papel Formato Personalizado', + 'pedidoEsperaFecha' => 'Pedido Espera Fecha', + 'pedidoEsperaUserId' => 'Pedido Espera User', + 'pedidoLibroConjuntoId' => 'Pedido Libro Conjunto ID', + 'presupuesto' => 'Presupuesto', + 'presupuestoList' => 'Presupuesto List', + 'presupuestos' => 'Presupuestos', + 'recogerEnTaller' => 'Recoger EN Taller', + 'referenciaCliente' => 'Referencia Cliente', + 'responsable' => 'Responsable', + 'serieId' => 'Serie ID', + 'solapas' => 'Solapas', + 'solapasAncho' => 'Solapas Ancho', + 'tarifaClienteId' => 'Tarifa Cliente ID', + 'tipoImpresionId' => 'Tipo Impresion', + 'tipologiaId' => 'Tipologia', + 'tirada' => 'Tirada', + 'tiradaAlternativaJsonData' => 'Tirada Alternativa Json Data', + 'titulo' => 'Titulo', + 'total' => 'Total', + 'totalAcabado' => 'Total Acabado', + 'totalCalculado' => 'Total Calculado', + 'totalClick' => 'Total Click', + 'totalConfirmado' => 'Total Confirmado', + 'totalConfirmadoUpdateAt' => 'Total Confirmado Update At', + 'totalConfirmadoUserId' => 'Total Confirmado User', + 'totalDescuento' => 'Total Descuento', + 'totalEnvios' => 'Total Envios', + 'totalManipulado' => 'Total Manipulado', + 'totalMargen' => 'Total Margen', + 'totalMargenExtra' => 'Total Margen Extra', + 'totalPedido' => 'Total Pedido', + 'totalPeso' => 'Total Peso', + 'totalPreimpresion' => 'Total Preimpresion', + 'totalPreimpresionMargen' => 'Total Preimpresion Margen', + 'totalPresupuesto' => 'Total Presupuesto', + 'ubicacionId' => 'Ubicacion', + 'updatedAt' => 'Updated At', + 'userCreatedId' => 'User Created', + 'userUpdateId' => 'User Update', + 'version' => 'Version', + 'wsExternoJsonData' => 'Ws Externo Json Data', + 'validation' => [ + 'aprobado_at' => [ + 'valid_date' => 'The {field} field must contain a valid date.', + + ], + + 'aprobado_json_data' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + + ], + + 'base_imponible' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'catalogo_id' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'causa_cancelacion' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + + ], + + 'coleccion' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + + ], + + 'comparador_json_data' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + + ], + + 'factura_id' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'fecha_encuardenado_at' => [ + 'valid_date' => 'The {field} field must contain a valid date.', + + ], + + 'fecha_entrega_real_at' => [ + 'valid_date' => 'The {field} field must contain a valid date.', + + ], + + 'fecha_externo_at' => [ + 'valid_date' => 'The {field} field must contain a valid date.', + + ], + + 'fecha_ferro_subido_at' => [ + 'valid_date' => 'The {field} field must contain a valid date.', + + ], + + 'fecha_impresion_at' => [ + 'valid_date' => 'The {field} field must contain a valid date.', + + ], + + 'inc_rei' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'isbn' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + + ], + + 'lomo' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'margen' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'margen_manual' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'numero_edicion' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + + ], + + 'paginas_color' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'paginas_color_click' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_color_forma_id' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'paginas_color_gramaje' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_color_libro' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_color_mano' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_color_pedido' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_color_peso' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_color_pliegos_libro' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_color_pliegos_pedido' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_color_pliegos_precio' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_color_posicion' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + + ], + + 'paginas_color_precio' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_cubierta_click' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_cubierta_forma_id' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'paginas_cubierta_gramaje' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_cubierta_libro' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_cubierta_mano' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_cubierta_pedido' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_cubierta_peso' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_cubierta_pliegos_libro' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_cubierta_pliegos_pedido' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_cubierta_pliegos_precio' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_cubierta_precio' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_negro' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'paginas_negro_click' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_negro_forma_id' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'paginas_negro_gramaje' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_negro_libro' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_negro_mano' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_negro_pedido' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_negro_peso' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_negro_pliegos_libro' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_negro_pliegos_pedido' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_negro_pliegos_precio' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_negro_precio' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_portada_click' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_portada_forma_id' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'paginas_portada_gramaje' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_portada_libro' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_portada_mano' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_portada_peso' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_portada_pliegos_libro' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_portada_pliegos_pedido' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_portada_pliegos_precio' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_portada_precio' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'papel_formato_alto' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'papel_formato_ancho' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'pedido_espera_fecha' => [ + 'valid_date' => 'The {field} field must contain a valid date.', + + ], + + 'pedido_libro_conjunto_id' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'responsable' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + + ], + + 'serie_id' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'tarifa_cliente_id' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'tirada_alternativa_json_data' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + + ], + + 'total' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_acabado' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_calculado' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_click' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_confirmado' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_confirmado_update_at' => [ + 'valid_date' => 'The {field} field must contain a valid date.', + + ], + + 'total_descuento' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_envios' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_manipulado' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_margen' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_margen_extra' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_pedido' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_peso' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_preimpresion' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_preimpresion_margen' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_presupuesto' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'user_update_id' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'ws_externo_json_data' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + + ], + + 'autor' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + 'required' => 'The {field} field is required.', + + ], + + 'comentarios' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + 'required' => 'The {field} field is required.', + + ], + + 'comentarios_pdf' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + 'required' => 'The {field} field is required.', + + ], + + 'comentarios_safekat' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + 'required' => 'The {field} field is required.', + + ], + + 'comentarios_tarifa' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + 'required' => 'The {field} field is required.', + + ], + + 'cubiertas_ancho' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + 'required' => 'The {field} field is required.', + + ], + + 'descuento' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + 'required' => 'The {field} field is required.', + + ], + + 'forzar_total' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + 'required' => 'The {field} field is required.', + + ], + + 'is_deleted' => [ + 'integer' => 'The {field} field must contain an integer.', + 'required' => 'The {field} field is required.', + + ], + + 'margen_extra' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + 'required' => 'The {field} field is required.', + + ], + + 'merma' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + 'required' => 'The {field} field is required.', + + ], + + 'merma_portada' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + 'required' => 'The {field} field is required.', + + ], + + 'paginas' => [ + 'integer' => 'The {field} field must contain an integer.', + 'required' => 'The {field} field is required.', + + ], + + 'paginas_cubierta' => [ + 'in_list' => 'The {field} field must be one of: {param}.', + 'required' => 'The {field} field is required.', + + ], + + 'paginas_portada' => [ + 'in_list' => 'The {field} field must be one of: {param}.', + 'required' => 'The {field} field is required.', + + ], + + 'paginas_portada_pedido' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + 'required' => 'The {field} field is required.', + + ], + + 'referencia_cliente' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + 'required' => 'The {field} field is required.', + + ], + + 'solapas_ancho' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + 'required' => 'The {field} field is required.', + + ], + + 'tirada' => [ + 'integer' => 'The {field} field must contain an integer.', + 'required' => 'The {field} field is required.', + + ], + + 'titulo' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + 'required' => 'The {field} field is required.', + + ], + + 'user_created_id' => [ + 'integer' => 'The {field} field must contain an integer.', + 'required' => 'The {field} field is required.', + + ], + + 'version' => [ + 'integer' => 'The {field} field must contain an integer.', + 'required' => 'The {field} field is required.', + + ], + + + ], + + +]; \ No newline at end of file diff --git a/ci4/app/Language/es/Presupuestos.php b/ci4/app/Language/es/Presupuestos.php new file mode 100644 index 00000000..eb0b401d --- /dev/null +++ b/ci4/app/Language/es/Presupuestos.php @@ -0,0 +1,772 @@ + '4x0', + '4x4' => '4x4', + 'aprobadoAt' => 'Aprobado At', + 'aprobadoJsonData' => 'Aprobado Json Data', + 'aprobadoUserId' => 'Aprobado User', + 'autor' => 'Autor', + 'baseImponible' => 'Base Imponible', + 'catalogoId' => 'Catalogo ID', + 'causaCancelacion' => 'Causa Cancelacion', + 'clienteId' => 'Cliente', + 'coleccion' => 'Coleccion', + 'comentarios' => 'Comentarios', + 'comentariosPdf' => 'Comentarios Pdf', + 'comentariosSafekat' => 'Comentarios Safekat', + 'comentariosTarifa' => 'Comentarios Tarifa', + 'comparadorJsonData' => 'Comparador Json Data', + 'cosido' => 'Cosido', + 'createdAt' => 'Created At', + 'cubiertas' => 'Cubiertas', + 'cubiertasAncho' => 'Cubiertas Ancho', + 'deletedAt' => 'Deleted At', + 'descuento' => 'Descuento', + 'enEspera' => 'EN Espera', + 'enProduccion' => 'EN Produccion', + 'enviosRecogeCliente' => 'Envios Recoge Cliente', + 'estadoId' => 'Estado', + 'facturaId' => 'Factura ID', + 'fechaEncuardenadoAt' => 'Fecha Encuardenado At', + 'fechaEntregaRealAt' => 'Fecha Entrega Real At', + 'fechaEntregaRealWarning' => 'Fecha Entrega Real Warning', + 'fechaExternoAt' => 'Fecha Externo At', + 'fechaFerroSubidoAt' => 'Fecha Ferro Subido At', + 'fechaImpresionAt' => 'Fecha Impresion At', + 'ferro' => 'Ferro', + 'ferroDigital' => 'Ferro Digital', + 'formaPagoId' => 'Forma Pago', + 'forzarTotal' => 'Forzar Total', + 'id' => 'ID', + 'imagenesBnInterior' => 'Imagenes Bn Interior', + 'incRei' => 'Inc Rei', + 'isDeleted' => 'Is Deleted', + 'isbn' => 'Isbn', + 'isdig' => 'Isdig', + 'lomo' => 'Lomo', + 'marcapaginas' => 'Marcapaginas', + 'margen' => 'Margen', + 'margenExtra' => 'Margen Extra', + 'margenManual' => 'Margen Manual', + 'merma' => 'Merma', + 'mermaPortada' => 'Merma Portada', + 'modoComparador' => 'Modo Comparador', + 'moduleTitle' => 'Presupuestos', + 'numeroEdicion' => 'Numero Edicion', + 'paginas' => 'Paginas', + 'paginasColor' => 'Paginas Color', + 'paginasColorCheckImpresionTotal' => 'Paginas Color Check Impresion Total', + 'paginasColorCheckPapelTotal' => 'Paginas Color Check Papel Total', + 'paginasColorClick' => 'Paginas Color Click', + 'paginasColorFormaId' => 'Paginas Color Forma ID', + 'paginasColorGramaje' => 'Paginas Color Gramaje', + 'paginasColorLibro' => 'Paginas Color Libro', + 'paginasColorMano' => 'Paginas Color Mano', + 'paginasColorMaquinaId' => 'Paginas Color Maquina', + 'paginasColorPapelId' => 'Paginas Color Papel', + 'paginasColorPapelImpresionId' => 'Paginas Color Papel Impresion', + 'paginasColorPedido' => 'Paginas Color Pedido', + 'paginasColorPeso' => 'Paginas Color Peso', + 'paginasColorPliegosLibro' => 'Paginas Color Pliegos Libro', + 'paginasColorPliegosPedido' => 'Paginas Color Pliegos Pedido', + 'paginasColorPliegosPrecio' => 'Paginas Color Pliegos Precio', + 'paginasColorPosicion' => 'Paginas Color Posicion', + 'paginasColorPrecio' => 'Paginas Color Precio', + 'paginasColorTarifaImpresionId' => 'Paginas Color Tarifa Impresion', + 'paginasCubierta' => 'Paginas Cubierta', + 'paginasCubiertaCheckImpresionTotal' => 'Paginas Cubierta Check Impresion Total', + 'paginasCubiertaCheckPapelTotal' => 'Paginas Cubierta Check Papel Total', + 'paginasCubiertaClick' => 'Paginas Cubierta Click', + 'paginasCubiertaFormaId' => 'Paginas Cubierta Forma ID', + 'paginasCubiertaGramaje' => 'Paginas Cubierta Gramaje', + 'paginasCubiertaLibro' => 'Paginas Cubierta Libro', + 'paginasCubiertaMano' => 'Paginas Cubierta Mano', + 'paginasCubiertaMaquinaId' => 'Paginas Cubierta Maquina', + 'paginasCubiertaPapelId' => 'Paginas Cubierta Papel', + 'paginasCubiertaPapelImpresionId' => 'Paginas Cubierta Papel Impresion', + 'paginasCubiertaPedido' => 'Paginas Cubierta Pedido', + 'paginasCubiertaPeso' => 'Paginas Cubierta Peso', + 'paginasCubiertaPliegosLibro' => 'Paginas Cubierta Pliegos Libro', + 'paginasCubiertaPliegosPedido' => 'Paginas Cubierta Pliegos Pedido', + 'paginasCubiertaPliegosPrecio' => 'Paginas Cubierta Pliegos Precio', + 'paginasCubiertaPrecio' => 'Paginas Cubierta Precio', + 'paginasCubiertaTarifaImpresionId' => 'Paginas Cubierta Tarifa Impresion', + 'paginasNegro' => 'Paginas Negro', + 'paginasNegroCheckImpresionTotal' => 'Paginas Negro Check Impresion Total', + 'paginasNegroCheckPapelTotal' => 'Paginas Negro Check Papel Total', + 'paginasNegroClick' => 'Paginas Negro Click', + 'paginasNegroFormaId' => 'Paginas Negro Forma ID', + 'paginasNegroGramaje' => 'Paginas Negro Gramaje', + 'paginasNegroHq' => 'Paginas Negro Hq', + 'paginasNegroLibro' => 'Paginas Negro Libro', + 'paginasNegroMano' => 'Paginas Negro Mano', + 'paginasNegroMaquinaId' => 'Paginas Negro Maquina', + 'paginasNegroPapelId' => 'Paginas Negro Papel', + 'paginasNegroPapelImpresionId' => 'Paginas Negro Papel Impresion', + 'paginasNegroPedido' => 'Paginas Negro Pedido', + 'paginasNegroPeso' => 'Paginas Negro Peso', + 'paginasNegroPliegosLibro' => 'Paginas Negro Pliegos Libro', + 'paginasNegroPliegosPedido' => 'Paginas Negro Pliegos Pedido', + 'paginasNegroPliegosPrecio' => 'Paginas Negro Pliegos Precio', + 'paginasNegroPrecio' => 'Paginas Negro Precio', + 'paginasNegroTarifaImpresionId' => 'Paginas Negro Tarifa Impresion', + 'paginasPortada' => 'Paginas Portada', + 'paginasPortadaCheckImpresionTotal' => 'Paginas Portada Check Impresion Total', + 'paginasPortadaCheckPapelTotal' => 'Paginas Portada Check Papel Total', + 'paginasPortadaClick' => 'Paginas Portada Click', + 'paginasPortadaFormaId' => 'Paginas Portada Forma ID', + 'paginasPortadaGramaje' => 'Paginas Portada Gramaje', + 'paginasPortadaLibro' => 'Paginas Portada Libro', + 'paginasPortadaMano' => 'Paginas Portada Mano', + 'paginasPortadaMaquinaId' => 'Paginas Portada Maquina', + 'paginasPortadaPapelId' => 'Paginas Portada Papel', + 'paginasPortadaPapelImpresionId' => 'Paginas Portada Papel Impresion', + 'paginasPortadaPedido' => 'Paginas Portada Pedido', + 'paginasPortadaPeso' => 'Paginas Portada Peso', + 'paginasPortadaPliegosLibro' => 'Paginas Portada Pliegos Libro', + 'paginasPortadaPliegosPedido' => 'Paginas Portada Pliegos Pedido', + 'paginasPortadaPliegosPrecio' => 'Paginas Portada Pliegos Precio', + 'paginasPortadaPrecio' => 'Paginas Portada Precio', + 'paginasPortadaTarifaImpresionId' => 'Paginas Portada Tarifa Impresion', + 'paisId' => 'Pais', + 'papelFormatoAlto' => 'Papel Formato Alto', + 'papelFormatoAncho' => 'Papel Formato Ancho', + 'papelFormatoId' => 'Papel Formato', + 'papelFormatoPersonalizado' => 'Papel Formato Personalizado', + 'pedidoEsperaFecha' => 'Pedido Espera Fecha', + 'pedidoEsperaUserId' => 'Pedido Espera User', + 'pedidoLibroConjuntoId' => 'Pedido Libro Conjunto ID', + 'presupuesto' => 'Presupuesto', + 'presupuestoList' => 'Presupuesto List', + 'presupuestos' => 'Presupuestos', + 'recogerEnTaller' => 'Recoger EN Taller', + 'referenciaCliente' => 'Referencia Cliente', + 'responsable' => 'Responsable', + 'serieId' => 'Serie ID', + 'solapas' => 'Solapas', + 'solapasAncho' => 'Solapas Ancho', + 'tarifaClienteId' => 'Tarifa Cliente ID', + 'tipoImpresionId' => 'Tipo Impresion', + 'tipologiaId' => 'Tipologia', + 'tirada' => 'Tirada', + 'tiradaAlternativaJsonData' => 'Tirada Alternativa Json Data', + 'titulo' => 'Titulo', + 'total' => 'Total', + 'totalAcabado' => 'Total Acabado', + 'totalCalculado' => 'Total Calculado', + 'totalClick' => 'Total Click', + 'totalConfirmado' => 'Total Confirmado', + 'totalConfirmadoUpdateAt' => 'Total Confirmado Update At', + 'totalConfirmadoUserId' => 'Total Confirmado User', + 'totalDescuento' => 'Total Descuento', + 'totalEnvios' => 'Total Envios', + 'totalManipulado' => 'Total Manipulado', + 'totalMargen' => 'Total Margen', + 'totalMargenExtra' => 'Total Margen Extra', + 'totalPedido' => 'Total Pedido', + 'totalPeso' => 'Total Peso', + 'totalPreimpresion' => 'Total Preimpresion', + 'totalPreimpresionMargen' => 'Total Preimpresion Margen', + 'totalPresupuesto' => 'Total Presupuesto', + 'ubicacionId' => 'Ubicacion', + 'updatedAt' => 'Updated At', + 'userCreatedId' => 'User Created', + 'userUpdateId' => 'User Update', + 'version' => 'Version', + 'wsExternoJsonData' => 'Ws Externo Json Data', + 'validation' => [ + 'aprobado_at' => [ + 'valid_date' => 'The {field} field must contain a valid date.', + + ], + + 'aprobado_json_data' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + + ], + + 'base_imponible' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'catalogo_id' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'causa_cancelacion' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + + ], + + 'coleccion' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + + ], + + 'comparador_json_data' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + + ], + + 'factura_id' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'fecha_encuardenado_at' => [ + 'valid_date' => 'The {field} field must contain a valid date.', + + ], + + 'fecha_entrega_real_at' => [ + 'valid_date' => 'The {field} field must contain a valid date.', + + ], + + 'fecha_externo_at' => [ + 'valid_date' => 'The {field} field must contain a valid date.', + + ], + + 'fecha_ferro_subido_at' => [ + 'valid_date' => 'The {field} field must contain a valid date.', + + ], + + 'fecha_impresion_at' => [ + 'valid_date' => 'The {field} field must contain a valid date.', + + ], + + 'inc_rei' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'isbn' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + + ], + + 'lomo' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'margen' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'margen_manual' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'numero_edicion' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + + ], + + 'paginas_color' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'paginas_color_click' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_color_forma_id' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'paginas_color_gramaje' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_color_libro' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_color_mano' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_color_pedido' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_color_peso' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_color_pliegos_libro' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_color_pliegos_pedido' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_color_pliegos_precio' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_color_posicion' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + + ], + + 'paginas_color_precio' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_cubierta_click' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_cubierta_forma_id' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'paginas_cubierta_gramaje' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_cubierta_libro' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_cubierta_mano' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_cubierta_pedido' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_cubierta_peso' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_cubierta_pliegos_libro' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_cubierta_pliegos_pedido' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_cubierta_pliegos_precio' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_cubierta_precio' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_negro' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'paginas_negro_click' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_negro_forma_id' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'paginas_negro_gramaje' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_negro_libro' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_negro_mano' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_negro_pedido' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_negro_peso' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_negro_pliegos_libro' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_negro_pliegos_pedido' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_negro_pliegos_precio' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_negro_precio' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_portada_click' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_portada_forma_id' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'paginas_portada_gramaje' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_portada_libro' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_portada_mano' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_portada_peso' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_portada_pliegos_libro' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_portada_pliegos_pedido' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_portada_pliegos_precio' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'paginas_portada_precio' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'papel_formato_alto' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'papel_formato_ancho' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'pedido_espera_fecha' => [ + 'valid_date' => 'The {field} field must contain a valid date.', + + ], + + 'pedido_libro_conjunto_id' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'responsable' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + + ], + + 'serie_id' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'tarifa_cliente_id' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'tirada_alternativa_json_data' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + + ], + + 'total' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_acabado' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_calculado' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_click' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_confirmado' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_confirmado_update_at' => [ + 'valid_date' => 'The {field} field must contain a valid date.', + + ], + + 'total_descuento' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_envios' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_manipulado' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_margen' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_margen_extra' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_pedido' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_peso' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_preimpresion' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_preimpresion_margen' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'total_presupuesto' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + + ], + + 'user_update_id' => [ + 'integer' => 'The {field} field must contain an integer.', + + ], + + 'ws_externo_json_data' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + + ], + + 'autor' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + 'required' => 'The {field} field is required.', + + ], + + 'comentarios' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + 'required' => 'The {field} field is required.', + + ], + + 'comentarios_pdf' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + 'required' => 'The {field} field is required.', + + ], + + 'comentarios_safekat' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + 'required' => 'The {field} field is required.', + + ], + + 'comentarios_tarifa' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + 'required' => 'The {field} field is required.', + + ], + + 'cubiertas_ancho' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + 'required' => 'The {field} field is required.', + + ], + + 'descuento' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + 'required' => 'The {field} field is required.', + + ], + + 'forzar_total' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + 'required' => 'The {field} field is required.', + + ], + + 'is_deleted' => [ + 'integer' => 'The {field} field must contain an integer.', + 'required' => 'The {field} field is required.', + + ], + + 'margen_extra' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + 'required' => 'The {field} field is required.', + + ], + + 'merma' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + 'required' => 'The {field} field is required.', + + ], + + 'merma_portada' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + 'required' => 'The {field} field is required.', + + ], + + 'paginas' => [ + 'integer' => 'The {field} field must contain an integer.', + 'required' => 'The {field} field is required.', + + ], + + 'paginas_cubierta' => [ + 'in_list' => 'The {field} field must be one of: {param}.', + 'required' => 'The {field} field is required.', + + ], + + 'paginas_portada' => [ + 'in_list' => 'The {field} field must be one of: {param}.', + 'required' => 'The {field} field is required.', + + ], + + 'paginas_portada_pedido' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + 'required' => 'The {field} field is required.', + + ], + + 'referencia_cliente' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + 'required' => 'The {field} field is required.', + + ], + + 'solapas_ancho' => [ + 'decimal' => 'The {field} field must contain a decimal number.', + 'required' => 'The {field} field is required.', + + ], + + 'tirada' => [ + 'integer' => 'The {field} field must contain an integer.', + 'required' => 'The {field} field is required.', + + ], + + 'titulo' => [ + 'max_length' => 'The {field} field cannot exceed {param} characters in length.', + 'required' => 'The {field} field is required.', + + ], + + 'user_created_id' => [ + 'integer' => 'The {field} field must contain an integer.', + 'required' => 'The {field} field is required.', + + ], + + 'version' => [ + 'integer' => 'The {field} field must contain an integer.', + 'required' => 'The {field} field is required.', + + ], + + + ], + + +]; \ No newline at end of file diff --git a/ci4/app/Models/Presupuestos/PresupuestoEstadoModel.php b/ci4/app/Models/Presupuestos/PresupuestoEstadoModel.php new file mode 100644 index 00000000..59f330f1 --- /dev/null +++ b/ci4/app/Models/Presupuestos/PresupuestoEstadoModel.php @@ -0,0 +1,88 @@ + "t1.id", + 2 => "t1.estado", + 3 => "t1.is_deleted", + 4 => "t1.created_at", + 5 => "t1.updated_at", + ]; + + protected $allowedFields = ["estado", "is_deleted"]; + protected $returnType = "App\Entities\Presupuestos\PresupuestoEstadoEntity"; + + protected $useTimestamps = true; + protected $useSoftDeletes = false; + + protected $createdField = "created_at"; + + protected $updatedField = "updated_at"; + + public static $labelField = "estado"; + + protected $validationRules = [ + "estado" => [ + "label" => "PresupuestoEstados.estado", + "rules" => "trim|required|max_length[50]", + ], + "is_deleted" => [ + "label" => "PresupuestoEstados.isDeleted", + "rules" => "required|integer", + ], + ]; + + protected $validationMessages = [ + "estado" => [ + "max_length" => "PresupuestoEstados.validation.estado.max_length", + "required" => "PresupuestoEstados.validation.estado.required", + ], + "is_deleted" => [ + "integer" => "PresupuestoEstados.validation.is_deleted.integer", + "required" => "PresupuestoEstados.validation.is_deleted.required", + ], + ]; + + /** + * Get resource data. + * + * @param string $search + * + * @return \CodeIgniter\Database\BaseBuilder + */ + public function getResource(string $search = "") + { + $builder = $this->db + ->table($this->table . " t1") + ->select( + "t1.id AS id, t1.estado AS estado, t1.is_deleted AS is_deleted, t1.created_at AS created_at, t1.updated_at AS updated_at" + ); + + return empty($search) + ? $builder + : $builder + ->groupStart() + ->like("t1.id", $search) + ->orLike("t1.estado", $search) + ->orLike("t1.is_deleted", $search) + ->orLike("t1.created_at", $search) + ->orLike("t1.updated_at", $search) + ->orLike("t1.id", $search) + ->orLike("t1.estado", $search) + ->orLike("t1.is_deleted", $search) + ->orLike("t1.created_at", $search) + ->orLike("t1.updated_at", $search) + ->groupEnd(); + } +} diff --git a/ci4/app/Models/Presupuestos/PresupuestoModel.php b/ci4/app/Models/Presupuestos/PresupuestoModel.php new file mode 100644 index 00000000..dcaf960e --- /dev/null +++ b/ci4/app/Models/Presupuestos/PresupuestoModel.php @@ -0,0 +1,1101 @@ + "t1.id", + 1 => "t1.created_at", + 2 => "t2.nombre", + 3 => "t3.first_name", + 4 => "t1.titulo", + 5 => "t4.nombre", + 6 => "t5.nombre", + 7 => "t1.inc_rei", + 8 => "t1.paginas", + 9 => "t1.tirada", + 10 => "t1.total_pedido", + 11 => "t6.estado", + ]; + + protected $allowedFields = [ + "pedido_libro_conjunto_id", + "version", + "cliente_id", + "tarifa_cliente_id", + "user_created_id", + "user_update_id", + "forma_pago_id", + "factura_id", + "tipo_impresion_id", + "tipologia_id", + "pais_id", + "ubicacion_id", + "serie_id", + "catalogo_id", + "estado_id", + "inc_rei", + "causa_cancelacion", + "recoger_en_taller", + "ferro", + "ferro_digital", + "marcapaginas", + "papel_formato_id", + "papel_formato_personalizado", + "papel_formato_ancho", + "papel_formato_alto", + "titulo", + "autor", + "coleccion", + "numero_edicion", + "isbn", + "referencia_cliente", + "paginas", + "tirada", + "solapas", + "solapas_ancho", + "cosido", + "cubiertas", + "cubiertas_ancho", + "merma", + "merma_portada", + "imagenes_bn_interior", + "comentarios", + "comentarios_safekat", + "comentarios_pdf", + "comentarios_tarifa", + "en_produccion", + "en_espera", + "modo_comparador", + "paginas_negro", + "paginas_negro_hq", + "paginas_negro_papel_id", + "paginas_negro_papel_impresion_id", + "paginas_negro_forma_id", + "paginas_negro_gramaje", + "paginas_negro_pliegos_libro", + "paginas_negro_pliegos_pedido", + "paginas_negro_pliegos_precio", + "paginas_negro_libro", + "paginas_negro_pedido", + "paginas_negro_mano", + "paginas_negro_peso", + "paginas_negro_maquina_id", + "paginas_negro_tarifa_impresion_id", + "paginas_negro_click", + "paginas_negro_precio", + "paginas_negro_check_papel_total", + "paginas_negro_check_impresion_total", + "paginas_color", + "paginas_color_papel_id", + "paginas_color_papel_impresion_id", + "paginas_color_forma_id", + "paginas_color_gramaje", + "paginas_color_pliegos_libro", + "paginas_color_pliegos_pedido", + "paginas_color_pliegos_precio", + "paginas_color_libro", + "paginas_color_pedido", + "paginas_color_mano", + "paginas_color_peso", + "paginas_color_maquina_id", + "paginas_color_tarifa_impresion_id", + "paginas_color_click", + "paginas_color_precio", + "paginas_color_check_papel_total", + "paginas_color_check_impresion_total", + "paginas_color_posicion", + "paginas_portada", + "paginas_portada_papel_id", + "paginas_portada_papel_impresion_id", + "paginas_portada_forma_id", + "paginas_portada_gramaje", + "paginas_portada_pliegos_libro", + "paginas_portada_pliegos_pedido", + "paginas_portada_pliegos_precio", + "paginas_portada_libro", + "paginas_portada_pedido", + "paginas_portada_mano", + "paginas_portada_peso", + "paginas_portada_maquina_id", + "paginas_portada_tarifa_impresion_id", + "paginas_portada_click", + "paginas_portada_precio", + "paginas_portada_check_papel_total", + "paginas_portada_check_impresion_total", + "paginas_cubierta", + "paginas_cubierta_papel_id", + "paginas_cubierta_papel_impresion_id", + "paginas_cubierta_forma_id", + "paginas_cubierta_gramaje", + "paginas_cubierta_pliegos_libro", + "paginas_cubierta_pliegos_pedido", + "paginas_cubierta_pliegos_precio", + "paginas_cubierta_libro", + "paginas_cubierta_pedido", + "paginas_cubierta_mano", + "paginas_cubierta_peso", + "paginas_cubierta_maquina_id", + "paginas_cubierta_tarifa_impresion_id", + "paginas_cubierta_click", + "paginas_cubierta_precio", + "paginas_cubierta_check_papel_total", + "paginas_cubierta_check_impresion_total", + "lomo", + "isDig", + "total_presupuesto", + "total_pedido", + "total_peso", + "total_click", + "total_preimpresion", + "total_preimpresion_margen", + "total_manipulado", + "total_acabado", + "total_envios", + "envios_recoge_cliente", + "margen", + "margen_extra", + "margen_manual", + "descuento", + "base_imponible", + "total_margen", + "total_margen_extra", + "total_descuento", + "total", + "forzar_total", + "total_calculado", + "total_confirmado", + "total_confirmado_user_id", + "total_confirmado_update_at", + "tirada_alternativa_json_data", + "aprobado_user_id", + "aprobado_at", + "aprobado_json_data", + "comparador_json_data", + "ws_externo_json_data", + "fecha_entrega_real_at", + "fecha_entrega_real_warning", + "fecha_impresion_at", + "fecha_encuardenado_at", + "fecha_externo_at", + "fecha_ferro_subido_at", + "responsable", + "pedido_espera_fecha", + "pedido_espera_user_id", + "is_deleted", + ]; + protected $returnType = "App\Entities\Presupuestos\PresupuestoEntity"; + + protected $useTimestamps = true; + protected $useSoftDeletes = false; + + protected $createdField = "created_at"; + + protected $updatedField = "updated_at"; + + public static $labelField = "titulo"; + + protected $validationRules = [ + "aprobado_at" => [ + "label" => "Presupuestos.aprobadoAt", + "rules" => "valid_date|permit_empty", + ], + "aprobado_json_data" => [ + "label" => "Presupuestos.aprobadoJsonData", + "rules" => "trim|max_length[16313]", + ], + "autor" => [ + "label" => "Presupuestos.autor", + "rules" => "trim|required|max_length[150]", + ], + "base_imponible" => [ + "label" => "Presupuestos.baseImponible", + "rules" => "decimal|permit_empty", + ], + "catalogo_id" => [ + "label" => "Presupuestos.catalogoId", + "rules" => "integer|permit_empty", + ], + "causa_cancelacion" => [ + "label" => "Presupuestos.causaCancelacion", + "rules" => "trim|max_length[16313]", + ], + "coleccion" => [ + "label" => "Presupuestos.coleccion", + "rules" => "trim|max_length[255]", + ], + "comentarios" => [ + "label" => "Presupuestos.comentarios", + "rules" => "trim|required|max_length[16313]", + ], + "comentarios_pdf" => [ + "label" => "Presupuestos.comentariosPdf", + "rules" => "trim|required|max_length[16313]", + ], + "comentarios_safekat" => [ + "label" => "Presupuestos.comentariosSafekat", + "rules" => "trim|required|max_length[16313]", + ], + "comentarios_tarifa" => [ + "label" => "Presupuestos.comentariosTarifa", + "rules" => "trim|required|max_length[16313]", + ], + "comparador_json_data" => [ + "label" => "Presupuestos.comparadorJsonData", + "rules" => "trim|max_length[16313]", + ], + "cubiertas_ancho" => [ + "label" => "Presupuestos.cubiertasAncho", + "rules" => "required|decimal", + ], + "descuento" => [ + "label" => "Presupuestos.descuento", + "rules" => "required|decimal", + ], + "factura_id" => [ + "label" => "Presupuestos.facturaId", + "rules" => "integer|permit_empty", + ], + "fecha_encuardenado_at" => [ + "label" => "Presupuestos.fechaEncuardenadoAt", + "rules" => "valid_date|permit_empty", + ], + "fecha_entrega_real_at" => [ + "label" => "Presupuestos.fechaEntregaRealAt", + "rules" => "valid_date|permit_empty", + ], + "fecha_externo_at" => [ + "label" => "Presupuestos.fechaExternoAt", + "rules" => "valid_date|permit_empty", + ], + "fecha_ferro_subido_at" => [ + "label" => "Presupuestos.fechaFerroSubidoAt", + "rules" => "valid_date|permit_empty", + ], + "fecha_impresion_at" => [ + "label" => "Presupuestos.fechaImpresionAt", + "rules" => "valid_date|permit_empty", + ], + "forzar_total" => [ + "label" => "Presupuestos.forzarTotal", + "rules" => "required|decimal", + ], + "inc_rei" => [ + "label" => "Presupuestos.incRei", + "rules" => "integer|permit_empty", + ], + "is_deleted" => [ + "label" => "Presupuestos.isDeleted", + "rules" => "required|integer", + ], + "isbn" => [ + "label" => "Presupuestos.isbn", + "rules" => "trim|max_length[50]", + ], + "lomo" => [ + "label" => "Presupuestos.lomo", + "rules" => "integer|permit_empty", + ], + "margen" => [ + "label" => "Presupuestos.margen", + "rules" => "decimal|permit_empty", + ], + "margen_extra" => [ + "label" => "Presupuestos.margenExtra", + "rules" => "required|decimal", + ], + "margen_manual" => [ + "label" => "Presupuestos.margenManual", + "rules" => "decimal|permit_empty", + ], + "merma" => [ + "label" => "Presupuestos.merma", + "rules" => "required|decimal", + ], + "merma_portada" => [ + "label" => "Presupuestos.mermaPortada", + "rules" => "required|decimal", + ], + "numero_edicion" => [ + "label" => "Presupuestos.numeroEdicion", + "rules" => "trim|max_length[50]", + ], + "paginas" => [ + "label" => "Presupuestos.paginas", + "rules" => "required|integer", + ], + "paginas_color" => [ + "label" => "Presupuestos.paginasColor", + "rules" => "integer|permit_empty", + ], + "paginas_color_click" => [ + "label" => "Presupuestos.paginasColorClick", + "rules" => "decimal|permit_empty", + ], + "paginas_color_forma_id" => [ + "label" => "Presupuestos.paginasColorFormaId", + "rules" => "integer|permit_empty", + ], + "paginas_color_gramaje" => [ + "label" => "Presupuestos.paginasColorGramaje", + "rules" => "decimal|permit_empty", + ], + "paginas_color_libro" => [ + "label" => "Presupuestos.paginasColorLibro", + "rules" => "decimal|permit_empty", + ], + "paginas_color_mano" => [ + "label" => "Presupuestos.paginasColorMano", + "rules" => "decimal|permit_empty", + ], + "paginas_color_pedido" => [ + "label" => "Presupuestos.paginasColorPedido", + "rules" => "decimal|permit_empty", + ], + "paginas_color_peso" => [ + "label" => "Presupuestos.paginasColorPeso", + "rules" => "decimal|permit_empty", + ], + "paginas_color_pliegos_libro" => [ + "label" => "Presupuestos.paginasColorPliegosLibro", + "rules" => "decimal|permit_empty", + ], + "paginas_color_pliegos_pedido" => [ + "label" => "Presupuestos.paginasColorPliegosPedido", + "rules" => "decimal|permit_empty", + ], + "paginas_color_pliegos_precio" => [ + "label" => "Presupuestos.paginasColorPliegosPrecio", + "rules" => "decimal|permit_empty", + ], + "paginas_color_posicion" => [ + "label" => "Presupuestos.paginasColorPosicion", + "rules" => "trim|max_length[16313]", + ], + "paginas_color_precio" => [ + "label" => "Presupuestos.paginasColorPrecio", + "rules" => "decimal|permit_empty", + ], + "paginas_cubierta" => [ + "label" => "Presupuestos.paginasCubierta", + "rules" => "required|in_list[4x0,4x4]", + ], + "paginas_cubierta_click" => [ + "label" => "Presupuestos.paginasCubiertaClick", + "rules" => "decimal|permit_empty", + ], + "paginas_cubierta_forma_id" => [ + "label" => "Presupuestos.paginasCubiertaFormaId", + "rules" => "integer|permit_empty", + ], + "paginas_cubierta_gramaje" => [ + "label" => "Presupuestos.paginasCubiertaGramaje", + "rules" => "decimal|permit_empty", + ], + "paginas_cubierta_libro" => [ + "label" => "Presupuestos.paginasCubiertaLibro", + "rules" => "decimal|permit_empty", + ], + "paginas_cubierta_mano" => [ + "label" => "Presupuestos.paginasCubiertaMano", + "rules" => "decimal|permit_empty", + ], + "paginas_cubierta_pedido" => [ + "label" => "Presupuestos.paginasCubiertaPedido", + "rules" => "decimal|permit_empty", + ], + "paginas_cubierta_peso" => [ + "label" => "Presupuestos.paginasCubiertaPeso", + "rules" => "decimal|permit_empty", + ], + "paginas_cubierta_pliegos_libro" => [ + "label" => "Presupuestos.paginasCubiertaPliegosLibro", + "rules" => "decimal|permit_empty", + ], + "paginas_cubierta_pliegos_pedido" => [ + "label" => "Presupuestos.paginasCubiertaPliegosPedido", + "rules" => "decimal|permit_empty", + ], + "paginas_cubierta_pliegos_precio" => [ + "label" => "Presupuestos.paginasCubiertaPliegosPrecio", + "rules" => "decimal|permit_empty", + ], + "paginas_cubierta_precio" => [ + "label" => "Presupuestos.paginasCubiertaPrecio", + "rules" => "decimal|permit_empty", + ], + "paginas_negro" => [ + "label" => "Presupuestos.paginasNegro", + "rules" => "integer|permit_empty", + ], + "paginas_negro_click" => [ + "label" => "Presupuestos.paginasNegroClick", + "rules" => "decimal|permit_empty", + ], + "paginas_negro_forma_id" => [ + "label" => "Presupuestos.paginasNegroFormaId", + "rules" => "integer|permit_empty", + ], + "paginas_negro_gramaje" => [ + "label" => "Presupuestos.paginasNegroGramaje", + "rules" => "decimal|permit_empty", + ], + "paginas_negro_libro" => [ + "label" => "Presupuestos.paginasNegroLibro", + "rules" => "decimal|permit_empty", + ], + "paginas_negro_mano" => [ + "label" => "Presupuestos.paginasNegroMano", + "rules" => "decimal|permit_empty", + ], + "paginas_negro_pedido" => [ + "label" => "Presupuestos.paginasNegroPedido", + "rules" => "decimal|permit_empty", + ], + "paginas_negro_peso" => [ + "label" => "Presupuestos.paginasNegroPeso", + "rules" => "decimal|permit_empty", + ], + "paginas_negro_pliegos_libro" => [ + "label" => "Presupuestos.paginasNegroPliegosLibro", + "rules" => "decimal|permit_empty", + ], + "paginas_negro_pliegos_pedido" => [ + "label" => "Presupuestos.paginasNegroPliegosPedido", + "rules" => "decimal|permit_empty", + ], + "paginas_negro_pliegos_precio" => [ + "label" => "Presupuestos.paginasNegroPliegosPrecio", + "rules" => "decimal|permit_empty", + ], + "paginas_negro_precio" => [ + "label" => "Presupuestos.paginasNegroPrecio", + "rules" => "decimal|permit_empty", + ], + "paginas_portada" => [ + "label" => "Presupuestos.paginasPortada", + "rules" => "required|in_list[4x0,4x4]", + ], + "paginas_portada_click" => [ + "label" => "Presupuestos.paginasPortadaClick", + "rules" => "decimal|permit_empty", + ], + "paginas_portada_forma_id" => [ + "label" => "Presupuestos.paginasPortadaFormaId", + "rules" => "integer|permit_empty", + ], + "paginas_portada_gramaje" => [ + "label" => "Presupuestos.paginasPortadaGramaje", + "rules" => "decimal|permit_empty", + ], + "paginas_portada_libro" => [ + "label" => "Presupuestos.paginasPortadaLibro", + "rules" => "decimal|permit_empty", + ], + "paginas_portada_mano" => [ + "label" => "Presupuestos.paginasPortadaMano", + "rules" => "decimal|permit_empty", + ], + "paginas_portada_pedido" => [ + "label" => "Presupuestos.paginasPortadaPedido", + "rules" => "required|decimal", + ], + "paginas_portada_peso" => [ + "label" => "Presupuestos.paginasPortadaPeso", + "rules" => "decimal|permit_empty", + ], + "paginas_portada_pliegos_libro" => [ + "label" => "Presupuestos.paginasPortadaPliegosLibro", + "rules" => "decimal|permit_empty", + ], + "paginas_portada_pliegos_pedido" => [ + "label" => "Presupuestos.paginasPortadaPliegosPedido", + "rules" => "decimal|permit_empty", + ], + "paginas_portada_pliegos_precio" => [ + "label" => "Presupuestos.paginasPortadaPliegosPrecio", + "rules" => "decimal|permit_empty", + ], + "paginas_portada_precio" => [ + "label" => "Presupuestos.paginasPortadaPrecio", + "rules" => "decimal|permit_empty", + ], + "papel_formato_alto" => [ + "label" => "Presupuestos.papelFormatoAlto", + "rules" => "decimal|permit_empty", + ], + "papel_formato_ancho" => [ + "label" => "Presupuestos.papelFormatoAncho", + "rules" => "decimal|permit_empty", + ], + "pedido_espera_fecha" => [ + "label" => "Presupuestos.pedidoEsperaFecha", + "rules" => "valid_date|permit_empty", + ], + "pedido_libro_conjunto_id" => [ + "label" => "Presupuestos.pedidoLibroConjuntoId", + "rules" => "integer|permit_empty", + ], + "referencia_cliente" => [ + "label" => "Presupuestos.referenciaCliente", + "rules" => "trim|required|max_length[100]", + ], + "responsable" => [ + "label" => "Presupuestos.responsable", + "rules" => "trim|max_length[32]", + ], + "serie_id" => [ + "label" => "Presupuestos.serieId", + "rules" => "integer|permit_empty", + ], + "solapas_ancho" => [ + "label" => "Presupuestos.solapasAncho", + "rules" => "required|decimal", + ], + "tarifa_cliente_id" => [ + "label" => "Presupuestos.tarifaClienteId", + "rules" => "integer|permit_empty", + ], + "tirada" => [ + "label" => "Presupuestos.tirada", + "rules" => "required|integer", + ], + "tirada_alternativa_json_data" => [ + "label" => "Presupuestos.tiradaAlternativaJsonData", + "rules" => "trim|max_length[16313]", + ], + "titulo" => [ + "label" => "Presupuestos.titulo", + "rules" => "trim|required|max_length[300]", + ], + "total" => [ + "label" => "Presupuestos.total", + "rules" => "decimal|permit_empty", + ], + "total_acabado" => [ + "label" => "Presupuestos.totalAcabado", + "rules" => "decimal|permit_empty", + ], + "total_calculado" => [ + "label" => "Presupuestos.totalCalculado", + "rules" => "decimal|permit_empty", + ], + "total_click" => [ + "label" => "Presupuestos.totalClick", + "rules" => "decimal|permit_empty", + ], + "total_confirmado" => [ + "label" => "Presupuestos.totalConfirmado", + "rules" => "decimal|permit_empty", + ], + "total_confirmado_update_at" => [ + "label" => "Presupuestos.totalConfirmadoUpdateAt", + "rules" => "valid_date|permit_empty", + ], + "total_descuento" => [ + "label" => "Presupuestos.totalDescuento", + "rules" => "decimal|permit_empty", + ], + "total_envios" => [ + "label" => "Presupuestos.totalEnvios", + "rules" => "decimal|permit_empty", + ], + "total_manipulado" => [ + "label" => "Presupuestos.totalManipulado", + "rules" => "decimal|permit_empty", + ], + "total_margen" => [ + "label" => "Presupuestos.totalMargen", + "rules" => "decimal|permit_empty", + ], + "total_margen_extra" => [ + "label" => "Presupuestos.totalMargenExtra", + "rules" => "decimal|permit_empty", + ], + "total_pedido" => [ + "label" => "Presupuestos.totalPedido", + "rules" => "decimal|permit_empty", + ], + "total_peso" => [ + "label" => "Presupuestos.totalPeso", + "rules" => "decimal|permit_empty", + ], + "total_preimpresion" => [ + "label" => "Presupuestos.totalPreimpresion", + "rules" => "decimal|permit_empty", + ], + "total_preimpresion_margen" => [ + "label" => "Presupuestos.totalPreimpresionMargen", + "rules" => "decimal|permit_empty", + ], + "total_presupuesto" => [ + "label" => "Presupuestos.totalPresupuesto", + "rules" => "decimal|permit_empty", + ], + "user_created_id" => [ + "label" => "Presupuestos.userCreatedId", + "rules" => "required|integer", + ], + "user_update_id" => [ + "label" => "Presupuestos.userUpdateId", + "rules" => "integer|permit_empty", + ], + "version" => [ + "label" => "Presupuestos.version", + "rules" => "required|integer", + ], + "ws_externo_json_data" => [ + "label" => "Presupuestos.wsExternoJsonData", + "rules" => "trim|max_length[16313]", + ], + ]; + + protected $validationMessages = [ + "aprobado_at" => [ + "valid_date" => "Presupuestos.validation.aprobado_at.valid_date", + ], + "aprobado_json_data" => [ + "max_length" => "Presupuestos.validation.aprobado_json_data.max_length", + ], + "autor" => [ + "max_length" => "Presupuestos.validation.autor.max_length", + "required" => "Presupuestos.validation.autor.required", + ], + "base_imponible" => [ + "decimal" => "Presupuestos.validation.base_imponible.decimal", + ], + "catalogo_id" => [ + "integer" => "Presupuestos.validation.catalogo_id.integer", + ], + "causa_cancelacion" => [ + "max_length" => "Presupuestos.validation.causa_cancelacion.max_length", + ], + "coleccion" => [ + "max_length" => "Presupuestos.validation.coleccion.max_length", + ], + "comentarios" => [ + "max_length" => "Presupuestos.validation.comentarios.max_length", + "required" => "Presupuestos.validation.comentarios.required", + ], + "comentarios_pdf" => [ + "max_length" => "Presupuestos.validation.comentarios_pdf.max_length", + "required" => "Presupuestos.validation.comentarios_pdf.required", + ], + "comentarios_safekat" => [ + "max_length" => "Presupuestos.validation.comentarios_safekat.max_length", + "required" => "Presupuestos.validation.comentarios_safekat.required", + ], + "comentarios_tarifa" => [ + "max_length" => "Presupuestos.validation.comentarios_tarifa.max_length", + "required" => "Presupuestos.validation.comentarios_tarifa.required", + ], + "comparador_json_data" => [ + "max_length" => "Presupuestos.validation.comparador_json_data.max_length", + ], + "cubiertas_ancho" => [ + "decimal" => "Presupuestos.validation.cubiertas_ancho.decimal", + "required" => "Presupuestos.validation.cubiertas_ancho.required", + ], + "descuento" => [ + "decimal" => "Presupuestos.validation.descuento.decimal", + "required" => "Presupuestos.validation.descuento.required", + ], + "factura_id" => [ + "integer" => "Presupuestos.validation.factura_id.integer", + ], + "fecha_encuardenado_at" => [ + "valid_date" => "Presupuestos.validation.fecha_encuardenado_at.valid_date", + ], + "fecha_entrega_real_at" => [ + "valid_date" => "Presupuestos.validation.fecha_entrega_real_at.valid_date", + ], + "fecha_externo_at" => [ + "valid_date" => "Presupuestos.validation.fecha_externo_at.valid_date", + ], + "fecha_ferro_subido_at" => [ + "valid_date" => "Presupuestos.validation.fecha_ferro_subido_at.valid_date", + ], + "fecha_impresion_at" => [ + "valid_date" => "Presupuestos.validation.fecha_impresion_at.valid_date", + ], + "forzar_total" => [ + "decimal" => "Presupuestos.validation.forzar_total.decimal", + "required" => "Presupuestos.validation.forzar_total.required", + ], + "inc_rei" => [ + "integer" => "Presupuestos.validation.inc_rei.integer", + ], + "is_deleted" => [ + "integer" => "Presupuestos.validation.is_deleted.integer", + "required" => "Presupuestos.validation.is_deleted.required", + ], + "isbn" => [ + "max_length" => "Presupuestos.validation.isbn.max_length", + ], + "lomo" => [ + "integer" => "Presupuestos.validation.lomo.integer", + ], + "margen" => [ + "decimal" => "Presupuestos.validation.margen.decimal", + ], + "margen_extra" => [ + "decimal" => "Presupuestos.validation.margen_extra.decimal", + "required" => "Presupuestos.validation.margen_extra.required", + ], + "margen_manual" => [ + "decimal" => "Presupuestos.validation.margen_manual.decimal", + ], + "merma" => [ + "decimal" => "Presupuestos.validation.merma.decimal", + "required" => "Presupuestos.validation.merma.required", + ], + "merma_portada" => [ + "decimal" => "Presupuestos.validation.merma_portada.decimal", + "required" => "Presupuestos.validation.merma_portada.required", + ], + "numero_edicion" => [ + "max_length" => "Presupuestos.validation.numero_edicion.max_length", + ], + "paginas" => [ + "integer" => "Presupuestos.validation.paginas.integer", + "required" => "Presupuestos.validation.paginas.required", + ], + "paginas_color" => [ + "integer" => "Presupuestos.validation.paginas_color.integer", + ], + "paginas_color_click" => [ + "decimal" => "Presupuestos.validation.paginas_color_click.decimal", + ], + "paginas_color_forma_id" => [ + "integer" => "Presupuestos.validation.paginas_color_forma_id.integer", + ], + "paginas_color_gramaje" => [ + "decimal" => "Presupuestos.validation.paginas_color_gramaje.decimal", + ], + "paginas_color_libro" => [ + "decimal" => "Presupuestos.validation.paginas_color_libro.decimal", + ], + "paginas_color_mano" => [ + "decimal" => "Presupuestos.validation.paginas_color_mano.decimal", + ], + "paginas_color_pedido" => [ + "decimal" => "Presupuestos.validation.paginas_color_pedido.decimal", + ], + "paginas_color_peso" => [ + "decimal" => "Presupuestos.validation.paginas_color_peso.decimal", + ], + "paginas_color_pliegos_libro" => [ + "decimal" => "Presupuestos.validation.paginas_color_pliegos_libro.decimal", + ], + "paginas_color_pliegos_pedido" => [ + "decimal" => "Presupuestos.validation.paginas_color_pliegos_pedido.decimal", + ], + "paginas_color_pliegos_precio" => [ + "decimal" => "Presupuestos.validation.paginas_color_pliegos_precio.decimal", + ], + "paginas_color_posicion" => [ + "max_length" => "Presupuestos.validation.paginas_color_posicion.max_length", + ], + "paginas_color_precio" => [ + "decimal" => "Presupuestos.validation.paginas_color_precio.decimal", + ], + "paginas_cubierta" => [ + "in_list" => "Presupuestos.validation.paginas_cubierta.in_list", + "required" => "Presupuestos.validation.paginas_cubierta.required", + ], + "paginas_cubierta_click" => [ + "decimal" => "Presupuestos.validation.paginas_cubierta_click.decimal", + ], + "paginas_cubierta_forma_id" => [ + "integer" => "Presupuestos.validation.paginas_cubierta_forma_id.integer", + ], + "paginas_cubierta_gramaje" => [ + "decimal" => "Presupuestos.validation.paginas_cubierta_gramaje.decimal", + ], + "paginas_cubierta_libro" => [ + "decimal" => "Presupuestos.validation.paginas_cubierta_libro.decimal", + ], + "paginas_cubierta_mano" => [ + "decimal" => "Presupuestos.validation.paginas_cubierta_mano.decimal", + ], + "paginas_cubierta_pedido" => [ + "decimal" => "Presupuestos.validation.paginas_cubierta_pedido.decimal", + ], + "paginas_cubierta_peso" => [ + "decimal" => "Presupuestos.validation.paginas_cubierta_peso.decimal", + ], + "paginas_cubierta_pliegos_libro" => [ + "decimal" => "Presupuestos.validation.paginas_cubierta_pliegos_libro.decimal", + ], + "paginas_cubierta_pliegos_pedido" => [ + "decimal" => "Presupuestos.validation.paginas_cubierta_pliegos_pedido.decimal", + ], + "paginas_cubierta_pliegos_precio" => [ + "decimal" => "Presupuestos.validation.paginas_cubierta_pliegos_precio.decimal", + ], + "paginas_cubierta_precio" => [ + "decimal" => "Presupuestos.validation.paginas_cubierta_precio.decimal", + ], + "paginas_negro" => [ + "integer" => "Presupuestos.validation.paginas_negro.integer", + ], + "paginas_negro_click" => [ + "decimal" => "Presupuestos.validation.paginas_negro_click.decimal", + ], + "paginas_negro_forma_id" => [ + "integer" => "Presupuestos.validation.paginas_negro_forma_id.integer", + ], + "paginas_negro_gramaje" => [ + "decimal" => "Presupuestos.validation.paginas_negro_gramaje.decimal", + ], + "paginas_negro_libro" => [ + "decimal" => "Presupuestos.validation.paginas_negro_libro.decimal", + ], + "paginas_negro_mano" => [ + "decimal" => "Presupuestos.validation.paginas_negro_mano.decimal", + ], + "paginas_negro_pedido" => [ + "decimal" => "Presupuestos.validation.paginas_negro_pedido.decimal", + ], + "paginas_negro_peso" => [ + "decimal" => "Presupuestos.validation.paginas_negro_peso.decimal", + ], + "paginas_negro_pliegos_libro" => [ + "decimal" => "Presupuestos.validation.paginas_negro_pliegos_libro.decimal", + ], + "paginas_negro_pliegos_pedido" => [ + "decimal" => "Presupuestos.validation.paginas_negro_pliegos_pedido.decimal", + ], + "paginas_negro_pliegos_precio" => [ + "decimal" => "Presupuestos.validation.paginas_negro_pliegos_precio.decimal", + ], + "paginas_negro_precio" => [ + "decimal" => "Presupuestos.validation.paginas_negro_precio.decimal", + ], + "paginas_portada" => [ + "in_list" => "Presupuestos.validation.paginas_portada.in_list", + "required" => "Presupuestos.validation.paginas_portada.required", + ], + "paginas_portada_click" => [ + "decimal" => "Presupuestos.validation.paginas_portada_click.decimal", + ], + "paginas_portada_forma_id" => [ + "integer" => "Presupuestos.validation.paginas_portada_forma_id.integer", + ], + "paginas_portada_gramaje" => [ + "decimal" => "Presupuestos.validation.paginas_portada_gramaje.decimal", + ], + "paginas_portada_libro" => [ + "decimal" => "Presupuestos.validation.paginas_portada_libro.decimal", + ], + "paginas_portada_mano" => [ + "decimal" => "Presupuestos.validation.paginas_portada_mano.decimal", + ], + "paginas_portada_pedido" => [ + "decimal" => "Presupuestos.validation.paginas_portada_pedido.decimal", + "required" => "Presupuestos.validation.paginas_portada_pedido.required", + ], + "paginas_portada_peso" => [ + "decimal" => "Presupuestos.validation.paginas_portada_peso.decimal", + ], + "paginas_portada_pliegos_libro" => [ + "decimal" => "Presupuestos.validation.paginas_portada_pliegos_libro.decimal", + ], + "paginas_portada_pliegos_pedido" => [ + "decimal" => "Presupuestos.validation.paginas_portada_pliegos_pedido.decimal", + ], + "paginas_portada_pliegos_precio" => [ + "decimal" => "Presupuestos.validation.paginas_portada_pliegos_precio.decimal", + ], + "paginas_portada_precio" => [ + "decimal" => "Presupuestos.validation.paginas_portada_precio.decimal", + ], + "papel_formato_alto" => [ + "decimal" => "Presupuestos.validation.papel_formato_alto.decimal", + ], + "papel_formato_ancho" => [ + "decimal" => "Presupuestos.validation.papel_formato_ancho.decimal", + ], + "pedido_espera_fecha" => [ + "valid_date" => "Presupuestos.validation.pedido_espera_fecha.valid_date", + ], + "pedido_libro_conjunto_id" => [ + "integer" => "Presupuestos.validation.pedido_libro_conjunto_id.integer", + ], + "referencia_cliente" => [ + "max_length" => "Presupuestos.validation.referencia_cliente.max_length", + "required" => "Presupuestos.validation.referencia_cliente.required", + ], + "responsable" => [ + "max_length" => "Presupuestos.validation.responsable.max_length", + ], + "serie_id" => [ + "integer" => "Presupuestos.validation.serie_id.integer", + ], + "solapas_ancho" => [ + "decimal" => "Presupuestos.validation.solapas_ancho.decimal", + "required" => "Presupuestos.validation.solapas_ancho.required", + ], + "tarifa_cliente_id" => [ + "integer" => "Presupuestos.validation.tarifa_cliente_id.integer", + ], + "tirada" => [ + "integer" => "Presupuestos.validation.tirada.integer", + "required" => "Presupuestos.validation.tirada.required", + ], + "tirada_alternativa_json_data" => [ + "max_length" => "Presupuestos.validation.tirada_alternativa_json_data.max_length", + ], + "titulo" => [ + "max_length" => "Presupuestos.validation.titulo.max_length", + "required" => "Presupuestos.validation.titulo.required", + ], + "total" => [ + "decimal" => "Presupuestos.validation.total.decimal", + ], + "total_acabado" => [ + "decimal" => "Presupuestos.validation.total_acabado.decimal", + ], + "total_calculado" => [ + "decimal" => "Presupuestos.validation.total_calculado.decimal", + ], + "total_click" => [ + "decimal" => "Presupuestos.validation.total_click.decimal", + ], + "total_confirmado" => [ + "decimal" => "Presupuestos.validation.total_confirmado.decimal", + ], + "total_confirmado_update_at" => [ + "valid_date" => "Presupuestos.validation.total_confirmado_update_at.valid_date", + ], + "total_descuento" => [ + "decimal" => "Presupuestos.validation.total_descuento.decimal", + ], + "total_envios" => [ + "decimal" => "Presupuestos.validation.total_envios.decimal", + ], + "total_manipulado" => [ + "decimal" => "Presupuestos.validation.total_manipulado.decimal", + ], + "total_margen" => [ + "decimal" => "Presupuestos.validation.total_margen.decimal", + ], + "total_margen_extra" => [ + "decimal" => "Presupuestos.validation.total_margen_extra.decimal", + ], + "total_pedido" => [ + "decimal" => "Presupuestos.validation.total_pedido.decimal", + ], + "total_peso" => [ + "decimal" => "Presupuestos.validation.total_peso.decimal", + ], + "total_preimpresion" => [ + "decimal" => "Presupuestos.validation.total_preimpresion.decimal", + ], + "total_preimpresion_margen" => [ + "decimal" => "Presupuestos.validation.total_preimpresion_margen.decimal", + ], + "total_presupuesto" => [ + "decimal" => "Presupuestos.validation.total_presupuesto.decimal", + ], + "user_created_id" => [ + "integer" => "Presupuestos.validation.user_created_id.integer", + "required" => "Presupuestos.validation.user_created_id.required", + ], + "user_update_id" => [ + "integer" => "Presupuestos.validation.user_update_id.integer", + ], + "version" => [ + "integer" => "Presupuestos.validation.version.integer", + "required" => "Presupuestos.validation.version.required", + ], + "ws_externo_json_data" => [ + "max_length" => "Presupuestos.validation.ws_externo_json_data.max_length", + ], + ]; + public function findAllWithAllRelations(string $selcols = "*", int $limit = null, int $offset = 0) + { + $sql = + "SELECT t1." . + $selcols . + ", t2.nombre AS cliente, t3.nombre AS forma_pago, t4.nombre AS tipo_impresion, t5.nombre AS tipologia, t6.nombre AS pais, t7.nombre AS ubicacion, t8.estado AS estado, t9.id AS papel_formato, t10.nombre AS paginas_negro_papel, t11.nombre AS paginas_negro_papel_impresion, t12.nombre AS paginas_negro_maquina, t13.precio AS paginas_negro_tarifa_impresion, t14.nombre AS paginas_color_papel, t15.nombre AS paginas_color_papel_impresion, t16.nombre AS paginas_color_maquina, t17.precio AS paginas_color_tarifa_impresion, t18.nombre AS paginas_portada_papel, t19.nombre AS paginas_portada_papel_impresion, t20.nombre AS paginas_portada_maquina, t21.id AS paginas_portada_tarifa_impresion, t22.nombre AS paginas_cubierta_papel, t23.nombre AS paginas_cubierta_papel_impresion, t24.nombre AS paginas_cubierta_maquina, t25.precio AS paginas_cubierta_tarifa_impresion, t26.first_name AS total_confirmado_user, t27.first_name AS aprobado_user, t28.first_name AS pedido_espera_user FROM " . + $this->table . + " t1 LEFT JOIN clientes t2 ON t1.cliente_id = t2.id LEFT JOIN lg_formas_pago t3 ON t1.forma_pago_id = t3.id LEFT JOIN lg_tipos_impresion t4 ON t1.tipo_impresion_id = t4.id LEFT JOIN lg_tipologias_libros t5 ON t1.tipologia_id = t5.id LEFT JOIN lg_paises t6 ON t1.pais_id = t6.id LEFT JOIN lg_ubicaciones_libros t7 ON t1.ubicacion_id = t7.id LEFT JOIN presupuesto_estados t8 ON t1.estado_id = t8.id LEFT JOIN lg_papel_formato t9 ON t1.papel_formato_id = t9.id LEFT JOIN lg_papel_generico t10 ON t1.paginas_negro_papel_id = t10.id LEFT JOIN lg_papel_impresion t11 ON t1.paginas_negro_papel_impresion_id = t11.id LEFT JOIN lg_maquinas t12 ON t1.paginas_negro_maquina_id = t12.id LEFT JOIN lg_maquinas_tarifas_impresion t13 ON t1.paginas_negro_tarifa_impresion_id = t13.id LEFT JOIN lg_papel_generico t14 ON t1.paginas_color_papel_id = t14.id LEFT JOIN lg_papel_impresion t15 ON t1.paginas_color_papel_impresion_id = t15.id LEFT JOIN lg_maquinas t16 ON t1.paginas_color_maquina_id = t16.id LEFT JOIN lg_maquinas_tarifas_impresion t17 ON t1.paginas_color_tarifa_impresion_id = t17.id LEFT JOIN lg_papel_generico t18 ON t1.paginas_portada_papel_id = t18.id LEFT JOIN lg_papel_impresion t19 ON t1.paginas_portada_papel_impresion_id = t19.id LEFT JOIN lg_maquinas t20 ON t1.paginas_portada_maquina_id = t20.id LEFT JOIN lg_maquinas_tarifas_impresion t21 ON t1.paginas_portada_tarifa_impresion_id = t21.id LEFT JOIN lg_papel_generico t22 ON t1.paginas_cubierta_papel_id = t22.id LEFT JOIN lg_papel_impresion t23 ON t1.paginas_cubierta_papel_impresion_id = t23.id LEFT JOIN lg_maquinas t24 ON t1.paginas_cubierta_maquina_id = t24.id LEFT JOIN lg_maquinas_tarifas_impresion t25 ON t1.paginas_cubierta_tarifa_impresion_id = t25.id LEFT JOIN auth_user t26 ON t1.total_confirmado_user_id = t26.id_user LEFT JOIN auth_user t27 ON t1.aprobado_user_id = t27.id_user LEFT JOIN auth_user t28 ON t1.pedido_espera_user_id = t28.id_user"; + if (!is_null($limit) && intval($limit) > 0) { + $sql .= " LIMIT " . intval($limit); + } + + if (!is_null($offset) && intval($offset) > 0) { + $sql .= " OFFSET " . intval($offset); + } + + $query = $this->db->query($sql); + $result = $query->getResultObject(); + return $result; + } + + /** + * Get resource data. + * + * @param string $search + * + * @return \CodeIgniter\Database\BaseBuilder + */ + public function getResource(string $search = "") + { + $builder = $this->db + ->table($this->table . " t1") + ->select( + "t1.id AS id, t1.created_at AS fecha, t2.nombre AS cliente, + CONCAT(t3.first_name, ' ', t3.last_name) AS comercial, t1.titulo AS titulo, t4.nombre AS ubicacion, + t5.nombre AS pais, t1.inc_rei AS inc_rei, t1.paginas AS paginas, t1.tirada AS tirada, + t1.total_pedido AS total_pedido, t6.estado AS estado" + ); + $builder->join("clientes t2", "t1.cliente_id = t2.id", "left"); + $builder->join("auth_user t3", "t1.user_update_id = t3.id_user", "left"); + $builder->join("lg_ubicaciones_libros t4", "t1.ubicacion_id = t4.id", "left"); + $builder->join("lg_paises t5", "t1.pais_id = t5.id", "left"); + $builder->join("presupuesto_estados t6", "t1.estado_id = t6.id", "left"); + + return empty($search) + ? $builder + : $builder + ->groupStart() + ->like("t1.id", $search) + ->orLike("t1.created_at", $search) + ->orLike("t2.nombre", $search) + ->orLike("t3.first_name", $search) + ->orLike("t3.last_name", $search) + ->orLike("t1.titulo", $search) + ->orLike("t4.nombre", $search) + ->orLike("t5.nombre", $search) + ->orLike("t1.inc_rei", $search) + ->orLike("t1.paginas", $search) + ->orLike("t1.tirada", $search) + ->orLike("t1.total_pedido ", $search) + ->orLike("t6.estado", $search) + ->orLike("t1.id", $search) + ->orLike("t1.created_at", $search) + ->orLike("t2.nombre", $search) + ->orLike("t3.first_name", $search) + ->orLike("t3.last_name", $search) + ->orLike("t1.titulo", $search) + ->orLike("t4.nombre", $search) + ->orLike("t5.nombre", $search) + ->orLike("t1.inc_rei", $search) + ->orLike("t1.paginas", $search) + ->orLike("t1.tirada", $search) + ->orLike("t1.total_pedido ", $search) + ->orLike("t6.estado", $search) + ->groupEnd(); + } +} diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_cosidotapablandaFormItems.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_cosidotapablandaFormItems.php new file mode 100644 index 00000000..37696677 --- /dev/null +++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_cosidotapablandaFormItems.php @@ -0,0 +1,1498 @@ +
+
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+ + +
+ +
+
+ + +
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+ + +
+
+ +
+ + +
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+ + +
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+ + +
+ +
+
+ + +
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+ + +
+
+ +
+
+
+
+ + +
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+ + +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+ + +
+ +
+
+ + +
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+ + +
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+ + +
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ +
\ No newline at end of file diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaForm.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaForm.php new file mode 100644 index 00000000..e53be135 --- /dev/null +++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaForm.php @@ -0,0 +1,783 @@ +include("Themes/_commonPartialsBs/select2bs5") ?> +include("Themes/_commonPartialsBs/sweetalert") ?> +extend("Themes/" . config("Basics")->theme["name"] . "/AdminLayout/defaultLayout") ?> +section("content") ?> +
+
+
+
+

+
+
+ +
+ + getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?> + +
+ +
+
+
+
+endSection() ?> + + +section("additionalInlineJs") ?> + + + $('#papelFormatoId').select2({ + theme: 'bootstrap-5', + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + id: 'id', + text: 'id', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function (response) { + + yeniden(response.); + + return { + results: response.menu + }; + }, + + cache: true + } + }); + + $('#clienteId').select2({ + theme: 'bootstrap-5', + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + id: 'id', + text: 'nombre', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function (response) { + + yeniden(response.); + + return { + results: response.menu + }; + }, + + cache: true + } + }); + + $('#paginasCubiertaPapelImpresionId').select2({ + theme: 'bootstrap-5', + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + id: 'id', + text: 'nombre', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function (response) { + + yeniden(response.); + + return { + results: response.menu + }; + }, + + cache: true + } + }); + + $('#tipoImpresionId').select2({ + theme: 'bootstrap-5', + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + id: 'id', + text: 'nombre', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function (response) { + + yeniden(response.); + + return { + results: response.menu + }; + }, + + cache: true + } + }); + + $('#paginasColorTarifaImpresionId').select2({ + theme: 'bootstrap-5', + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + id: 'id', + text: 'precio', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function (response) { + + yeniden(response.); + + return { + results: response.menu + }; + }, + + cache: true + } + }); + + $('#paginasColorPapelId').select2({ + theme: 'bootstrap-5', + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + id: 'id', + text: 'nombre', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function (response) { + + yeniden(response.); + + return { + results: response.menu + }; + }, + + cache: true + } + }); + + $('#paginasNegroTarifaImpresionId').select2({ + theme: 'bootstrap-5', + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + id: 'id', + text: 'precio', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function (response) { + + yeniden(response.); + + return { + results: response.menu + }; + }, + + cache: true + } + }); + + $('#paginasNegroPapelId').select2({ + theme: 'bootstrap-5', + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + id: 'id', + text: 'nombre', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function (response) { + + yeniden(response.); + + return { + results: response.menu + }; + }, + + cache: true + } + }); + + $('#paginasCubiertaTarifaImpresionId').select2({ + theme: 'bootstrap-5', + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + id: 'id', + text: 'precio', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function (response) { + + yeniden(response.); + + return { + results: response.menu + }; + }, + + cache: true + } + }); + + $('#paginasCubiertaPapelId').select2({ + theme: 'bootstrap-5', + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + id: 'id', + text: 'nombre', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function (response) { + + yeniden(response.); + + return { + results: response.menu + }; + }, + + cache: true + } + }); + + $('#paginasPortadaPapelId').select2({ + theme: 'bootstrap-5', + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + id: 'id', + text: 'nombre', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function (response) { + + yeniden(response.); + + return { + results: response.menu + }; + }, + + cache: true + } + }); + + $('#totalConfirmadoUserId').select2({ + theme: 'bootstrap-5', + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + id: 'id_user', + text: 'first_name', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function (response) { + + yeniden(response.); + + return { + results: response.menu + }; + }, + + cache: true + } + }); + + $('#tipologiaId').select2({ + theme: 'bootstrap-5', + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + id: 'id', + text: 'nombre', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function (response) { + + yeniden(response.); + + return { + results: response.menu + }; + }, + + cache: true + } + }); + + $('#aprobadoUserId').select2({ + theme: 'bootstrap-5', + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + id: 'id_user', + text: 'first_name', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function (response) { + + yeniden(response.); + + return { + results: response.menu + }; + }, + + cache: true + } + }); + + $('#pedidoEsperaUserId').select2({ + theme: 'bootstrap-5', + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + id: 'id_user', + text: 'first_name', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function (response) { + + yeniden(response.); + + return { + results: response.menu + }; + }, + + cache: true + } + }); + + $('#paginasNegroMaquinaId').select2({ + theme: 'bootstrap-5', + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + id: 'id', + text: 'nombre', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function (response) { + + yeniden(response.); + + return { + results: response.menu + }; + }, + + cache: true + } + }); + + $('#estadoId').select2({ + theme: 'bootstrap-5', + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + id: 'id', + text: 'estado', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function (response) { + + yeniden(response.); + + return { + results: response.menu + }; + }, + + cache: true + } + }); + + $('#paginasColorMaquinaId').select2({ + theme: 'bootstrap-5', + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + id: 'id', + text: 'nombre', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function (response) { + + yeniden(response.); + + return { + results: response.menu + }; + }, + + cache: true + } + }); + + $('#paginasNegroPapelImpresionId').select2({ + theme: 'bootstrap-5', + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + id: 'id', + text: 'nombre', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function (response) { + + yeniden(response.); + + return { + results: response.menu + }; + }, + + cache: true + } + }); + + $('#paginasCubiertaMaquinaId').select2({ + theme: 'bootstrap-5', + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + id: 'id', + text: 'nombre', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function (response) { + + yeniden(response.); + + return { + results: response.menu + }; + }, + + cache: true + } + }); + + $('#ubicacionId').select2({ + theme: 'bootstrap-5', + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + id: 'id', + text: 'nombre', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function (response) { + + yeniden(response.); + + return { + results: response.menu + }; + }, + + cache: true + } + }); + + $('#paginasPortadaMaquinaId').select2({ + theme: 'bootstrap-5', + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + id: 'id', + text: 'nombre', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function (response) { + + yeniden(response.); + + return { + results: response.menu + }; + }, + + cache: true + } + }); + + $('#paginasPortadaTarifaImpresionId').select2({ + theme: 'bootstrap-5', + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + id: 'id', + text: 'id', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function (response) { + + yeniden(response.); + + return { + results: response.menu + }; + }, + + cache: true + } + }); + + $('#paginasColorPapelImpresionId').select2({ + theme: 'bootstrap-5', + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + id: 'id', + text: 'nombre', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function (response) { + + yeniden(response.); + + return { + results: response.menu + }; + }, + + cache: true + } + }); + + $('#paginasPortadaPapelImpresionId').select2({ + theme: 'bootstrap-5', + allowClear: false, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + id: 'id', + text: 'nombre', + searchTerm: params.term, + : v + }; + }, + delay: 60, + processResults: function (response) { + + yeniden(response.); + + return { + results: response.menu + }; + }, + + cache: true + } + }); + + +endSection() ?> diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaList.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaList.php new file mode 100644 index 00000000..a49171c7 --- /dev/null +++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaList.php @@ -0,0 +1,202 @@ +include('themes/_commonPartialsBs/select2bs5') ?> +include('themes/_commonPartialsBs/datatables') ?> +include('themes/_commonPartialsBs/sweetalert') ?> +include('themes/_commonPartialsBs/_confirm2delete') ?> +extend('themes/backend/vuexy/main/defaultlayout') ?> +section('content'); ?> +
+
+ +
+
+

+ 'btn btn-primary float-end']); ?> +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+ +endSection() ?> + + +section('additionalInlineJs') ?> + + const lastColNr = $('#tableOfPresupuestos').find("tr:first th").length - 1; + const actionBtns = function(data) { + return ` +
+ + +
+ `; + }; + theTable = $('#tableOfPresupuestos').DataTable({ + processing: true, + serverSide: true, + autoWidth: true, + responsive: true, + scrollX: true, + lengthMenu: [ 5, 10, 25, 50, 75, 100, 250, 500, 1000, 2500 ], + pageLength: 50, + lengthChange: true, + "dom": 'lfBrtip', + "buttons": [ + 'copy', 'csv', 'excel', 'print', { + extend: 'pdfHtml5', + orientation: 'landscape', + pageSize: 'A4' + } + ], + stateSave: true, + order: [[1, 'asc']], + language: { + url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/i18n ?>.json" + }, + ajax : $.fn.dataTable.pipeline( { + url: '', + method: 'POST', + headers: {'X-Requested-With': 'XMLHttpRequest'}, + async: true, + }), + columnDefs: [ + { + orderable: false, + searchable: false, + targets: [lastColNr] + } + ], + columns : [ + { 'data': 'id' }, + { 'data': 'fecha' }, + { 'data': 'cliente' }, + { 'data': 'comercial' }, + { 'data': 'titulo' }, + { 'data': 'ubicacion' }, + { 'data': 'pais' }, + { 'data': 'inc_rei' }, + { 'data': 'paginas' }, + { 'data': 'tirada' }, + { 'data': 'total_pedido' }, + { 'data': 'estado' }, + { 'data': actionBtns } + ] +}); + + +theTable.on( 'draw.dt', function () { + + const dateCols = [1]; + const shortDateFormat = ''; + const dateTimeFormat = ''; + + for (let coln of dateCols) { + theTable.column(coln, { page: 'current' }).nodes().each( function (cell, i) { + const datestr = cell.innerHTML; + const dateStrLen = datestr.toString().trim().length; + if (dateStrLen > 0) { + let dateTimeParts= datestr.split(/[- :]/); // regular expression split that creates array with: year, month, day, hour, minutes, seconds values + dateTimeParts[1]--; // monthIndex begins with 0 for January and ends with 11 for December so we need to decrement by one + const d = new Date(...dateTimeParts); // new Date(datestr); + const md = moment(d); + const usingThisFormat = dateStrLen > 11 ? dateTimeFormat : shortDateFormat; + const formattedDateStr = md.format(usingThisFormat); + cell.innerHTML = formattedDateStr; + } + }); + } +}); + + +$(document).on('click', '.btn-edit', function(e) { + window.location.href = `/${$(this).attr('data-id')}/edit`; + }); + +$(document).on('click', '.btn-delete', function(e) { + Swal.fire({ + title: '', + text: '', + icon: 'warning', + showCancelButton: true, + confirmButtonColor: '#3085d6', + confirmButtonText: '', + cancelButtonText: '', + cancelButtonColor: '#d33' + }) + .then((result) => { + const dataId = $(this).data('id'); + const row = $(this).closest('tr'); + if (result.value) { + $.ajax({ + url: `/${dataId}`, + method: 'DELETE', + }).done((data, textStatus, jqXHR) => { + Toast.fire({ + icon: 'success', + title: data.msg ?? jqXHR.statusText, + }); + + theTable.clearPipeline(); + theTable.row($(row)).invalidate().draw(); + }).fail((jqXHR, textStatus, errorThrown) => { + Toast.fire({ + icon: 'error', + title: jqXHR.responseJSON.messages.error, + }); + }) + } + }); +}); + + + + +endSection() ?> + + +section('css') ?> + +endSection() ?> + + +section('additionalExternalJs') ?> + + + + + + + + + + +endSection() ?> + From 10c81d7844e1069f04d1d1e44f70c58eaa0bab3d Mon Sep 17 00:00:00 2001 From: Jaime Jimenez Date: Fri, 8 Sep 2023 12:32:39 +0200 Subject: [PATCH 02/16] Primeros cambios en cosido tapa blanda 2 --- ci4/app/Views/themes/_commonPartialsBs/datatables.php | 2 +- .../presupuestos/cosidotapablanda/viewCosidotapablandaList.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci4/app/Views/themes/_commonPartialsBs/datatables.php b/ci4/app/Views/themes/_commonPartialsBs/datatables.php index 6ee8d97d..db5778d1 100644 --- a/ci4/app/Views/themes/_commonPartialsBs/datatables.php +++ b/ci4/app/Views/themes/_commonPartialsBs/datatables.php @@ -11,7 +11,7 @@ section('additionalExternalJs') ?> - + endSection() ?> diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaList.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaList.php index a49171c7..ec3adfad 100644 --- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaList.php +++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaList.php @@ -19,7 +19,7 @@ - + From 40fd7fcbf186c62f30b6652e87f9cbeb9245daad Mon Sep 17 00:00:00 2001 From: Jaime Jimenez Date: Fri, 8 Sep 2023 12:33:35 +0200 Subject: [PATCH 03/16] Primeros cambios en cosido tapa blanda 3 --- ci4/app/Views/themes/_commonPartialsBs/datatables.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci4/app/Views/themes/_commonPartialsBs/datatables.php b/ci4/app/Views/themes/_commonPartialsBs/datatables.php index db5778d1..6ee8d97d 100644 --- a/ci4/app/Views/themes/_commonPartialsBs/datatables.php +++ b/ci4/app/Views/themes/_commonPartialsBs/datatables.php @@ -11,7 +11,7 @@ section('additionalExternalJs') ?> - + endSection() ?> From eaebcfe7c1d805aa102f6df39f0f98f56446a9fb Mon Sep 17 00:00:00 2001 From: Jaime Jimenez Date: Fri, 8 Sep 2023 12:57:07 +0200 Subject: [PATCH 04/16] Primeros cambios en cosido tapa blanda 4 --- ci4/.env | 2 +- ci4/app/Config/Boot/development.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci4/.env b/ci4/.env index 347f66d5..1502e939 100644 --- a/ci4/.env +++ b/ci4/.env @@ -22,7 +22,7 @@ CI_ENVIRONMENT = development # APP #-------------------------------------------------------------------- -app.baseURL = 'https://sk-imn.imnavajas.es' +app.baseURL = 'https://sk-jjo.imnavajas.es' #app.baseURL = 'https://sk-imn.imnavajas.es' # app.baseURL = "http://safekat.test/" # app.forceGlobalSecureRequests = false diff --git a/ci4/app/Config/Boot/development.php b/ci4/app/Config/Boot/development.php index 05a86125..ff02768c 100644 --- a/ci4/app/Config/Boot/development.php +++ b/ci4/app/Config/Boot/development.php @@ -29,4 +29,4 @@ defined('SHOW_DEBUG_BACKTRACE') || define('SHOW_DEBUG_BACKTRACE', true); | the system. This will control whether Kint is loaded, and a few other | items. It can always be used within your own application too. */ -defined('CI_DEBUG') || define('CI_DEBUG', true); +defined('CI_DEBUG') || define('CI_DEBUG', false); From 5d251a1b2cdcbcb9c8a361a507f3b79fc207c7a0 Mon Sep 17 00:00:00 2001 From: imnavajas Date: Sat, 9 Sep 2023 13:06:01 +0200 Subject: [PATCH 05/16] Corregidos nombres BBDD, entidad, modelo y vistas --- .../Presupuestos/Cosidotapablanda.php | 4 +- .../Presupuestos/PresupuestoEntity.php | 95 ++-- ci4/app/Language/en/Presupuestos.php | 2 +- ci4/app/Language/es/Presupuestos.php | 2 +- .../Models/Presupuestos/PresupuestoModel.php | 234 ++++---- .../_cosidotapablandaFormItems.php | 515 +++++++++--------- .../viewCosidotapablandaForm.php | 46 +- .../viewCosidotapablandaList.php | 2 - 8 files changed, 406 insertions(+), 494 deletions(-) diff --git a/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php b/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php index f2304cee..10970090 100644 --- a/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php +++ b/ci4/app/Controllers/Presupuestos/Cosidotapablanda.php @@ -260,8 +260,8 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController if ($this->request->getPost('envios_recoge_cliente') == null) { $sanitizedData['envios_recoge_cliente'] = false; } - if ($this->request->getPost('fecha_entrega_real_warning') == null) { - $sanitizedData['fecha_entrega_real_warning'] = false; + if ($this->request->getPost('fecha_entrega_real_aviso') == null) { + $sanitizedData['fecha_entrega_real_aviso'] = false; } // JJO diff --git a/ci4/app/Entities/Presupuestos/PresupuestoEntity.php b/ci4/app/Entities/Presupuestos/PresupuestoEntity.php index 84a6ea09..4aeaca6a 100644 --- a/ci4/app/Entities/Presupuestos/PresupuestoEntity.php +++ b/ci4/app/Entities/Presupuestos/PresupuestoEntity.php @@ -7,18 +7,15 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity { protected $attributes = [ "id" => null, - "pedido_libro_conjunto_id" => null, "version" => 0, "cliente_id" => null, "tarifa_cliente_id" => null, "user_created_id" => 1, "user_update_id" => null, "forma_pago_id" => null, - "factura_id" => null, "tipo_impresion_id" => null, "tipologia_id" => null, "pais_id" => 1, - "ubicacion_id" => 1, "serie_id" => null, "catalogo_id" => null, "estado_id" => 1, @@ -43,10 +40,10 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity "solapas" => false, "solapas_ancho" => 0.0, "cosido" => false, - "cubiertas" => false, - "cubiertas_ancho" => 0.0, + "sobrecubiertas" => false, + "sobrecubiertas_ancho" => 0.0, "merma" => null, - "merma_portada" => 6.0, + "merma_cubierta" => 6.0, "imagenes_bn_interior" => false, "comentarios" => null, "comentarios_safekat" => null, @@ -93,24 +90,6 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity "paginas_color_check_papel_total" => true, "paginas_color_check_impresion_total" => true, "paginas_color_posicion" => null, - "paginas_portada" => null, - "paginas_portada_papel_id" => null, - "paginas_portada_papel_impresion_id" => null, - "paginas_portada_forma_id" => null, - "paginas_portada_gramaje" => null, - "paginas_portada_pliegos_libro" => null, - "paginas_portada_pliegos_pedido" => null, - "paginas_portada_pliegos_precio" => null, - "paginas_portada_libro" => null, - "paginas_portada_pedido" => null, - "paginas_portada_mano" => null, - "paginas_portada_peso" => null, - "paginas_portada_maquina_id" => null, - "paginas_portada_tarifa_impresion_id" => null, - "paginas_portada_click" => null, - "paginas_portada_precio" => null, - "paginas_portada_check_papel_total" => true, - "paginas_portada_check_impresion_total" => true, "paginas_cubierta" => null, "paginas_cubierta_papel_id" => null, "paginas_cubierta_papel_impresion_id" => null, @@ -129,6 +108,24 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity "paginas_cubierta_precio" => null, "paginas_cubierta_check_papel_total" => true, "paginas_cubierta_check_impresion_total" => true, + "paginas_sobrecubierta" => null, + "paginas_sobrecubierta_papel_id" => null, + "paginas_sobrecubierta_papel_impresion_id" => null, + "paginas_sobrecubierta_forma_id" => null, + "paginas_sobrecubierta_gramaje" => null, + "paginas_sobrecubierta_pliegos_libro" => null, + "paginas_sobrecubierta_pliegos_pedido" => null, + "paginas_sobrecubierta_pliegos_precio" => null, + "paginas_sobrecubierta_libro" => null, + "paginas_sobrecubierta_pedido" => null, + "paginas_sobrecubierta_mano" => null, + "paginas_sobrecubierta_peso" => null, + "paginas_sobrecubierta_maquina_id" => null, + "paginas_sobrecubierta_tarifa_impresion_id" => null, + "paginas_sobrecubierta_click" => null, + "paginas_sobrecubierta_precio" => null, + "paginas_sobrecubierta_check_papel_total" => true, + "paginas_sobrecubierta_check_impresion_total" => true, "lomo" => null, "isDig" => false, "total_presupuesto" => null, @@ -160,9 +157,8 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity "aprobado_at" => null, "aprobado_json_data" => null, "comparador_json_data" => null, - "ws_externo_json_data" => null, "fecha_entrega_real_at" => null, - "fecha_entrega_real_warning" => false, + "fecha_entrega_real_aviso" => false, "fecha_impresion_at" => null, "fecha_encuardenado_at" => null, "fecha_externo_at" => null, @@ -176,18 +172,15 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity "updated_at" => null, ]; protected $casts = [ - "pedido_libro_conjunto_id" => "?int", "version" => "int", "cliente_id" => "int", "tarifa_cliente_id" => "?int", "user_created_id" => "int", "user_update_id" => "?int", "forma_pago_id" => "?int", - "factura_id" => "?int", "tipo_impresion_id" => "?int", "tipologia_id" => "?int", "pais_id" => "int", - "ubicacion_id" => "int", "serie_id" => "?int", "catalogo_id" => "?int", "estado_id" => "int", @@ -205,10 +198,10 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity "solapas" => "boolean", "solapas_ancho" => "float", "cosido" => "boolean", - "cubiertas" => "boolean", - "cubiertas_ancho" => "float", + "sobrecubiertas" => "boolean", + "sobrecubiertas_ancho" => "float", "merma" => "float", - "merma_portada" => "float", + "merma_cubierta" => "float", "imagenes_bn_interior" => "boolean", "en_produccion" => "boolean", "en_espera" => "boolean", @@ -250,23 +243,6 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity "paginas_color_precio" => "?float", "paginas_color_check_papel_total" => "boolean", "paginas_color_check_impresion_total" => "boolean", - "paginas_portada_papel_id" => "?int", - "paginas_portada_papel_impresion_id" => "?int", - "paginas_portada_forma_id" => "?int", - "paginas_portada_gramaje" => "?float", - "paginas_portada_pliegos_libro" => "?float", - "paginas_portada_pliegos_pedido" => "?float", - "paginas_portada_pliegos_precio" => "?float", - "paginas_portada_libro" => "?float", - "paginas_portada_pedido" => "float", - "paginas_portada_mano" => "?float", - "paginas_portada_peso" => "?float", - "paginas_portada_maquina_id" => "?int", - "paginas_portada_tarifa_impresion_id" => "?int", - "paginas_portada_click" => "?float", - "paginas_portada_precio" => "?float", - "paginas_portada_check_papel_total" => "boolean", - "paginas_portada_check_impresion_total" => "boolean", "paginas_cubierta_papel_id" => "?int", "paginas_cubierta_papel_impresion_id" => "?int", "paginas_cubierta_forma_id" => "?int", @@ -275,7 +251,7 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity "paginas_cubierta_pliegos_pedido" => "?float", "paginas_cubierta_pliegos_precio" => "?float", "paginas_cubierta_libro" => "?float", - "paginas_cubierta_pedido" => "?float", + "paginas_cubierta_pedido" => "float", "paginas_cubierta_mano" => "?float", "paginas_cubierta_peso" => "?float", "paginas_cubierta_maquina_id" => "?int", @@ -284,6 +260,23 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity "paginas_cubierta_precio" => "?float", "paginas_cubierta_check_papel_total" => "boolean", "paginas_cubierta_check_impresion_total" => "boolean", + "paginas_sobrecubierta_papel_id" => "?int", + "paginas_sobrecubierta_papel_impresion_id" => "?int", + "paginas_sobrecubierta_forma_id" => "?int", + "paginas_sobrecubierta_gramaje" => "?float", + "paginas_sobrecubierta_pliegos_libro" => "?float", + "paginas_sobrecubierta_pliegos_pedido" => "?float", + "paginas_sobrecubierta_pliegos_precio" => "?float", + "paginas_sobrecubierta_libro" => "?float", + "paginas_sobrecubierta_pedido" => "?float", + "paginas_sobrecubierta_mano" => "?float", + "paginas_sobrecubierta_peso" => "?float", + "paginas_sobrecubierta_maquina_id" => "?int", + "paginas_sobrecubierta_tarifa_impresion_id" => "?int", + "paginas_sobrecubierta_click" => "?float", + "paginas_sobrecubierta_precio" => "?float", + "paginas_sobrecubierta_check_papel_total" => "boolean", + "paginas_sobrecubierta_check_impresion_total" => "boolean", "lomo" => "?int", "isDig" => "boolean", "total_presupuesto" => "?float", @@ -310,7 +303,7 @@ class PresupuestoEntity extends \CodeIgniter\Entity\Entity "total_confirmado" => "?float", "total_confirmado_user_id" => "?int", "aprobado_user_id" => "?int", - "fecha_entrega_real_warning" => "?boolean", + "fecha_entrega_real_aviso" => "?boolean", "pedido_espera_user_id" => "?int", "is_deleted" => "int", ]; diff --git a/ci4/app/Language/en/Presupuestos.php b/ci4/app/Language/en/Presupuestos.php index eb0b401d..10de2d3e 100644 --- a/ci4/app/Language/en/Presupuestos.php +++ b/ci4/app/Language/en/Presupuestos.php @@ -699,7 +699,7 @@ return [ ], - 'merma_portada' => [ + 'merma_cubierta' => [ 'decimal' => 'The {field} field must contain a decimal number.', 'required' => 'The {field} field is required.', diff --git a/ci4/app/Language/es/Presupuestos.php b/ci4/app/Language/es/Presupuestos.php index eb0b401d..10de2d3e 100644 --- a/ci4/app/Language/es/Presupuestos.php +++ b/ci4/app/Language/es/Presupuestos.php @@ -699,7 +699,7 @@ return [ ], - 'merma_portada' => [ + 'merma_cubierta' => [ 'decimal' => 'The {field} field must contain a decimal number.', 'required' => 'The {field} field is required.', diff --git a/ci4/app/Models/Presupuestos/PresupuestoModel.php b/ci4/app/Models/Presupuestos/PresupuestoModel.php index dcaf960e..90908e38 100644 --- a/ci4/app/Models/Presupuestos/PresupuestoModel.php +++ b/ci4/app/Models/Presupuestos/PresupuestoModel.php @@ -28,18 +28,15 @@ class PresupuestoModel extends \App\Models\GoBaseModel ]; protected $allowedFields = [ - "pedido_libro_conjunto_id", "version", "cliente_id", "tarifa_cliente_id", "user_created_id", "user_update_id", "forma_pago_id", - "factura_id", "tipo_impresion_id", "tipologia_id", "pais_id", - "ubicacion_id", "serie_id", "catalogo_id", "estado_id", @@ -64,8 +61,8 @@ class PresupuestoModel extends \App\Models\GoBaseModel "solapas", "solapas_ancho", "cosido", - "cubiertas", - "cubiertas_ancho", + "sobrecubiertas", + "sobrecubiertas_ancho", "merma", "merma_portada", "imagenes_bn_interior", @@ -114,24 +111,6 @@ class PresupuestoModel extends \App\Models\GoBaseModel "paginas_color_check_papel_total", "paginas_color_check_impresion_total", "paginas_color_posicion", - "paginas_portada", - "paginas_portada_papel_id", - "paginas_portada_papel_impresion_id", - "paginas_portada_forma_id", - "paginas_portada_gramaje", - "paginas_portada_pliegos_libro", - "paginas_portada_pliegos_pedido", - "paginas_portada_pliegos_precio", - "paginas_portada_libro", - "paginas_portada_pedido", - "paginas_portada_mano", - "paginas_portada_peso", - "paginas_portada_maquina_id", - "paginas_portada_tarifa_impresion_id", - "paginas_portada_click", - "paginas_portada_precio", - "paginas_portada_check_papel_total", - "paginas_portada_check_impresion_total", "paginas_cubierta", "paginas_cubierta_papel_id", "paginas_cubierta_papel_impresion_id", @@ -150,6 +129,24 @@ class PresupuestoModel extends \App\Models\GoBaseModel "paginas_cubierta_precio", "paginas_cubierta_check_papel_total", "paginas_cubierta_check_impresion_total", + "paginas_sobrecubierta", + "paginas_sobrecubierta_papel_id", + "paginas_sobrecubierta_papel_impresion_id", + "paginas_sobrecubierta_forma_id", + "paginas_sobrecubierta_gramaje", + "paginas_sobrecubierta_pliegos_libro", + "paginas_sobrecubierta_pliegos_pedido", + "paginas_sobrecubierta_pliegos_precio", + "paginas_sobrecubierta_libro", + "paginas_sobrecubierta_pedido", + "paginas_sobrecubierta_mano", + "paginas_sobrecubierta_peso", + "paginas_sobrecubierta_maquina_id", + "paginas_sobrecubierta_tarifa_impresion_id", + "paginas_sobrecubierta_click", + "paginas_sobrecubierta_precio", + "paginas_sobrecubierta_check_papel_total", + "paginas_sobrecubierta_check_impresion_total", "lomo", "isDig", "total_presupuesto", @@ -181,9 +178,8 @@ class PresupuestoModel extends \App\Models\GoBaseModel "aprobado_at", "aprobado_json_data", "comparador_json_data", - "ws_externo_json_data", "fecha_entrega_real_at", - "fecha_entrega_real_warning", + "fecha_entrega_real_aviso", "fecha_impresion_at", "fecha_encuardenado_at", "fecha_externo_at", @@ -253,18 +249,14 @@ class PresupuestoModel extends \App\Models\GoBaseModel "label" => "Presupuestos.comparadorJsonData", "rules" => "trim|max_length[16313]", ], - "cubiertas_ancho" => [ - "label" => "Presupuestos.cubiertasAncho", + "sobrecubiertas_ancho" => [ + "label" => "Presupuestos.sobrecubiertasAncho", "rules" => "required|decimal", ], "descuento" => [ "label" => "Presupuestos.descuento", "rules" => "required|decimal", ], - "factura_id" => [ - "label" => "Presupuestos.facturaId", - "rules" => "integer|permit_empty", - ], "fecha_encuardenado_at" => [ "label" => "Presupuestos.fechaEncuardenadoAt", "rules" => "valid_date|permit_empty", @@ -385,51 +377,51 @@ class PresupuestoModel extends \App\Models\GoBaseModel "label" => "Presupuestos.paginasColorPrecio", "rules" => "decimal|permit_empty", ], - "paginas_cubierta" => [ + "paginas_sobrecubierta" => [ "label" => "Presupuestos.paginasCubierta", "rules" => "required|in_list[4x0,4x4]", ], - "paginas_cubierta_click" => [ + "paginas_sobrecubierta_click" => [ "label" => "Presupuestos.paginasCubiertaClick", "rules" => "decimal|permit_empty", ], - "paginas_cubierta_forma_id" => [ + "paginas_sobrecubierta_forma_id" => [ "label" => "Presupuestos.paginasCubiertaFormaId", "rules" => "integer|permit_empty", ], - "paginas_cubierta_gramaje" => [ + "paginas_sobrecubierta_gramaje" => [ "label" => "Presupuestos.paginasCubiertaGramaje", "rules" => "decimal|permit_empty", ], - "paginas_cubierta_libro" => [ + "paginas_sobrecubierta_libro" => [ "label" => "Presupuestos.paginasCubiertaLibro", "rules" => "decimal|permit_empty", ], - "paginas_cubierta_mano" => [ + "paginas_sobrecubierta_mano" => [ "label" => "Presupuestos.paginasCubiertaMano", "rules" => "decimal|permit_empty", ], - "paginas_cubierta_pedido" => [ + "paginas_sobrecubierta_pedido" => [ "label" => "Presupuestos.paginasCubiertaPedido", "rules" => "decimal|permit_empty", ], - "paginas_cubierta_peso" => [ + "paginas_sobrecubierta_peso" => [ "label" => "Presupuestos.paginasCubiertaPeso", "rules" => "decimal|permit_empty", ], - "paginas_cubierta_pliegos_libro" => [ + "paginas_sobrecubierta_pliegos_libro" => [ "label" => "Presupuestos.paginasCubiertaPliegosLibro", "rules" => "decimal|permit_empty", ], - "paginas_cubierta_pliegos_pedido" => [ + "paginas_sobrecubierta_pliegos_pedido" => [ "label" => "Presupuestos.paginasCubiertaPliegosPedido", "rules" => "decimal|permit_empty", ], - "paginas_cubierta_pliegos_precio" => [ + "paginas_sobrecubierta_pliegos_precio" => [ "label" => "Presupuestos.paginasCubiertaPliegosPrecio", "rules" => "decimal|permit_empty", ], - "paginas_cubierta_precio" => [ + "paginas_sobrecubierta_precio" => [ "label" => "Presupuestos.paginasCubiertaPrecio", "rules" => "decimal|permit_empty", ], @@ -481,51 +473,51 @@ class PresupuestoModel extends \App\Models\GoBaseModel "label" => "Presupuestos.paginasNegroPrecio", "rules" => "decimal|permit_empty", ], - "paginas_portada" => [ + "paginas_cubierta" => [ "label" => "Presupuestos.paginasPortada", "rules" => "required|in_list[4x0,4x4]", ], - "paginas_portada_click" => [ + "paginas_cubierta_click" => [ "label" => "Presupuestos.paginasPortadaClick", "rules" => "decimal|permit_empty", ], - "paginas_portada_forma_id" => [ + "paginas_cubierta_forma_id" => [ "label" => "Presupuestos.paginasPortadaFormaId", "rules" => "integer|permit_empty", ], - "paginas_portada_gramaje" => [ + "paginas_cubierta_gramaje" => [ "label" => "Presupuestos.paginasPortadaGramaje", "rules" => "decimal|permit_empty", ], - "paginas_portada_libro" => [ + "paginas_cubierta_libro" => [ "label" => "Presupuestos.paginasPortadaLibro", "rules" => "decimal|permit_empty", ], - "paginas_portada_mano" => [ + "paginas_cubierta_mano" => [ "label" => "Presupuestos.paginasPortadaMano", "rules" => "decimal|permit_empty", ], - "paginas_portada_pedido" => [ + "paginas_cubierta_pedido" => [ "label" => "Presupuestos.paginasPortadaPedido", "rules" => "required|decimal", ], - "paginas_portada_peso" => [ + "paginas_cubierta_peso" => [ "label" => "Presupuestos.paginasPortadaPeso", "rules" => "decimal|permit_empty", ], - "paginas_portada_pliegos_libro" => [ + "paginas_cubierta_pliegos_libro" => [ "label" => "Presupuestos.paginasPortadaPliegosLibro", "rules" => "decimal|permit_empty", ], - "paginas_portada_pliegos_pedido" => [ + "paginas_cubierta_pliegos_pedido" => [ "label" => "Presupuestos.paginasPortadaPliegosPedido", "rules" => "decimal|permit_empty", ], - "paginas_portada_pliegos_precio" => [ + "paginas_cubierta_pliegos_precio" => [ "label" => "Presupuestos.paginasPortadaPliegosPrecio", "rules" => "decimal|permit_empty", ], - "paginas_portada_precio" => [ + "paginas_cubierta_precio" => [ "label" => "Presupuestos.paginasPortadaPrecio", "rules" => "decimal|permit_empty", ], @@ -541,10 +533,6 @@ class PresupuestoModel extends \App\Models\GoBaseModel "label" => "Presupuestos.pedidoEsperaFecha", "rules" => "valid_date|permit_empty", ], - "pedido_libro_conjunto_id" => [ - "label" => "Presupuestos.pedidoLibroConjuntoId", - "rules" => "integer|permit_empty", - ], "referencia_cliente" => [ "label" => "Presupuestos.referenciaCliente", "rules" => "trim|required|max_length[100]", @@ -653,10 +641,6 @@ class PresupuestoModel extends \App\Models\GoBaseModel "label" => "Presupuestos.version", "rules" => "required|integer", ], - "ws_externo_json_data" => [ - "label" => "Presupuestos.wsExternoJsonData", - "rules" => "trim|max_length[16313]", - ], ]; protected $validationMessages = [ @@ -701,17 +685,14 @@ class PresupuestoModel extends \App\Models\GoBaseModel "comparador_json_data" => [ "max_length" => "Presupuestos.validation.comparador_json_data.max_length", ], - "cubiertas_ancho" => [ - "decimal" => "Presupuestos.validation.cubiertas_ancho.decimal", - "required" => "Presupuestos.validation.cubiertas_ancho.required", + "sobrecubiertas_ancho" => [ + "decimal" => "Presupuestos.validation.sobrecubiertas_ancho.decimal", + "required" => "Presupuestos.validation.sobrecubiertas_ancho.required", ], "descuento" => [ "decimal" => "Presupuestos.validation.descuento.decimal", "required" => "Presupuestos.validation.descuento.required", ], - "factura_id" => [ - "integer" => "Presupuestos.validation.factura_id.integer", - ], "fecha_encuardenado_at" => [ "valid_date" => "Presupuestos.validation.fecha_encuardenado_at.valid_date", ], @@ -808,42 +789,42 @@ class PresupuestoModel extends \App\Models\GoBaseModel "paginas_color_precio" => [ "decimal" => "Presupuestos.validation.paginas_color_precio.decimal", ], - "paginas_cubierta" => [ - "in_list" => "Presupuestos.validation.paginas_cubierta.in_list", - "required" => "Presupuestos.validation.paginas_cubierta.required", + "paginas_sobrecubierta" => [ + "in_list" => "Presupuestos.validation.paginas_sobrecubierta.in_list", + "required" => "Presupuestos.validation.paginas_sobrecubierta.required", ], - "paginas_cubierta_click" => [ - "decimal" => "Presupuestos.validation.paginas_cubierta_click.decimal", + "paginas_sobrecubierta_click" => [ + "decimal" => "Presupuestos.validation.paginas_sobrecubierta_click.decimal", ], - "paginas_cubierta_forma_id" => [ - "integer" => "Presupuestos.validation.paginas_cubierta_forma_id.integer", + "paginas_sobrecubierta_forma_id" => [ + "integer" => "Presupuestos.validation.paginas_sobrecubierta_forma_id.integer", ], - "paginas_cubierta_gramaje" => [ - "decimal" => "Presupuestos.validation.paginas_cubierta_gramaje.decimal", + "paginas_sobrecubierta_gramaje" => [ + "decimal" => "Presupuestos.validation.paginas_sobrecubierta_gramaje.decimal", ], - "paginas_cubierta_libro" => [ - "decimal" => "Presupuestos.validation.paginas_cubierta_libro.decimal", + "paginas_sobrecubierta_libro" => [ + "decimal" => "Presupuestos.validation.paginas_sobrecubierta_libro.decimal", ], - "paginas_cubierta_mano" => [ - "decimal" => "Presupuestos.validation.paginas_cubierta_mano.decimal", + "paginas_sobrecubierta_mano" => [ + "decimal" => "Presupuestos.validation.paginas_sobrecubierta_mano.decimal", ], - "paginas_cubierta_pedido" => [ - "decimal" => "Presupuestos.validation.paginas_cubierta_pedido.decimal", + "paginas_sobrecubierta_pedido" => [ + "decimal" => "Presupuestos.validation.paginas_sobrecubierta_pedido.decimal", ], - "paginas_cubierta_peso" => [ - "decimal" => "Presupuestos.validation.paginas_cubierta_peso.decimal", + "paginas_sobrecubierta_peso" => [ + "decimal" => "Presupuestos.validation.paginas_sobrecubierta_peso.decimal", ], - "paginas_cubierta_pliegos_libro" => [ - "decimal" => "Presupuestos.validation.paginas_cubierta_pliegos_libro.decimal", + "paginas_sobrecubierta_pliegos_libro" => [ + "decimal" => "Presupuestos.validation.paginas_sobrecubierta_pliegos_libro.decimal", ], - "paginas_cubierta_pliegos_pedido" => [ - "decimal" => "Presupuestos.validation.paginas_cubierta_pliegos_pedido.decimal", + "paginas_sobrecubierta_pliegos_pedido" => [ + "decimal" => "Presupuestos.validation.paginas_sobrecubierta_pliegos_pedido.decimal", ], - "paginas_cubierta_pliegos_precio" => [ - "decimal" => "Presupuestos.validation.paginas_cubierta_pliegos_precio.decimal", + "paginas_sobrecubierta_pliegos_precio" => [ + "decimal" => "Presupuestos.validation.paginas_sobrecubierta_pliegos_precio.decimal", ], - "paginas_cubierta_precio" => [ - "decimal" => "Presupuestos.validation.paginas_cubierta_precio.decimal", + "paginas_sobrecubierta_precio" => [ + "decimal" => "Presupuestos.validation.paginas_sobrecubierta_precio.decimal", ], "paginas_negro" => [ "integer" => "Presupuestos.validation.paginas_negro.integer", @@ -881,43 +862,43 @@ class PresupuestoModel extends \App\Models\GoBaseModel "paginas_negro_precio" => [ "decimal" => "Presupuestos.validation.paginas_negro_precio.decimal", ], - "paginas_portada" => [ - "in_list" => "Presupuestos.validation.paginas_portada.in_list", - "required" => "Presupuestos.validation.paginas_portada.required", + "paginas_cubierta" => [ + "in_list" => "Presupuestos.validation.paginas_cubierta.in_list", + "required" => "Presupuestos.validation.paginas_cubierta.required", ], - "paginas_portada_click" => [ - "decimal" => "Presupuestos.validation.paginas_portada_click.decimal", + "paginas_cubierta_click" => [ + "decimal" => "Presupuestos.validation.paginas_cubierta_click.decimal", ], - "paginas_portada_forma_id" => [ - "integer" => "Presupuestos.validation.paginas_portada_forma_id.integer", + "paginas_cubierta_forma_id" => [ + "integer" => "Presupuestos.validation.paginas_cubierta_forma_id.integer", ], - "paginas_portada_gramaje" => [ - "decimal" => "Presupuestos.validation.paginas_portada_gramaje.decimal", + "paginas_cubierta_gramaje" => [ + "decimal" => "Presupuestos.validation.paginas_cubierta_gramaje.decimal", ], - "paginas_portada_libro" => [ - "decimal" => "Presupuestos.validation.paginas_portada_libro.decimal", + "paginas_cubierta_libro" => [ + "decimal" => "Presupuestos.validation.paginas_cubierta_libro.decimal", ], - "paginas_portada_mano" => [ - "decimal" => "Presupuestos.validation.paginas_portada_mano.decimal", + "paginas_cubierta_mano" => [ + "decimal" => "Presupuestos.validation.paginas_cubierta_mano.decimal", ], - "paginas_portada_pedido" => [ - "decimal" => "Presupuestos.validation.paginas_portada_pedido.decimal", - "required" => "Presupuestos.validation.paginas_portada_pedido.required", + "paginas_cubierta_pedido" => [ + "decimal" => "Presupuestos.validation.paginas_cubierta_pedido.decimal", + "required" => "Presupuestos.validation.paginas_cubierta_pedido.required", ], - "paginas_portada_peso" => [ - "decimal" => "Presupuestos.validation.paginas_portada_peso.decimal", + "paginas_cubierta_peso" => [ + "decimal" => "Presupuestos.validation.paginas_cubierta_peso.decimal", ], - "paginas_portada_pliegos_libro" => [ - "decimal" => "Presupuestos.validation.paginas_portada_pliegos_libro.decimal", + "paginas_cubierta_pliegos_libro" => [ + "decimal" => "Presupuestos.validation.paginas_cubierta_pliegos_libro.decimal", ], - "paginas_portada_pliegos_pedido" => [ - "decimal" => "Presupuestos.validation.paginas_portada_pliegos_pedido.decimal", + "paginas_cubierta_pliegos_pedido" => [ + "decimal" => "Presupuestos.validation.paginas_cubierta_pliegos_pedido.decimal", ], - "paginas_portada_pliegos_precio" => [ - "decimal" => "Presupuestos.validation.paginas_portada_pliegos_precio.decimal", + "paginas_cubierta_pliegos_precio" => [ + "decimal" => "Presupuestos.validation.paginas_cubierta_pliegos_precio.decimal", ], - "paginas_portada_precio" => [ - "decimal" => "Presupuestos.validation.paginas_portada_precio.decimal", + "paginas_cubierta_precio" => [ + "decimal" => "Presupuestos.validation.paginas_cubierta_precio.decimal", ], "papel_formato_alto" => [ "decimal" => "Presupuestos.validation.papel_formato_alto.decimal", @@ -928,9 +909,6 @@ class PresupuestoModel extends \App\Models\GoBaseModel "pedido_espera_fecha" => [ "valid_date" => "Presupuestos.validation.pedido_espera_fecha.valid_date", ], - "pedido_libro_conjunto_id" => [ - "integer" => "Presupuestos.validation.pedido_libro_conjunto_id.integer", - ], "referencia_cliente" => [ "max_length" => "Presupuestos.validation.referencia_cliente.max_length", "required" => "Presupuestos.validation.referencia_cliente.required", @@ -1018,18 +996,15 @@ class PresupuestoModel extends \App\Models\GoBaseModel "integer" => "Presupuestos.validation.version.integer", "required" => "Presupuestos.validation.version.required", ], - "ws_externo_json_data" => [ - "max_length" => "Presupuestos.validation.ws_externo_json_data.max_length", - ], ]; public function findAllWithAllRelations(string $selcols = "*", int $limit = null, int $offset = 0) { $sql = "SELECT t1." . $selcols . - ", t2.nombre AS cliente, t3.nombre AS forma_pago, t4.nombre AS tipo_impresion, t5.nombre AS tipologia, t6.nombre AS pais, t7.nombre AS ubicacion, t8.estado AS estado, t9.id AS papel_formato, t10.nombre AS paginas_negro_papel, t11.nombre AS paginas_negro_papel_impresion, t12.nombre AS paginas_negro_maquina, t13.precio AS paginas_negro_tarifa_impresion, t14.nombre AS paginas_color_papel, t15.nombre AS paginas_color_papel_impresion, t16.nombre AS paginas_color_maquina, t17.precio AS paginas_color_tarifa_impresion, t18.nombre AS paginas_portada_papel, t19.nombre AS paginas_portada_papel_impresion, t20.nombre AS paginas_portada_maquina, t21.id AS paginas_portada_tarifa_impresion, t22.nombre AS paginas_cubierta_papel, t23.nombre AS paginas_cubierta_papel_impresion, t24.nombre AS paginas_cubierta_maquina, t25.precio AS paginas_cubierta_tarifa_impresion, t26.first_name AS total_confirmado_user, t27.first_name AS aprobado_user, t28.first_name AS pedido_espera_user FROM " . + ", t2.nombre AS cliente, t3.nombre AS forma_pago, t4.nombre AS tipo_impresion, t5.nombre AS tipologia, t6.nombre AS pais, t8.estado AS estado, t9.id AS papel_formato, t10.nombre AS paginas_negro_papel, t11.nombre AS paginas_negro_papel_impresion, t12.nombre AS paginas_negro_maquina, t13.precio AS paginas_negro_tarifa_impresion, t14.nombre AS paginas_color_papel, t15.nombre AS paginas_color_papel_impresion, t16.nombre AS paginas_color_maquina, t17.precio AS paginas_color_tarifa_impresion, t18.nombre AS paginas_cubierta_papel, t19.nombre AS paginas_cubierta_papel_impresion, t20.nombre AS paginas_cubierta_maquina, t21.id AS paginas_cubierta_tarifa_impresion, t22.nombre AS paginas_sobrecubierta_papel, t23.nombre AS paginas_sobrecubierta_papel_impresion, t24.nombre AS paginas_sobrecubierta_maquina, t25.precio AS paginas_sobrecubierta_tarifa_impresion, t26.first_name AS total_confirmado_user, t27.first_name AS aprobado_user, t28.first_name AS pedido_espera_user FROM " . $this->table . - " t1 LEFT JOIN clientes t2 ON t1.cliente_id = t2.id LEFT JOIN lg_formas_pago t3 ON t1.forma_pago_id = t3.id LEFT JOIN lg_tipos_impresion t4 ON t1.tipo_impresion_id = t4.id LEFT JOIN lg_tipologias_libros t5 ON t1.tipologia_id = t5.id LEFT JOIN lg_paises t6 ON t1.pais_id = t6.id LEFT JOIN lg_ubicaciones_libros t7 ON t1.ubicacion_id = t7.id LEFT JOIN presupuesto_estados t8 ON t1.estado_id = t8.id LEFT JOIN lg_papel_formato t9 ON t1.papel_formato_id = t9.id LEFT JOIN lg_papel_generico t10 ON t1.paginas_negro_papel_id = t10.id LEFT JOIN lg_papel_impresion t11 ON t1.paginas_negro_papel_impresion_id = t11.id LEFT JOIN lg_maquinas t12 ON t1.paginas_negro_maquina_id = t12.id LEFT JOIN lg_maquinas_tarifas_impresion t13 ON t1.paginas_negro_tarifa_impresion_id = t13.id LEFT JOIN lg_papel_generico t14 ON t1.paginas_color_papel_id = t14.id LEFT JOIN lg_papel_impresion t15 ON t1.paginas_color_papel_impresion_id = t15.id LEFT JOIN lg_maquinas t16 ON t1.paginas_color_maquina_id = t16.id LEFT JOIN lg_maquinas_tarifas_impresion t17 ON t1.paginas_color_tarifa_impresion_id = t17.id LEFT JOIN lg_papel_generico t18 ON t1.paginas_portada_papel_id = t18.id LEFT JOIN lg_papel_impresion t19 ON t1.paginas_portada_papel_impresion_id = t19.id LEFT JOIN lg_maquinas t20 ON t1.paginas_portada_maquina_id = t20.id LEFT JOIN lg_maquinas_tarifas_impresion t21 ON t1.paginas_portada_tarifa_impresion_id = t21.id LEFT JOIN lg_papel_generico t22 ON t1.paginas_cubierta_papel_id = t22.id LEFT JOIN lg_papel_impresion t23 ON t1.paginas_cubierta_papel_impresion_id = t23.id LEFT JOIN lg_maquinas t24 ON t1.paginas_cubierta_maquina_id = t24.id LEFT JOIN lg_maquinas_tarifas_impresion t25 ON t1.paginas_cubierta_tarifa_impresion_id = t25.id LEFT JOIN auth_user t26 ON t1.total_confirmado_user_id = t26.id_user LEFT JOIN auth_user t27 ON t1.aprobado_user_id = t27.id_user LEFT JOIN auth_user t28 ON t1.pedido_espera_user_id = t28.id_user"; + " t1 LEFT JOIN clientes t2 ON t1.cliente_id = t2.id LEFT JOIN lg_formas_pago t3 ON t1.forma_pago_id = t3.id LEFT JOIN lg_tipos_impresion t4 ON t1.tipo_impresion_id = t4.id LEFT JOIN lg_tipologias_libros t5 ON t1.tipologia_id = t5.id LEFT JOIN lg_paises t6 ON t1.pais_id = t6.id = t7.id LEFT JOIN presupuesto_estados t8 ON t1.estado_id = t8.id LEFT JOIN lg_papel_formato t9 ON t1.papel_formato_id = t9.id LEFT JOIN lg_papel_generico t10 ON t1.paginas_negro_papel_id = t10.id LEFT JOIN lg_papel_impresion t11 ON t1.paginas_negro_papel_impresion_id = t11.id LEFT JOIN lg_maquinas t12 ON t1.paginas_negro_maquina_id = t12.id LEFT JOIN lg_maquinas_tarifas_impresion t13 ON t1.paginas_negro_tarifa_impresion_id = t13.id LEFT JOIN lg_papel_generico t14 ON t1.paginas_color_papel_id = t14.id LEFT JOIN lg_papel_impresion t15 ON t1.paginas_color_papel_impresion_id = t15.id LEFT JOIN lg_maquinas t16 ON t1.paginas_color_maquina_id = t16.id LEFT JOIN lg_maquinas_tarifas_impresion t17 ON t1.paginas_color_tarifa_impresion_id = t17.id LEFT JOIN lg_papel_generico t18 ON t1.paginas_cubierta_papel_id = t18.id LEFT JOIN lg_papel_impresion t19 ON t1.paginas_cubierta_papel_impresion_id = t19.id LEFT JOIN lg_maquinas t20 ON t1.paginas_cubierta_maquina_id = t20.id LEFT JOIN lg_maquinas_tarifas_impresion t21 ON t1.paginas_cubierta_tarifa_impresion_id = t21.id LEFT JOIN lg_papel_generico t22 ON t1.paginas_sobrecubierta_papel_id = t22.id LEFT JOIN lg_papel_impresion t23 ON t1.paginas_sobrecubierta_papel_impresion_id = t23.id LEFT JOIN lg_maquinas t24 ON t1.paginas_sobrecubierta_maquina_id = t24.id LEFT JOIN lg_maquinas_tarifas_impresion t25 ON t1.paginas_sobrecubierta_tarifa_impresion_id = t25.id LEFT JOIN auth_user t26 ON t1.total_confirmado_user_id = t26.id_user LEFT JOIN auth_user t27 ON t1.aprobado_user_id = t27.id_user LEFT JOIN auth_user t28 ON t1.pedido_espera_user_id = t28.id_user"; if (!is_null($limit) && intval($limit) > 0) { $sql .= " LIMIT " . intval($limit); } @@ -1056,13 +1031,12 @@ class PresupuestoModel extends \App\Models\GoBaseModel ->table($this->table . " t1") ->select( "t1.id AS id, t1.created_at AS fecha, t2.nombre AS cliente, - CONCAT(t3.first_name, ' ', t3.last_name) AS comercial, t1.titulo AS titulo, t4.nombre AS ubicacion, + CONCAT(t3.first_name, ' ', t3.last_name) AS comercial, t1.titulo AS titulo, t5.nombre AS pais, t1.inc_rei AS inc_rei, t1.paginas AS paginas, t1.tirada AS tirada, t1.total_pedido AS total_pedido, t6.estado AS estado" ); $builder->join("clientes t2", "t1.cliente_id = t2.id", "left"); $builder->join("auth_user t3", "t1.user_update_id = t3.id_user", "left"); - $builder->join("lg_ubicaciones_libros t4", "t1.ubicacion_id = t4.id", "left"); $builder->join("lg_paises t5", "t1.pais_id = t5.id", "left"); $builder->join("presupuesto_estados t6", "t1.estado_id = t6.id", "left"); diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_cosidotapablandaFormItems.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_cosidotapablandaFormItems.php index 37696677..b2c64879 100644 --- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_cosidotapablandaFormItems.php +++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_cosidotapablandaFormItems.php @@ -66,13 +66,6 @@ -
- - -
-
-
- - -
-