<style>
fieldset {
/*border: none;*/
border: 1px dotted black;
padding: 10px;
}
legend {
border: none;
}
.detail-table td {
font-weight: bolder;
}
.detail-table span {
font-weight: normal;
}
h5{
padding: 0px;
margin: 0px;
}
</style>
<div class="row" style="margin-top: 10px; ">
<div class="col-lg-6 col-md-6 col-sm-6">
<fieldset>
<legend>WayBill</legend>
<div class="row">
<div class="col-lg-8">
<h5>Sender Name</h5>
<span>{{ transaction.wayBill.senderName | upper }}</span>
</div>
<div class="col-lg-4">
<h5>Phone</h5>
<span>{{ transaction.wayBill.senderPhoneNumber | upper }}</span>
</div>
</div>
<div class="row">
<div class="col-lg-8">
<h5>Receiver Name</h5>
<span>{{ transaction.wayBill.receiverName | upper }}</span>
</div>
<div class="col-lg-4">
<h5>Phone</h5>
<span>{{ transaction.wayBill.receiverPhoneNumber | upper }}</span>
</div>
</div>
<div class="row">
<div class="col-lg-8">
<h5>From</h5>
<span>{{ transaction.wayBill.fromStation | upper }}</span>
</div>
<div class="col-lg-4">
<h5>To</h5>
<span>{{ transaction.wayBill.toStation | upper }}</span>
</div>
</div>
</fieldset>
</div>
<div class="col-lg-3 col-sm-4 col-md-3">
<fieldset>
<legend>Parcels</legend>
{% for parcel in transaction.wayBill.parcels %}
<div class="row" style="border: 1px dashed black; padding-bottom: 5px;padding-top: 5px;">
<div class="col-lg-12">
<h5>Parcel [#{{ parcel.id }}]</h5>
<span>{{ parcel.description }}</span>
</div>
</div>
{% endfor %}
</fieldset>
</div>
<div class="col-lg-3 col-sm-4 col-md-3">
<div class="row">
<div class="col-lg-12">
<fieldset>
<legend>Transaction</legend>
<table width="100%" style="text-align: center; align-content: center;">
<tr>
<td align="left"><h5 align="left" style="border: none;">{{ transaction.taxPercentage }}% V.A.T</h5></td>
<td align="right" style="font-family: monospace, monospace; border-right: none;">{{ transaction.taxAmount }}</td>
</tr>
<tr style="border-bottom: 1px dotted black;">
<td align="left"><h5 align="left" style="border: none;">AMOUNT</h5></td>
<td align="right" style="font-family: monospace, monospace;border-right: none;">{{ (transaction.grossAmount - transaction.taxAmount) | number_format}}</td>
</tr>
{#{% set expenseAmount = 0 %}#}
{% for expense in transaction.wayBillExpenses %}
{% if expense.expenseType.isAutomatic == false %}
<tr style="border-bottom: 1px solid black;">
<td align="left"><h5 align="left" style="border: none;">{{ expense.expenseType.expenseName | upper }}</h5></td>
<td align="right" style="font-family: monospace, monospace;border-right: none;">-{{ expense.amount | number_format}}</td>
</tr>
{#{% set expenseAmount = (expenseAmount + expense.amount) %}#}
{% endif %}
{% endfor %}
<tr style="border-bottom: 1px double black;">
<td align="right"><h4 align="left" style="border: none;">TOTAL</h4></td>
<td align="right" style="font-family: monospace, monospace; border-right: none;">{{ (transaction.stationBalance) | number_format }}</td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
<hr style="margin-top: 15px;">
<div class="row">
<div class="col-lg-6">
<span>Entered By: {{ transaction.wayBill.createdBy.person.firstName | upper }} {{ transaction.wayBill.createdBy.person.secondName | upper }} {{ transaction.wayBill.createdBy.person.sirName | upper }} | @user {{ transaction.wayBill.createdBy.username }}</span></span>
</div>
<div align="right" class="col-lg-4">
<span><a class="btn btn-warning btn-sm" href="{{ path('one_way_bill', {'id': transaction.wayBill.id}) }}">View Details <i class="fas fa-arrow-circle-right"></i></a></span>
</div>
</div>