mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'mod/presupuesto_pdf' into 'main'
Mod/presupuesto pdf See merge request jjimenez/safekat!135
This commit is contained in:
@ -202,7 +202,7 @@ $routes->group('papelesimpresionmargenes', ['namespace' => 'App\Controllers\Conf
|
||||
$routes->post('datatable_editor', 'Papelimpresionmargenes::datatable_editor', ['as' => 'editorOfPapelImpresionMargenes']);
|
||||
$routes->get('delete/(:num)', 'Papelimpresionmargenes::delete/$1', ['as' => 'deletePapelImpresionMargen']);
|
||||
});
|
||||
$routes->resource('papelesimpresionmargenes', ['namespace' => 'App\Controllers\Configuracion', 'controller' => 'Papelimpresionmargenes', 'except' => 'show,new,create,update']);
|
||||
$routes->resource('papelesimpresionmargenes', ['namespace' => 'App\Controllers\Configuracion', 'controller' => 'Papelimpresionmargenes', 'except' => 'show,new,create,update']);
|
||||
|
||||
|
||||
$routes->group('tarifaacabadolineas', ['namespace' => 'App\Controllers\Tarifas'], function ($routes) {
|
||||
@ -453,21 +453,21 @@ $routes->group('tarifasenvios', ['namespace' => 'App\Controllers\Tarifas'], func
|
||||
$routes->post('allmenuitems', 'Tarifasenvios::allItemsSelect', ['as' => 'select2ItemsOfTarifaEnvio']);
|
||||
$routes->post('menuitems', 'Tarifasenvios::menuItems', ['as' => 'menuItemsOfTarifaEnvio']);
|
||||
});
|
||||
$routes->resource('tarifasenvios', ['namespace' => 'App\Controllers\Tarifas', 'controller' => 'Tarifasenvios', 'except' => 'show,new,create,update']);
|
||||
$routes->resource('tarifasenvios', ['namespace' => 'App\Controllers\Tarifas', 'controller' => 'Tarifasenvios', 'except' => 'show,new,create,update']);
|
||||
|
||||
|
||||
$routes->group('tarifasenviosprecios', ['namespace' => 'App\Controllers\Tarifas'], function ($routes) {
|
||||
$routes->post('datatable', 'Tarifasenviosprecios::datatable', ['as' => 'dataTableOfTarifasEnvioPrecios']);
|
||||
$routes->post('datatable_editor', 'Tarifasenviosprecios::datatable_editor', ['as' => 'editorOfTarifasEnvioPrecios']);
|
||||
});
|
||||
$routes->resource('tarifasenviosprecios', ['namespace' => 'App\Controllers\Tarifas', 'controller' => 'Tarifasenviosprecios', 'except' => 'show,new,create,update']);
|
||||
$routes->resource('tarifasenviosprecios', ['namespace' => 'App\Controllers\Tarifas', 'controller' => 'Tarifasenviosprecios', 'except' => 'show,new,create,update']);
|
||||
|
||||
|
||||
$routes->group('tarifasenvioszonas', ['namespace' => 'App\Controllers\Tarifas'], function ($routes) {
|
||||
$routes->post('datatable', 'Tarifasenvioszonas::datatable', ['as' => 'dataTableOfTarifasEnvioZonas']);
|
||||
$routes->post('datatable_editor', 'Tarifasenvioszonas::datatable_editor', ['as' => 'editorOfTarifasEnvioZonas']);
|
||||
});
|
||||
$routes->resource('tarifasenvioszonas', ['namespace' => 'App\Controllers\Tarifas', 'controller' => 'Tarifasenvioszonas', 'except' => 'show,new,create,update']);
|
||||
$routes->resource('tarifasenvioszonas', ['namespace' => 'App\Controllers\Tarifas', 'controller' => 'Tarifasenvioszonas', 'except' => 'show,new,create,update']);
|
||||
|
||||
|
||||
$routes->group('proveedores', ['namespace' => 'App\Controllers\Compras'], function ($routes) {
|
||||
@ -513,7 +513,6 @@ $routes->group('clientedirecciones', ['namespace' => 'App\Controllers\Clientes']
|
||||
$routes->resource('clientedirecciones', ['namespace' => 'App\Controllers\Clientes', 'controller' => 'Clientedirecciones', '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']);
|
||||
@ -526,7 +525,7 @@ $routes->group('cosidotapablanda', ['namespace' => 'App\Controllers\Presupuestos
|
||||
$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']);
|
||||
$routes->resource('cosidotapablanda', ['namespace' => 'App\Controllers\Presupuestos', 'controller' => 'Cosidotapablanda', 'except' => 'show,new,create,update']);
|
||||
|
||||
$routes->group('serviciosacabados', ['namespace' => 'App\Controllers\Presupuestos'], function ($routes) {
|
||||
$routes->post('datatable', 'Presupuestoacabados::datatable', ['as' => 'dataTableOfPresupuestoAcabados']);
|
||||
@ -538,7 +537,7 @@ $routes->group('serviciosencuadernaciones', ['namespace' => 'App\Controllers\Pre
|
||||
$routes->post('menuitems', 'Presupuestoencuadernaciones::menuItems', ['as' => 'menuItemsOfPresupuestoEncuadernaciones']);
|
||||
$routes->get('delete/(:num)', 'Presupuestoencuadernaciones::delete/$1', ['as' => 'deletePresupuestoencuadernaciones']);
|
||||
$routes->post('edit/(:num)', 'Presupuestoencuadernaciones::edit/$1', ['as' => 'updatePresupuestoencuadernaciones']);
|
||||
|
||||
|
||||
});
|
||||
|
||||
$routes->group('serviciosmanipulados', ['namespace' => 'App\Controllers\Presupuestos'], function ($routes) {
|
||||
@ -555,10 +554,13 @@ $routes->group('presupuestodirecciones', ['namespace' => 'App\Controllers\Presup
|
||||
$routes->post('datatable', 'Presupuestodirecciones::datatable', ['as' => 'dataTableOfPresupuestoDirecciones']);
|
||||
});
|
||||
|
||||
$routes->group('printpresupuestos', ['namespace' => 'App\Controllers\Pdf'], function ($routes) {
|
||||
$routes->get('', 'PrintPresupuestos::index', ['as' => 'viewPresupuesto']);
|
||||
$routes->get('generar', 'PrintPresupuestos::generar', ['as' => 'presupuestoToPdf']);
|
||||
});
|
||||
$routes->group(
|
||||
'printpresupuestos',
|
||||
['namespace' => 'App\Controllers\Pdf'],
|
||||
function ($routes) {
|
||||
$routes->get('index/(:num)', 'PrintPresupuestos::index/$1', ['as' => 'viewPresupuesto']);
|
||||
$routes->get('generar/(:num)', 'PrintPresupuestos::generar/$1', ['as' => 'presupuestoToPdf']);
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Pdf;
|
||||
|
||||
use App\Controllers\BaseController;
|
||||
@ -6,22 +7,65 @@ use App\Controllers\BaseController;
|
||||
|
||||
class PrintPresupuestos extends BaseController
|
||||
{
|
||||
function __construct()
|
||||
|
||||
public function index($id_presupuesto)
|
||||
{
|
||||
|
||||
$presupuestoModel = model('App\Models\Presupuestos\PresupuestoModel');
|
||||
$lineasPresupuestoModel = model('App\Models\Presupuestos\PresupuestoLineaModel');
|
||||
$direccionesEnvioModel = model('App\Models\Presupuestos\PresupuestoDireccionesModel');
|
||||
|
||||
$data['presupuesto'] = $presupuestoModel->getResourceForPdf($id_presupuesto)->get()->getRow();
|
||||
$data['lp_ByN'] = $lineasPresupuestoModel->getResourceByNForPdf($id_presupuesto)->get()->getRow();
|
||||
$data['lp_Color'] = $lineasPresupuestoModel->getResourceColorForPdf($id_presupuesto)->get()->getRow();
|
||||
$data['direccionesEnvio'] = $direccionesEnvioModel->getResourceForPdf($id_presupuesto)->get()->getResultObject();
|
||||
|
||||
|
||||
return view(getenv('theme.path') . 'pdfs/presupuesto', $data);
|
||||
}
|
||||
public function index()
|
||||
|
||||
public function generar($presupuesto_id)
|
||||
{
|
||||
|
||||
//return view('pdf_view');
|
||||
return view(getenv('theme.path').'pdfs/presupuesto');
|
||||
}
|
||||
public function generar(){
|
||||
$dompdf = new \Dompdf\Dompdf(['isRemoteEnabled' => true]);
|
||||
//$dompdf->loadHtml(view('pdf_view'));
|
||||
$dompdf->loadHtml(view(getenv('theme.path').'pdfs/presupuesto'));
|
||||
// Cargar modelos
|
||||
$presupuestoModel = model('App\Models\Presupuestos\PresupuestoModel');
|
||||
$lineasPresupuestoModel = model('App\Models\Presupuestos\PresupuestoLineaModel');
|
||||
$direccionesEnvioModel = model('App\Models\Presupuestos\PresupuestoDireccionesModel');
|
||||
|
||||
// Informacion del presupuesto
|
||||
$data['presupuesto'] = $presupuestoModel->getResourceForPdf($presupuesto_id)->get()->getRow();
|
||||
$data['lp_ByN'] = $lineasPresupuestoModel->getResourceByNForPdf($presupuesto_id)->get()->getRow();
|
||||
$data['lp_Color'] = $lineasPresupuestoModel->getResourceColorForPdf($presupuesto_id)->get()->getRow();
|
||||
$data['direccionesEnvio'] = $direccionesEnvioModel->getResourceForPdf($presupuesto_id)->get()->getResultObject();
|
||||
|
||||
// Crear una instancia de Dompdf
|
||||
$options = new \Dompdf\Options();
|
||||
$options->set('isHtml5ParserEnabled', true);
|
||||
$options->set('isPhpEnabled', true);
|
||||
$options->set('isRemoteEnabled', true);
|
||||
$dompdf = new \Dompdf\Dompdf($options);
|
||||
|
||||
// Contenido HTML del documento
|
||||
$dompdf->loadHtml(view(getenv('theme.path').'pdfs/presupuesto', $data));
|
||||
|
||||
// Establecer el tamaño del papel
|
||||
$dompdf->setPaper('A4', 'portrait');
|
||||
|
||||
// Renderizar el PDF
|
||||
$dompdf->render();
|
||||
$dompdf->stream('presupuesto-demo.pdf');
|
||||
|
||||
// Obtener el contenido generado
|
||||
$output = $dompdf->output();
|
||||
|
||||
// Establecer las cabeceras para visualizar en lugar de descargar
|
||||
$file_name = "presupuesto-$presupuesto_id.pdf";
|
||||
return $this->response
|
||||
->setStatusCode(200)
|
||||
->setHeader('Content-Type', 'application/pdf')
|
||||
->setHeader('Content-Disposition', 'inline; filename="' . $file_name . '"')
|
||||
->setHeader('Cache-Control', 'private, max-age=0, must-revalidate')
|
||||
->setHeader('Pragma', 'public')
|
||||
->setHeader('Content-Length', strlen($output))
|
||||
->setBody($output);
|
||||
}
|
||||
}
|
||||
@ -279,6 +279,7 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
||||
endif; // ($requestMethod === 'post')
|
||||
|
||||
|
||||
$this->viewData['presupuestoId'] = $id;
|
||||
$this->viewData['presupuestoEntity'] = $presupuestoEntity;
|
||||
$this->viewData['isCosido'] = (new TipoPresupuestoModel())->get_isCosido($presupuestoEntity->tipo_impresion_id);
|
||||
|
||||
|
||||
@ -89,4 +89,28 @@ class PresupuestoDireccionesModel extends \App\Models\GoBaseModel
|
||||
->orLike("t1.telefono", $search)
|
||||
->groupEnd();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get resource data for pdf generation.
|
||||
*
|
||||
* @param int $presupuesto_id
|
||||
*
|
||||
* @return \CodeIgniter\Database\BaseBuilder
|
||||
*/
|
||||
public function getResourceForPdf($presupuesto_id = -1)
|
||||
{
|
||||
$builder = $this->db
|
||||
->table($this->table . " t1")
|
||||
->select(
|
||||
"t1.direccion AS direccion, t2.nombre AS pais,
|
||||
t1.municipio AS municipio, t1.provincia AS provincia, t1.cp AS cp, t1.telefono AS telefono,
|
||||
t1.cantidad AS cantidad"
|
||||
);
|
||||
|
||||
$builder->where('t1.presupuesto_id', $presupuesto_id);
|
||||
$builder->join("lg_paises t2", "t1.pais_id = t2.id", "left");
|
||||
|
||||
return $builder;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Presupuestos;
|
||||
|
||||
class PresupuestoLineaModel extends \App\Models\GoBaseModel
|
||||
@ -307,17 +308,18 @@ class PresupuestoLineaModel extends \App\Models\GoBaseModel
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function createForPresupuesto($presupuesto_id){
|
||||
public function createForPresupuesto($presupuesto_id)
|
||||
{
|
||||
|
||||
$tipos = ['bn','bnhq','color','colorhq','cubierta','sobrecubierta','rot_bn','rot_color'];
|
||||
foreach($tipos as $tipo){
|
||||
$tipos = ['bn', 'bnhq', 'color', 'colorhq', 'cubierta', 'sobrecubierta', 'rot_bn', 'rot_color'];
|
||||
foreach ($tipos as $tipo) {
|
||||
$builder = $this->db
|
||||
->table($this->table . " t1");
|
||||
->table($this->table . " t1");
|
||||
$data = [
|
||||
'presupuesto_id' => $presupuesto_id,
|
||||
'tipo' => $tipo,
|
||||
'presupuesto_id' => $presupuesto_id,
|
||||
'tipo' => $tipo,
|
||||
];
|
||||
|
||||
|
||||
$builder->insert($data);
|
||||
}
|
||||
}
|
||||
@ -330,30 +332,58 @@ class PresupuestoLineaModel extends \App\Models\GoBaseModel
|
||||
"*"
|
||||
)
|
||||
->where("t1.presupuesto_id", $presupuesto_id);
|
||||
|
||||
|
||||
return $builder->orderBy("t1.id", "asc")->get()->getResultObject();
|
||||
}
|
||||
|
||||
public function deleteLineasPresupuesto($presupuesto_id){
|
||||
public function deleteLineasPresupuesto($presupuesto_id)
|
||||
{
|
||||
$this->db
|
||||
->table($this->table . " t1")
|
||||
->where("presupuesto_id", $presupuesto_id)
|
||||
->delete();
|
||||
}
|
||||
|
||||
public function insertLineasPresupuesto($presupuesto_id = -1, $datos=[])
|
||||
public function insertLineasPresupuesto($presupuesto_id = -1, $datos = [])
|
||||
{
|
||||
$this->deleteLineasPresupuesto($presupuesto_id);
|
||||
|
||||
foreach($datos as $linea){
|
||||
|
||||
foreach ($datos as $linea) {
|
||||
|
||||
$this->db
|
||||
->table($this->table . " t1")
|
||||
->where("t1.presupuesto_id", $presupuesto_id)
|
||||
->insert($linea);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function getResourceByNForPdf($presupuesto_id = -1)
|
||||
{
|
||||
$builder = $this->db
|
||||
->table($this->table . " t1")
|
||||
->select(
|
||||
"t1.paginas AS paginas, t1.papel_impresion AS papel, t1.gramaje AS gramaje"
|
||||
)
|
||||
->where("t1.presupuesto_id", $presupuesto_id)
|
||||
->whereIn('t1.tipo', ['lp_bn', 'lp_bnhq', 'lp_rot_bn']);
|
||||
|
||||
return $builder;
|
||||
}
|
||||
|
||||
public function getResourceColorForPdf($presupuesto_id = -1)
|
||||
{
|
||||
$builder = $this->db
|
||||
->table($this->table . " t1")
|
||||
->select(
|
||||
"t1.paginas AS paginas, t1.papel_impresion AS papel, t1.gramaje AS gramaje"
|
||||
)
|
||||
->where("t1.presupuesto_id", $presupuesto_id)
|
||||
->whereIn('t1.tipo', ['lp_color', 'lp_colorhq', 'lp_rot_color']);
|
||||
|
||||
return $builder;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Presupuestos;
|
||||
|
||||
class PresupuestoModel extends \App\Models\GoBaseModel
|
||||
@ -258,7 +259,7 @@ class PresupuestoModel extends \App\Models\GoBaseModel
|
||||
],
|
||||
"inc_rei" => [
|
||||
"integer" => "Presupuestos.validation.integer",
|
||||
|
||||
|
||||
],
|
||||
"coleccion" => [
|
||||
"max_length" => "Presupuestos.validation.max_length",
|
||||
@ -277,8 +278,9 @@ class PresupuestoModel extends \App\Models\GoBaseModel
|
||||
],
|
||||
"referencia_cliente" => [
|
||||
"max_length" => "Presupuestos.validation.max_length",
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
public function findAllWithAllRelations(string $selcols = "*", int $limit = null, int $offset = 0)
|
||||
{
|
||||
$sql =
|
||||
@ -324,14 +326,14 @@ class PresupuestoModel extends \App\Models\GoBaseModel
|
||||
|
||||
$builder->where("t1.is_deleted", 0);
|
||||
|
||||
if(empty($search))
|
||||
if (empty($search))
|
||||
return $builder;
|
||||
else{
|
||||
else {
|
||||
$builder->groupStart();
|
||||
foreach($search as $col_search){
|
||||
if($col_search[0] != 1)
|
||||
foreach ($search as $col_search) {
|
||||
if ($col_search[0] != 1)
|
||||
$builder->like(self::SORTABLE[$col_search[0]], $col_search[2]);
|
||||
else{
|
||||
else {
|
||||
$dates = explode(" ", $col_search[2]);
|
||||
$builder->where(self::SORTABLE[$col_search[0]] . ">=", $dates[0]);
|
||||
$builder->where(self::SORTABLE[$col_search[0]] . "<=", $dates[1]);
|
||||
@ -340,6 +342,43 @@ class PresupuestoModel extends \App\Models\GoBaseModel
|
||||
$builder->groupEnd();
|
||||
return $builder;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get resource data for creating PDFs.
|
||||
*
|
||||
* @param string $search
|
||||
*
|
||||
* @return \CodeIgniter\Database\BaseBuilder
|
||||
*/
|
||||
public function getResourceForPdf($presupuesto_id = -1)
|
||||
{
|
||||
$builder = $this->db
|
||||
->table($this->table . " t1")
|
||||
->select(
|
||||
"t1.id AS id, t1.created_at AS fecha, t1.titulo AS titulo, t1.autor AS autor, t1.ferro AS ferro,
|
||||
t1.ferro_digital AS ferro_digital, t1.prototipo AS prototipo, t1.solapas AS solapas,
|
||||
t1.solapas_ancho AS solapas_ancho, t1.paginas AS paginas, t1.tirada AS tirada, t1.coleccion AS coleccion,
|
||||
t1.retractilado AS retractilado, t1.guardas AS guardas, t1.marcapaginas AS marcapaginas,
|
||||
t1.comentarios_pdf AS comentarios_pdf,
|
||||
t1.total_presupuesto AS total_presupuesto, t1.total_precio_unidad AS total_precio_unidad,
|
||||
t1.papel_formato_personalizado AS isPersonalizado, t1.envios_recoge_cliente AS recoge_cliente,
|
||||
CONCAT(t1.papel_formato_ancho, 'x', t1.papel_formato_alto) AS formatoPersonalizado,
|
||||
t2.nombre AS cliente,
|
||||
CONCAT(t3.first_name, ' ', t3.last_name) AS comercial, t3.email AS email_comercial,
|
||||
CONCAT(t4.ancho, 'x', t4.alto) AS formato"
|
||||
);
|
||||
$builder->join("clientes t2", "t1.cliente_id = t2.id", "left");
|
||||
$builder->join("auth_user t3", "t1.user_update_id = t3.id_user", "left");
|
||||
$builder->join("lg_papel_formato t4", "t1.papel_formato_id = t4.id", "left");
|
||||
|
||||
$builder->where("t1.is_deleted", 0);
|
||||
$builder->where("t1.id", $presupuesto_id);
|
||||
|
||||
return $builder;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
value="<?= lang("Basic.global.Save") ?>"
|
||||
/>
|
||||
<?php if (str_contains($formAction, 'edit')): ?>
|
||||
<?= anchor(route_to("presupuestoToPdf"), lang("Basic.global.Print"), ["class" => "btn btn-dark float-start me-sm-3 me-1",]) ?>
|
||||
<?= anchor(route_to("presupuestoToPdf", $presupuestoId), lang("Basic.global.Print"), ["class" => "btn btn-dark float-start me-sm-3 me-1",'target' => '_blank']) ?>
|
||||
<?= anchor(route_to("#"), lang("Basic.global.Clone"), ["class" => "btn btn-info float-start me-sm-3 me-1",]) ?>
|
||||
<?php endif; ?>
|
||||
<?= anchor(route_to("cosidotapablandaList"), lang("Basic.global.Cancel"), ["class" => "btn btn-secondary float-start",]) ?>
|
||||
|
||||
@ -52,12 +52,12 @@
|
||||
}
|
||||
|
||||
// SOLO PARA TEST
|
||||
$(document).on("keypress", function(event) {
|
||||
/*$(document).on("keypress", function(event) {
|
||||
if (event.keyCode === 112) {
|
||||
event.preventDefault();
|
||||
showBreadCrumbSaveButton(true);
|
||||
}
|
||||
});
|
||||
});*/
|
||||
|
||||
$('#bc-save').on( "click", function() {
|
||||
showBreadCrumbSaveButton(false);
|
||||
|
||||
@ -4,17 +4,16 @@
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><?= "Presupuesto " . "TBC" ?></title>
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/font-pdf.css') ?>">
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/all.css') ?>">
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/pdf.presupuesto.css') ?>">
|
||||
<style>
|
||||
@page {
|
||||
margin: 18px;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 18px;
|
||||
margin: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -37,34 +36,34 @@
|
||||
PRESUPUESTO Nº:
|
||||
</th>
|
||||
<th class="num_presupuesto">
|
||||
<?= "obj->id" ?>
|
||||
<?= $presupuesto->id ?>
|
||||
</th>
|
||||
<th class="intro_cliente">
|
||||
CLIENTE:
|
||||
</th>
|
||||
<th class="cliente letra">
|
||||
<?= "obj->customer->name" ?>
|
||||
<?= $presupuesto->cliente ?>
|
||||
</th>
|
||||
<th class="intro_fecha">
|
||||
FECHA:
|
||||
</th>
|
||||
<th class="fecha">
|
||||
<?= date("d/m/Y") ?>
|
||||
<?= date('d/m/Y', strtotime($presupuesto->fecha)); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="6" class="titulo">
|
||||
<span style="font-weight: bold">Título:</span> <?= "obj->titulo" ?>
|
||||
<span style="font-weight: bold">Título:</span> <?= $presupuesto->titulo ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="coleccion">
|
||||
<span style="font-weight: bold">Colección:</span> <?= "obj->coleccion" ?>
|
||||
<span style="font-weight: bold">Colección:</span> <?= $presupuesto->coleccion ?>
|
||||
</td>
|
||||
<td colspan="3" class="autor">
|
||||
<span style="font-weight: bold">Autor:</span> <?= "obj->autor" ?>
|
||||
<span style="font-weight: bold">Autor:</span> <?= $presupuesto->autor ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -83,37 +82,39 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="t">Ferro</td>
|
||||
<td class="v">TBD</td>
|
||||
<td class="v"><?php echo(($presupuesto->ferro == 1) ? "SI" : "NO"); ?></td>
|
||||
<td class="t-first">Prototipo</td>
|
||||
<td class="v-first">SI</td>
|
||||
<td class="v-first"><?php echo(($presupuesto->prototipo == 1) ? "SI" : "NO"); ?></td>
|
||||
<td class="t-second">Ferro Digital</td>
|
||||
<td class="v-second">SI</td>
|
||||
<td class="v-second"><?php echo(($presupuesto->ferro_digital == 1) ? "SI" : "NO"); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="t">Formato</td>
|
||||
<td class="v" colspan="5">
|
||||
<?= "obj->papel_formato->format()" ?> mm.
|
||||
<?= (($presupuesto->isPersonalizado) ? $presupuesto->formatoPersonalizado : $presupuesto->formato) ?> mm
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="t">Nº de páginas totales</td>
|
||||
<td class="v" colspan="5"><?= "obj->paginas" ?></td>
|
||||
<td class="v" colspan="5"><?= $presupuesto->paginas ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="t">Nº de páginas ByN</td>
|
||||
<td class="v"><?= "paginas_negro" ?></td>
|
||||
<td class="v"><?= $lp_ByN->paginas ?></td>
|
||||
<td class="t-first">Papel</td>
|
||||
<td class="v-first"><?= "papel_negro" ?></td>
|
||||
<td class="v-first"><?= $lp_ByN->papel ?></td>
|
||||
<td class="t-second">Gramaje</td>
|
||||
<td class="v-second"><?= "gramaje_negro" ?></td>
|
||||
<td class="v-second"><?= $lp_ByN->gramaje ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="t">Nº de páginas Color</td>
|
||||
<td class="v"><?= "paginas_color" ?></td>
|
||||
<td class="v"><?= $lp_Color->paginas ?></td>
|
||||
<td class="t-first">Papel</td>
|
||||
<td class="v-first"><?= "papel_color" ?></td>
|
||||
<td class="v-first"><?= $lp_Color->papel ?></td>
|
||||
<td class="t-second">Gramaje</td>
|
||||
<td class="v-second"><?= "gramaje_color" ?></td>
|
||||
<td class="v-second"><?= $lp_Color->gramaje ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -169,9 +170,9 @@
|
||||
<td class="t">Tipo</td>
|
||||
<td class="v"><?= "encuardernado" ?></td>
|
||||
<td class="t-first">Solapas</td>
|
||||
<td class="v-first"><?= "solapas_portada" ?></td>
|
||||
<td class="v-first"><?php echo(($presupuesto->solapas == 1) ? "SI" : "NO"); ?></td>
|
||||
<td class="t-second">Ancho</td>
|
||||
<td class="v-second">TBD cm</td>
|
||||
<td class="v-second"><?= $presupuesto->solapas_ancho ?> cm</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -185,15 +186,15 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="t">Retractilado</td>
|
||||
<td class="v" colspan="5">NO</td>
|
||||
<td class="v" colspan="5"><?php echo(($presupuesto->retractilado == 1) ? "SI" : "NO"); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="t">Guardas</td>
|
||||
<td class="v" colspan="5">NO</td>
|
||||
<td class="v" colspan="5"><?php echo(($presupuesto->guardas == 1) ? "SI" : "NO"); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="t">Marcapáginas</td>
|
||||
<td class="v" colspan="5">NO</td>
|
||||
<td class="v" colspan="5"><?php echo(($presupuesto->marcapaginas == 1) ? "SI" : "NO"); ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -204,42 +205,55 @@
|
||||
<th class="intro_envio" colspan="10">ENVÍO</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php if (isset($envios_recogeCliente)) { ?>
|
||||
<?php
|
||||
if ($presupuesto->recoge_cliente == 1) { ?>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="10">El pedido será recogido por el cliente</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<?php } else { ?>
|
||||
<?php
|
||||
} else {
|
||||
if (count($direccionesEnvio) != 0) {
|
||||
?>
|
||||
<tbody>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="t-ejemplares">Ejemplares</td>
|
||||
<td class="v-ejemplares"><?= "TBD" ?></td>
|
||||
<td class="t-first-direccion">Dirección</td>
|
||||
<td class="v-first-direccion" colspan="7"><?= "TBC" ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="t">País</td>
|
||||
<td class="v"><?= "TBC" ?></td>
|
||||
<td class="t-first">Provincia</td>
|
||||
<td class="v-first"><?= "TBC" ?></td>
|
||||
<td class="t-second">C.P.</td>
|
||||
<td class="v-second"><?= "TBC" ?></td>
|
||||
<td class="t-third">Ciudad</td>
|
||||
<td class="v-third"><?= "TBC" ?></td>
|
||||
<td class="t-fourth">Telf.</td>
|
||||
<td class="v-fourth"><?= "TBC" ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<?php } ?>
|
||||
<?php foreach ($direccionesEnvio as $direccionEnvio) { ?>
|
||||
<tr>
|
||||
<td class="t-ejemplares">Ejemplares</td>
|
||||
<td class="v-ejemplares"><?= $direccionEnvio->cantidad ?></td>
|
||||
<td class="t-first-direccion">Dirección</td>
|
||||
<td class="v-first-direccion" colspan="7"><?= $direccionEnvio->direccion ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="t">País</td>
|
||||
<td class="v"><?= $direccionEnvio->pais ?></td>
|
||||
<td class="t-first">Provincia</td>
|
||||
<td class="v-first"><?= $direccionEnvio->provincia ?></td>
|
||||
<td class="t-second">C.P.</td>
|
||||
<td class="v-second"><?= $direccionEnvio->cp ?></td>
|
||||
<td class="t-third">Ciudad</td>
|
||||
<td class="v-third"><?= $direccionEnvio->municipio ?></td>
|
||||
<td class="t-fourth">Telf.</td>
|
||||
<td class="v-fourth"><?= $direccionEnvio->telefono ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
<?php
|
||||
} else { ?>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="10">No hay definidos envíos</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<?php
|
||||
}
|
||||
} ?>
|
||||
</table>
|
||||
|
||||
<table class="totales" align="right">
|
||||
<table class="totales">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="hidden"></th>
|
||||
<th class="hidden"></th>
|
||||
<th>Tirada</th>
|
||||
<th>U.Impresión 4%</th>
|
||||
<th>U.Envío 21%</th>
|
||||
@ -250,9 +264,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="hidden"></td>
|
||||
<td class="hidden"></td>
|
||||
<td class="tirada">TBD uds.</td>
|
||||
<td class="tirada"><?= $presupuesto->tirada ?> uds.</td>
|
||||
<td class="precio">TBD €</td>
|
||||
<td class="precio">TBD €</td>
|
||||
<td class="precio">TBD €</td>
|
||||
@ -263,32 +275,41 @@
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class="iva" colspan="5">Estos precios no incluyen I.V.A.</td>
|
||||
<td class="iva"></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<?php if (isset($obj->comentarios_pdf)) { ?>
|
||||
<h6 class="observaciones">OBSERVACIONES</h6>
|
||||
<div class="comentarios">{!! nl2br($obj->comentarios_pdf) !!}</div>
|
||||
<?php if (isset($presupuesto->comentarios_pdf)) { ?>
|
||||
<div class="observaciones">
|
||||
<h6 class="observaciones">OBSERVACIONES</h6>
|
||||
<div class="comentarios">
|
||||
<?= nl2br($presupuesto->comentarios_pdf); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="footer" style="margin-top: 70px">
|
||||
<p>Por la grave crisis de papel que está sufriendo el sector, este presupuesto deberá ser confirmado con su
|
||||
<div class="footer">
|
||||
<p class="texto-info">Por la grave crisis de papel que está sufriendo el sector, este presupuesto deberá ser confirmado con su
|
||||
comercial el día que se oficialice el pedido, dado que pueda darse la situación de que no haya stock
|
||||
disponible o que su precio haya variado considerablemente, para así poder ofrecerle alternativas.</p>
|
||||
<p class="texto-email">Esperando que los precios se ajusten a sus necesidades,<br/>
|
||||
<?= "obj->customer->salesman->name" ?> <?= "obj->customer->salesman->lastname" ?> •
|
||||
email: <?= "obj->customer->salesman->email" ?></p>
|
||||
<p class="texto-asteriscos">(*) En el formato de desarrollo de cubierta están contemplados los 3 mm. de vuelta
|
||||
de solapas en caso de llevarlas.<br/>
|
||||
(**) Estos precios están sujetos a análisis de cobertura de tinta del archivo PDF de interior.</p>
|
||||
|
||||
disponible o que su precio haya variado considerablemente, para así poder ofrecerle alternativas.
|
||||
</p>
|
||||
<p class="texto-email">
|
||||
Esperando que los precios se ajusten a sus necesidades,<br/>
|
||||
<?= $presupuesto->comercial ?> • email: <?= $presupuesto->email_comercial ?>
|
||||
</p>
|
||||
<p class="texto-asteriscos">
|
||||
(*) En el formato de desarrollo de cubierta están contemplados los 3 mm. de vuelta de solapas en caso de
|
||||
llevarlas.<br/>
|
||||
(**) Estos precios están sujetos a análisis de cobertura de tinta del archivo PDF de interior.
|
||||
</p>
|
||||
<span class="texto-presupuesto">
|
||||
Este presupuesto se calcula en base a los datos aportados, por lo que su importe puede variar a la vista del original definitivo a imprimir si éste difiere de los datos inicialmente incluidos, en cuyo caso se le facilitará un nuevo presupuesto corregido para que lo apruebe antes de realizar el pedido.
|
||||
<br/>
|
||||
Este presupuesto es válido durante 30 días.</span>
|
||||
Este presupuesto se calcula en base a los datos aportados, por lo que su importe puede variar a la vista del
|
||||
original definitivo a imprimir si éste difiere de los datos inicialmente incluidos, en cuyo caso se le
|
||||
facilitará un nuevo presupuesto corregido para que lo apruebe antes de realizar el pedido.<br/>
|
||||
Este presupuesto es válido durante 30 días.
|
||||
</span>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -16,6 +16,7 @@ body table.logo td.logo img {
|
||||
body table.presupuesto-data {
|
||||
width: 100%;
|
||||
font-size: 12px;
|
||||
margin-top: -22px;
|
||||
}
|
||||
|
||||
body table.presupuesto-data th {
|
||||
@ -83,8 +84,8 @@ body table.presupuesto-data td.autor {
|
||||
body table.impresion {
|
||||
width: 100%;
|
||||
font-size: 11px;
|
||||
margin-bottom: 9px;
|
||||
margin-top: 8px;
|
||||
// IMN margin-bottom: 9px;
|
||||
// IMN margin-top: 8px;
|
||||
}
|
||||
|
||||
body table.impresion th {
|
||||
@ -137,7 +138,8 @@ body table.impresion td.v-first {
|
||||
body table.cubierta {
|
||||
width: 100%;
|
||||
font-size: 11px;
|
||||
margin-bottom: 9px;
|
||||
margin-top: -2px;
|
||||
// IMN margin-bottom: 9px;
|
||||
}
|
||||
|
||||
body table.cubierta th {
|
||||
@ -185,7 +187,8 @@ body table.cubierta td.v-first {
|
||||
body table.encuadernacion {
|
||||
width: 100%;
|
||||
font-size: 11px;
|
||||
margin-bottom: 9px;
|
||||
margin-top: -2px;
|
||||
// IMN margin-bottom: 9px;
|
||||
}
|
||||
|
||||
body table.encuadernacion th {
|
||||
@ -240,7 +243,8 @@ body table.encuadernacion td.t-second {
|
||||
body table.extras {
|
||||
width: 100%;
|
||||
font-size: 11px;
|
||||
margin-bottom: 9px;
|
||||
margin-top: -2px;
|
||||
// IMN margin-bottom: 9px;
|
||||
}
|
||||
|
||||
body table.extras th {
|
||||
@ -266,7 +270,8 @@ body table.extras td.t {
|
||||
body table.envio {
|
||||
width: 100%;
|
||||
font-size: 11px;
|
||||
margin-bottom: 9px;
|
||||
margin-top: -2px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
body table.envio th {
|
||||
@ -328,30 +333,25 @@ body table.envio td.t-first {
|
||||
}
|
||||
|
||||
body table.totales {
|
||||
width: 64%;
|
||||
margin-left: auto;
|
||||
margin-right: 0;
|
||||
width: 75%;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
body table.totales th {
|
||||
width: 12%;
|
||||
width: 16%;
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
color: white;
|
||||
background: #0C2C84;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
body table.totales th.u_envio_21 {
|
||||
width: 16%;
|
||||
}
|
||||
|
||||
body table.totales th.hidden {
|
||||
background: none;
|
||||
}
|
||||
|
||||
body table.totales td {
|
||||
font-size: 12px;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
border: 1px dotted #4e4e4e;
|
||||
@ -360,29 +360,26 @@ body table.totales td {
|
||||
}
|
||||
|
||||
body table.totales td.tirada {
|
||||
width: 12%;
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
body table.totales td.precio,
|
||||
body table.totales td.u_impresion_4 {
|
||||
width: 12%;
|
||||
body table.totales td.precio {
|
||||
|
||||
}
|
||||
|
||||
body table.totales td.precio_ud {
|
||||
width: 12%;
|
||||
border-right: none;
|
||||
body table.totales td.precio_iva {
|
||||
|
||||
}
|
||||
|
||||
body table.totales td.iva {
|
||||
border: none;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
border-bottom: none;
|
||||
text-align: right;
|
||||
font-size: 10px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
body table.totales td.hidden {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
/* Presupuesto Manual */
|
||||
|
||||
@ -491,9 +488,21 @@ div.comentarios {
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
div.observaciones {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
div.footer {
|
||||
font-size: 10pt;
|
||||
text-align: left;
|
||||
padding: 15px;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
font-size: 12px;
|
||||
text-align: justify;
|
||||
|
||||
}
|
||||
|
||||
div.footer .taxto-info {
|
||||
|
||||
}
|
||||
|
||||
div.footer .texto-email {
|
||||
@ -501,6 +510,7 @@ div.footer .texto-email {
|
||||
}
|
||||
|
||||
div.footer .texto-asteriscos {
|
||||
margin-top: 20px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user