mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Iniciada informacion de cubierta y sobrecubierta
This commit is contained in:
2
ci4/.env
2
ci4/.env
@ -23,7 +23,7 @@ CI_ENVIRONMENT = development
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
#app.baseURL = 'https://sk-dev.imnavajas.es'
|
||||
app.baseURL = 'https://sk-imn.imnavajas.es'
|
||||
app.baseURL = 'https://sk-jjo.imnavajas.es'
|
||||
# app.baseURL = "http://safekat.test/"
|
||||
# app.forceGlobalSecureRequests = false
|
||||
|
||||
|
||||
@ -18,9 +18,10 @@ class PrintPresupuestos extends BaseController
|
||||
$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['lp_Cubierta'] = $lineasPresupuestoModel->getResourceCubiertaForPdf($id_presupuesto)->get()->getRow();
|
||||
$data['lp_Sobrecubierta'] = $lineasPresupuestoModel->getResourceSobrecubiertaForPdf($id_presupuesto)->get()->getRow();
|
||||
$data['direccionesEnvio'] = $direccionesEnvioModel->getResourceForPdf($id_presupuesto)->get()->getResultObject();
|
||||
|
||||
|
||||
return view(getenv('theme.path') . 'pdfs/presupuesto', $data);
|
||||
}
|
||||
|
||||
|
||||
@ -385,6 +385,32 @@ class PresupuestoLineaModel extends \App\Models\GoBaseModel
|
||||
return $builder;
|
||||
}
|
||||
|
||||
public function getResourceCubiertaForPdf($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_cubierta']);
|
||||
|
||||
return $builder;
|
||||
}
|
||||
|
||||
public function getResourceSobrecubiertaForPdf($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_sobrecubierta']);
|
||||
|
||||
return $builder;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -275,7 +275,7 @@ class PresupuestoModel extends \App\Models\GoBaseModel
|
||||
->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.ferro_digital AS ferro_digital, t1.prototipo AS prototipo, t1.solapas AS solapas, t1.lomo AS lomo,
|
||||
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,
|
||||
|
||||
@ -101,20 +101,20 @@
|
||||
|
||||
<tr>
|
||||
<td class="t">Nº de páginas ByN</td>
|
||||
<td class="v"><?= $lp_ByN->paginas ?></td>
|
||||
<td class="v"><?= $lp_ByN !== null ? $lp_ByN->paginas : 'N/A' ?></td>
|
||||
<td class="t-first">Papel</td>
|
||||
<td class="v-first"><?= $lp_ByN->papel ?></td>
|
||||
<td class="v-first"><?= $lp_ByN !== null ? $lp_ByN->papel : 'N/A' ?></td>
|
||||
<td class="t-second">Gramaje</td>
|
||||
<td class="v-second"><?= $lp_ByN->gramaje ?></td>
|
||||
<td class="v-second"><?= $lp_ByN !== null ? $lp_ByN->gramaje : 'N/A' ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="t">Nº de páginas Color</td>
|
||||
<td class="v"><?= $lp_Color->paginas ?></td>
|
||||
<td class="v"><?= $lp_Color !== null ? $lp_Color->paginas : 'N/A' ?></td>
|
||||
<td class="t-first">Papel</td>
|
||||
<td class="v-first"><?= $lp_Color->papel ?></td>
|
||||
<td class="v-first"><?= $lp_Color !== null ? $lp_Color->papel : 'N/A' ?></td>
|
||||
<td class="t-second">Gramaje</td>
|
||||
<td class="v-second"><?= $lp_Color->gramaje ?></td>
|
||||
<td class="v-second"><?= $lp_Color !== null ? $lp_Color->gramaje : 'N/A' ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -130,15 +130,23 @@
|
||||
<td class="t">Formato cubierta*</td>
|
||||
<td class="v" colspan="5"><?= "obj->papel_formato->alto" ?> mm.
|
||||
<td class="t-third">Lomo</td>
|
||||
<td class="v-third"><?= "TBD mm." ?></td>
|
||||
<td class="v-third"><?= isset($lp_ByN->lomo) ? $lp_ByN->lomo . "mm" : 'N/A' ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="t">Impresión</td>
|
||||
<td class="v"><?= "cubierta_impresa_caras" ?></td>
|
||||
<td class="v">
|
||||
<?php if($lp_Cubierta !== null){
|
||||
$caras = $lp_Cubierta->paginas/2;
|
||||
echo (($caras > 1) ? "$caras caras" : "$caras cara");
|
||||
} else{
|
||||
echo "N/A";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class="t-first">Papel</td>
|
||||
<td class="v-first"><?= "papel_portada" ?></td>
|
||||
<td class="v-first"><?= $lp_Cubierta !== null ? $lp_Cubierta->papel : 'N/A' ?></td>
|
||||
<td class="t-second">Gramaje</td>
|
||||
<td class="v-second"><?= "gramaje_portada" ?></td>
|
||||
<td class="v-second"><?= $lp_Cubierta !== null ? $lp_Cubierta->gramaje : 'N/A' ?></td>
|
||||
<td class="t-third">Plastificado</td>
|
||||
<td class="v-third"><?= "plastificado_portada" ?></td>
|
||||
</tr>
|
||||
@ -150,9 +158,9 @@
|
||||
<td class="t">Sobrecubierta</td>
|
||||
<td class="v"><?= "resumen_cubierta" ?></td>
|
||||
<td class="t-first">Papel</td>
|
||||
<td class="v-first"><?= "papel_cubierta" ?></td>
|
||||
<td class="v-first"><?= $lp_Sobrecubierta !== null ? $lp_Cubierta->papel : 'N/A' ?></td>
|
||||
<td class="t-second">Gramaje</td>
|
||||
<td class="v-second"><?= "gramaje_cubierta" ?></td>
|
||||
<td class="v-second"><?= $lp_Sobrecubierta !== null ? $lp_Cubierta->gramaje : 'N/A' ?></td>
|
||||
<td class="t-third">Plastificado</td>
|
||||
<td class="v-third"><?= "plastificado_cubierta" ?></td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user