diff --git a/ci4/app/Controllers/Js_loader.php b/ci4/app/Controllers/Js_loader.php index 2890d7b8..8ba7523b 100755 --- a/ci4/app/Controllers/Js_loader.php +++ b/ci4/app/Controllers/Js_loader.php @@ -94,5 +94,11 @@ class Js_loader extends BaseController return view('themes/backend/vuexy/form/presupuestos/cliente/tipoLibroItems.js'); } + function presupuestoClienteDisenioLibro_js() + { + $this->response->setHeader('Content-Type', 'text/javascript'); + return view('themes/backend/vuexy/form/presupuestos/cliente/disenioLibro.js'); + } + } \ No newline at end of file diff --git a/ci4/app/Controllers/Presupuestos/Presupuestocliente.php b/ci4/app/Controllers/Presupuestos/Presupuestocliente.php index c37824bc..814ab158 100755 --- a/ci4/app/Controllers/Presupuestos/Presupuestocliente.php +++ b/ci4/app/Controllers/Presupuestos/Presupuestocliente.php @@ -154,6 +154,7 @@ class Presupuestocliente extends \App\Controllers\GoBaseResourceController $datosPresupuesto = (object)array(); $datosPresupuesto->paisList = model('App\Models\Configuracion\PaisModel')->getAllForMenu('id, nombre', 'nombre', true); + $datosPresupuesto->papelFormatoList = $this->getPapelFormatoListItems($presupuestoEntity->papel_formato_id ?? null); $this->viewData['formAction'] = route_to('crearPresupuestoCliente'); @@ -555,5 +556,13 @@ class Presupuestocliente extends \App\Controllers\GoBaseResourceController return $this->failUnauthorized('Invalid request', 403); } } + + protected function getPapelFormatoListItems($selId = null) + { + $papelFormatoModel = model('App\Models\Configuracion\PapelFormatoModel'); + $data = $papelFormatoModel->getElementsForMenu(); + array_shift($data); + return $data; + } } \ No newline at end of file diff --git a/ci4/app/Services/PresupuestoService.php b/ci4/app/Services/PresupuestoService.php index 512239ab..1c1b1254 100755 --- a/ci4/app/Services/PresupuestoService.php +++ b/ci4/app/Services/PresupuestoService.php @@ -1473,14 +1473,14 @@ class PresupuestoService extends BaseService $nueva_tarifa[0]->tiempo != $servicio->tiempo){ $servicio->precio_unidad = round($nueva_tarifa[0]->precio_unidad, 2); - $servicio->tiempo = round($nueva_tarifa[0]->tiempo, 2); + $servicio->tiempo = $nueva_tarifa[0]->tiempo==null?"": round($nueva_tarifa[0]->tiempo, 2); $servicio->precio_total = round($nueva_tarifa[0]->total, 2); $servicio->margen = round($nueva_tarifa[0]->margen); $cambio = true; } else if($input_data['is_duplicado'] && $nueva_tarifa[0]->proveedor_id != $servicio->proveedor_id){ $servicio->precio_unidad = round($nueva_tarifa[0]->precio_unidad, 2); - $servicio->tiempo = round($nueva_tarifa[0]->tiempo, 2); + $servicio->tiempo = $nueva_tarifa[0]->tiempo==null?"": round($nueva_tarifa[0]->tiempo, 2); $servicio->precio_total = round($nueva_tarifa[0]->total, 2); $servicio->margen = round($nueva_tarifa[0]->margen); $servicio->proveedor = $nueva_tarifa[0]->proveedor; diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cliente/_disenioLibroItems.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cliente/_disenioLibroItems.php new file mode 100644 index 00000000..1f5a0fe7 --- /dev/null +++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cliente/_disenioLibroItems.php @@ -0,0 +1,165 @@ +