mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'main' into feat/sk-31
This commit is contained in:
@ -208,8 +208,13 @@ class Facturas extends \App\Controllers\BaseResourceController
|
||||
['title' => lang("Facturas.facturaList"), 'route' => route_to('facturasList'), 'active' => true]
|
||||
];
|
||||
|
||||
$userModel = model('App\Models\UserModel');
|
||||
$factura->created_by = $userModel->getFullName($factura->user_created_id);
|
||||
$factura->updated_by = $userModel->getFullName($factura->user_updated_id);
|
||||
$factura->created_at_footer = $factura->created_at ? date(' H:i d/m/Y', strtotime($factura->created_at)) : '';
|
||||
$factura->updated_at_footer = $factura->updated_at ? date(' H:i d/m/Y', strtotime($factura->updated_at)) : '';
|
||||
$this->viewData['facturaEntity'] = $factura;
|
||||
|
||||
|
||||
$this->viewData['boxTitle'] = lang('Basic.global.edit2') . ' ' . lang('Facturas.factura') . ' ' . lang('Basic.global.edit3');
|
||||
|
||||
return $this->displayForm(__METHOD__, $id);
|
||||
|
||||
@ -273,8 +273,8 @@ class Pedido extends \App\Controllers\BaseResourceController
|
||||
|
||||
$this->obtenerDatosFormulario($pedidoEntity);
|
||||
|
||||
$this->viewData['pedidoEntity'] = $pedidoEntity;
|
||||
|
||||
$this->viewData['pedidoEntity'] = $pedidoEntity;
|
||||
|
||||
$this->viewData['boxTitle'] = lang('Basic.global.edit2') . ' ' . lang('Pedidos.moduleTitle') . ' ' . lang('Basic.global.edit3');
|
||||
|
||||
@ -382,6 +382,12 @@ class Pedido extends \App\Controllers\BaseResourceController
|
||||
$pedidoEntity->fecha_impresion_text = $pedidoEntity->fecha_impresion ? date('d/m/Y', strtotime($pedidoEntity->fecha_impresion)) : '';
|
||||
$pedidoEntity->fecha_encuadernado_text = $pedidoEntity->fecha_encuadernado ? date('d/m/Y', strtotime($pedidoEntity->fecha_encuadernado)) : '';
|
||||
$pedidoEntity->fecha_entrega_externo_text = $pedidoEntity->fecha_entrega_externo ? date('d/m/Y', strtotime($pedidoEntity->fecha_entrega_externo)) : '';
|
||||
|
||||
$userModel = model('App\Models\UserModel');
|
||||
$pedidoEntity->created_by = $userModel->getFullName($pedidoEntity->user_created_id);
|
||||
$pedidoEntity->updated_by = $userModel->getFullName($pedidoEntity->user_updated_id);
|
||||
$pedidoEntity->created_at_footer = $pedidoEntity->created_at ? date(' H:i d/m/Y', strtotime($pedidoEntity->created_at)) : '';
|
||||
$pedidoEntity->updated_at_footer = $pedidoEntity->updated_at ? date(' H:i d/m/Y', strtotime($pedidoEntity->updated_at)) : '';
|
||||
}
|
||||
public function get_xml_pedido($pedido_id)
|
||||
{
|
||||
|
||||
607
ci4/app/Controllers/Presupuestos/Importadorpresupuestos.php
Normal file
607
ci4/app/Controllers/Presupuestos/Importadorpresupuestos.php
Normal file
@ -0,0 +1,607 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Presupuestos;
|
||||
|
||||
use App\Models\Presupuestos\ImportadorModel;
|
||||
use App\Models\Clientes\ClienteModel;
|
||||
use stdClass;
|
||||
|
||||
class Importadorpresupuestos extends \App\Controllers\BaseResourceController
|
||||
{
|
||||
protected $modelName = "ImportadorModel";
|
||||
protected $format = 'json';
|
||||
|
||||
protected static $singularObjectName = 'Importadorpresupuesto';
|
||||
protected static $singularObjectNameCc = 'Importadorpresupuesto';
|
||||
protected static $pluralObjectName = 'ImportadorPresupuestos';
|
||||
protected static $pluralObjectNameCc = 'Importadorpresupuestos';
|
||||
|
||||
protected static $controllerSlug = 'importadorpresupuestos';
|
||||
|
||||
protected static $viewPath = 'themes/vuexy/form/presupuestos/importador/';
|
||||
|
||||
protected $indexRoute = 'listaPresupuestos';
|
||||
|
||||
|
||||
public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger)
|
||||
{
|
||||
|
||||
$this->viewData['usingSweetAlert'] = true;
|
||||
|
||||
$this->viewData = ['usingServerSideDataTable' => true]; // JJO
|
||||
|
||||
// Breadcrumbs
|
||||
$this->viewData['breadcrumb'] = [
|
||||
['title' => 'Importador de presupuestos', 'route' => "javascript:void(0);", 'active' => false]
|
||||
];
|
||||
$this->messageService = service('messages');
|
||||
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->model = new ImportadorModel();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$viewData = [
|
||||
'currentModule' => static::$controllerSlug,
|
||||
'pageSubTitle' => lang('Basic.global.ManageAllRecords', [lang('Presupuestos.moduleName')]),
|
||||
];
|
||||
|
||||
$this->viewData['serviciosAutomaticos'] = [
|
||||
'ferro' => model('App\Models\Configuracion\ConfigVariableModel')->getVariable('id_servicio_ferro')->value,
|
||||
'prototipo' => model('App\Models\Configuracion\ConfigVariableModel')->getVariable('id_servicio_prototipo')->value,
|
||||
'ferro_digital' => model('App\Models\Configuracion\ConfigVariableModel')->getVariable('id_servicio_ferro_digital')->value,
|
||||
];
|
||||
|
||||
$viewData = array_merge($this->viewData, $viewData); // merge any possible values from the parent controller class
|
||||
|
||||
return view(static::$viewPath . 'viewImportadorPresupuestos', $viewData);
|
||||
}
|
||||
|
||||
public function getClientList()
|
||||
{
|
||||
|
||||
$search = "";
|
||||
|
||||
if ($this->request->getGet("q")) {
|
||||
$search = $this->request->getGet("q");
|
||||
}
|
||||
|
||||
$dataOld = (new ImportadorModel())->getClientList();
|
||||
$dataNew = (new ClienteModel())->getIdName($search);
|
||||
|
||||
$newKeys = array_map(fn($item) => $item->id . '_' . $item->name, $dataNew);
|
||||
|
||||
// Filtrar $dataOld para obtener solo los elementos comunes
|
||||
$commonData = array_filter($dataOld, fn($item) => in_array($item->id . '_' . $item->name, $newKeys));
|
||||
|
||||
return $this->response->setJSON(array_values($commonData));
|
||||
}
|
||||
|
||||
public function getPresupuestosList()
|
||||
{
|
||||
|
||||
$search = "";
|
||||
|
||||
if ($this->request->getGet("q")) {
|
||||
$search = $this->request->getGet("q");
|
||||
}
|
||||
$clienteId = $this->request->getGet("clienteId");
|
||||
|
||||
$data = (new ImportadorModel())->getPresupuestosList($clienteId, $search);
|
||||
|
||||
return $this->response->setJSON($data);
|
||||
}
|
||||
|
||||
|
||||
public function getEncuadernacionList()
|
||||
{
|
||||
|
||||
$search = "";
|
||||
|
||||
if ($this->request->getGet("q")) {
|
||||
$search = $this->request->getGet("q");
|
||||
}
|
||||
|
||||
$model = model('App\Models\Configuracion\TipoPresupuestoModel');
|
||||
$data = $model->getLibros($search);
|
||||
|
||||
return $this->response->setJSON($data);
|
||||
}
|
||||
|
||||
public function getPresupuesto()
|
||||
{
|
||||
|
||||
if ($this->request->isAJAX()) {
|
||||
|
||||
$id = $this->request->getGet("id") ?? 0;
|
||||
|
||||
if ($id == 0) {
|
||||
return $this->failUnauthorized('Invalid request', 403);
|
||||
}
|
||||
|
||||
$data = (new ImportadorModel())->getPresupuestoForImport($id);
|
||||
|
||||
$model_papel_formato = model('App\Models\Configuracion\PapelFormatoModel');
|
||||
$papel_formato = $model_papel_formato->where('is_deleted', 0)->where('ancho>', 0)->findAll();
|
||||
|
||||
$papel_formato_id = null;
|
||||
$papel_formato_texto = null;
|
||||
|
||||
foreach ($papel_formato as $formato) {
|
||||
if ($data['datosGenerales']->papel_formato_personalizado) {
|
||||
if ($formato->ancho == $data['datosGenerales']->papel_formato_personalizado_ancho && $formato->alto == $data['datosGenerales']->papel_formato_personalizado_alto) {
|
||||
$papel_formato_id = $formato->id;
|
||||
$papel_formato_texto = $formato->ancho . 'x' . $formato->alto;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if ($formato->ancho == $data['datosGenerales']->papel_formato_ancho && $formato->alto == $data['datosGenerales']->papel_formato_alto) {
|
||||
$papel_formato_id = $formato->id;
|
||||
$papel_formato_texto = $formato->ancho . 'x' . $formato->alto;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$datosGenerales = new \stdClass();
|
||||
$datosGenerales->tirada = $data['datosGenerales']->tirada;
|
||||
$datosGenerales->paginas = $data['datosGenerales']->paginas;
|
||||
|
||||
if ($papel_formato_id != null) {
|
||||
|
||||
$datosGenerales->papel_formato_personalizado = 0;
|
||||
$datosGenerales->papel_formato_id = $papel_formato_id;
|
||||
$datosGenerales->papel_formato_texto = $papel_formato_texto;
|
||||
} else {
|
||||
$datosGenerales->papel_formato_personalizado = 1;
|
||||
if ($data['datosGenerales']->papel_formato_personalizado) {
|
||||
$datosGenerales->papel_formato_ancho = $data['datosGenerales']->papel_formato_personalizado_ancho;
|
||||
$datosGenerales->papel_formato_alto = $data['datosGenerales']->papel_formato_personalizado_alto;
|
||||
} else {
|
||||
$datosGenerales->papel_formato_ancho = $data['datosGenerales']->papel_formato_ancho;
|
||||
$datosGenerales->papel_formato_alto = $data['datosGenerales']->papel_formato_alto;
|
||||
}
|
||||
}
|
||||
|
||||
$data['manipulados'] = array_map(fn($item) => $item->nombre, $data['manipulados']);
|
||||
$data['acabados'] = array_map(fn($item) => $item->nombre, $data['acabados']);
|
||||
|
||||
$encuadernacion = $this->getEncuadernacion($data['manipulados']);
|
||||
$lineas = $this->getLineasPresupuesto($data['lineas']);
|
||||
$acabados = $this->getAcabados($data['acabados']);
|
||||
|
||||
$returnData = [
|
||||
'success' => true,
|
||||
'data' => [
|
||||
'datosGenerales' => $datosGenerales,
|
||||
'encuadernacion' => $encuadernacion,
|
||||
'lineas' => $lineas,
|
||||
'acabados' => $acabados,
|
||||
'servicios' => [
|
||||
'ferro' => $data['datosGenerales']->ferro,
|
||||
'ferroDigital' => $data['datosGenerales']->ferro_digital,
|
||||
'marcapaginas' => $data['datosGenerales']->marcapaginas,
|
||||
'prototipo' => $data['datosGenerales']->prototipo
|
||||
]
|
||||
]
|
||||
|
||||
];
|
||||
|
||||
return $this->response->setJSON($returnData);
|
||||
} else {
|
||||
return $this->failUnauthorized('Invalid request', 403);
|
||||
}
|
||||
}
|
||||
|
||||
private function getEncuadernacion($manipulados)
|
||||
{
|
||||
|
||||
$encuadernacion_values = [
|
||||
'libroFresadoTapaDura' => 'Tapa Dura al Cromo Fresada',
|
||||
'libroFresadoTapaBlanda' => 'Rústica Fresada',
|
||||
'libroCosidoTapaDura' => 'Tapa Dura al Cromo Cosida Hilo',
|
||||
'libroCosidoTapaBlanda' => 'Rústica Cosido Hilo vegetal',
|
||||
'libroEspiralTapaDura' => 'Espiral',
|
||||
'libroGrapado' => 'Cosido a caballete 2 grapas'
|
||||
];
|
||||
|
||||
$encuadernacionOld = "";
|
||||
$encuadernacion = new stdClass();
|
||||
|
||||
foreach ($manipulados as $manipulado) {
|
||||
// check if manipulado is like strlower encuadernacion_values values
|
||||
foreach ($encuadernacion_values as $valor) {
|
||||
if (strpos(strtolower($manipulado), strtolower($valor)) !== false) {
|
||||
$encuadernacionOld = $manipulado;
|
||||
$key = array_search(strtolower($valor), array_map('strtolower', $encuadernacion_values));
|
||||
$model = model('App\Models\Configuracion\TipoPresupuestoModel');
|
||||
$encuadernacion = $model->select('id, codigo, encuadernacion')->where('codigo', $key)->first();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
'encuadernacion' => $encuadernacion,
|
||||
'encuadernacionOld' => $encuadernacionOld
|
||||
];
|
||||
}
|
||||
|
||||
private function getLineasPresupuesto($lineas)
|
||||
{
|
||||
|
||||
$isHq = false;
|
||||
foreach ($lineas as $linea) {
|
||||
if ($linea->tipo == 'bn' || $linea->tipo == 'color' || $linea->tipo == 'rotativa') {
|
||||
if ($linea->hq == 1) {
|
||||
$isHq = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$model_papelGenerico = model('App\Models\Configuracion\PapelGenericoModel');
|
||||
|
||||
|
||||
$bn = new stdClass();
|
||||
$color = new stdClass();
|
||||
$cubierta = new stdClass();
|
||||
$sobrecubierta = new stdClass();
|
||||
|
||||
foreach ($lineas as $linea) {
|
||||
|
||||
$newPapel = $model_papelGenerico->where('code', $linea->papel_code)->where('deleted_at', NULL)->first();
|
||||
|
||||
if ($linea->tipo == 'bn') {
|
||||
$bn->papel_id = $linea->papel_id;
|
||||
$bn->papel_nombre = $linea->papel_nombre;
|
||||
$bn->papel_code = $linea->papel_code;
|
||||
$bn->gramaje = $linea->gramaje;
|
||||
$bn->paginas = $linea->paginas;
|
||||
$bn->new_papel_id = $newPapel->id;
|
||||
$bn->new_papel_nombre = $newPapel->nombre;
|
||||
}
|
||||
|
||||
else if ($linea->tipo == 'color') {
|
||||
$color->papel_id = $linea->papel_id;
|
||||
$color->papel_nombre = $linea->papel_nombre;
|
||||
$color->papel_code = $linea->papel_code;
|
||||
$color->gramaje = $linea->gramaje;
|
||||
$color->paginas = $linea->paginas;
|
||||
$color->new_papel_id = $newPapel->id;
|
||||
$color->new_papel_nombre = $newPapel->nombre;
|
||||
}
|
||||
|
||||
else if ($linea->tipo == 'portada') {
|
||||
$cubierta->papel_id = $linea->papel_id;
|
||||
$cubierta->papel_nombre = $linea->papel_nombre;
|
||||
$cubierta->papel_code = $linea->papel_code;
|
||||
$cubierta->gramaje = $linea->gramaje;
|
||||
$cubierta->paginas = $linea->paginas;
|
||||
$cubierta->new_papel_id = $newPapel->id;
|
||||
$cubierta->new_papel_nombre = $newPapel->nombre;
|
||||
$cubierta->solapas = $linea->solapas_ancho;
|
||||
}
|
||||
|
||||
else if ($linea->tipo == 'cubierta') {
|
||||
$sobrecubierta->papel_id = $linea->papel_id;
|
||||
$sobrecubierta->papel_nombre = $linea->papel_nombre;
|
||||
$sobrecubierta->papel_code = $linea->papel_code;
|
||||
$sobrecubierta->gramaje = $linea->gramaje;
|
||||
$sobrecubierta->paginas = $linea->paginas;
|
||||
$sobrecubierta->new_papel_id = $newPapel->id;
|
||||
$sobrecubierta->new_papel_nombre = $newPapel->nombre;
|
||||
$sobrecubierta->solapas = $linea->solapas_ancho;
|
||||
}
|
||||
|
||||
else if ($linea->tipo == 'rotativa') {
|
||||
|
||||
if ($linea->rotativa_impresion == 'negro') {
|
||||
$bn->papel_id = $linea->papel_id;
|
||||
$bn->papel_nombre = $linea->papel_nombre;
|
||||
$bn->papel_code = $linea->papel_code;
|
||||
$bn->gramaje = $linea->gramaje;
|
||||
$bn->paginas = $linea->paginas;
|
||||
$bn->new_papel_id = $newPapel->id;
|
||||
$bn->new_papel_nombre = $newPapel->nombre;
|
||||
} else {
|
||||
if ($linea->paginas == $linea->rotativa_pag_color) {
|
||||
$color->papel_id = $linea->papel_id;
|
||||
$color->papel_nombre = $linea->papel_nombre;
|
||||
$color->papel_code = $linea->papel_code;
|
||||
$color->gramaje = $linea->gramaje;
|
||||
$color->paginas = $linea->paginas;
|
||||
$color->new_papel_id = $newPapel->id;
|
||||
$color->new_papel_nombre = $newPapel->nombre;
|
||||
} else {
|
||||
|
||||
$bn->papel_id = $color->papel_id = $linea->papel_id;
|
||||
$bn->papel_nombre = $color->papel_nombre = $linea->papel_nombre;
|
||||
$bn->papel_code = $color->papel_code = $linea->papel_code;
|
||||
$bn->gramaje = $color->gramaje = $linea->gramaje;
|
||||
$color->paginas = $linea->rotativa_pag_color;
|
||||
$bn->paginas = intval($linea->paginas) - intval($linea->rotativa_pag_color);
|
||||
$bn->new_papel_id = $color->new_papel_id = $newPapel->id;
|
||||
$bn->new_papel_nombre = $color->new_papel_nombre = $newPapel->nombre;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return [
|
||||
'bn' => $bn,
|
||||
'color' => $color,
|
||||
'cubierta' => $cubierta,
|
||||
'sobrecubierta' => $sobrecubierta,
|
||||
'isHq' => $isHq
|
||||
];
|
||||
}
|
||||
|
||||
private function getAcabados($acabados){
|
||||
|
||||
$acabadoCubierta = "";
|
||||
$reservaUVICubierta = false;
|
||||
$acabadoSobrecubierta = "";
|
||||
$reservaUVISobrecubierta = false;
|
||||
|
||||
$acabadoCubiertaOld = "";
|
||||
$acabadoSobrecubiertaOld = "";
|
||||
|
||||
// por defecto, si pone portada o no pone ni portada ni cubierta, se asigna a la cubierta (portada en el antiguo)
|
||||
foreach ($acabados as $acabado) {
|
||||
if (strpos(strtolower($acabado), 'portada') !== false ||
|
||||
(strpos(strtolower($acabado), 'portada') === false &&
|
||||
strpos(strtolower($acabado), 'sobre cubierta') === false)) {
|
||||
// palabras clave: brillo, mate, gofrado, antirayado, antirrayado, sandy, uvi para buscar en acabado
|
||||
if(strpos(strtolower($acabado), 'brillo') !== false){
|
||||
$acabadoCubierta = 1;
|
||||
$acabadoCubiertaOld = strlen($acabadoCubiertaOld)==0? $acabado: $acabadoCubiertaOld . ', ' . $acabado;
|
||||
} else if(strpos(strtolower($acabado), 'gofrado') !== false){
|
||||
$acabadoCubierta = 6;
|
||||
$acabadoCubiertaOld = strlen($acabadoCubiertaOld)==0? $acabado: $acabadoCubiertaOld . ', ' . $acabado;
|
||||
} else if(strpos(strtolower($acabado), 'antirayado') !== false || strpos(strtolower($acabado), 'antirrayado') !== false){
|
||||
$acabadoCubierta = 8;
|
||||
$acabadoCubiertaOld = strlen($acabadoCubiertaOld)==0? $acabado: $acabadoCubiertaOld . ', ' . $acabado;
|
||||
} else if(strpos(strtolower($acabado), 'sandy') !== false){
|
||||
$acabadoCubierta = 9;
|
||||
$acabadoCubiertaOld = strlen($acabadoCubiertaOld)==0? $acabado: $acabadoCubiertaOld . ', ' . $acabado;
|
||||
} else if(strpos(strtolower($acabado), 'uvi') !== false){
|
||||
$reservaUVICubierta = true;
|
||||
$acabadoCubiertaOld = strlen($acabadoCubiertaOld)==0? $acabado: $acabadoCubiertaOld . ', ' . $acabado;
|
||||
} else if(strpos(strtolower($acabado), 'mate') !== false){
|
||||
$acabadoCubierta = 5;
|
||||
$acabadoCubiertaOld = strlen($acabadoCubiertaOld)==0? $acabado: $acabadoCubiertaOld . ', ' . $acabado;
|
||||
}
|
||||
}
|
||||
else if (strpos(strtolower($acabado), 'sobre cubierta') !== false) {
|
||||
// palabras clave: brillo, mate, gofrado, antirayado, antirrayado, sandy, uvi para buscar en acabado
|
||||
if(strpos(strtolower($acabado), 'brillo') !== false){
|
||||
$acabadoSobrecubierta = 1;
|
||||
$acabadoSobrecubiertaOld = strlen($acabadoSobrecubiertaOld)==0? $acabado: $acabadoSobrecubiertaOld . ', ' . $acabado;
|
||||
} else if(strpos(strtolower($acabado), 'gofrado') !== false){
|
||||
$acabadoSobrecubierta = 6;
|
||||
$acabadoSobrecubiertaOld = strlen($acabadoSobrecubiertaOld)==0? $acabado: $acabadoSobrecubiertaOld . ', ' . $acabado;
|
||||
} else if(strpos(strtolower($acabado), 'antirayado') !== false || strpos(strtolower($acabado), 'antirrayado') !== false){
|
||||
$acabadoSobrecubierta = 8;
|
||||
$acabadoSobrecubiertaOld = strlen($acabadoSobrecubiertaOld)==0? $acabado: $acabadoSobrecubiertaOld . ', ' . $acabado;
|
||||
} else if(strpos(strtolower($acabado), 'sandy') !== false){
|
||||
$acabadoSobrecubierta = 9;
|
||||
$acabadoSobrecubiertaOld = strlen($acabadoSobrecubiertaOld)==0? $acabado: $acabadoSobrecubiertaOld . ', ' . $acabado;
|
||||
} else if(strpos(strtolower($acabado), 'uvi') !== false){
|
||||
$reservaUVISobrecubierta = true;
|
||||
$acabadoSobrecubiertaOld = strlen($acabadoSobrecubiertaOld)==0? $acabado: $acabadoSobrecubiertaOld . ', ' . $acabado;
|
||||
} else if(strpos(strtolower($acabado), 'mate') !== false){
|
||||
$acabadoSobrecubierta = 5;
|
||||
$acabadoSobrecubiertaOld = strlen($acabadoSobrecubiertaOld)==0? $acabado: $acabadoSobrecubiertaOld . ', ' . $acabado;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Si es mate y lleva UVI, se cambia al servicio correspondiente
|
||||
if($acabadoCubierta == 5 && $reservaUVICubierta){
|
||||
$acabadoCubierta = 2;
|
||||
}
|
||||
if($acabadoSobrecubierta == 5 && $reservaUVISobrecubierta){
|
||||
$acabadoSobrecubierta = 2;
|
||||
}
|
||||
|
||||
$model = model('App\Models\Tarifas\Acabados\ServicioAcabadoModel');
|
||||
|
||||
$cubierta = new stdClass();
|
||||
$cubierta->acabadoOld = $acabadoCubiertaOld;
|
||||
$cubierta->acabado = $model->select('id as id, nombre as name')->where('id', $acabadoCubierta)->first();
|
||||
|
||||
$sobrecubierta = new stdClass();
|
||||
$sobrecubierta->acabadoOld = $acabadoSobrecubiertaOld;
|
||||
$sobrecubierta->acabado = $model->select('id as id, nombre as name')->where('id', $acabadoSobrecubierta)->first();
|
||||
|
||||
return [
|
||||
'cubierta' => $cubierta,
|
||||
'sobrecubierta' => $sobrecubierta,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
public function importarPresupuesto(){
|
||||
|
||||
if($this->request->isAJAX()){
|
||||
|
||||
$presupuesto_id = $this->request->getPost('id');
|
||||
|
||||
$tipo_presupuesto_id = intval($this->request->getPost('encuadernacion') ?? 0);
|
||||
|
||||
$papel_formato_id = $this->request->getPost('papel_formato_id');
|
||||
$papel_formato_personalizado = intval($this->request->getPost('papel_formato_personalizado') ?? 0);
|
||||
$papel_formato_ancho = intval($this->request->getPost('papel_formato_ancho') ?? 0);
|
||||
$papel_formato_alto = intval($this->request->getPost('papel_formato_alto') ?? 0);
|
||||
|
||||
if($papel_formato_personalizado){
|
||||
$tamanio = array(
|
||||
"ancho" => $papel_formato_ancho,
|
||||
"alto" => $papel_formato_alto
|
||||
);
|
||||
}
|
||||
else{
|
||||
$medidas = model('App\Models\Configuracion\PapelFormatoModel')->select('ancho, alto')->where('id', $papel_formato_id)->first();
|
||||
$tamanio = array(
|
||||
"ancho" => $medidas->ancho,
|
||||
"alto" => $medidas->alto
|
||||
);
|
||||
}
|
||||
|
||||
$isHq = intval($this->request->getPost('isHq') ?? 0);
|
||||
$paginas_bn = intval($this->request->getPost('paginas_bn') ?? 0);
|
||||
$paginas_color = intval($this->request->getPost('paginas_color') ?? 0);
|
||||
$gramaje_bn = intval($this->request->getPost('gramaje_bn') ?? 0);
|
||||
$gramaje_color = intval($this->request->getPost('gramaje_color') ?? 0);
|
||||
$papel_bn = intval($this->request->getPost('papel_bn') ?? 0);
|
||||
$papel_color = intval($this->request->getPost('papel_color') ?? 0);
|
||||
|
||||
$papel_interior_diferente = false;
|
||||
if($papel_bn != $papel_color && $papel_bn != 0 && $papel_color != 0){
|
||||
$papel_interior_diferente = true;
|
||||
$papel_interior = array(
|
||||
"negro" => $papel_bn,
|
||||
"color" => $papel_color
|
||||
);
|
||||
$gramaje_interior = array(
|
||||
"negro" => $gramaje_bn,
|
||||
"color" => $gramaje_color
|
||||
);
|
||||
}
|
||||
else{
|
||||
$papel_interior = $papel_bn == 0 ? $papel_color : $papel_bn;
|
||||
$gramaje_interior = $gramaje_bn == 0 ? $gramaje_color : $gramaje_bn;
|
||||
}
|
||||
|
||||
$interior = array(
|
||||
"papelInterior" => $papel_interior,
|
||||
"gramajeInterior" => $gramaje_interior
|
||||
);
|
||||
|
||||
$isColor = false;
|
||||
if(intval($paginas_color)>0){
|
||||
$isColor = true;
|
||||
}
|
||||
|
||||
$tapaCubierta = model('App\Models\Configuracion\TipoPresupuestoModel')->
|
||||
select("is_tapa_dura")->where('id', $tipo_presupuesto_id)->first();
|
||||
$tapaCubierta = $tapaCubierta->is_tapa_dura == 0 ? "tapaBlanda" : "tapaDura";
|
||||
$cubierta = array(
|
||||
"carasImpresion" => intval($this->request->getPost('paginas_cubierta') ?? 0),
|
||||
"tipoCubierta" => $tapaCubierta,
|
||||
"papelCubierta" => intval($this->request->getPost('papel_cubierta') ?? 0),
|
||||
"gramajeCubierta" => intval($this->request->getPost('gramaje_cubierta') ?? 0),
|
||||
"acabado" => intval($this->request->getPost('acabado_cubierta') ?? 0),
|
||||
);
|
||||
|
||||
$solapas_cubierta = intval($this->request->getPost('solapas_cubierta') ?? 0);
|
||||
if($solapas_cubierta>0){
|
||||
$cubierta["solapas"] = 1;
|
||||
$cubierta["tamanioSolapas"] = $solapas_cubierta;
|
||||
}
|
||||
else{
|
||||
$cubierta["solapas"] = 0;
|
||||
}
|
||||
|
||||
$sobrecubierta = intval($this->request->getPost('sobrecubierta') ?? 0);
|
||||
if($sobrecubierta>0){
|
||||
$sobrecubierta = array(
|
||||
"papel" => intval($this->request->getPost('papel_sobrecubierta') ?? 0),
|
||||
"gramaje" => intval($this->request->getPost('gramaje_sobrecubierta') ?? 0),
|
||||
"solapas" => intval($this->request->getPost('solapas_sobrecubierta') ?? 0),
|
||||
"acabado" => intval($this->request->getPost('acabado_sobrecubierta') ?? 0),
|
||||
);
|
||||
|
||||
// para corregir el fallo de un presupuesto sin solapas en sobrecubierta
|
||||
if($sobrecubierta["solapas"] == 0){
|
||||
$sobrecubierta["solapas"] = 80;
|
||||
}
|
||||
}
|
||||
else{
|
||||
$sobrecubierta = false;
|
||||
}
|
||||
|
||||
$datosSave = model('App\Models\Presupuestos\ImportadorModel')->getDatosGuardar($presupuesto_id);
|
||||
$direcciones = model('App\Models\Presupuestos\ImportadorModel')->getDirecciones($presupuesto_id);
|
||||
|
||||
$direcciones = (array) $direcciones;
|
||||
$direcciones = array_map(fn($item) => (array) $item, $direcciones);
|
||||
$direccionesToSend = [];
|
||||
foreach($direcciones as $direccion){
|
||||
$direccion['pais_id'] =
|
||||
model('App\Models\Configuracion\PaisModel')->select('id')->like('nombre', $direccion['pais'])->first()->id;
|
||||
$tempData = [];
|
||||
$tempData['direccion'] = $direccion;
|
||||
$tempData['entregaPalets'] = 0;
|
||||
$tempData['unidades'] = $direccion['unidades'];
|
||||
array_push($direccionesToSend, $tempData);
|
||||
}
|
||||
|
||||
$datos = array(
|
||||
"tirada" => array(intval($this->request->getPost('tirada') ?? 0)),
|
||||
"selectedTirada" => intval($this->request->getPost('tirada') ?? 0),
|
||||
"paginas" => intval($this->request->getPost('paginas') ?? 0),
|
||||
"tamanio" => $tamanio,
|
||||
"tipo_presupuesto_id" => $tipo_presupuesto_id,
|
||||
"clienteId" => intval($this->request->getPost('cliente_id') ?? 0),
|
||||
"isColor" => $isColor,
|
||||
"isHq" => $isHq,
|
||||
"papelDiferente" => $papel_interior_diferente,
|
||||
"paginasColor" => $paginas_color,
|
||||
"paginasCuadernillo" => 32,
|
||||
|
||||
"interior" => $interior,
|
||||
|
||||
"cubierta" => $cubierta,
|
||||
|
||||
"sobrecubierta" => $sobrecubierta,
|
||||
"guardas" => false,
|
||||
"faja" => 0,
|
||||
|
||||
"servicios" => $this->request->getPost('servicios') ?? [],
|
||||
|
||||
"datosCabecera" => [
|
||||
"titulo" => $datosSave->titulo ?? "",
|
||||
"autor" => $datosSave->autor ?? "",
|
||||
"coleccion" => $datosSave->coleccion ?? "",
|
||||
"isbn" => $datosSave->isbn ?? "",
|
||||
"referenciaCliente" => $datosSave->referenciaCliente ?? ""
|
||||
],
|
||||
'entrega_taller' => $datosSave->entrega_taller,
|
||||
'direcciones' => $direccionesToSend
|
||||
);
|
||||
|
||||
$value = (new Presupuestocliente())->guardar($datos);
|
||||
|
||||
if(isset($value['sk_id'])){
|
||||
$texto_comments = '[PRESUPUESTO IMPORTADO ' . $presupuesto_id . ' - ERP ANTIGUO]' . PHP_EOL .
|
||||
'------------------------------------------------------------------------------------------' . PHP_EOL;
|
||||
$presupuesto_model = model('App\Models\Presupuestos\PresupuestoModel');
|
||||
$presupuesto_model->update($value['sk_id'], [
|
||||
'comentarios_cliente' => strlen($datosSave->comentarios_cliente)>0?$texto_comments . $datosSave->comentarios_cliente:"",
|
||||
'comentarios_safekat' => strlen($datosSave->comentarios_safekat)>0? $texto_comments . $datosSave->comentarios_safekat:"",
|
||||
]);
|
||||
|
||||
$returnData = [
|
||||
'success' => true,
|
||||
'id' => $value['sk_id']
|
||||
];
|
||||
|
||||
}
|
||||
else{
|
||||
$returnData = [
|
||||
'success' =>false,
|
||||
];
|
||||
}
|
||||
|
||||
return $this->response->setJSON($returnData);
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
return $this->failUnauthorized('Invalid request', 403);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -583,8 +583,10 @@ class Presupuestoadmin extends \App\Controllers\BaseResourceController
|
||||
|
||||
$data['comentarios_cliente'] = $presupuesto->comentarios_cliente;
|
||||
$data['comentarios_safekat'] = $presupuesto->comentarios_safekat;
|
||||
$data['comentarios_pdf'] = $presupuesto->comentarios_pdf;
|
||||
$data['comentarios_presupuesto'] = $presupuesto->comentarios_presupuesto;
|
||||
$data['comentarios_produccion'] = $presupuesto->comentarios_produccion;
|
||||
|
||||
|
||||
$data['tiradasAlternativas'] = json_decode($presupuesto->tirada_alternativa_json_data);
|
||||
|
||||
@ -612,6 +614,14 @@ class Presupuestoadmin extends \App\Controllers\BaseResourceController
|
||||
$data['resumen']['total_precio_unidad'] = $presupuesto->total_precio_unidad;
|
||||
$data['resumen']['total_factor'] = is_numeric($presupuesto->total_factor) ? $presupuesto->total_factor : 0;
|
||||
$data['resumen']['total_factor_ponderado'] = is_numeric($presupuesto->total_factor_ponderado) ? $presupuesto->total_factor_ponderado : 0;
|
||||
|
||||
$data['resumen']['iva_reducido'] = $presupuesto->iva_reducido;
|
||||
|
||||
$data['created_by'] = model('App\Models\UserModel')->getFullName($presupuesto->user_created_id);
|
||||
$data['updated_by'] = model('App\Models\UserModel')->getFullName($presupuesto->user_update_id);
|
||||
$data['created_at'] = date(' H:i d/m/Y', strtotime($presupuesto->created_at));
|
||||
$data['updated_at'] = date(' H:i d/m/Y', strtotime($presupuesto->updated_at));
|
||||
|
||||
if ($presupuesto->estado_id == 2) {
|
||||
$data['resumen']['total_aceptado'] = $presupuesto->total_aceptado;
|
||||
}
|
||||
|
||||
@ -460,7 +460,7 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
$tamanio = $reqData['tamanio'];
|
||||
$paginas = $reqData['paginas'] ?? 0;
|
||||
$paginas_color = $reqData['paginasColor'] ?? 0;
|
||||
$tipo = $reqData['tipo'];
|
||||
$tipo = $reqData['tipo'] ?? 'cosido';
|
||||
|
||||
$paginasCuadernillo = $reqData['paginasCuadernillo'] ?? null;
|
||||
$papelInteriorDiferente = intval($reqData['papelInteriorDiferente'] ?? null);
|
||||
@ -478,7 +478,8 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
|
||||
$direcciones = $reqData['direcciones'] ?? [];
|
||||
|
||||
$tipo_impresion_id = $this->getTipoImpresion($tipo, $cubierta['tipoCubierta']);
|
||||
$tipo_impresion_id = intval($reqData['tipo_presupuesto_id'] ?? 0) == 0 ?
|
||||
$this->getTipoImpresion($tipo, $cubierta['tipoCubierta']) : intval($reqData['tipo_presupuesto_id']);
|
||||
$lomoRedondo = $cubierta['lomoRedondo'] ?? 0;
|
||||
|
||||
if ($papelInteriorDiferente) {
|
||||
@ -975,7 +976,7 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
$paginasColorConsecutivas = $reqData['pagColorConsecutivas'] ?? 0;
|
||||
$papelInteriorDiferente = $reqData['papelInteriorDiferente'] ?? 0;
|
||||
|
||||
$tipo = $reqData['tipo'];
|
||||
$tipo = $reqData['tipo'] ?? "";
|
||||
|
||||
$paginasCuadernillo = $reqData['paginasCuadernillo'] ?? 32;
|
||||
$papelInteriorDiferente = intval($reqData['papelInteriorDiferente'] ?? null);
|
||||
@ -1001,7 +1002,10 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
|
||||
$direcciones = $reqData['direcciones'] ?? [];
|
||||
|
||||
$tipo_impresion_id = $this->getTipoImpresion($tipo, $cubierta['tipoCubierta']);
|
||||
if ($tipo != "")
|
||||
$tipo_impresion_id = $this->getTipoImpresion($tipo, $cubierta['tipoCubierta']);
|
||||
else
|
||||
$tipo_impresion_id = $reqData['tipo_presupuesto_id'] ?? 0;
|
||||
|
||||
if ($papelInteriorDiferente) {
|
||||
$papel['negro'] = $modelPapelGenerico->where('id', $interior['papelInterior']['negro'])->first()->toArray();
|
||||
@ -1083,18 +1087,27 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
$errors = $resultado_presupuesto['errors'];
|
||||
foreach ($errors as $error) {
|
||||
if (!empty($error)) {
|
||||
return $this->respond([
|
||||
'error' => $error,
|
||||
]);
|
||||
if ($this->request) {
|
||||
return $this->respond([
|
||||
'error' => $error,
|
||||
]);
|
||||
} else {
|
||||
return $error;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (isset($resultado_presupuesto['exception'])) {
|
||||
return $this->respond([
|
||||
'error' => $resultado_presupuesto['exception'],
|
||||
'file' => $resultado_presupuesto['file'],
|
||||
'line' => $resultado_presupuesto['line'],
|
||||
]);
|
||||
if($this->request) {
|
||||
return $this->respond([
|
||||
'error' => $resultado_presupuesto['exception'],
|
||||
'file' => $resultado_presupuesto['file'],
|
||||
'line' => $resultado_presupuesto['line'],
|
||||
]);
|
||||
} else {
|
||||
return $resultado_presupuesto['exception'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// seleccionamos el peso de la tirada seleccionada
|
||||
$peso_libro = $resultado_presupuesto['peso'][array_search($selected_tirada, $tirada)];
|
||||
@ -1262,16 +1275,13 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
];
|
||||
|
||||
|
||||
if(isset($resultado_presupuesto['values']['servicios_extra']))
|
||||
{
|
||||
if (isset($resultado_presupuesto['values']['servicios_extra'])) {
|
||||
foreach ($resultado_presupuesto['values']['servicios_extra'] as $servicio) {
|
||||
if($servicio->tarifa_id == $servicio_ferro->id){
|
||||
if ($servicio->tarifa_id == $servicio_ferro->id) {
|
||||
$ferro = 1;
|
||||
}
|
||||
else if($servicio->tarifa_id == $servicio_ferro_digital->id){
|
||||
} else if ($servicio->tarifa_id == $servicio_ferro_digital->id) {
|
||||
$ferroDigital = 1;
|
||||
}
|
||||
else if($servicio->tarifa_id == $servicio_prototipo->id){
|
||||
} else if ($servicio->tarifa_id == $servicio_prototipo->id) {
|
||||
$prototipo = 1;
|
||||
}
|
||||
}
|
||||
@ -1435,7 +1445,7 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
} else if ($servicio->tarifa_id == $servicio_ferro->id || $servicio->tarifa_id == $servicio_prototipo->id) {
|
||||
// Servicios extra
|
||||
$this->guardarServicio($id, $servicio, 'extra');
|
||||
}else if (
|
||||
} else if (
|
||||
$servicio->tarifa_id == $servicio_solapas_cubierta->id ||
|
||||
$servicio->tarifa_id == $servicio_solapas_sobrecubierta->id ||
|
||||
$servicio->tarifa_id == $servicio_solapas_faja->id ||
|
||||
@ -1764,7 +1774,7 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
$direccion['direccion'],
|
||||
$peso_libro,
|
||||
$direccion['unidades'],
|
||||
$direccion['entregaPalets'] == 'false' ? 0 : 1,
|
||||
($direccion['entregaPalets'] == 'false' || $direccion['entregaPalets'] == 0) ? 0 : 1,
|
||||
false
|
||||
);
|
||||
|
||||
@ -1775,7 +1785,7 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
unset($data->id);
|
||||
$data->precio = $data->coste;
|
||||
unset($data->coste);
|
||||
$data->entregaPieCalle = $direccion['entregaPalets'] == 'false' ? 0 : 1;
|
||||
$data->entregaPieCalle = ($direccion['entregaPalets'] == 'false' || $direccion['entregaPalets'] == 0) ? 0 : 1;
|
||||
unset($data->tipo);
|
||||
$data->peso = $peso_envio;
|
||||
$data->cantidad = $unidades;
|
||||
@ -1886,15 +1896,21 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
$margen = $tarifas_envio[$i]->margen;
|
||||
}
|
||||
|
||||
$tarifa_envio_final = null;
|
||||
if (count($tarifas_envio) > 1) {
|
||||
$tarifa_final = array_reduce($tarifas_envio, function ($previous, $current) {
|
||||
$tarifa_envio_final = array_reduce($tarifas_envio, function ($previous, $current) {
|
||||
return $current->precio < $previous->precio ? $current : $previous;
|
||||
});
|
||||
$coste = $tarifa_final->precio;
|
||||
} else {
|
||||
if (count($tarifas_envio) > 0)
|
||||
$coste = $tarifas_envio[0]->precio;
|
||||
$margen = $tarifas_envio[0]->margen;
|
||||
if (count($tarifas_envio) > 0) {
|
||||
$tarifa_envio_final = $tarifas_envio[0];
|
||||
}
|
||||
}
|
||||
$coste = $tarifa_envio_final->precio;
|
||||
$margen = $tarifa_envio_final->margen;
|
||||
|
||||
if (!isset($return_data['id'])) {
|
||||
$return_data['id'] = $tarifa_envio_final->id;
|
||||
}
|
||||
|
||||
$return_data['coste'] = $coste;
|
||||
@ -2779,10 +2795,12 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
|
||||
$serviciosExtra = [];
|
||||
// funcionalidad para los servicios extra añadidos por el usuario
|
||||
if($datos_entrada['servicios'] !== [] && isset($datos_entrada['servicios']['serviciosExtra']) &&
|
||||
$datos_entrada['servicios']['serviciosExtra'] !== []){
|
||||
if (
|
||||
$datos_entrada['servicios'] !== [] && isset($datos_entrada['servicios']['serviciosExtra']) &&
|
||||
$datos_entrada['servicios']['serviciosExtra'] !== []
|
||||
) {
|
||||
|
||||
foreach($datos_entrada['servicios']['serviciosExtra'] as $servicio){
|
||||
foreach ($datos_entrada['servicios']['serviciosExtra'] as $servicio) {
|
||||
$resultado = PresupuestoCLienteService::getServiciosExtra([
|
||||
'tarifa_id' => intval($servicio),
|
||||
]);
|
||||
@ -3495,7 +3513,8 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
return [$paginasNegro, $paginasColor];
|
||||
}
|
||||
|
||||
private function getServiciosExtra(){
|
||||
private function getServiciosExtra()
|
||||
{
|
||||
|
||||
$servicios = [];
|
||||
|
||||
@ -3504,12 +3523,15 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
|
||||
foreach ($data as $servicio) {
|
||||
$id = "service_extra_" . $servicio->id;
|
||||
array_push($servicios,
|
||||
"<input class=\"calcular-presupuesto form-check-input\" type=\"checkbox\" id=\"{$id}\"
|
||||
array_push(
|
||||
$servicios,
|
||||
"<input class=\"calcular-presupuesto form-check-input\" type=\"checkbox\" id=\"{$id}\"
|
||||
name=\"{$id}\" value=\"1\" data-tarifa-id=\"{$servicio->id}\" data-tarifa-tipo=\"extra\" data-tarifa-nombre=\"{$servicio->nombre}\">
|
||||
<label class=\"form-check-label\" for=\"{$id}\">{$servicio->nombre}</label>");
|
||||
<label class=\"form-check-label\" for=\"{$id}\">{$servicio->nombre}</label>"
|
||||
);
|
||||
}
|
||||
|
||||
return $servicios;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -378,14 +378,16 @@ class Presupuestotiradasalternativas extends \App\Controllers\BaseResourceContro
|
||||
$json_data_extra = json_decode($json_data_extra, true);
|
||||
if (count($json_data_extra) > 0) {
|
||||
$extra = new Presupuestoserviciosextra();
|
||||
$POD = (new \App\Models\Configuracion\ConfigVariableModel())->getVariable('POD')->value;
|
||||
$result = $extra->getServiciosExtra($json_data_extra, $reqData['tirada'], $POD);
|
||||
$json_data_extra = array_map(function($item) {
|
||||
return $item['tarifa_id'];
|
||||
}, $json_data_extra);
|
||||
$result = $extra->getServiciosExtra($json_data_extra);
|
||||
if (count($result) > 0) {
|
||||
foreach ($result as $servicio) {
|
||||
$servicios->coste += round(floatval($servicio->total), 2);
|
||||
$base = round(floatval($servicio->total / (1 + $servicio->margen / 100.0)), 2);
|
||||
$servicios->coste += round(floatval($servicio->precio), 2);
|
||||
$base = round(floatval($servicio->precio / (1 + floatval($servicio->margen) / 100.0)), 2);
|
||||
$base = round(floatval($base / $datosPedido->tirada) , 2)* $datosPedido->tirada;
|
||||
$servicios->margen += round(floatval($servicio->total - $base), 2);
|
||||
$servicios->margen += round(floatval($servicio->precio - $base), 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,9 +3,12 @@
|
||||
namespace App\Controllers;
|
||||
|
||||
use App\Controllers\BaseController;
|
||||
use App\Controllers\Presupuestos\Importadorpresupuestos;
|
||||
use App\Controllers\Presupuestos\Presupuestocliente;
|
||||
use App\Models\Configuracion\MaquinasTarifasImpresionModel;
|
||||
use App\Models\Configuracion\PapelGenericoModel;
|
||||
use App\Models\Configuracion\MaquinaModel;
|
||||
use App\Models\Presupuestos\ImportadorModel;
|
||||
use App\Models\Presupuestos\PresupuestoModel;
|
||||
use App\Models\Usuarios\GroupModel;
|
||||
use App\Models\Usuarios\PermisosModel;
|
||||
@ -26,13 +29,9 @@ class Test extends BaseController
|
||||
|
||||
public function index()
|
||||
{
|
||||
/*$model = model("\App\Models\Clientes\ClientePreciosModel");
|
||||
$model->debug_all_clientes_to_defecto();
|
||||
echo '<pre>';
|
||||
echo 'OK';
|
||||
echo '</pre>';*/
|
||||
|
||||
xdebug_info();
|
||||
|
||||
// (new Presupuestocliente())->testRemoteDB();
|
||||
(new Importadorpresupuestos())->getClientList();
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user