Adding the possibility to not use any image at all.
This commit is contained in:
parent
039fa4c785
commit
21df8325d3
|
@ -33,6 +33,9 @@ sub postal_code ($self) {
|
|||
}
|
||||
|
||||
sub image ($self) {
|
||||
if (!defined $self->config->{img}) {
|
||||
return
|
||||
}
|
||||
return $ROOT_PATH->child($self->config->{img});
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,12 @@ sub run ($self) {
|
|||
COMPLETA => $COMPLETA,
|
||||
concepts => $concepts,
|
||||
final_data => $final_data,
|
||||
logo => MIME::Base64::encode_base64($logo->slurp_raw),
|
||||
(
|
||||
( defined $logo )
|
||||
? ( logo => MIME::Base64::encode_base64( $logo->slurp_raw ),
|
||||
)
|
||||
: ( logo => undef )
|
||||
),
|
||||
}
|
||||
)
|
||||
);
|
||||
|
@ -94,7 +99,9 @@ sub template_bill ($self) {
|
|||
</head>
|
||||
<body>
|
||||
<div class="page-contents">
|
||||
% if (defined $logo) {
|
||||
<img class="logo" src="data:image/svg+xml;base64,<%=$logo%>"/>
|
||||
% }
|
||||
<h1>Factura <%=$kind_of_bill eq $SIMPLIFICADA ? 'Simplificada' : 'Completa'%></h1>
|
||||
|
||||
<h2>Datos de factura</h2>
|
||||
|
|
Loading…
Reference in New Issue