Merge branch 'feat/presupuestos' into 'main'

Feat/presupuestos

See merge request jjimenez/safekat!63
This commit is contained in:
2023-09-22 06:54:24 +00:00
30 changed files with 7933 additions and 31 deletions

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,271 @@
<?php namespace App\Controllers\Configuracion;
use App\Controllers\GoBaseResourceController;
use App\Models\Collection;
use App\Entities\Configuracion\PapelFormatoEntity;
use App\Models\Configuracion\PapelFormatoModel;
class Papelformato extends \App\Controllers\GoBaseResourceController {
protected $modelName = PapelFormatoModel::class;
protected $format = 'json';
protected static $singularObjectName = 'Papel Formato';
protected static $singularObjectNameCc = 'papelFormato';
protected static $pluralObjectName = 'Papeles Formatos';
protected static $pluralObjectNameCc = 'papelesFormatos';
protected static $controllerSlug = 'papelformato';
protected static $viewPath = 'themes/backend/vuexy/form/configuracion/papelformato/';
protected $indexRoute = 'papelFormatoList';
public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger) {
$this->viewData['pageTitle'] = lang('LgPapelFormatoes.moduleTitle');
$this->viewData['usingSweetAlert'] = true;
parent::initController($request, $response, $logger);
}
public function index() {
$viewData = [
'currentModule' => static::$controllerSlug,
'pageSubTitle' => lang('Basic.global.ManageAllRecords', [lang('LgPapelFormatoes.papelFormato')]),
'papelFormatoEntity' => new PapelFormatoEntity(),
'usingServerSideDataTable' => true,
];
$viewData = array_merge($this->viewData, $viewData); // merge any possible values from the parent controller class
return view(static::$viewPath.'viewPapelFormatoList', $viewData);
}
public function add() {
$requestMethod = $this->request->getMethod();
if ($requestMethod === 'post') :
$nullIfEmpty = true; // !(phpversion() >= '8.1');
$postData = $this->request->getPost();
$sanitizedData = $this->sanitized($postData, $nullIfEmpty);
$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('LgPapelFormatoes.papelFormato'))]);
$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('LgPapelFormatoes.papelFormato'))]).'.';
$message .= anchor( "admin/papelformato/{$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['papelFormatoEntity'] = isset($sanitizedData) ? new PapelFormatoEntity($sanitizedData) : new PapelFormatoEntity();
$this->viewData['formAction'] = route_to('createPapelFormato');
$this->viewData['boxTitle'] = lang('Basic.global.addNew').' '.lang('LgPapelFormatoes.moduleTitle').' '.lang('Basic.global.addNewSuffix');
return $this->displayForm(__METHOD__);
} // end function add()
public function edit($requestedId = null) {
if ($requestedId == null) :
return $this->redirect2listView();
endif;
$id = filter_var($requestedId, FILTER_SANITIZE_URL);
$papelFormatoEntity = $this->model->find($id);
if ($papelFormatoEntity == false) :
$message = lang('Basic.global.notFoundWithIdErr', [mb_strtolower(lang('LgPapelFormatoes.papelFormato')), $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);
$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('LgPapelFormatoes.papelFormato'))]);
$this->session->setFlashdata('formErrors', $this->model->errors());
endif;
$papelFormatoEntity->fill($sanitizedData);
$thenRedirect = true;
endif;
if ($noException && $successfulResult) :
$id = $papelFormatoEntity->id ?? $id;
$message = lang('Basic.global.updateSuccess', [mb_strtolower(lang('LgPapelFormatoes.papelFormato'))]).'.';
$message .= anchor( "admin/papelformato/{$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['papelFormatoEntity'] = $papelFormatoEntity;
$this->viewData['formAction'] = route_to('updatePapelFormato', $id);
$this->viewData['boxTitle'] = lang('Basic.global.edit2').' '.lang('LgPapelFormatoes.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'] ?? 1;
$order = PapelFormatoModel::SORTABLE[$requestedOrder > 0 ? $requestedOrder : 1];
$dir = $reqData['order']['0']['dir'] ?? 'asc';
$resourceData = $this->model->getResource($search)->orderBy($order, $dir)->limit($length, $start)->get()->getResultObject();
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.', ancho', 'ancho', $onlyActiveOnes, false);
$nonItem = new \stdClass;
$nonItem->id = '';
$nonItem->ancho = '- '.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 ?? 'ancho'];
$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);
}
}
}

View File

@ -1,19 +1,966 @@
<?php
namespace App\Controllers\Presupuestos;
use App\Controllers\BaseController;
use App\Controllers\GoBaseResourceController;
use App\Models\Collection;
use App\Entities\Presupuestos\PresupuestoEntity;
use App\Models\Configuracion\PapelGenericoModel;
use App\Models\Presupuestos\PresupuestoModel;
class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
{
protected $modelName = "PresupuestoModel";
protected $format = 'json';
protected static $singularObjectName = 'Cosido Tapa Blanda';
protected static $singularObjectNameCc = 'Cosidotapablanda';
protected static $pluralObjectName = 'Cosidos Tapa Blanda';
protected static $pluralObjectNameCc = 'cosidosTapaBlanda';
protected static $controllerSlug = 'cosidotapablanda';
protected static $viewPath = 'themes/backend/vuexy/form/presupuestos/cosidotapablanda/';
protected $indexRoute = 'cosidotapablandaList';
class Cosidotapablanda extends BaseController
{
function __construct()
{
public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger)
{
$this->viewData['pageTitle'] = lang('Presupuestos.moduleTitleCosidoTB');
$this->viewData['usingSweetAlert'] = 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
// Breadcrumbs
$this->viewData['breadcrumb'] = [
['title' => lang("App.menu_presupuestos"), 'route' => "javascript:void(0);", 'active' => false],
['title' => lang("App.menu_libros_cosido_tapa_blanda"), 'route' => site_url('presupuestos/cosidotapablanda'), 'active' => 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,
];
$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['incReiList'] = array('incidencia'=>lang('Presupuestos.incidencia'), 'reimpresion'=>lang('Presupuestos.reimpresion'), 'sin_cargo'=>lang('Presupuestos.sinCargo'));
$this->viewData['paisList'] = $this->getPaisListItems();
$this->viewData['papelFormatoList'] = $this->getPapelFormatoListItems($presupuestoEntity->papel_formato_id ?? null);
$this->viewData['papelGenericoNegroList'] = $this->getPapelGenericoNegro();
$this->viewData['papelGenericoNegroHQList'] = $this->getPapelGenericoNegroHQ();
$this->viewData['papelGenericoColorList'] = $this->getPapelGenericoColor();
$this->viewData['papelGenericoColorHQList'] = $this->getPapelGenericoColorHQ();
$this->viewData['papelGenericoCubiertaList'] = $this->getPapelGenericoCubierta();
$this->viewData['papelGenericoSobrecubiertaList'] = $this->getPapelGenericoSobreCubierta();
/*
$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['ubicacionLibroList'] = $this->getUbicacionLibroListItems($presupuestoEntity->ubicacion_id ?? null);
$this->viewData['presupuestoEstadoList'] = $this->getPresupuestoEstadoListItems($presupuestoEntity->estado_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('createCosidotapablanda');
$this->viewData['boxTitle'] = lang('Basic.global.addNew') . ' ' . lang('Presupuestos.moduleTitleCosidoTB') . ' ' . lang('Basic.global.addNewSuffix');
/* TEST JS LOADER */
//$this->viewData['global_js_variables'] = array('jsVarTest' => "'Hola Jaime'");
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_aviso') == null) {
$sanitizedData['fecha_entrega_real_aviso'] = 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['papelGenericoNegroList'] = $this->getPapelGenericoNegro();
$this->viewData['papelGenericoNegroHQList'] = $this->getPapelGenericoNegroHQ();
$this->viewData['papelGenericoColorList'] = $this->getPapelGenericoColor();
$this->viewData['papelGenericoColorHQList'] = $this->getPapelGenericoColorHQ();
$this->viewData['papelGenericoCubiertaList'] = $this->getPapelGenericoCubierta();
$this->viewData['papelGenericoSobrecubiertaList'] = $this->getPapelGenericoSobreCubierta();
$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()) {
$reqData = $this->request->getPost();
$tipo = $reqData['tipo'] ?? null;
$datos = $reqData['datos'] ?? null;
$searchStr = goSanitize($this->request->getPost('searchTerm'))[0];
if ($tipo == 'gramaje'){
// En este caso contiene el nombre del papel generico
$model = new PapelGenericoModel();
$menu = $model->getGramajeComparador($datos, $searchStr);
}
$newTokenHash = csrf_hash();
$csrfTokenName = csrf_token();
$data = [
'menu' => $menu,
$csrfTokenName => $newTokenHash
];
return $this->respond($data);
} else {
return $this->failUnauthorized('Invalid request', 403);
}
}
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 getPaisListItems()
{
$paisModel = model('App\Models\Configuracion\PaisModel');
$onlyActiveOnes = true;
$data = $paisModel->getAllForMenu('id, nombre', 'nombre', $onlyActiveOnes);
return $data;
}
protected function getPapelFormatoListItems($selId = null)
{
$papelFormatoModel = model('App\Models\Configuracion\PapelFormatoModel');
$data = $papelFormatoModel->getElementsForMenu();
array_unshift($data, (object)['id'=>'', 'tamanio' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Presupuestos.papelFormatoId'))])]);
return $data;
}
protected function getPapelGenericoNegro()
{
$model = model('App\Models\Configuracion\PapelGenericoModel');
$data = $model->getPapelForComparador('negro', false, false);
array_unshift($data, lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Presupuestos.papel'))]));
return $data;
}
protected function getPapelGenericoNegroHQ()
{
$model = model('App\Models\Configuracion\PapelGenericoModel');
$data = $model->getPapelForComparador('negrohq', false, false);
array_unshift($data, lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Presupuestos.papel'))]));
return $data;
}
protected function getPapelGenericoColor()
{
$model = model('App\Models\Configuracion\PapelGenericoModel');
$data = $model->getPapelForComparador('color', false, false);
array_unshift($data, lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Presupuestos.papel'))]));
return $data;
}
protected function getPapelGenericoColorHQ()
{
$model = model('App\Models\Configuracion\PapelGenericoModel');
$data = $model->getPapelForComparador('colorhq', false, false);
array_unshift($data, lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Presupuestos.papel'))]));
return $data;
}
protected function getPapelGenericoCubierta()
{
$model = model('App\Models\Configuracion\PapelGenericoModel');
$data = $model->getPapelForComparador('color', true, false);
array_unshift($data, lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Presupuestos.papel'))]));
return $data;
}
protected function getPapelGenericoSobreCubierta()
{
$model = model('App\Models\Configuracion\PapelGenericoModel');
$data = $model->getPapelForComparador('color', false, true);
array_unshift($data, lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Presupuestos.papel'))]));
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 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 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;
}
*/
}

View File

@ -0,0 +1,25 @@
<?php
namespace App\Controllers\Presupuestos;
use App\Controllers\BaseController;
class Js_loader extends BaseController
{
function __construct()
{
}
function comparadorCosidoTapablanda_js()
{
$this->load->view('themes/backend/vuexy/form/presupuestos/cosidotapablanda/comparador.js', $data);
$this->output->set_content_type('text/javascript');
}
}

View File

@ -2,7 +2,7 @@
namespace App\Controllers;
use App\Models\Tarifas\TarifaAcabadoLineaModel;
use App\Models\Configuracion\PapelGenericoModel;
class Test extends BaseController
{
@ -15,11 +15,10 @@ class Test extends BaseController
public function index()
{
/*
$papel = new Papelesimpresion();
var_dump($papel->datatablePG());*/
$session = session();
var_dump($session->id_user);
$model = new PapelGenericoModel();
echo '<pre>';
var_dump($model->getGramajeComparador('CARTULINA GRÁFICA ESTUCADA 1/C'));
echo '</pre>';
}
}

View File

@ -0,0 +1,22 @@
<?php
namespace App\Entities\Configuracion;
use CodeIgniter\Entity;
class PapelFormatoEntity extends \CodeIgniter\Entity\Entity
{
protected $attributes = [
"id" => null,
"ancho" => null,
"alto" => null,
"is_deleted" => 0,
"deleted_at" => null,
"created_at" => null,
"updated_at" => null,
];
protected $casts = [
"ancho" => "float",
"alto" => "float",
"is_deleted" => "int",
];
}

View File

@ -0,0 +1,320 @@
<?php
namespace App\Entities\Presupuestos;
use CodeIgniter\Entity;
class PresupuestoEntity extends \CodeIgniter\Entity\Entity
{
protected $attributes = [
"id" => null,
"version" => 0,
"cliente_id" => null,
"tarifa_cliente_id" => null,
"user_created_id" => 1,
"user_update_id" => null,
"forma_pago_id" => null,
"tipo_impresion_id" => null,
"tipologia_id" => null,
"pais_id" => 1,
"serie_id" => null,
"catalogo_id" => null,
"estado_id" => 1,
"inc_rei" => null,
"causa_cancelacion" => null,
"retractilado" => false,
"retractilado5" => false,
"guardas" => false,
"faja_color" => false,
"recoger_en_taller" => false,
"ferro" => false,
"ferro_digital" => false,
"marcapaginas" => false,
"prototipo" => false,
"papel_formato_id" => null,
"papel_formato_personalizado" => false,
"papel_formato_ancho" => null,
"papel_formato_alto" => null,
"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,
"sobrecubiertas" => false,
"sobrecubiertas_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_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,
"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,
"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,
"fecha_entrega_real_at" => null,
"fecha_entrega_real_aviso" => 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 = [
"version" => "int",
"cliente_id" => "int",
"tarifa_cliente_id" => "?int",
"user_created_id" => "int",
"user_update_id" => "?int",
"forma_pago_id" => "?int",
"tipo_impresion_id" => "?int",
"tipologia_id" => "?int",
"pais_id" => "int",
"serie_id" => "?int",
"catalogo_id" => "?int",
"estado_id" => "int",
"inc_rei" => "?int",
"retractilado" => "boolean",
"retractilado5" => "boolean",
"guardas" => "boolean",
"faja_color" => "boolean",
"recoger_en_taller" => "boolean",
"ferro" => "boolean",
"ferro_digital" => "boolean",
"marcapaginas" => "boolean",
"prototipo" => "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",
"sobrecubiertas" => "boolean",
"sobrecubiertas_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_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",
"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",
"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_aviso" => "?boolean",
"pedido_espera_user_id" => "?int",
"is_deleted" => "int",
];
}

View File

@ -0,0 +1,19 @@
<?php
namespace App\Entities\Presupuestos;
use CodeIgniter\Entity;
class PresupuestoEstadoEntity extends \CodeIgniter\Entity\Entity
{
protected $attributes = [
"id" => null,
"estado" => null,
"is_deleted" => 0,
"deleted_at" => null,
"created_at" => null,
"updated_at" => null,
];
protected $casts = [
"is_deleted" => "int",
];
}

View File

@ -127,7 +127,7 @@ class LoginAuthFilter implements FilterInterface
*/
public function whiteListController(){
return [
'',
'Js_loader',
'BaseController',
'Home',
'Login',

View File

@ -0,0 +1,827 @@
<?php
return [
'moduleTitleCosidoTB' => 'Budget for Softcover Stitched Book',
'presupuestoCosidotapablandaList' => 'List of budgets for Softcover Stitched Books',
'presupuesto' => 'Budget',
'datosPresupuesto' => 'Budget information',
'datosLibro' => 'Book information',
'datosPresupuestoCliente' => 'Client budget data (comparator)',
'id' => 'Budget Number',
'created_at' => 'Date',
'clienteId' => 'Cliend',
'comercial' => 'Sales agent',
'titulo' => 'Title',
'paisId' => 'País',
'incRei' => 'Incident \ Reprint',
'paginas' => 'Pages',
'tirada' => 'Print',
'totalPapelPedido' => 'Total paper budget',
'presupuestoEstado' => 'State',
'presupuestoEstadoBorrador' => 'Draft',
'presupuestoEstadoAceptado' => 'Acepted',
'incidencia' => 'Incident',
'reimpresion' => 'Reprint',
'reimpresion' => 'Free of charge',
'autor' => 'Author',
'coleccion' => 'Collection',
'numeroEdicion' => 'Edition number',
'isbn' => 'ISBN',
'referenciaCliente' => 'Customer reference',
'papelFormatoId' => "Size",
'papelFormatoPersonalizado' => 'Custom size',
'papelFormatoAncho' => 'Width',
'papelFormatoAlto' => 'Height',
'cosido' => 'Sewn',
'ferro' => 'Ferro',
'ferroDigital' => 'Digital Ferro',
'prototipo' => 'Prototype',
'imagenesBnInterior' => 'B/W pictures inside',
'recogerEnTaller' => 'Pick up in workshop',
'marcapaginas' => 'Bookmark',
'merma' => 'Weakening',
'mermaportada' => 'Cover weakening',
'tipoImpresion' => 'Printing type',
'papelesComparadorCosidoTapaBlanda' => 'Interior and cover papers',
'posicionPagColor' => 'Color pages position',
'colorPageInstructions' => 'Enter the position of the color pages within the book. E.g., 3,5,7 or 4-10,20,155.',
'numeroPaginas' => 'Nº Pages',
'papel' => 'Paper',
'gramaje' => 'Paper weight',
'opcionesPresupuesto' => 'Budget options',
'retractilado' => 'Individual shrink-wrapping',
'retractilado5' => 'Shrink-wrapping in packs of 5',
'Guardas' => 'Endpapers',
'fajaColor' => 'Print color band ',
'cubierta' => 'Cover',
'sobrecubierta' => 'Dust jacket',
'encuadernacion' => 'Binding',
'solapasCubierta' => 'Cover dust jacket',
'solapasAnchoCubierta' => 'Cover dust jacket width',
'1cara' => '1 side',
'2caras' => '2 sides',
/* '4x0' => '4x0',
'4x4' => '4x4',
'aprobadoAt' => 'Aprobado At',
'aprobadoJsonData' => 'Aprobado Json Data',
'aprobadoUserId' => 'Aprobado User',
'autor' => 'Autor',
'baseImponible' => 'Base Imponible',
'catalogoId' => 'Catalogo ID',
'causaCancelacion' => 'Causa Cancelacion',
'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',
'imagenesBnInterior' => 'Imagenes Bn Interior',
'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',
'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',
'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',
'tiradaAlternativaJsonData' => 'Tirada Alternativa Json Data',
'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',
'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.',
],
], */
];

View File

@ -0,0 +1,847 @@
<?php
return [
'moduleTitleCosidoTB' => 'Presupuesto Libro Cosido Tapa Blanda',
'presupuestoCosidotapablandaList' => 'Lista presupuestos Libros Cosido Tapa Blanda',
'presupuesto' => 'Presupuesto',
'datosPresupuesto' => 'Datos generales del presupuesto',
'datosLibro' => 'Datos del libro',
'datosPresupuestoCliente' => 'Datos presupuesto cliente (comparador)',
'id' => 'Número Presupuesto',
'created_at' => 'Fecha',
'clienteId' => 'Cliente',
'comercial' => 'Comercial',
'titulo' => 'Título',
'paisId' => 'País',
'incRei' => 'Incidencia \ Reimpresión',
'paginas' => 'Paginas',
'tirada' => 'Tirada',
'totalPedido' => 'Total Presupuesto',
'presupuestoEstado' => 'Estado',
'presupuestoEstadoBorrador' => 'Borrador',
'presupuestoEstadoAceptado' => 'Aceptado',
'incidencia' => 'Incidencia',
'reimpresion' => 'Reimpresion',
'sinCargo' => 'Sin cargo',
'autor' => 'Autor',
'coleccion' => 'Colección',
'numeroEdicion' => 'Número de edición',
'isbn' => 'ISBN',
'referenciaCliente' => 'Referencia del cliente',
'papelFormatoId' => "Tamaño",
'papelFormatoPersonalizado' => 'Tamaño personalizado',
'papelFormatoAncho' => 'Ancho',
'papelFormatoAlto' => 'Alto',
'cosido' => 'Cosido',
'ferro' => 'Ferro',
'ferroDigital' => 'Ferro Digital',
'prototipo' => 'Prototipo',
'imagenesBnInterior' => 'Imágenes B/N interior',
'recogerEnTaller' => 'Recoger en taller',
'marcapaginas' => 'Marcapáginas',
'merma' => 'Merma',
'mermaportada' => 'Merma portada',
'tipoImpresion' => 'Tipo de impresión',
'papelesComparadorCosidoTapaBlanda' => 'Papeles interior y cubierta',
'posicionPagColor' => 'Posición páginas a color',
'colorPageInstructions' => 'Introduzca la posición de las páginas a color dentro del libro. Ej: 3,5,7 ó 4-10,20,155',
'numeroPaginas' => 'Nº Páginas',
'papel' => 'Papel',
'gramaje' => 'Gramaje',
'opcionesPresupuesto' => 'Opciones presupuesto',
'retractilado' => 'Retractilado individual',
'retractilado5' => 'Retractilado de 5',
'Guardas' => 'Guardas',
'fajaColor' => 'Imprimir faja a color',
'compInteriorPlana' => 'Interior en plana',
'compInteriorRotativa' => 'Interior en rotativa',
'compCubiertaSobrecubierta' => 'Cubierta y sobrecubierta',
'tipo' => 'Tipo',
'marca' => 'Marca',
'maquina' => 'Máquina',
'numeroPliegos' => 'Nº Pliegos',
'pliegosPedido' => 'Pliegos pedido',
'precioPliego' => 'Precio pliegos',
'libro' => 'Libro',
'totalPapelPedido' => 'Total papel pedido',
'lomo' => 'Lomo',
'peso' => 'Peso',
'click' => 'Click',
'totalClicks' => 'Total clicks',
'precioPagNegro' => 'Precio pág. negro',
'precioPagColor' => 'Precio pág. color',
'totalTinta' => 'Total tinta',
'totalCorte' => 'Total corte',
'total' => 'Total',
'cubierta' => 'Cubierta',
'sobrecubierta' => 'Sobrecubierta',
'encuadernacion' => 'Encuadernación',
'solapasCubierta' => 'Solapas cubierta',
'solapasAnchoCubierta' => 'Ancho solapas cubierta',
'1cara' => '1 cara',
'2caras' => '2 caras',
/* '4x0' => '4x0',
'4x4' => '4x4',
'aprobadoAt' => 'Aprobado At',
'aprobadoJsonData' => 'Aprobado Json Data',
'aprobadoUserId' => 'Aprobado User',
'autor' => 'Autor',
'baseImponible' => 'Base Imponible',
'catalogoId' => 'Catalogo ID',
'causaCancelacion' => 'Causa Cancelacion',
'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',
'imagenesBnInterior' => 'Imagenes Bn Interior',
'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',
'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',
'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',
'tiradaAlternativaJsonData' => 'Tirada Alternativa Json Data',
'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',
'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.',
],
], */
];

View File

@ -0,0 +1,96 @@
<?php
namespace App\Models\Configuracion;
class PapelFormatoModel extends \App\Models\GoBaseModel
{
protected $table = "lg_papel_formato";
/**
* Whether primary key uses auto increment.
*
* @var bool
*/
protected $useAutoIncrement = true;
const SORTABLE = [
1 => "t1.id",
2 => "t1.ancho",
3 => "t1.alto",
4 => "t1.created_at",
5 => "t1.updated_at",
];
protected $allowedFields = ["ancho", "alto"];
protected $returnType = "App\Entities\Configuracion\PapelFormatoEntity";
protected $useTimestamps = true;
protected $useSoftDeletes = false;
protected $createdField = "created_at";
protected $updatedField = "updated_at";
public static $labelField = "ancho";
protected $validationRules = [
"alto" => [
"label" => "LgPapelFormatoes.alto",
"rules" => "required|decimal",
],
"ancho" => [
"label" => "LgPapelFormatoes.ancho",
"rules" => "required|decimal",
],
];
protected $validationMessages = [
"alto" => [
"decimal" => "LgPapelFormatoes.validation.alto.decimal",
"required" => "LgPapelFormatoes.validation.alto.required",
],
"ancho" => [
"decimal" => "LgPapelFormatoes.validation.ancho.decimal",
"required" => "LgPapelFormatoes.validation.ancho.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.ancho AS ancho, t1.alto AS alto, t1.created_at AS created_at, t1.updated_at AS updated_at"
);
return empty($search)
? $builder
: $builder
->groupStart()
->like("t1.id", $search)
->orLike("t1.ancho", $search)
->orLike("t1.alto", $search)
->orLike("t1.created_at", $search)
->orLike("t1.updated_at", $search)
->orLike("t1.id", $search)
->orLike("t1.ancho", $search)
->orLike("t1.alto", $search)
->orLike("t1.created_at", $search)
->orLike("t1.updated_at", $search)
->groupEnd();
}
public function getElementsForMenu(){
return $this->db
->table($this->table . " t1")
->select(
"t1.id AS id, CONCAT(t1.ancho, ' x ', t1.alto) AS tamanio"
)->get()->getResultObject();
}
}

View File

@ -1,4 +1,5 @@
<?php
namespace App\Models\Configuracion;
class PapelGenericoModel extends \App\Models\GoBaseModel
@ -20,7 +21,7 @@ class PapelGenericoModel extends \App\Models\GoBaseModel
3 => "t1.show_in_client",
];
protected $allowedFields = ["nombre", "code", "code_ot", "show_in_client","deleted_at","is_deleted"];
protected $allowedFields = ["nombre", "code", "code_ot", "show_in_client", "deleted_at", "is_deleted"];
protected $returnType = "App\Entities\Configuracion\PapelGenerico";
protected $useTimestamps = true;
@ -79,15 +80,79 @@ class PapelGenericoModel extends \App\Models\GoBaseModel
return empty($search)
? $builder
: $builder
->groupStart()
->like("t1.id", $search)
->orLike("t1.nombre", $search)
->orLike("t1.code", $search)
->orLike("t1.code_ot", $search)
->orLike("t1.id", $search)
->orLike("t1.nombre", $search)
->orLike("t1.code", $search)
->orLike("t1.code_ot", $search)
->groupEnd();
->groupStart()
->like("t1.id", $search)
->orLike("t1.nombre", $search)
->orLike("t1.code", $search)
->orLike("t1.code_ot", $search)
->orLike("t1.id", $search)
->orLike("t1.nombre", $search)
->orLike("t1.code", $search)
->orLike("t1.code_ot", $search)
->groupEnd();
}
public function getPapelForComparador($tipo, $is_cubierta = null, $is_sobrecubierta = null)
{
/*
1.-> Tipo impresion
2.-> Maquina
3.-> Papeles impresion asociados a esa maquina
4.-> papeles genericos que aparecen en esos papeles impresion
*/
$builder = $this->db
->table($this->table . " t1")
->select(
"t1.nombre AS papel_generico"
)
->join("lg_papel_impresion t2", "t2.papel_generico_id = t1.id", "left")
->join("lg_maquina_papel_impresion t3", "t3.papel_impresion_id = t2.id", "left")
->join("lg_maquinas t4", "t3.maquina_id = t4.id", "left")
->join("lg_maquinas_tarifas_impresion t5", "t5.maquina_id = t4.id", "left")
->where("t1.is_deleted", 0)
->where("t2.is_deleted", 0)
->where("t4.is_deleted", 0)
->where("t4.tipo", "impresion")
->where("t5.tipo", $tipo);
if(!is_null($is_cubierta)){
if($is_cubierta==true){
$builder->where("t2.cubierta", 1);
}
else if($is_sobrecubierta==true){
$builder->where("t2.sobrecubierta", 1);
}
}
return array_unique(array_column($builder->orderBy("t1.nombre", "asc")->get()->getResultArray(), 'papel_generico'));
}
public function getGramajeComparador(string $papel_generico_nombre="")
{
$builder = $this->db
->table($this->table . " t1")
->select(
"t2.gramaje AS text"
)
->join("lg_papel_impresion t2", "t2.papel_generico_id = t1.id", "left")
->where("t1.is_deleted", 0)
->where("t2.is_deleted", 0)
->where("t1.nombre", $papel_generico_nombre);
$values = $builder->orderBy("t2.gramaje", "asc")->get()->getResultObject();
$id = 1;
foreach ($values as $value){
$value->id = $id;
$id++;
}
$values_array = array_map( function( $value ) {
return $value->text;
}, $values );
$unique_values = array_unique($values_array);
return array_values(array_intersect_key($values, $unique_values));
}
}

View File

@ -0,0 +1,88 @@
<?php
namespace App\Models\Presupuestos;
class PresupuestoEstadoModel extends \App\Models\GoBaseModel
{
protected $table = "presupuesto_estados";
/**
* Whether primary key uses auto increment.
*
* @var bool
*/
protected $useAutoIncrement = true;
const SORTABLE = [
1 => "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();
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,27 @@
<?php
namespace App\Services;
use CodeIgniter\Config\BaseService;
use App\Models\Configuracion\PapelGenericoModel;
class PresupuestoService extends BaseService
{
public static function example(){
return 'Hola';
}
/*
/**
* getPapelForMenu.
* Devuelve la lista de papeles disponibles
*
* @param mixed $tipo_impresion
* @param mixed $dimensiones
* @return mixed
*/
public static function test(){
}
}

View File

@ -0,0 +1,19 @@
<div class="row">
<div class="col-md-12 col-lg-12 px-4">
<div class="mb-3">
<label for="ancho" class="form-label">
<?=lang('LgPapelFormatoes.ancho') ?>*
</label>
<input type="number" id="ancho" name="ancho" required maxLength="8" step="0.01" class="form-control" value="<?=old('ancho', $papelFormatoEntity->ancho) ?>">
</div><!--//.mb-3 -->
<div class="mb-3">
<label for="alto" class="form-label">
<?=lang('LgPapelFormatoes.alto') ?>*
</label>
<input type="number" id="alto" name="alto" required maxLength="8" step="0.01" class="form-control" value="<?=old('alto', $papelFormatoEntity->alto) ?>">
</div><!--//.mb-3 -->
</div><!--//.col -->
</div><!-- //.row -->

View File

@ -0,0 +1,26 @@
<?= $this->include("Themes/_commonPartialsBs/select2bs5") ?>
<?= $this->include("Themes/_commonPartialsBs/sweetalert") ?>
<?= $this->extend("Themes/" . config("Basics")->theme["name"] . "/AdminLayout/defaultLayout") ?>
<?= $this->section("content") ?>
<div class="row">
<div class="col-12">
<div class="card card-info">
<div class="card-header">
<h3 class="card-title"><?= $boxTitle ?? $pageTitle ?></h3>
</div><!--//.card-header -->
<form id="papelFormatoForm" method="post" action="<?= $formAction ?>">
<?= csrf_field() ?>
<div class="card-body">
<?= view("Themes/_commonPartialsBs/_alertBoxes") ?>
<?= !empty($validation->getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?>
<?= view("themes/backend/vuexy/form/configuracion/papelformato/_papelFormatoFormItems") ?>
</div><!-- /.card-body -->
<div class="card-footer">
<?= anchor(route_to("papelFormatoList"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary float-start"]) ?>
<input type="submit" class="btn btn-primary float-end" name="save" value="<?= lang("Basic.global.Save") ?>">
</div><!-- /.card-footer -->
</form>
</div><!-- //.card -->
</div><!--//.col -->
</div><!--//.row -->
<?= $this->endSection() ?>

View File

@ -0,0 +1,187 @@
<?=$this->include('Themes/_commonPartialsBs/datatables') ?>
<?=$this->include('Themes/_commonPartialsBs/sweetalert') ?>
<?=$this->extend('Themes/'.config('Basics')->theme['name'].'/AdminLayout/defaultLayout') ?>
<?=$this->section('content'); ?>
<div class="row">
<div class="col-md-12">
<div class="card card-info">
<div class="card-header">
<h3 class="card-title"><?=lang('LgPapelFormatoes.papelFormatoList') ?></h3>
</div><!--//.card-header -->
<div class="card-body">
<?= view('Themes/_commonPartialsBs/_alertBoxes'); ?>
<table id="tableOfPapelesformatos" class="table table-striped table-hover" style="width: 100%;">
<thead>
<tr>
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
<th><?=lang('LgPapelFormatoes.id')?></th>
<th><?= lang('LgPapelFormatoes.ancho') ?></th>
<th><?= lang('LgPapelFormatoes.alto') ?></th>
<th><?= lang('LgPapelFormatoes.createdAt') ?></th>
<th><?= lang('LgPapelFormatoes.updatedAt') ?></th>
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div><!--//.card-body -->
<div class="card-footer">
<?=anchor(route_to('newPapelFormato'), lang('Basic.global.addNew').' '.lang('LgPapelFormatoes.papelFormato'), ['class'=>'btn btn-primary float-end']); ?>
</div><!--//.card-footer -->
</div><!--//.card -->
</div><!--//.col -->
</div><!--//.row -->
<?=$this->endSection() ?>
<?=$this->section('additionalInlineJs') ?>
const lastColNr = $('#tableOfPapelesformatos').find("tr:first th").length - 1;
const actionBtns = function(data) {
return `<td class="text-right py-0 align-middle">
<div class="btn-group btn-group-sm">
<button class="btn btn-sm btn-warning btn-edit me-1" data-id="${data.id}"><?= lang('Basic.global.edit') ?></button>
<button class="btn btn-sm btn-danger btn-delete ms-1" data-id="${data.id}"><?= lang('Basic.global.Delete') ?></button>
</div>
</td>`;
};
theTable = $('#tableOfPapelesformatos').DataTable({
processing: true,
serverSide: true,
autoWidth: true,
responsive: true,
scrollX: true,
lengthMenu: [ 5, 10, 25, 50, 75, 100, 250, 500, 1000, 2500 ],
pageLength: 10,
lengthChange: true,
"dom": 'lfrtipB', // 'lfBrtip', // you can try different layout combinations by uncommenting one or the other
// "dom": '<"top"lf><"clear">rt<"bottom"ipB><"clear">', // remember to comment this line if you uncomment the above
"buttons": [
'copy', 'csv', 'excel', 'print', {
extend: 'pdfHtml5',
orientation: 'landscape',
pageSize: 'A4'
}
],
stateSave: true,
order: [[1, 'asc']],
language: {
url: "/assets/dt/<?= config('Basics')->languages[$currentLocale] ?? config('Basics')->i18n ?>.json"
},
ajax : $.fn.dataTable.pipeline( {
url: '<?= route_to('dataTableOfPapelesFormatos') ?>',
method: 'POST',
headers: {'X-Requested-With': 'XMLHttpRequest'},
async: true,
}),
columnDefs: [
{
orderable: false,
searchable: false,
targets: [0,lastColNr]
}
],
columns : [
{ 'data': actionBtns },
{ 'data': 'id' },
{ 'data': 'ancho' },
{ 'data': 'alto' },
{ 'data': 'created_at' },
{ 'data': 'updated_at' },
{ 'data': actionBtns }
]
});
theTable.on( 'draw.dt', function () {
const dateCols = [4, 5];
const shortDateFormat = '<?= convertPhpDateToMomentFormat('mm/dd/YYYY')?>';
const dateTimeFormat = '<?= convertPhpDateToMomentFormat('mm/dd/YYYY h:i a')?>';
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 = `<?= route_to('papelFormatoList') ?>/${$(this).attr('data-id')}/edit`;
});
$(document).on('click', '.btn-delete', function(e) {
Swal.fire({
title: '<?= lang('Basic.global.sweet.sureToDeleteTitle', [mb_strtolower(lang('LgPapelFormatoes.papel formato'))]) ?>',
text: '<?= lang('Basic.global.sweet.sureToDeleteText') ?>',
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
confirmButtonText: '<?= lang('Basic.global.sweet.deleteConfirmationButton') ?>',
cancelButtonText: '<?= lang('Basic.global.Cancel') ?>',
cancelButtonColor: '#d33'
})
.then((result) => {
const dataId = $(this).data('id');
const row = $(this).closest('tr');
if (result.value) {
$.ajax({
url: `<?= route_to('papelFormatoList') ?>/${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,
});
})
}
});
});
<?=$this->endSection() ?>
<?=$this->section('css') ?>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.2.3/css/buttons.<?=config('Basics')->theme['name'] == 'Bootstrap5' ? 'bootstrap5' : 'bootstrap4' ?>.min.css">
<?=$this->endSection() ?>
<?= $this->section('additionalExternalJs') ?>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.<?=config('Basics')->theme['name'] == 'Bootstrap5' ? 'bootstrap5' : 'bootstrap4' ?>.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.print.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.0/jszip.min.js" integrity="sha512-xcHCGC5tQ0SHlRX8Anbz6oy/OullASJkEhb4gjkneVpGE3/QGYejf14CUO5n5q5paiHfRFTa9HKgByxzidw2Bw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.5/pdfmake.min.js" integrity="sha512-rDbVu5s98lzXZsmJoMa0DjHNE+RwPJACogUCLyq3Xxm2kJO6qsQwjbE5NDk2DqmlKcxDirCnU1wAzVLe12IM3w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.5/vfs_fonts.js" integrity="sha512-cktKDgjEiIkPVHYbn8bh/FEyYxmt4JDJJjOCu5/FQAkW4bc911XtKYValiyzBiJigjVEvrIAyQFEbRJZyDA1wQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<?=$this->endSection() ?>

View File

@ -0,0 +1,262 @@
<div class="accordion mt-3" id="accordionDatosLibro">
<div class="card accordion-item active">
<h2 class="accordion-header" id="headingOne">
<button type="button" class="accordion-button" data-bs-toggle="collapse" data-bs-target="#accordionDatosLibroTip" aria-expanded="false" aria-controls="accordionDatosLibroTip">
<h4><?= lang("Presupuestos.datosLibro") ?></h4>
</button>
</h2>
<div id="accordionDatosLibroTip" class="accordion-collapse collapse show" data-bs-parent="#accordionDatosLibro">
<div class="accordion-body">
<!-- Fila 1 -->
<div class="row">
<div class="col-md-12 col-lg-2 px-4">
<div class="row">
<div class="mb-3">
<label for="paginas" class="form-label">
<?= lang('Presupuestos.paginas') ?>*
</label>
<input type="number" id="paginas" name="paginas" maxLength="11" class="form-control" value="<?= old('paginas', $presupuestoEntity->paginas) ?>">
</div><!--//.mb-3 -->
</div>
<div class="row">
<div class="mb-3">
<div class="form-check form-switch mb-2">
<input class="form-check-input" type="checkbox" id="solapas" name="solapas" value="1" <?= $presupuestoEntity->solapas == true ? 'checked' : ''; ?>>
<label class="form-check-label" for="papelFormatoPersonalizado"><?= lang('Presupuestos.solapasCubierta') ?></label>
</div>
</div><!--//.mb-3 -->
</div>
</div><!--//.col -->
<div class="col-md-12 col-lg-2 px-4">
<div class="mb-3">
<label for="tirada" class="form-label">
<?= lang('Presupuestos.tirada') ?>*
</label>
<input type="number" id="tirada" name="tirada" maxLength="11" class="form-control" value="<?= old('tirada', $presupuestoEntity->tirada) ?>">
</div><!--//.mb-3 -->
</div><!--//.col -->
<div class="col-md-12 col-lg-4 px-4">
<div class="mb-3">
<label id="label_papelFormatoId" for="papelFormatoId" class="form-label">
<?= lang('Presupuestos.papelFormatoId') ?>*
</label>
<select id="papelFormatoId" name="papel_formato_id" class="form-control select2bs2" style="width: 100%;">
<?php if (isset($papelFormatoList) && is_array($papelFormatoList) && !empty($papelFormatoList)) :
foreach ($papelFormatoList as $formato) : ?>
<option value="<?= $formato->id ?>" <?= $formato->id == $presupuestoEntity->papel_formato_id ? ' selected' : '' ?>>
<?= $formato->tamanio ?>
</option>
<?php endforeach;
endif; ?>
</select>
<div class="row">
<div class="col-md-12 col-lg-6">
<div class="mb-3">
<input style="display: none" type="number" id="papelFormatoAncho" name="papel_formato_ancho" maxLength="8" step="0.01" class="form-control" value="<?= old('papel_formato_ancho', $presupuestoEntity->papel_formato_ancho) ?>">
</div><!--//.mb-3 -->
</div><!--//.col -->
<div class="col-md-12 col-lg-6">
<div class="mb-3">
<input style="display: none" type="number" id="papelFormatoAlto" name="papel_formato_alto" maxLength="8" step="0.01" class="form-control" value="<?= old('papel_formato_alto', $presupuestoEntity->papel_formato_alto) ?>">
</div><!--//.mb-3 -->
</div><!--//.col -->
</div>
<div class="form-check form-switch mb-2">
<input class="form-check-input" type="checkbox" id="papelFormatoPersonalizado" name="papel_formato_personalizado" value="1" <?= $presupuestoEntity->papel_formato_personalizado == true ? 'checked' : ''; ?>>
<label class="form-check-label" for="papelFormatoPersonalizado"><?= lang('Presupuestos.papelFormatoPersonalizado') ?></label>
</div>
</div><!--//.mb-3 -->
</div><!--//.col -->
<div class="col-md-12 col-lg-2 px-4">
<div class="mb-3">
<label for="merma" class="form-label">
<?= lang('Presupuestos.merma') ?>*
</label>
<input type="number" id="merma" name="merma" maxLength="8" step="0.01" class="form-control" value="<?= old('merma', $presupuestoEntity->merma) ?>">
</div><!--//.mb-3 -->
</div><!--//.col -->
<div class="col-md-12 col-lg-2 px-4">
<div class="mb-3">
<label for="mermaportada" class="form-label">
<?= lang('Presupuestos.mermaportada') ?>*
</label>
<input type="number" id="mermaportada" name="merma_sobrecubierta" placeholder="6.00" maxLength="8" step="0.01" class="form-control" value="<?= old('merma_sobrecubierta', $presupuestoEntity->merma_sobrecubierta) ?>">
</div><!--//.mb-3 -->
</div><!--//.col -->
</div> <!--//.row -->
<div class="row">
</div>
<div class="row" id="div_solapas_ancho" style="display:none;">
<div class="col-md-12 col-lg-2 px-4">
<div class="mb-3">
<label for="solapas_ancho" class="form-label">
<?= lang('Presupuestos.solapasAnchoCubierta') ?>*
</label>
<input type="number" id="solapas_ancho" name="solapas_ancho" placeholder="6.00" maxLength="8" step="0.01" class="form-control" value="<?= old('solapas_ancho', $presupuestoEntity->solapas_ancho) ?>">
</div><!--//.mb-3 -->
</div><!--//.col -->
</div>
<!----------------------------------------------------------------------------->
<div class="divider divider-dark text-start mb-1">
<div class="divider-text">
<h5><?= lang("Presupuestos.opcionesPresupuesto") ?></h5>
</div>
</div>
<div class="row">
<div class="col-md-12 col-lg-3 px-4">
<div class="mb-3">
<div class="form-check">
<label for="retractilado" class="form-check-label">
<input type="checkbox" id="retractilado" name="retractilado" value="1" class="form-check-input" <?= $presupuestoEntity->retractilado == true ? 'checked' : ''; ?>>
<?= lang('Presupuestos.retractilado') ?>
</label>
</div><!--//.form-check -->
</div><!--//.mb-3 -->
</div><!--//.col -->
<div class="col-md-12 col-lg-3 px-4">
<div class="mb-3">
<div class="form-check">
<label for="retractilado5" class="form-check-label">
<input type="checkbox" id="retractilado5" name="retractilado_5" value="1" class="form-check-input" <?= $presupuestoEntity->retractilado5 == true ? 'checked' : ''; ?>>
<?= lang('Presupuestos.retractilado5') ?>
</label>
</div><!--//.form-check -->
</div><!--//.mb-3 -->
</div><!--//.col -->
<div class="col-md-12 col-lg-3 px-4">
<div class="mb-3">
<div class="form-check">
<label for="fajaColor" class="form-check-label">
<input type="checkbox" id="fajaColor" name="faja_color" value="1" class="form-check-input" <?= $presupuestoEntity->faja_color == true ? 'checked' : ''; ?>>
<?= lang('Presupuestos.fajaColor') ?>
</label>
</div><!--//.form-check -->
</div><!--//.mb-3 -->
</div><!--//.col -->
<div class="col-md-12 col-lg-3 px-4">
<div class="mb-3">
<div class="form-check">
<label for="prototipo" class="form-check-label">
<input type="checkbox" id="prototipo" name="prototipo" value="1" class="form-check-input" <?= $presupuestoEntity->prototipo == true ? 'checked' : ''; ?>>
<?= lang('Presupuestos.prototipo') ?>
</label>
</div><!--//.form-check -->
</div><!--//.mb-3 -->
<div class="mb-3">
</div><!--//.mb-3 -->
</div><!--//.col -->
</div>
<div class="row">
<div class="col-md-12 col-lg-3 px-4">
<div class="mb-3">
<div class="form-check">
<label for="ferro" class="form-check-label">
<input type="checkbox" id="ferro" name="ferro" value="1" class="form-check-input" <?= $presupuestoEntity->ferro == true ? 'checked' : ''; ?>>
<?= lang('Presupuestos.ferro') ?>
</label>
</div><!--//.form-check -->
</div><!--//.mb-3 -->
</div><!--//.col -->
<div class="col-md-12 col-lg-3 px-4">
<div class="mb-3">
<div class="form-check">
<label for="ferroDigital" class="form-check-label">
<input type="checkbox" id="ferroDigital" name="ferro_digital" value="1" class="form-check-input" <?= $presupuestoEntity->ferro_digital == true ? 'checked' : ''; ?>>
<?= lang('Presupuestos.ferroDigital') ?>
</label>
</div><!--//.form-check -->
</div><!--//.mb-3 -->
</div><!--//.col -->
<div class="col-md-12 col-lg-3 px-4">
<div class="mb-3">
<div class="form-check">
<label for="marcapaginas" class="form-check-label">
<input type="checkbox" id="marcapaginas" name="marcapaginas" value="1" class="form-check-input" <?= $presupuestoEntity->marcapaginas == true ? 'checked' : ''; ?>>
<?= lang('Presupuestos.marcapaginas') ?>
</label>
</div><!--//.form-check -->
</div><!--//.mb-3 -->
</div><!--//.col -->
<div class="col-md-12 col-lg-3 px-4">
<div class="mb-3">
<div class="form-check">
<label for="recogerEnTaller" class="form-check-label">
<input type="checkbox" id="recogerEnTaller" name="recoger_en_taller" value="1" class="form-check-input" <?= $presupuestoEntity->recoger_en_taller == true ? 'checked' : ''; ?>>
<?= lang('Presupuestos.recogerEnTaller') ?>
</label>
</div><!--//.form-check -->
</div><!--//.mb-3 -->
</div><!--//.col -->
</div>
<div class="row">
<div class="col-md-12 col-lg-4 px-4">
<div class="mb-3">
<div class="form-check">
<label for="imagenesBnInterior" class="form-check-label">
<input type="checkbox" id="imagenesBnInterior" name="imagenes_bn_interior" value="1" class="form-check-input" <?= $presupuestoEntity->imagenes_bn_interior == true ? 'checked' : ''; ?>>
<?= lang('Presupuestos.imagenesBnInterior') ?>
</label>
</div><!--//.form-check -->
</div><!--//.mb-3 -->
</div><!--//.col -->
</div> <!--//.row -->
</div> <!-- //.accordion-body -->
</div> <!-- //.accordion-collapse -->
</div> <!-- //.accordion-item -->
</div> <!-- //.accordion -->

View File

@ -0,0 +1,409 @@
<div class="accordion mt-3" id="accordionDatosPresupuestoCliente">
<div class="card accordion-item active">
<h2 class="accordion-header" id="heading">
<button type="button" class="accordion-button" data-bs-toggle="collapse" data-bs-target="#accordionDatosPresupuestoClienteTip" aria-expanded="false" aria-controls="accordionDatosPresupuestoClienteTip">
<h4><?= lang("Presupuestos.datosPresupuestoCliente") ?></h4>
</button>
</h2>
<div id="accordionDatosPresupuestoClienteTip" class="accordion-collapse collapse show" data-bs-parent="#accordionDatosPresupuestoCliente">
<div class="accordion-body">
<div class="divider divider-dark text-start mb-1">
<div class="divider-text">
<h5><?= lang("Presupuestos.tipoImpresion") ?></h5>
</div>
</div>
<div class="col-md-12 col-lg-3 px-4 mt-1">
<div class="mb-3">
<select id="tipoImpresion" name="tipo_impresion" class="form-control select2bs2" style="width: 100%;">
<option id="tipoImpresionNegro" value="negro" <?= isset($presupuestoEntity->comparador_json_data) ? ("negro" == $presupuestoEntity->comparador_json_data->tipo_impresion ? ' selected' : '') : '' ?>>
<?= lang('MaquinasTarifasImpresions.negro') ?>
</option>
<option value="negrohq" <?= isset($presupuestoEntity->comparador_json_data) ? ("negrohq" == $presupuestoEntity->comparador_json_data->tipo_impresion ? ' selected' : '') : '' ?>>
<?= lang('MaquinasTarifasImpresions.negrohq') ?>
</option>
<option value="color" <?= isset($presupuestoEntity->comparador_json_data) ? ("color" == $presupuestoEntity->comparador_json_data->tipo_impresion ? ' selected' : '') : '' ?>>
<?= lang('MaquinasTarifasImpresions.color') ?>
</option>
<option value="colorhq" <?= isset($presupuestoEntity->comparador_json_data) ? ("colorhq" == $presupuestoEntity->comparador_json_data->tipo_impresion ? ' selected' : '') : '' ?>>
<?= lang('MaquinasTarifasImpresions.colorhq') ?>
</option>
</select>
</div><!--//.mb-3 -->
</div><!--//.col -->
<!----------------------------------------------------------------------------->
<div class="divider divider-dark text-start mb-1">
<div class="divider-text">
<h5><?= lang("Presupuestos.papelesComparadorCosidoTapaBlanda") ?></h5>
</div>
</div>
<div class="row mb-1">
<div class="col-md-12 col-lg-2 px-1 mb-0">
<p class="mb-0"></p>
</div>
<div class="col-md-12 col-lg-2 px-4 mb-0">
<p class="mb-0"><?= lang("Presupuestos.numeroPaginas") ?></p>
</div>
<div class="col-md-12 col-lg-6 px-4 mb-0">
<p class="mb-0"><?= lang("Presupuestos.papel") ?></p>
</div>
<div class="col-md-12 col-lg-2 px-4 mb-0">
<p class="mb-0"><?= lang("Presupuestos.gramaje") ?></p>
</div>
<div>
<hr class="my-1">
<hr class="my-1">
</div>
</div>
<div class="row mt-0 comp-negro-selected">
<div class="col-md-12 col-lg-2 px-4">
<p><?= lang('MaquinasTarifasImpresions.negro') ?></p>
</div>
<div class="col-md-12 col-lg-2 px-4">
<input type="number" id="compPaginasNegro" name="comp_paginas_negro" placeholder="0" maxLength="5" class="form-control" value="<?= isset($presupuestoEntity->comparador_json_data->negro) ? (old(0, $presupuestoEntity->comparador_json_data->negro->paginas)) : '0' ?>">
</div>
<div class="col-md-12 col-lg-6 px-4">
<select id="compPapelNegro" name="comp_papel_negro" class="form-control select2bs2" style="width: 100%;">
<?php if (isset($papelGenericoNegroList) && is_array($papelGenericoNegroList) && !empty($papelGenericoNegroList)) :
foreach ($papelGenericoNegroList as $k => $v) : ?>
<option value="<?= $k ?>" /*<?= $k == $presupuestoEntity->tipo_impresion_id ? ' selected' : '' ?>* />
<?= $v ?>
</option>
<?php endforeach;
endif; ?>
</select>
</div>
<div class="col-md-12 col-lg-2 px-4">
<select id="compGramajeNegro" name="comp_gramaje_negro" class="form-control select2bs2" disabled style="width: 100%;">
</select>
</div>
<div>
<hr class="my-1">
</div>
</div>
<div class="row mt-0 comp-negrohq-selected">
<div class="col-md-12 col-lg-2 px-4">
<p><?= lang('MaquinasTarifasImpresions.negrohq') ?></p>
</div>
<div class="col-md-12 col-lg-2 px-4">
<input type="number" id="compPaginasNegrohq" name="comp_paginas_negrohq" placeholder="0" maxLength="5" class="form-control" value="<?= isset($presupuestoEntity->comparador_json_data->negro) ? (old(0, $presupuestoEntity->comparador_json_data->negro->paginas)) : '0' ?>">
</div>
<div class="col-md-12 col-lg-6 px-4">
<select id="compPapelNegrohq" name="comp_papel_negrohq" class="form-control select2bs2" style="width: 100%;">
<?php if (isset($papelGenericoNegroHQList) && is_array($papelGenericoNegroHQList) && !empty($papelGenericoNegroHQList)) :
foreach ($papelGenericoNegroHQList as $k => $v) : ?>
<option value="<?= $k ?>" /*<?= $k == $presupuestoEntity->tipo_impresion_id ? ' selected' : '' ?>* />
<?= $v ?>
</option>
<?php endforeach;
endif; ?>
</select>
</div>
<div class="col-md-12 col-lg-2 px-4">
<select id="compGramajeNegrohq" name="comp_gramaje_negrohq" class="form-control select2bs2" disabled style="width: 100%;">
</select>
</div>
<div>
<hr class="my-1">
</div>
</div>
<div class="row comp-color-selected">
<div class="col-md-12 col-lg-2 px-4">
<p><?= lang('MaquinasTarifasImpresions.color') ?></p>
</div>
<div class="col-md-12 col-lg-2 px-4">
<input type="number" id="compPaginasColor" name="comp_paginas_color" placeholder="0" maxLength="5" class="form-control" value="<?= isset($presupuestoEntity->comparador_json_data->color) ? (old(0, $presupuestoEntity->comparador_json_data->color->paginas)) : '0' ?>">
</div>
<div class="col-md-12 col-lg-6 px-4">
<select id="compPapelColor" name="comp_papel_color" class="form-control select2bs2" style="width: 100%;">
<?php if (isset($papelGenericoColorList) && is_array($papelGenericoColorList) && !empty($papelGenericoColorList)) :
foreach ($papelGenericoColorList as $k => $v) : ?>
<option value="<?= $k ?>" /*<?= $k == $presupuestoEntity->tipo_impresion_id ? ' selected' : '' ?>* />
<?= $v ?>
</option>
<?php endforeach;
endif; ?>
</select>
</div>
<div class="col-md-12 col-lg-2 px-4">
<select id="compGramajeColor" name="comp_gramaje_color" class="form-control select2bs2" disabled style="width: 100%;">
</select>
</div>
<div>
<hr class="my-1">
</div>
</div>
<div class="row comp-colorhq-selected">
<div class="col-md-12 col-lg-2 px-4">
<p><?= lang('MaquinasTarifasImpresions.colorhq') ?></p>
</div>
<div class="col-md-12 col-lg-2 px-4">
<input type="number" id="compPaginasColorhq" name="comp_paginas_colorhq" placeholder="0" maxLength="5" class="form-control" value="<?= isset($presupuestoEntity->comparador_json_data->color) ? (old(0, $presupuestoEntity->comparador_json_data->color->paginas)) : '0' ?>">
</div>
<div class="col-md-12 col-lg-6 px-4">
<select id="compPapelColorhq" name="comp_papel_colorhq" class="form-control select2bs2" style="width: 100%;">
<?php if (isset($papelGenericoColorHQList) && is_array($papelGenericoColorHQList) && !empty($papelGenericoColorHQList)) :
foreach ($papelGenericoColorHQList as $k => $v) : ?>
<option value="<?= $k ?>" /*<?= $k == $presupuestoEntity->tipo_impresion_id ? ' selected' : '' ?>* />
<?= $v ?>
</option>
<?php endforeach;
endif; ?>
</select>
</div>
<div class="col-md-12 col-lg-2 px-4">
<select id="compGramajeColorhq" name="comp_gramaje_colorhq" class="form-control select2bs2" disabled style="width: 100%;">
</select>
</div>
<div>
<hr class="my-1">
</div>
</div>
<div class="row">
<div class="col-md-12 col-lg-2 px-4">
<p><?= lang('PapelImpresion.cubierta') ?></p>
</div>
<div class="col-md-12 col-lg-2 px-4">
<select id="compPaginasCubierta" name="comp_paginas_cubierta" class="form-control select2bs2" style="width: 100%;">
<option value="1" >
<p><?= lang('Presupuestos.1cara') ?></p>
</option>
<option value="2" >
<p><?= lang('Presupuestos.2caras') ?></p>
</option>
</select>
</div>
<div class="col-md-12 col-lg-6 px-4">
<select id="compPapelCubierta" name="comp_papel_cubierta" class="form-control select2bs2" style="width: 100%;">
<?php if (isset($papelGenericoSobrecubiertaList) && is_array($papelGenericoSobrecubiertaList) && !empty($papelGenericoSobrecubiertaList)) :
foreach ($papelGenericoSobrecubiertaList as $k => $v) : ?>
<option value="<?= $k ?>" /*<?= $k == $presupuestoEntity->tipo_impresion_id ? ' selected' : '' ?>* />
<?= $v ?>
</option>
<?php endforeach;
endif; ?>
</select>
</div>
<div class="col-md-12 col-lg-2 px-4">
<select id="compGramajeCubierta" name="comp_gramaje_cubierta" class="form-control select2bs2" disabled style="width: 100%;">
</select>
</div>
<div>
<hr class="my-1">
</div>
</div>
<!----------------------------------------------------------------------------->
<div class="divider divider-dark text-start mb-1 comp-color-selected">
<div class="divider-text">
<h5><?= lang("Presupuestos.posicionPagColor") ?></h5>
</div>
</div>
<div class="row comp-color-selected">
<div class="col-md-12 col-lg-4 px-4">
<div class="mb-3">
<label for="compPosPaginasColor" class="form-label">
<?= lang('Presupuestos.posicionPagColor') ?>
</label>
<input type="text" id="compPosPaginasColor" name="comp_pos_paginas_color" maxLength="20" class="form-control" value="<?= isset($presupuestoEntity->comparador_json_data->color->pospaginas) ? (old('', $presupuestoEntity->comparador_json_data->color->pospaginas)) : '' ?>">
</div><!--//.mb-3 -->
</div><!--//.col -->
<div class="col-md-12 col-lg-8 px-4">
<div class="mb-3">
<label for="compCalPaginasColor" class="form-label">
<?= lang('Presupuestos.posicionPagColor') ?>
</label>
<textarea type="text" id="compCalPaginasColor" name="comp_cal_paginas_color" maxLength="500" class="form-control" rows="1" readonly style="background: #E8E8E8;"></textarea>
</div><!--//.mb-3 -->
</div><!--//.col -->
<div class="col-md-12 col-lg-12 px-4">
<p class="text-muted" style="font-size: 0.9em;"><?= lang('Presupuestos.colorPageInstructions') ?></p>
</div>
</div><!--//.row -->
<!----------------------------------------------------------------------------->
<div class="accordion mt-3" id="accordionCompInteriorPlana">
<div class="card accordion-item active">
<h2 class="accordion-header" id="headingOne">
<button type="button" class="accordion-button" data-bs-toggle="collapse" data-bs-target="#accordionCompInteriorPlanaTip" aria-expanded="false" aria-controls="accordionCompInteriorPlanaTip">
<h6><?= lang("Presupuestos.compInteriorPlana") ?></h4>
</button>
</h2>
<div id="accordionCompInteriorPlanaTip" class="accordion-collapse collapse" data-bs-parent="#accordionCompInteriorPlana">
<div class="accordion-body">
<table id="tableCompIntPlana" class="comparator-table table dt-responsive dataTable">
<thead>
<tr>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.tipo') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.paginas') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.papel') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.gramaje') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.marca') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.maquina') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.numeroPliegos') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.pliegosPedido') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPliego') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.libro') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalPapelPedido') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.lomo') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.peso') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.click') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalClicks') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPagNegro') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPagColor') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalTinta') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalCorte') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.total') ?></th>
</tr>
</thead>
<tbody>
</tbody>
<tfoot>
<tr>
<td class="dt-result dt-result-text" colspan="18"><?= lang('Presupuestos.total') ?> <?= lang("Presupuestos.compInteriorPlana") ?>:</td>
<td class="dt-result dt-result-value" colspan="2"> 0.00 </td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
<div class="accordion mt-3" id="accordionCompInteriorRotativa">
<div class="card accordion-item active">
<h2 class="accordion-header" id="headingTwo">
<button type="button" class="accordion-button" data-bs-toggle="collapse" data-bs-target="#accordionCompInteriorRotativaTip" aria-expanded="false" aria-controls="accordionCompInteriorRotativaTip">
<h6><?= lang("Presupuestos.compInteriorRotativa") ?></h4>
</button>
</h2>
<div id="accordionCompInteriorRotativaTip" class="accordion-collapse collapse" data-bs-parent="#accordionCompInteriorRotativa">
<div class="accordion-body">
<table id="tableCompIntRotativa" class="comparator-table table dt-responsive dataTable">
<thead>
<tr>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.tipo') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.paginas') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.papel') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.gramaje') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.marca') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.maquina') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.numeroPliegos') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.pliegosPedido') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPliego') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.libro') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalPapelPedido') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.lomo') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.peso') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.click') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalClicks') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPagNegro') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPagColor') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalTinta') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalCorte') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.total') ?></th>
</tr>
</thead>
<tbody>
</tbody>
<tfoot>
<tr>
<td class="dt-result dt-result-text" colspan="18"><?= lang('Presupuestos.total') ?> <?= lang("Presupuestos.compInteriorRotativa") ?>:</td>
<td class="dt-result dt-result-value" colspan="2">0.00</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
<div class="accordion mt-3" id="accordionCompCubiertaSobrecubierta">
<div class="card accordion-item active">
<h2 class="accordion-header" id="headingThree">
<button type="button" class="accordion-button" data-bs-toggle="collapse" data-bs-target="#accordionCompCubiertaSobrecubiertaTip" aria-expanded="false" aria-controls="accordionCompCubiertaSobrecubiertaTip">
<h6><?= lang("Presupuestos.cubierta") ?></h4>
</button>
</h2>
<div id="accordionCompCubiertaSobrecubiertaTip" class="accordion-collapse collapse" data-bs-parent="#accordionCompCubiertaSobrecubierta">
<div class="accordion-body">
<table id="tableCompCubierta" class="comparator-table table dt-responsive dataTable">
<thead>
<tr>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.tipo') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.paginas') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.papel') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.gramaje') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.marca') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.maquina') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.numeroPliegos') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.pliegosPedido') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPliego') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.libro') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalPapelPedido') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.lomo') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.peso') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.click') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalClicks') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPagNegro') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.precioPagColor') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalTinta') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.totalCorte') ?></th>
<th style="padding-right: 0.75em;"><?= lang('Presupuestos.total') ?></th>
</tr>
</thead>
<tbody>
</tbody>
<tfoot>
<tr>
<td class="dt-result dt-result-text" colspan="18"><?= lang('Presupuestos.total') ?> <?= lang('Presupuestos.cubierta') ?>:</td>
<td class="dt-result dt-result-value" colspan="2">0.00</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div> <!-- //.accordion-body -->
</div> <!-- //.accordion-collapse -->
</div> <!-- //.accordion-item -->
</div> <!-- //.accordion -->

View File

@ -0,0 +1,169 @@
<div class="accordion mt-3" id="accordionDatosPresupuesto">
<div class="card accordion-item active">
<h2 class="accordion-header" id="headingOne">
<button type="button" class="accordion-button" data-bs-toggle="collapse" data-bs-target="#accordionDatosPresupuestoTip" aria-expanded="false" aria-controls="accordionDatosPresupuestoTip">
<h4><?= lang("Presupuestos.datosPresupuesto") ?></h4>
</button>
</h2>
<div id="accordionDatosPresupuestoTip" class="accordion-collapse collapse show" data-bs-parent="#accordionDatosPresupuesto">
<div class="accordion-body">
<!-- Fila 1 -->
<div class="row">
<div class="col-md-12 col-lg-3 px-4">
<div class="mb-3">
<label for="id" class="form-label">
<?= lang('Presupuestos.id') ?>
</label>
<input readonly style="background: #E8E8E8;" id="id" name="id" maxLength="12" class="form-control" value="<?= old('id', $presupuestoEntity->id) ?>">
</div><!--//.mb-3 -->
</div><!--//.col -->
<div class="col-md-12 col-lg-3 px-4">
<div class="mb-3">
<label for="created_at" class="form-label">
<?= lang('Presupuestos.created_at') ?>
</label>
<input readonly style="background: #E8E8E8;" id="created_at" name="created_at" maxLength="12" class="form-control" value="<?= old('created_at', (isset($presupuestoEntity->created_at)) ? $presupuestoEntity->created_at : date("d/m/Y")) ?>">
</div><!--//.mb-3 -->
</div><!--//.col -->
<div class="col-md-12 col-lg-3 px-4">
<div class="mb-3">
<label for="estadoId" class="form-label">
<?= lang('Presupuestos.presupuestoEstado') ?>
</label>
<input readonly style="background: #E8E8E8 ;" id="estadoId" name="estado_id" maxLength="12" class="form-control" value="<?= old('estadoId', (isset($presupuestoEntity->estadoId)) ? $presupuestoEntity->estadoId : lang('Presupuestos.presupuestoEstadoBorrador')) ?>">
</div><!--//.mb-3 -->
</div><!--//.col -->
<div class="col-md-12 col-lg-3 px-4">
<div class="mb-3">
<label for="incRei" class="form-label">
<?= lang('Presupuestos.incRei') ?>
</label>
<select id="incRei" name="inc_rei" maxLength="11" class="form-control" value="<?= old('inc_rei', $presupuestoEntity->inc_rei) ?>">
<?php if (isset($incReiList) && is_array($incReiList) && !empty($incReiList)) : ?>
<option> </option>
<?php foreach ($incReiList as $k => $v) : ?>
<option value="<?= $k ?>" <?= $k == $presupuestoEntity->estado_id ? ' selected' : '' ?>>
<?= $v ?>
</option>
<?php endforeach;
endif; ?>
</select>
</div><!--//.mb-3 -->
</div><!--//.col -->
</div> <!--//.row -->
<!-- Fila 2 -->
<div class="row">
<div class="col-md-12 col-lg-6 px-4">
<div class="mb-3">
<label for="titulo" class="form-label">
<?=lang('Presupuestos.titulo') ?>*
</label>
<input type="text" id="titulo" name="titulo" maxLength="300" class="form-control" value="<?=old('titulo', $presupuestoEntity->titulo) ?>">
</div><!--//.mb-3 -->
</div><!--//.col -->
<div class="col-md-12 col-lg-6 px-4">
<div class="mb-3">
<label for="autor" class="form-label">
<?=lang('Presupuestos.autor') ?>*
</label>
<input type="text" id="autor" name="autor" maxLength="150" class="form-control" value="<?=old('autor', $presupuestoEntity->autor) ?>">
</div><!--//.mb-3 -->
</div><!--//.col -->
</div> <!--//.row -->
<!-- Fila 3 -->
<div class="row">
<div class="col-md-12 col-lg-3 px-4">
<div class="mb-3">
<label for="coleccion" class="form-label">
<?=lang('Presupuestos.coleccion') ?>
</label>
<input type="text" id="coleccion" name="coleccion" maxLength="255" class="form-control" value="<?=old('coleccion', $presupuestoEntity->coleccion) ?>">
</div><!--//.mb-3 -->
</div>
<div class="col-md-12 col-lg-3 px-4">
<div class="mb-3">
<label for="numeroEdicion" class="form-label">
<?=lang('Presupuestos.numeroEdicion') ?>
</label>
<input type="text" id="numeroEdicion" name="numero_edicion" maxLength="50" class="form-control" value="<?=old('numero_edicion', $presupuestoEntity->numero_edicion) ?>">
</div><!--//.mb-3 -->
</div>
<div class="col-md-12 col-lg-3 px-4">
<div class="mb-3">
<label for="isbn" class="form-label">
<?=lang('Presupuestos.isbn') ?>
</label>
<input type="text" id="isbn" name="isbn" maxLength="50" class="form-control" value="<?=old('isbn', $presupuestoEntity->isbn) ?>">
</div><!--//.mb-3 -->
</div>
<div class="col-md-12 col-lg-3 px-4">
<div class="mb-3">
<label for="paisId" class="form-label">
<?=lang('Presupuestos.paisId') ?>*
</label>
<select id="paisId" name="pais_id" class="form-control select2bs" style="width: 100%;" >
<option value=""><?=lang('Basic.global.pleaseSelectA', [lang('Presupuestos.paisId')]) ?></option>
<?php foreach ($paisList as $item) : ?>
<option value="<?=$item->id ?>"<?=$item->id==$presupuestoEntity->pais_id ? ' selected':'' ?>>
<?=$item->nombre ?>
</option>
<?php endforeach; ?>
</select>
</div><!--//.mb-3 -->
</div>
</div> <!--//.row -->
<!-- Fila 3 -->
<div class="row">
<div class="col-md-12 col-lg-6 px-4">
<div class="mb-3">
<label for="clienteId" class="form-label">
<?= lang('Presupuestos.clienteId') ?>*
</label>
<select id="clienteId" name="cliente_id" class="form-control select2bs2" style="width: 100%;">
<?php if (isset($clienteList) && is_array($clienteList) && !empty($clienteList)) :
foreach ($clienteList as $k => $v) : ?>
<option value="<?= $k ?>" <?= $k == $presupuestoEntity->cliente_id ? ' selected' : '' ?>>
<?= $v ?>
</option>
<?php endforeach;
endif; ?>
</select>
</div><!--//.mb-3 -->
</div><!--//.col -->
<div class="col-md-12 col-lg-6 px-4">
<div class="mb-3">
<label for="referenciaCliente" class="form-label">
<?=lang('Presupuestos.referenciaCliente') ?>
</label>
<input type="text" id="referenciaCliente" name="referencia_cliente" maxLength="100" class="form-control" value="<?=old('referencia_cliente', $presupuestoEntity->referencia_cliente) ?>">
</div><!--//.mb-3 -->
</div><!--//.col -->
</div> <!--//.row -->
</div> <!-- //.accordion-body -->
</div> <!-- //.accordion-collapse -->
</div> <!-- //.accordion-item -->
</div> <!-- //.accordion -->

View File

@ -0,0 +1,33 @@
<div class="accordion mt-3" id="accordionEncuadernacion">
<div class="card accordion-item active">
<h2 class="accordion-header" id="headingOne">
<button type="button" class="accordion-button" data-bs-toggle="collapse" data-bs-target="#accordionEncuadernacionTip" aria-expanded="false" aria-controls="accordionEncuadernacionTip">
<h4><?= lang("Presupuestos.encuadernacion") ?></h4>
</button>
</h2>
<div id="accordionEncuadernacionTip" class="accordion-collapse collapse show" data-bs-parent="#accordionEncuadernacion">
<div class="accordion-body">
<div class="col-md-12 col-lg-4 px-4">
<div class="mb-3">
<label for="encuadernacion" class="form-label">
<?= lang('Presupuestos.encuadernacion') ?>*
</label>
<select id="encuadernacion" name="encuadernacion" class="form-control select2bs2" style="width: 100%;">
<!---
<?php if (isset($papelFormatoList) && is_array($papelFormatoList) && !empty($papelFormatoList)) :
foreach ($papelFormatoList as $formato) : ?>
<option value="<?= $formato->id ?>" <?= $formato->id == $presupuestoEntity->papel_formato_id ? ' selected' : '' ?>>
<?= $formato->tamanio ?>
</option>
<?php endforeach;
endif; ?>
--->
</select>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,197 @@
/*******************************
* Eventos asociados a elementos HTML
*******************************/
$("#solapas").on("click", function () {
var e = document.getElementById('div_solapas_ancho');
if (document.getElementById('solapas').checked) {
e.style.display = "flex";
}
else {
e.style.display = "none";
}
});
$('#tipoImpresion').on("change", function () {
updatePapelesComparador();
});
$('#tipoImpresion').on("change", function () {
updatePapelesComparador();
});
$('#compRetractilado').on("change", function () {
checkRetractiladoComparador(this);
});
$('#compRetractilado5').on("change", function () {
checkRetractiladoComparador(this);
});
$('#imagenesBnInterior').on("change", function () {
var e = document.getElementById('tipoImpresion');
var optionToHide = e.querySelector("option[value='negro']");
if (document.getElementById('imagenesBnInterior').checked) {
optionToHide.setAttribute('disabled', 'disabled')
if (e.value == 'negro') {
e.value = 'negrohq';
}
}
else {
optionToHide.removeAttribute('disabled');
}
$('#tipoImpresion').select2();
});
$('#compPosPaginasColor').on("keyup", function () {
computarPaginasColor(this.value);
});
// Este evento recoloca los headers de las tablas cuando se pulsa el
// boton del acordeon
$('.accordion-button').on('click', function (e) {
$.fn.dataTable.tables({ visible: true, api: true }).columns.adjust();
});
/*******************************
* Metodos
*******************************/
function init_comparador() {
updatePapelesComparador();
const paginasColor = document.getElementById('compCalPaginasColor');
if (paginasColor.value.length > 0) {
computarPaginasColor(paginasColor.value);
}
}
function computarPaginasColor(string) {
var numbers = [];
for (const [, beginStr, endStr] of string.matchAll(/(\d+)(?:-(\d+))?/g)) {
const [begin, end] = [beginStr, endStr].map(Number);
numbers.push(begin);
if (endStr !== undefined) {
for (let num = begin + 1; num <= end; num++) {
numbers.push(num);
}
}
}
var numbers2 = [];
numbers.forEach(function (value, i) {
// Si es impar y no está el siguiente par hay que añadirlo
if (value % 2 != 0 && numbers[i + 1] != value + 1) {
numbers2.push(value + 1);
}
});
numbers = numbers.concat(numbers2);
numbers.sort(function (a, b) {
return a - b;
});
calPagesTextarea = document.getElementById('compCalPaginasColor');
calPagesTextarea.value = numbers;
autosize.update(calPagesTextarea);
}
function checkRetractiladoComparador(element) {
switch (element.id) {
case 'compRetractilado':
if (document.getElementById(element.id).checked) {
document.getElementById('compRetractilado5').checked = false;
}
break;
case 'compRetractilado5':
if (document.getElementById(element.id).checked) {
document.getElementById('compRetractilado').checked = false;
}
break;
default:
break;
}
}
function updatePapelesComparador() {
var e = document.getElementById("tipoImpresion");
elements_negro = document.getElementsByClassName('comp-negro-selected');
elements_negrohq = document.getElementsByClassName('comp-negrohq-selected');
elements_color = document.getElementsByClassName('comp-color-selected');
elements_colorhq = document.getElementsByClassName('comp-colorhq-selected');
switch (e.value) {
case "negro":
Array.from(elements_color).forEach(element => {
element.style.display = "none";
});
Array.from(elements_negro).forEach(element => {
element.style.display = "flex";
});
Array.from(elements_negrohq).forEach(element => {
element.style.display = "none";
});
Array.from(elements_colorhq).forEach(element => {
element.style.display = "none";
});
break;
case "negrohq":
Array.from(elements_color).forEach(element => {
element.style.display = "none";
});
Array.from(elements_negro).forEach(element => {
element.style.display = "none";
});
Array.from(elements_negrohq).forEach(element => {
element.style.display = "flex";
});
Array.from(elements_colorhq).forEach(element => {
element.style.display = "none";
});
break;
case "color":
Array.from(elements_negro).forEach(element => {
element.style.display = "flex";
});
Array.from(elements_negrohq).forEach(element => {
element.style.display = "none";
});
Array.from(elements_color).forEach(element => {
element.style.display = "flex";
});
Array.from(elements_colorhq).forEach(element => {
element.style.display = "none";
});
break;
case "colorhq":
Array.from(elements_negro).forEach(element => {
element.style.display = "none";
});
Array.from(elements_negrohq).forEach(element => {
element.style.display = "flex";
});
Array.from(elements_color).forEach(element => {
element.style.display = "none";
});
Array.from(elements_colorhq).forEach(element => {
element.style.display = "flex";
});
break;
default:
break;
}
}

View File

@ -0,0 +1,403 @@
<?= $this->include('themes/_commonPartialsBs/datatables') ?>
<?= $this->include("themes/_commonPartialsBs/select2bs5") ?>
<?= $this->include("themes/_commonPartialsBs/sweetalert") ?>
<?= $this->extend('themes/backend/vuexy/main/defaultlayout') ?>
<?= $this->section("content") ?>
<div class="row">
<div class="col-12">
<div class="card card-info">
<div class="card-header">
<h3 class="card-title"><?= $boxTitle ?? $pageTitle ?></h3>
</div><!--//.card-header -->
<form id="presupuestoForm" class="card-body" method="post" action="<?= $formAction ?>">
<?= csrf_field() ?>
<?= view("themes/_commonPartialsBs/_alertBoxes") ?>
<?= !empty($validation->getErrors()) ? $validation->listErrors("bootstrap_style") : "" ?>
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoItems") ?>
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosLibroItems") ?>
<?= view("themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoClienteItems") ?>
<div class="pt-4">
<input type="submit"
class="btn btn-primary float-start me-sm-3 me-1"
name="save"
value="<?= lang("Basic.global.Save") ?>"
/>
<?= anchor(route_to("cosidotapablandaList"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary float-start",]) ?>
</div>
</form>
</div><!-- //.card -->
</div><!--//.col -->
</div><!--//.row -->
<?= $this->endSection() ?>
<!------------------------------------------->
<!-- Código JS para los selects -->
<!------------------------------------------->
<?= $this->section("additionalInlineJs") ?>
$('#clienteId').select2({
allowClear: false,
ajax: {
url: '<?= route_to("menuItemsOfClientes") ?>',
type: 'post',
dataType: 'json',
data: function (params) {
return {
id: 'id',
text: 'nombre',
searchTerm: params.term,
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
};
},
delay: 60,
processResults: function (response) {
yeniden(response.<?= csrf_token() ?>);
return {
results: response.menu
};
},
cache: true
}
});
$('#incRei').select2({
allowClear: false,
});
$('#paisId').select2({
allowClear: false,
});
$('#papelFormatoId').select2({
allowClear: false,
});
$('#tipoImpresion').select2({
allowClear: false,
});
$('#compPapelNegro').select2({
allowClear: false,
});
$('#compGramajeNegro').select2({
allowClear: false,
});
$('#compPapelNegrohq').select2({
allowClear: false,
});
$('#compGramajeNegrohq').select2({
allowClear: false,
});
$('#compPapelColor').select2({
allowClear: false,
});
$('#compPapelColorhq').select2({
allowClear: false,
});
$('#compGramajeColor').select2({
allowClear: false,
});
$('#compPapelCubierta').select2({
allowClear: false,
});
$('#compGramajeCubierta').select2({
allowClear: false,
});
$('#encuadernacion').select2({
allowClear: false,
});
$('#compPaginasCubierta').select2({
allowClear: false,
minimumResultsForSearch: Infinity,
});
<?= $this->endSection() ?>
<!------------------------------------------->
<!-- Código JS comportamiento general pag. -->
<!------------------------------------------->
<?= $this->section("additionalInlineJs") ?>
autosize($('#compCalPaginasColor'));
$('#papelFormatoPersonalizado').on("click",function(){
var checkbox = document.getElementById('papelFormatoPersonalizado');
if(checkbox.checked == true){
document.getElementById("papelFormatoAncho").style.display = "block";
document.getElementById("papelFormatoAlto").style.display = "block";
$('#papelFormatoId').next(".select2-container").hide();
document.getElementById("label_papelFormatoId").innerHTML =
"<?=lang('Presupuestos.papelFormatoId') ?> (" +
"<?=lang('Presupuestos.papelFormatoAncho') ?> x <?=lang('Presupuestos.papelFormatoAncho') ?>)*";
}
else{
document.getElementById("papelFormatoAncho").style.display = "none";
document.getElementById("papelFormatoAlto").style.display = "none";
$('#papelFormatoId').next(".select2-container").show();
document.getElementById("label_papelFormatoId").innerHTML =
"<?=lang('Presupuestos.papelFormatoId') ?>*";
}
});
init_comparador();
var tableCompIntPlana = new DataTable('#tableCompIntPlana',{
scrollX: true,
searching: false,
paging: false,
info: false,
ordering: false,
responsive: true,
language: {
url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/<?= config('Basics')->i18n ?>.json"
},
});
var tableCompIntRotativa = new DataTable('#tableCompIntRotativa',{
scrollX: true,
searching: false,
paging: false,
info: false,
ordering: false,
responsive: true,
language: {
url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/<?= config('Basics')->i18n ?>.json"
},
});
var tableCompIntCubierta = new DataTable('#tableCompCubierta',{
scrollX: true,
searching: false,
paging: false,
info: false,
ordering: false,
responsive: true,
language: {
url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/<?= config('Basics')->i18n ?>.json"
},
});
var tableCompIntSobrecubierta = new DataTable('#tableCompSobrecubierta',{
scrollX: true,
searching: false,
paging: false,
info: false,
ordering: false,
responsive: true,
language: {
url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/<?= config('Basics')->i18n ?>.json"
},
});
$('#compPapelNegro').on('select2:select', function (e){
$('#compGramajeNegro').val(null).trigger('change');
$('#compGramajeNegro').prop('disabled', false);
$('#compPapelNegro').find('option[value="0"]').remove();
$('#compGramajeNegro').select2({
allowClear: true,
minimumResultsForSearch: Infinity,
ajax: {
url: '<?= route_to("menuItemsOfCosidotapablanda") ?>',
type: 'post',
dataType: 'json',
data: function (params) {
return {
tipo: 'gramaje',
datos: $('#compPapelNegro').select2('data')[0].text.trim() ,
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
};
},
delay: 60,
processResults: function (response) {
yeniden(response.<?= csrf_token() ?>);
return {
results: response.menu
};
},
cache: true
}
});
});
$('#compPapelNegrohq').on('select2:select', function (e){
$('#compGramajeNegrohq').val(null).trigger('change');
$('#compGramajeNegrohq').prop('disabled', false);
$('#compPapelNegrohq').find('option[value="0"]').remove();
$('#compGramajeNegrohq').select2({
allowClear: true,
minimumResultsForSearch: Infinity,
ajax: {
url: '<?= route_to("menuItemsOfCosidotapablanda") ?>',
type: 'post',
dataType: 'json',
data: function (params) {
return {
tipo: 'gramaje',
datos: $('#compPapelNegrohq').select2('data')[0].text.trim() ,
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
};
},
delay: 60,
processResults: function (response) {
yeniden(response.<?= csrf_token() ?>);
return {
results: response.menu
};
},
cache: true
}
});
});
$('#compPapelColor').on('select2:select', function (e){
$('#compGramajeColor').val(null).trigger('change');
$('#compGramajeColor').prop('disabled', false);
$('#compPapelColor').find('option[value="0"]').remove();
$('#compGramajeColor').select2({
allowClear: true,
minimumResultsForSearch: Infinity,
ajax: {
url: '<?= route_to("menuItemsOfCosidotapablanda") ?>',
type: 'post',
dataType: 'json',
data: function (params) {
return {
tipo: 'gramaje',
datos: $('#compPapelColor').select2('data')[0].text.trim() ,
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
};
},
delay: 60,
processResults: function (response) {
yeniden(response.<?= csrf_token() ?>);
return {
results: response.menu
};
},
cache: true
}
});
});
$('#compPapelColorhq').on('select2:select', function (e){
$('#compGramajeColorhq').val(null).trigger('change');
$('#compGramajeColorhq').prop('disabled', false);
$('#compPapelColorhq').find('option[value="0"]').remove();
$('#compGramajeColorhq').select2({
allowClear: true,
minimumResultsForSearch: Infinity,
ajax: {
url: '<?= route_to("menuItemsOfCosidotapablanda") ?>',
type: 'post',
dataType: 'json',
data: function (params) {
return {
tipo: 'gramaje',
datos: $('#compPapelColorhq').select2('data')[0].text.trim() ,
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
};
},
delay: 60,
processResults: function (response) {
yeniden(response.<?= csrf_token() ?>);
return {
results: response.menu
};
},
cache: true
}
});
});
$('#compPapelCubierta').on('select2:select', function (e){
$('#compGramajeCubierta').val(null).trigger('change');
$('#compGramajeCubierta').prop('disabled', false);
$('#compPapelCubierta').find('option[value="0"]').remove();
$('#compGramajeCubierta').select2({
allowClear: true,
minimumResultsForSearch: Infinity,
ajax: {
url: '<?= route_to("menuItemsOfCosidotapablanda") ?>',
type: 'post',
dataType: 'json',
data: function (params) {
return {
tipo: 'gramaje',
datos: $('#compPapelCubierta').select2('data')[0].text.trim() ,
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
};
},
delay: 60,
processResults: function (response) {
yeniden(response.<?= csrf_token() ?>);
return {
results: response.menu
};
},
cache: true
}
});
});
<?= $this->endSection() ?>
<?=$this->section('css') ?>
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/datatables-editor/editor.dataTables.min.css') ?>">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.2.3/css/buttons.bootstrap5.min.css">
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/sk-datatables.css') ?>">
<?=$this->endSection() ?>
<?= $this->section('additionalExternalJs') ?>
<script src="<?= site_url('themes/vuexy/vendor/libs/autosize/autosize.js') ?>"></script>
<script src="<?= site_url('js_loader/comparadorCosidoTapaBlanda_js') ?>"></script>
<?=$this->endSection() ?>
<?= $this->section('additionalExternalJs') ?>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.bootstrap5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.print.min.js"></script>
<?=$this->endSection() ?>

View File

@ -0,0 +1,195 @@
<?=$this->include('themes/_commonPartialsBs/select2bs5') ?>
<?=$this->include('themes/_commonPartialsBs/datatables') ?>
<?=$this->include('themes/_commonPartialsBs/sweetalert') ?>
<?= $this->include('themes/_commonPartialsBs/_confirm2delete') ?>
<?= $this->extend('themes/backend/vuexy/main/defaultlayout') ?>
<?=$this->section('content'); ?>
<div class="row">
<div class="col-md-12">
<div class="card card-info">
<div class="card-header">
<h3 class="card-title"><?=lang('Presupuestos.presupuestoCosidotapablandaList') ?></h3>
<?=anchor(route_to('newCosidotapablanda'), lang('Basic.global.addNew').' '.lang('Presupuestos.presupuesto'), ['class'=>'btn btn-primary float-end']); ?>
</div><!--//.card-header -->
<div class="card-body">
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
<table id="tableOfPresupuestos" class="table table-striped table-hover" style="width: 100%;">
<thead>
<tr>
<th><?=lang('Presupuestos.id')?></th>
<th><?= lang('Presupuestos.created_at') ?></th>
<th><?= lang('Clientes.cliente') ?></th>
<th><?= lang('Presupuestos.comercial') ?></th>
<th><?= lang('Presupuestos.titulo') ?></th>
<th><?= lang('Paises.pais') ?></th>
<th><?= lang('Presupuestos.incRei') ?></th>
<th><?= lang('Presupuestos.paginas') ?></th>
<th><?= lang('Presupuestos.tirada') ?></th>
<th><?= lang('Presupuestos.totalPedido') ?></th>
<th><?= lang('Presupuestos.presupuestoEstado') ?></th>
<th class="text-nowrap"><?= lang('Basic.global.Action') ?></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div><!--//.card-body -->
<div class="card-footer">
</div><!--//.card-footer -->
</div><!--//.card -->
</div><!--//.col -->
</div><!--//.row -->
<?=$this->endSection() ?>
<?=$this->section('additionalInlineJs') ?>
const lastColNr = $('#tableOfPresupuestos').find("tr:first th").length - 1;
const actionBtns = function(data) {
return `
<td class="text-right py-0 align-middle">
<div class="btn-group btn-group-sm">
<a href="javascript:void(0);"><i class="ti ti-pencil ti-sm btn-edit mx-2" data-id="${data.id}"></i></a>
<a href="javascript:void(0);"><i class="ti ti-trash ti-sm btn-delete mx-2" data-id="${data.id}" data-bs-toggle="modal" data-bs-target="#confirm2delete"></i></a>
</div>
</td>`;
};
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": [
'colvis', '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/<?= config('Basics')->i18n ?>.json"
},
ajax : $.fn.dataTable.pipeline( {
url: '<?= route_to('dataTableOfCosidotapablanda') ?>',
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': 'pais' },
{ 'data': 'inc_rei' },
{ 'data': 'paginas' },
{ 'data': 'tirada' },
{ 'data': 'total_pedido' },
{ 'data': 'estado' },
{ 'data': actionBtns }
]
});
theTable.on( 'draw.dt', function () {
const dateCols = [1];
const priceCols = [9];
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);
cell.innerHTML = d.toLocaleDateString();
}
});
}
for (let coln of priceCols) {
theTable.column(coln, { page: 'current' }).nodes().each( function (cell, i) {
cell.innerHTML = parseFloat(cell.innerHTML).toFixed(2);
});
}
});
$(document).on('click', '.btn-edit', function(e) {
window.location.href = `/presupuestos/cosidotapablanda/edit/${$(this).attr('data-id')}`;
});
$(document).on('click', '.btn-delete', function(e) {
$(".btn-remove").attr('data-id', $(this).attr('data-id'));
});
$(document).on('click', '.btn-remove', function(e) {
const dataId = $(this).attr('data-id');
const row = $(this).closest('tr');
if ($.isNumeric(dataId)) {
$.ajax({
url: `/presupuestos/cosidotapablanda/delete/${dataId}`,
method: 'GET',
}).done((data, textStatus, jqXHR) => {
$('#confirm2delete').modal('toggle');
theTable.clearPipeline();
theTable.row($(row)).invalidate().draw();
popSuccessAlert(data.msg ?? jqXHR.statusText);
}).fail((jqXHR, textStatus, errorThrown) => {
popErrorAlert(jqXHR.responseJSON.messages.error)
})
}
});
<?=$this->endSection() ?>
<?=$this->section('css') ?>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.2.3/css/buttons.<?=config('Basics')->theme['name'] == 'Bootstrap5' ? 'bootstrap5' : 'bootstrap4' ?>.min.css">
<?=$this->endSection() ?>
<?= $this->section('additionalExternalJs') ?>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.<?=config('Basics')->theme['name'] == 'Bootstrap5' ? 'bootstrap5' : 'bootstrap4' ?>.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.print.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.colVis.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.0/jszip.min.js" integrity="sha512-xcHCGC5tQ0SHlRX8Anbz6oy/OullASJkEhb4gjkneVpGE3/QGYejf14CUO5n5q5paiHfRFTa9HKgByxzidw2Bw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.5/pdfmake.min.js" integrity="sha512-rDbVu5s98lzXZsmJoMa0DjHNE+RwPJACogUCLyq3Xxm2kJO6qsQwjbE5NDk2DqmlKcxDirCnU1wAzVLe12IM3w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.5/vfs_fonts.js" integrity="sha512-cktKDgjEiIkPVHYbn8bh/FEyYxmt4JDJJjOCu5/FQAkW4bc911XtKYValiyzBiJigjVEvrIAyQFEbRJZyDA1wQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<?=$this->endSection() ?>

View File

@ -335,6 +335,16 @@ if (!empty($token) && $tfa == false) {
<!-- Page JS -->
<?= sweetAlert() ?>
<?php
if (isset($global_js_variables)) {
echo "<script>\n";
foreach ($global_js_variables as $name => $value):
echo "\t" . "var $name = $value;" . "\n";
endforeach;
echo "</script>\n";
}
?>
<script type="text/javascript">

View File

@ -1,16 +1,43 @@
/* Overwrite datatables styles */
table.dataTable.table-striped > tbody > tr.odd.selected > * {
table.dataTable.table-striped>tbody>tr.odd.selected>* {
box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.5);
}
table.dataTable > tbody > tr.selected > * {
table.dataTable>tbody>tr.selected>* {
box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.5);
color: white;
}
table.dataTable.table-hover > tbody > tr.selected:hover > * {
table.dataTable.table-hover>tbody>tr.selected:hover>* {
box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.65);
}
.comparator-table th,
.comparator-table td {
padding-left: 0.6em;
padding-right: 0.6em;
}
.comparator-table td {
font-size: 0.65em;
}
.comparator-table th {
font-size: 0.6em;
}
.comparator-table td.dt-result {
font-size: 0.9em;
font-weight: bold;
text-transform: uppercase;
}
.comparator-table td.dt-result-text {
text-align: right;
}
.comparator-table td.dt-result-value {
text-align: left;
}