{% block stylesheets %}
<style>
h6 {
font-weight: bold;
}
h3 {
/*font-size: 20px;*/
}
h5, h3, h4, p {
padding: 0px;
font-family: "Amaranth", sans-serif;
background: #ffffff;
}
legend {
border: none;
padding: 5px;
}
.print-area h5, .print-area h3, .print-area h4 {
padding: 0px;
font-family: "Nova Flat", sans-serif;
background: #ffffff;
border: none;
margin: 0;
}
.print-area p {
font-size: 12px;
padding: 4px;
margin: 0px;
line-height: 10px;
border: none;
}
hr {
margin-top: 1px;
margin-bottom: 1px;
border-top: 2px dashed rgba(0, 0, 0, 0.99);
}
.print-area hr {
border-top: 1px dashed rgba(0, 0, 0, 0.99);
}
.print-area {
width: 28%;
background: white;
/*border: 1px dotted;*/
padding: 2%;
display: block;
/*background-color: firebrick;*/
}
.print-area table {
font-family: 'Fjord One', serif;
}
element.style {
}
fieldset {
display: block;
margin-left: 0px;
margin-right: 2px;
border-top: 1px dotted black;
}
.kkk fieldset {
float: right;
width: 40%;
}
.detail {
padding: 0px;
font-size: 11px;
border: none;
}
@media print {
.sf-toolbar, .sf-display-none, .sf-minitoolbar {
display: none;
}
.print-area {
display: block;
}
@page {
margin: 0 !important;
}
html {
margin: 0 !important;
}
body {
margin: 0 !important;
}
.print-area {
width: 100%;
}
.pro {
display: none;
}
.sf-toolbar, .sf-toolbarreset, .sf-minitoolbar {
display: none;
}
/*.page-break {display: block; page-break-before: always }*/
.page-break {
page-break-before: avoid;
}
.page-break {
page-break-after: always;
}
pre, blockquote {
page-break-inside: avoid;
}
}
.parcel {
/*font-family: 'Big Shoulders Text', cursive;*/
margin-bottom: 10px;
/*margin-left: 10px;*/
}
.parcel h3, .parcel span {
font-family: 'Merriweather', serif;
margin-top: 15px;
}
.sender_receiver {
}
.destinations {
float: left;
width: auto;
padding: 0px;
font-family: 'Open Sans', sans-serif;
margin-bottom: 15px;
}
.destinations h4, .destinations b {
font-family: 'Merriweather', serif;
}
.destinations h3 {
margin-bottom: 10px;
}
.description {
font-size: 30px;
/*margin-left: 10px;*/
}
.all_parcels {
text-transform: uppercase;
/*-ms-transform: rotate(90deg);*/
/*-moz-transform: rotate(90deg);*/
/*-webkit-transform: rotate(90deg);*/
/*-o-transform: rotate(90deg);*/
margin-top: 115px;
width: 430px;
margin-left: -60px;
}
.payment button, .print, .payment a {
width: 150px;
border-radius: 30px;
}
.payment .cash {
float: right;
}
.payment .cash img {
height: 20px;
}
.dropdown-menu > li.kopie > a {
padding-left: 5px;
}
.dropdown-submenu {
position: relative;
}
.dropdown-submenu > .dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
-webkit-border-radius: 0 6px 6px 6px;
-moz-border-radius: 0 6px 6px 6px;
border-radius: 0 6px 6px 6px;
}
.dropdown-submenu > a:after {
border-color: transparent transparent transparent #333;
border-style: solid;
border-width: 5px 0 5px 5px;
content: " ";
display: block;
float: right;
height: 0;
margin-right: -10px;
margin-top: 5px;
width: 0;
}
.dropdown-submenu:hover > a:after {
border-left-color: #555;
}
.dropdown-menu > li > a:hover, .dropdown-menu > .active > a:hover {
text-decoration: underline;
}
@media (max-width: 767px) {
.navbar-nav {
display: inline;
}
.navbar-default .navbar-brand {
display: inline;
}
.navbar-default .navbar-toggle .icon-bar {
background-color: #fff;
}
.navbar-default .navbar-nav .dropdown-menu > li > a {
color: red;
background-color: #ccc;
border-radius: 4px;
margin-top: 2px;
}
.navbar-default .navbar-nav .open .dropdown-menu > li > a {
color: #333;
}
.navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
.navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
background-color: #ccc;
}
.navbar-nav .open .dropdown-menu {
border-bottom: 1px solid white;
border-radius: 0;
}
.dropdown-menu {
padding-left: 10px;
}
.dropdown-menu .dropdown-menu {
padding-left: 20px;
}
.dropdown-menu .dropdown-menu .dropdown-menu {
padding-left: 30px;
}
li.dropdown.open {
border: 0px solid red;
}
}
@media (min-width: 768px) {
ul.nav li:hover > ul.dropdown-menu {
display: block;
}
#navbar {
text-align: center;
}
}
.dropdown-submenu .dropdown-menu li {
font-size: 12px;
}
.invalid-feedback {
color: orangered;
font-size: 12px;
}
legend {
display: block;
max-width: 100%;
width: auto;
padding: 10px;
margin-bottom: 5px;
font-size: 12px;
line-height: 1px;
color: inherit;
white-space: normal;
border: 1px solid;
/*font-family: "Nova Flat", Helvetica, Arial, sans-serif;*/
font-family: "Amaranth", Monaco, Consolas, "Courier New", monospace;
font-weight: bolder;
}
fieldset {
display: block;
margin-left: 0px;
margin-right: 2px;
margin-top: 10px;
padding-left: 10px;
/*padding-top: 0.35em;
padding-bottom: 0.625em;
padding-left: 0.75em;
padding-right: 0.75em;*/
border-top: 1px dotted black;
}
.datagrid-cell {
text-transform: uppercase;
}
.datagrid-footer-inner {
font-weight: bolder;
}
.datagrid-footer-inner .datagrid-cell {
font-size: 20px;
}
.panel-footer {
text-align: center;
}
h6 {
font-weight: bold;
}
h3 {
/*font-size: 20px;*/
}
h5, h3, h4, p {
padding: 0px;
font-family: "Amaranth", sans-serif;
background: #ffffff;
border: 1px dotted #cccccc;
}
legend {
border: none;
padding: 5px;
}
.print-area h5, .print-area h3, .print-area h4 {
padding: 0px;
font-family: "Nova Flat", sans-serif;
background: #ffffff;
border: none;
margin: 0;
}
.print-area p {
font-size: 12px;
padding: 0px;
margin: 0px;
line-height: 10px;
border: none;
}
hr {
margin-top: 1px;
margin-bottom: 1px;
border-top: 2px dashed rgba(0, 0, 0, 0.99);
}
.print-area hr {
border-top: 1px dashed rgba(0, 0, 0, 0.99);
}
.print-area {
width: 28%;
background: white;
/*border: 1px dotted;*/
padding: 2%;
display: block;
}
.print-area table {
font-family: monospace, monospace;
}
element.style {
}
fieldset {
display: block;
margin-left: 0px;
margin-right: 2px;
/*border: 1px dashed black;*/
padding: 0px;
}
.detail {
padding: 0px;
font-size: 11px;
border: none;
}
@media print {
.print-area {
display: block;
}
@page {
margin: 0 !important;
}
html {
margin: 0 !important;
}
body {
margin: 0 !important;
}
.print-area {
width: 100%;
}
.pro {
display: none;
}
.sf-toolbar, .sf-toolbarreset, .sf-minitoolbar {
display: none;
}
}
table {
border-collapse: collapse;
}
</style>
{% endblock %}
{% block body %}
<div class="print-area" id="print-area">
<div class="receipt-print" style="border: 1px solid black;">
<div align="center">
<img id="img.base-64" style="height: 80px;" src="{{ 'data:image/jpg;base64,'~logoBase64 }}" alt=""/>
</div>
<h5 style="text-align: center; align-content: center">NENO COURIER SERVICES LTD</h5>
<p style="text-align: center; align-content: center; font-size: 10px">
P.O BOX 660-60100 - EMBU <br/>
TEL:{{ waybill.fromStation.stationName }}:{{ waybill.fromStation.phoneNumbers }}<br>
{{ waybill.toStation.stationName }}: {{ waybill.toStation.phoneNumbers }} </p>
<p style="text-align: center;">----------------------------------------------</p>
<table style="width: 100%; font-size: 10px">
<tr>
<td align="right" style="width: 40%;">PIN:</td>
<td>P051185384I</td>
</tr>
<tr>
{% if transaction.pinNumber %}
<td align="right">BUYERS PIN:</td>
<td>{{ transaction.pinNumber | upper }}</td>
{% endif %}
</tr>
</table>
<div style="align-content: center; text-align: center; ">
<p style="font-weight: bold; font-size: 10px; margin-bottom: 5px;">{{ receiptType }}</p>
</div>
<table style="width: 100%; border: 1px solid black; border-top: 1px dashed black; padding: 5px;">
<thead>
<tr>
<td colspan="2" style="text-align: center; padding: 0px;">
<p style="text-align: center; font-size: 10px;">{{ transaction.createdAt | date }}</p>
<p style="font-size: 10px;"> WAYBILL/RCP#{{ waybill.id }}</p>
</td>
</tr>
<tr>
<td colspan="2" style="text-align: center; padding: 0px;">
{# <barcode code="{{ waybill.id }}" height="0.66" type="EAN128C" text="1"/>#}
{# <br>#}
<p style='font-weight:bolder; font-size: 20px; font-family: "Amaranth", sans-serif'>{{ waybill.id }}</p>
</td>
</tr>
</thead>
</table>
<table style="width: 100%; border: 1px solid black; padding: 5px;">
<thead>
<tr>
<th style="text-align: left;">
<h6>Parcel Value</h6>
</th>
<th style="text-align: right;">
<h6>{{ waybill.parcelValue | number_format }}</h6>
</th>
</tr>
</thead>
</table>
<table style="width: 100%; border: 1px solid black; padding: 5px;">
<thead>
<tr>
<th style="text-align: left;">
<h6>FROM</h6>
</th>
<th style="text-align: right;">
<h6>TO</h6>
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="font-size: 10px;">
<div style="">
<p style="font-weight: normal;">{{ waybill.senderName | upper }}</p>
<p>{{ waybill.senderPhoneNumber }}</p>
<p>{{ waybill.fromStation.stationName | upper }}</p>
</div>
</td>
<td style="text-align: right; font-size: 10px;">
<div style="">
<p style="font-weight: normal; ">{{ waybill.receiverName | upper }}</p>
<p>{{ waybill.receiverPhoneNumber }}</p>
<p>{{ waybill.toStation.stationName | upper }}</p><br>
</div>
</td>
</tr>
</tbody>
</table>
{# <div style="text-align: center; margin-bottom: 0px;">- - - - - - - - - - - - - - - - - - - - - - - - -</div>#}
<table style="margin-top: 1px; width:100%; margin-bottom: 0px; font-size: 10px;">
{% for index, parcel in parcels %}
<tr>
<td><b style="font-size: 18px;">◾</b></td>
<td colspan="2" style="font-size: 12px;">{{ parcel.description | slice(0,25) }} </td>
<td align="right" style="font-size: 12px; padding-left: 5px; padding-right:5px;">1 x</td>
<td align="right"
style="font-size: 12px;">{{ (transaction.amount/waybill.percelCount) | number_format(2, '.', ',') }}</td>
</tr>
{% endfor %}
</table>
<div style="text-align: center; margin-bottom: 0px;">- - - - - - - - - - - - - - - - - - - - - - - - -</div>
<table style="text-align: center; width: 100%; align-content: center;">
<tr style="border-bottom: 1px solid black;">
<td align="left" style="font-size: 10px;">TOTAL TAX EXCL</td>
<td align="right"
style="font-weight: bolder;font-size: 10px;">{{ (transaction.grossAmount - transaction.taxAmount) | number_format(2, '.', ',') }}</td>
</tr>
<tr>
<td align="left" style="font-size: 10px;">TAXES 16%</td>
<td align="right"
style="font-weight: bolder;font-size: 10px;">{{ transaction.taxAmount | number_format(2, '.', ',') }}</td>
</tr>
</table>
<div style="text-align: center; margin-bottom: -2px;"></div>
<table style="text-align: center; width:100%; align-content: center;">
<tr style="">
<td align="left" style="font-weight: bold; font-size: 10px;">TOTAL AMOUNT</td>
<td align="right"
style="font-weight: bold; font-size: 10px;">{{ transaction.amount | number_format(2, '.', ',') }}</td>
</tr>
</table>
{# <b style="text-align: center; margin-bottom: 0px;">- - - - - - - - - - - - - - - - - - - - - - - - -</b>#}
<div style="border: 1px dotted; margin: 3px; padding: 2px;">
<table style="width: 100%;">
{% if transaction.paymentMethod == 'MPESA' %}
<tr>
<td style="text-align: left; font-size: 10px;">PAID IN</td>
<td style="text-align: right; font-size: 10px;"> {{ transaction.paymentMethod }} [{{ mpesa.mpesa.transactionId }}]
by {{ mpesa.mpesa.firstName | capitalize }}</td>
</tr>
{% elseif transaction.paymentMethod == 'MPESA_CASH' %}
<tr>
<td style="text-align: left;font-size: 10px;">PAID IN</td>
<td style="text-align: right;font-size: 10px;"> {{ transaction.paymentMethod }} [{{ mpesa.mpesa.transactionId }}]
by {{ mpesa.mpesa.firstName | capitalize }}</td>
</tr>
{% else %}
<tr>
<td style="text-align: left; font-size: 10px;">PAID IN</td>
<td style="text-align: right; font-size: 10px;">CASH</td>
</tr>
{% endif %}
</table>
<table style="width: 100%;">
<tr>
<td style="text-align: left;font-size: 10px;">SERVED BY</td>
<td style="text-align: right;font-size: 10px;">{{ by.preferredName | capitalize }}</td>
</tr>
</table>
</div>
<p>
{# <b style="text-align: center;">- - - - - - - - - - - - - - - - - - - - - - - - -</b>#}
{% if qrcode is defined %}
<table>
<tr>
<td>
<img id="img.base-64" style="width: 100px; height: 100px;" src="{{ 'data:image/png;base64,'~qrcode }}" alt=""/>
</td>
<td>
<p style="width: 100%; font-weight: bold; font-size: 10px;">CONTROL UNIT </p>
<p>-------------------------</p>
<p style="font-size: 10px;"><b>SERIAL NUMBER</b></p>
{# <p style="font-size: 10px; font-weight: normal;">KRAMW011202207060805</p>#}
<p style="font-size: 10px; font-weight: normal;">KRAMW011202207061147</p>
<p style="font-size: 10px;"><b>INVOICE NUMBER</b></p>
<p style="font-size: 10px;font-weight: normal;">{{ timsInvoiceNumber }}</p>
</td>
</tr>
</table>
{% endif %}
<div style="text-align: center;">
<p>
<i>"<b>Thank you</b> for choosing <br> Neno Courier Services."</i>
</p>
<p><i>Have an awesome
{% set currentHour = (waybill.createdAt | date('H')) %}
{% if currentHour > 0 and currentHour < 12 %}
day
{% elseif currentHour >= 12 and currentHour < 15 %}
afternoon
{% elseif currentHour >= 16 and currentHour < 23 %}
evening
{% endif %}
</i></p>
</div>
</div>
{% for parcel in parcels %}
<div class="page-break" style="margin-top:0px;"></div>
<div style="border: 1px solid black;">
<div style="text-align: center; margin-bottom: 1px; margin-top:1px; border: 1px solid black;">
<h3>NENO COURIER SERVICES</h3>
<p style="text-align: center; align-content: center; ">P.O BOX 660-60100,
Tel:{{ waybill.fromStation.stationName }}:
<b style="font-family: 'Merriweather', serif;"> {{ waybill.fromStation.phoneNumbers }}</b>
{{ waybill.toStation.stationName }}:
<b>{{ waybill.toStation.phoneNumbers }}</b>
</p>
<h1 style="margin: 1px; padding: 0px;"><b style="font-weight: bold; font-family: serif;">{{ waybill.id }}</b></h1>
<div style="text-align: center; margin-bottom: 1px;">
<barcode code="{{ waybill.id }}" size="2" type="I25" text="1"/>
<h4><b>{{ waybill.id }}</b></h4>
</div>
<p align="center">{{ transaction.createdAt | date }}</p>
<h5>by:{{ waybill.createdBy.person.preferredName }}</h5>
<hr>
</div>
<table rotate="90" style="padding-top:50px; border-collapse: collapse;">
<thead>
<tr>
<th colspan="2">
<div style="font-size: 45px;">
{{ waybill.toStation }} -
{% if waybill.fromStation.id < 10 %}
00{{ waybill.fromStation.id }}
{% elseif waybill.fromStation.id > 9 and waybill.fromStation.id < 100 %}
0{{ waybill.fromStation.id }}
{% else %}
{{ waybill.fromStation.id }}
{% endif %}
</div>
</th>
</tr>
<tr>
<th colspan="2">
<h3 style="width: 400px; font-weight: normal; ">
{# {% set receiverP = waybill.receiverPhoneNumber | split(' ') %}#}
{# {{ receiverP[0] ~ ' *** '~receiverP[2] }}#}
{{ waybill.receiverPhoneNumber }}
<span>KES{{ transaction.amount }}</span>
</h3>
</th>
</tr>
</thead>
<tbody>
<tr style="border-bottom: 1px solid black;">
<th style="border-bottom: 1px solid black;">
<h6 style="text-align: left">FROM</h6>
</th>
<th style="border-bottom: 1px solid black;">
<h6 style="text-align: left">TO</h6>
</th>
</tr>
<tr>
<td style="border-bottom: 1px solid black;">
<div class="destinations">
<h4 style="font-weight: bold;">{{ waybill.senderName | upper }}</h4>
<h5>
{{ waybill.senderPhoneNumber }}
{# {% set senderP = waybill.senderPhoneNumber | split(' ') %}#}
{# {{ senderP[0] ~ ' *** '~senderP[2] }}#}
</h5>
<h5>{{ waybill.fromStation.stationName }}</h5>
</div>
</td>
<td style="border-bottom: 1px solid black;">
<div class="destinations">
<h4 style="font-weight: bold;">{{ waybill.receiverName | upper }}</h4>
<h5>
{{ waybill.receiverPhoneNumber }}
{# {% set receiverP = waybill.receiverPhoneNumber | split(' ') %}#}
{# {{ receiverP[0] ~ ' *** '~receiverP[2] }}#}
</h5>
<h5>{{ waybill.toStation.stationName }}</h5>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div class="description">
<div style="font-size: 25px;">
{{ parcel.description | slice(0, 70) }}
{% if parcel.description|length > 70 %}
...
{% endif %}
</div>
<br>
</div>
</td>
</tr>
</tbody>
</table>
</div>
{% endfor %}
</div>
{% endblock %}