<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* fos/parcels/view_parcel.html.twig */
class __TwigTemplate_17ad5efce4aa4aed53d3207772ea37f5 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'firstnav' => [$this, 'block_firstnav'],
'secondnav' => [$this, 'block_secondnav'],
'current' => [$this, 'block_current'],
'secondarylinkblock' => [$this, 'block_secondarylinkblock'],
'stylesheets' => [$this, 'block_stylesheets'],
'main' => [$this, 'block_main'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "fos/base.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "fos/parcels/view_parcel.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "fos/parcels/view_parcel.html.twig"));
$this->parent = $this->loadTemplate("fos/base.html.twig", "fos/parcels/view_parcel.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 5
public function block_firstnav($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "firstnav"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "firstnav"));
// line 6
echo " ";
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Parcels\\DefaultController::nav"));
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 8
public function block_secondnav($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "secondnav"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "secondnav"));
// line 9
echo "
<script src=\"https://printjs-4de6.kxcdn.com/print.min.js\"></script>
<link rel=\"stylesheet\" type=\"text/css\" href=\"https://printjs-4de6.kxcdn.com/print.min.css\">
<script src=\"https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js\"></script>
<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js\"
integrity=\"sha512-BNaRQnYJYiPSqHHDb58B0yaPfCu+Wgds8Gp/gU33kqBtgNS4tSPHuGibyoeqMV/TJlSKda6FXzoEyYGjTe+vXA==\"
crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>
<script src=\"https://cdnjs.cloudflare.com/ajax/libs/dompurify/2.4.0/purify.min.js\" integrity=\"sha512-/hVAZO5POxCKdZMSLefw30xEVwjm94PAV9ynjskGbIpBvHO9EBplEcdUlBdCKutpZsF+La8Ag4gNrG0gAOn3Ig==\" crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>
";
// line 22
echo "
<!-- Second Nav -->
<nav class=\"navbar-second navbar navbar-default navbar-static-top\" role=\"navigation\">
<div class=\"container-fluid\">
<div class=\"navbar-header\">
<button type=\"button\" class=\"navbar-toggle collapsed\" data-toggle=\"collapse\"
data-target=\"#bs-example-navbar-collapse-1\">
<span class=\"sr-only\">Toggle navigation</span>
<span class=\"icon-bar\"></span>
<span class=\"icon-bar\"></span>
<span class=\"icon-bar\"></span>
</button>
<!-- Brand -->
";
// line 36
$this->displayBlock('current', $context, $blocks);
// line 39
echo " </div>
<div class=\"collapse navbar-collapse animated fadeIn\" id=\"bs-example-navbar-collapse-1\">
<ul class=\"nav navbar-nav animated fadeIn\">
";
// line 43
$this->displayBlock('secondarylinkblock', $context, $blocks);
// line 49
echo " </ul>
<ul class=\"nav navbar-nav navbar-right\">
<li class=\"\"><a></a></li>
";
// line 53
echo " </ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 36
public function block_current($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "current"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "current"));
// line 37
echo " <span class=\"navbar-brand\" href=\"#\"><i class=\"fa fa-gears\"></i> PARCEL TO ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 37, $this->source); })()), "wayBill", [], "any", false, false, false, 37), "toStation", [], "any", false, false, false, 37), "html", null, true);
echo "</span>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 43
public function block_secondarylinkblock($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "secondarylinkblock"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "secondarylinkblock"));
// line 44
echo " ";
// line 45
echo " ";
// line 46
echo " <li class=\"\"><a href=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 46, $this->source); })()), "request", [], "any", false, false, false, 46), "headers", [], "any", false, false, false, 46), "get", ["referer"], "method", false, false, false, 46), "html", null, true);
echo "\"><i class=\"fa fa-arrow-circle-left\"></i> Back</a></li>
";
// line 48
echo " ";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 60
public function block_stylesheets($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
// line 61
echo " <style>
/*@import \"../../../../../web/assets/css/print.css\";*/
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: none;
/*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 .col-lg-6 + fieldset {
box-shadow: 5px 3px 20px #888888;
}
.sender_receiver fieldset{
background-color: beige;
border-top: 1px solid #d3cece;
}
.sender_receiver fieldset legend{
background-color: beige;
border: 1px solid #d3cece;
}
.sender_receiver fieldset h5{
background: none;
}
.destinations {
float: left;
width: 50%;
padding: 10px;
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: 37px;
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;
}
</style>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 261
public function block_main($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 262
echo " <div class=\"row pro\" style=\"padding: 10px 0px 20px 20px; /*border-right: 1px solid #888888;*/ background: #FFFFFF; /*box-shadow: 5px 3px 20px #888888;*/\">
<h3 style=\"font-family:Serif;margin-top: 30px;\">WayBill: ";
// line 263
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 263, $this->source); })()), "wayBill", [], "any", false, false, false, 263), "id", [], "any", false, false, false, 263), "html", null, true);
echo " - ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 263, $this->source); })()), "cuInvoiceNumber", [], "any", false, false, false, 263), "html", null, true);
echo "</h3>
<div class=\"col-lg-6 pro\">
<div class=\"row sender_receiver\">
<div class=\"col-lg-6\">
<fieldset style=\"box-shadow: 5px 5px 0px #888888;\">
<legend class=\"top-legend\">SENDER</legend>
<div class=\"row\">
<div class=\"col-lg-12\">
<fieldset>
<legend>Name</legend>
<h5>";
// line 275
echo twig_escape_filter($this->env, twig_upper_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 275, $this->source); })()), "waybill", [], "any", false, false, false, 275), "senderName", [], "any", false, false, false, 275)), "html", null, true);
echo "</h5>
</fieldset>
</div>
</div>
<div class=\"row\">
<div class=\"col-lg-12\">
<fieldset>
<legend>Phone</legend>
<h5>";
// line 283
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 283, $this->source); })()), "waybill", [], "any", false, false, false, 283), "senderPhoneNumber", [], "any", false, false, false, 283), "html", null, true);
echo "</h5>
</fieldset>
</div>
</div>
<div class=\"row\">
<div class=\"col-lg-12\">
<fieldset>
<legend>From</legend>
<h5>";
// line 291
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 291, $this->source); })()), "waybill", [], "any", false, false, false, 291), "fromStation", [], "any", false, false, false, 291), "html", null, true);
echo "</h5>
</fieldset>
</div>
</div>
</fieldset>
</div>
<div class=\"col-lg-6\">
<fieldset style=\"box-shadow:5px 5px 0px #888888\">
<legend class=\"top-legend\">RECEIVER</legend>
<div class=\"row\">
<div class=\"col-lg-12\">
<fieldset>
<legend>Name</legend>
<h5>";
// line 305
echo twig_escape_filter($this->env, twig_upper_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 305, $this->source); })()), "wayBill", [], "any", false, false, false, 305), "receiverName", [], "any", false, false, false, 305)), "html", null, true);
echo "</h5>
</fieldset>
</div>
</div>
<div class=\"row\">
<div class=\"col-lg-12\">
<fieldset>
<legend>Phone</legend>
<h5>";
// line 313
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 313, $this->source); })()), "waybill", [], "any", false, false, false, 313), "receiverPhoneNumber", [], "any", false, false, false, 313), "html", null, true);
echo "</h5>
</fieldset>
</div>
</div>
<div class=\"row\">
<div class=\"col-lg-12\">
<fieldset>
<legend>To</legend>
<h5>";
// line 321
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 321, $this->source); })()), "waybill", [], "any", false, false, false, 321), "toStation", [], "any", false, false, false, 321), "html", null, true);
echo "</h5>
</fieldset>
</div>
</div>
</fieldset>
</div>
</div>
</div>
<div class=\"receipt\" >
<div class=\"row pro\">
<div class=\"col-lg-4 col-md-6\">
<fieldset align=\"center\" style=\"border: 1px dotted black; padding-bottom: 10px;\">
<legend>Cost</legend>
<table width=\"90%\" style=\"text-align: center; align-content: center;\">
<tr>
<td align=\"left\"><h5 align=\"left\" style=\"border: none;\">";
// line 340
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 340, $this->source); })()), "taxPercentage", [], "any", false, false, false, 340), "html", null, true);
echo "% V.A.T</h5></td>
<td align=\"right\" style=\"font-family: 'Fjord One', Serif; font-weight: bolder;\">";
// line 341
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 341, $this->source); })()), "taxAmount", [], "any", false, false, false, 341), 2, ".", ","), "html", null, true);
echo "</td>
</tr>
<tr style=\"\">
<td align=\"left\"><h5 align=\"left\" style=\"border: none;\">COST</h5></td>
<td align=\"right\" style=\"font-family: 'Fjord One', Serif;font-weight: bolder;\">";
// line 345
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, (twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 345, $this->source); })()), "grossAmount", [], "any", false, false, false, 345) - twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 345, $this->source); })()), "taxAmount", [], "any", false, false, false, 345)), 2, ".", ","), "html", null, true);
echo "</td>
</tr>
";
// line 348
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 348, $this->source); })()), "wayBillExpenses", [], "any", false, false, false, 348));
foreach ($context['_seq'] as $context["_key"] => $context["expense"]) {
// line 349
echo " ";
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["expense"], "expenseType", [], "any", false, false, false, 349), "isAutomatic", [], "any", false, false, false, 349) == false)) {
// line 350
echo " <tr style=\"border-bottom: 1px solid black;\">
<td align=\"left\"><h5 align=\"left\" style=\"border: none;\">";
// line 351
echo twig_escape_filter($this->env, twig_upper_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["expense"], "expenseType", [], "any", false, false, false, 351), "expenseName", [], "any", false, false, false, 351)), "html", null, true);
echo "</h5></td>
<td align=\"right\" style=\"font-family: 'Fjord One', Serif; font-weight: bolder;border-right: none;\">-";
// line 352
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["expense"], "amount", [], "any", false, false, false, 352), "html", null, true);
echo "</td>
</tr>
";
// line 355
echo " ";
}
// line 356
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['expense'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 357
echo "
<tr style=\"border-bottom: 2px double black;border-top: 2px double black;\">
<td align=\"right\"><h4 align=\"left\" style=\"border: none;\">TOTAL</h4></td>
<td align=\"right\" style=\"font-family: 'Fjord One', Serif; font-weight: bolder;\">KSH ";
// line 360
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 360, $this->source); })()), "stationBalance", [], "any", false, false, false, 360)), "html", null, true);
echo "</td>
</tr>
</table>
</fieldset>
<p style=\"border:none;\">Transaction by: ";
// line 366
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 366, $this->source); })()), "waybill", [], "any", false, false, false, 366), "createdBy", [], "any", false, false, false, 366), "person", [], "any", false, false, false, 366), "secondName", [], "any", false, false, false, 366), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 366, $this->source); })()), "waybill", [], "any", false, false, false, 366), "createdBy", [], "any", false, false, false, 366), "person", [], "any", false, false, false, 366), "sirName", [], "any", false, false, false, 366), "html", null, true);
echo "</p>
";
// line 371
if ((twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 371, $this->source); })()), "isCancelled", [], "any", false, false, false, 371) == false)) {
// line 372
echo " ";
if ((((twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 372, $this->source); })()), "isComplete", [], "any", false, false, false, 372) == false) || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_BOS_USER")) || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_STATION_ADMIN"))) {
// line 373
echo " ";
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["cancelForm"]) || array_key_exists("cancelForm", $context) ? $context["cancelForm"] : (function () { throw new RuntimeError('Variable "cancelForm" does not exist.', 373, $this->source); })()), 'form_start');
echo "
<button type=\"submit\" class=\"btn btn-sm btn-warning \">cancel transaction</button>
";
// line 375
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["cancelForm"]) || array_key_exists("cancelForm", $context) ? $context["cancelForm"] : (function () { throw new RuntimeError('Variable "cancelForm" does not exist.', 375, $this->source); })()), 'form_end');
echo "
";
}
// line 377
echo " ";
}
// line 378
echo " </div>
</div>
</div>
</div>
<div class=\"row\">
<div class=\"row\">
";
// line 389
if (twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 389, $this->source); })()), "isPaid", [], "any", false, false, false, 389)) {
// line 390
echo " ";
if ((twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 390, $this->source); })()), "isCancelled", [], "any", false, false, false, 390) != true)) {
// line 391
echo " <div class=\"col-lg\">
";
// line 393
echo " <div class=\"row pro kkk\" style=\"padding: 10px 0px 20px 20px; background: #FFFFFF; margin-left: auto\">
<div class=\"col-lg-12\">
<fieldset>
<legend>Print</legend>
";
// line 397
if ((isset($context["isCashCanChangeMpesa"]) || array_key_exists("isCashCanChangeMpesa", $context) ? $context["isCashCanChangeMpesa"] : (function () { throw new RuntimeError('Variable "isCashCanChangeMpesa" does not exist.', 397, $this->source); })())) {
// line 398
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("payment_request_view", ["waybill" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 398, $this->source); })()), "wayBill", [], "any", false, false, false, 398), "id", [], "any", false, false, false, 398)]), "html", null, true);
echo "\" class=\"btn btn-success\" style=\"float: left;\">
<i><img src=\"";
// line 399
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("fos/images/m-pesa-icon.svg"), "html", null, true);
echo "\" alt=\"\"></i>
change payment to M-PESA
</a>
";
}
// line 403
echo "
<div align=\"right\">
";
// line 406
echo " ";
// line 407
echo "
";
// line 409
if ( !(null === (isset($context["tims"]) || array_key_exists("tims", $context) ? $context["tims"] : (function () { throw new RuntimeError('Variable "tims" does not exist.', 409, $this->source); })()))) {
// line 410
echo " ";
if (((twig_get_attribute($this->env, $this->source, (isset($context["tims"]) || array_key_exists("tims", $context) ? $context["tims"] : (function () { throw new RuntimeError('Variable "tims" does not exist.', 410, $this->source); })()), "type", [], "any", false, false, false, 410) == "TYPEC") && (twig_get_attribute($this->env, $this->source, (isset($context["tims"]) || array_key_exists("tims", $context) ? $context["tims"] : (function () { throw new RuntimeError('Variable "tims" does not exist.', 410, $this->source); })()), "supplierCode", [], "any", false, false, false, 410) == "PARGAMON"))) {
// line 412
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("receipt_action", ["waybill_" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 412, $this->source); })()), "wayBill", [], "any", false, false, false, 412), "id", [], "any", false, false, false, 412)]), "html", null, true);
echo "\" download=\"application/pdf\">
<button type=\"button\" class=\"btn btn-success print\">
<i class=\"fa fa-print\"></i>
Print PDF
</button>
</a>
";
} elseif (((twig_get_attribute($this->env, $this->source, // line 418
(isset($context["tims"]) || array_key_exists("tims", $context) ? $context["tims"] : (function () { throw new RuntimeError('Variable "tims" does not exist.', 418, $this->source); })()), "type", [], "any", false, false, false, 418) == "TYPEC") && (twig_get_attribute($this->env, $this->source, (isset($context["tims"]) || array_key_exists("tims", $context) ? $context["tims"] : (function () { throw new RuntimeError('Variable "tims" does not exist.', 418, $this->source); })()), "supplierCode", [], "any", false, false, false, 418) == "TREMOL"))) {
// line 419
echo "
<button type=\"button\" class=\"btn btn-success print\" onclick=\"print('/fos/receipt/g03/";
// line 420
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 420, $this->source); })()), "wayBill", [], "any", false, false, false, 420), "id", [], "any", false, false, false, 420), "html", null, true);
echo "')\">
<i class=\"fa fa-print\"></i>
Print Receipt
</button>
";
} else {
// line 425
echo " <button type=\"button\" class=\"btn btn-success print\" onclick=\"print('/fos/receipt/";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 425, $this->source); })()), "wayBill", [], "any", false, false, false, 425), "id", [], "any", false, false, false, 425), "html", null, true);
echo "')\">
<i class=\"fa fa-print\"></i>
Print Receipt
</button>
";
}
// line 430
echo " ";
} else {
// line 431
echo " ----
<button type=\"button\" class=\"btn btn-success print\" onclick=\"print('/fos/receipt/";
// line 432
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 432, $this->source); })()), "wayBill", [], "any", false, false, false, 432), "id", [], "any", false, false, false, 432), "html", null, true);
echo "')\">
<i class=\"fa fa-print\"></i>
Print Receipt
</button>
";
}
// line 437
echo "
";
// line 446
echo "
</div>
</fieldset>
</div>
</div>
";
// line 453
echo " </div>
";
} else {
// line 455
echo " <div class=\"col-lg\">
<fieldset>
<legend>Print</legend>
<div align=\"right\">
<button type=\"button\" class=\"btn btn-danger print\" style=\"width: auto\" disabled>
<i class=\"fa fa-print\"></i>
this transaction is cancelled
</button>
</div>
</fieldset>
<b></b>
</div>
";
}
// line 469
echo " ";
} else {
// line 470
echo " ";
if ((twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 470, $this->source); })()), "isCancelled", [], "any", false, false, false, 470) != true)) {
// line 471
echo " <div class=\"col-lg\"s>
<div class=\"row pro kkk\" style=\"padding: 10px 0px 20px 20px; background: #FFFFFF; margin-left: auto\">
<div class=\"col-lg-12\">
<fieldset class=\"payment\">
<legend>Select Payment option</legend>
";
// line 476
if ((isset($context["isMpesaAvailable"]) || array_key_exists("isMpesaAvailable", $context) ? $context["isMpesaAvailable"] : (function () { throw new RuntimeError('Variable "isMpesaAvailable" does not exist.', 476, $this->source); })())) {
// line 477
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("payment_request_view", ["waybill" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 477, $this->source); })()), "wayBill", [], "any", false, false, false, 477), "id", [], "any", false, false, false, 477)]), "html", null, true);
echo "\" class=\"btn btn-success\" style=\"float: left;\">
<i><img src=\"";
// line 478
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("fos/images/m-pesa-icon.svg"), "html", null, true);
echo "\" alt=\"\"></i>
M-PESA
</a>
";
} else {
// line 482
echo " <button ";
echo " class=\"btn btn-success\" style=\"float: left;\" disabled>
<i><img src=\"";
// line 483
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("fos/images/m-pesa-icon.svg"), "html", null, true);
echo "\" alt=\"\"></i>
M-PESA
</button>
";
}
// line 487
echo "
";
// line 488
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["cashPaymentOptionForm"]) || array_key_exists("cashPaymentOptionForm", $context) ? $context["cashPaymentOptionForm"] : (function () { throw new RuntimeError('Variable "cashPaymentOptionForm" does not exist.', 488, $this->source); })()), 'form_start');
echo "
<button type=\"submit\" class=\"btn btn-warning cash\">
<i><img src=\"";
// line 490
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("fos/images/money_icon.png"), "html", null, true);
echo "\" alt=\"\"></i>
Cash
</button>
";
// line 493
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["cashPaymentOptionForm"]) || array_key_exists("cashPaymentOptionForm", $context) ? $context["cashPaymentOptionForm"] : (function () { throw new RuntimeError('Variable "cashPaymentOptionForm" does not exist.', 493, $this->source); })()), 'form_end');
echo "
</fieldset>
</div>
</div>
</div>
";
}
// line 500
echo " ";
}
// line 501
echo " </div>
</div>
";
// line 533
echo "
<div class=\" row pro\">
";
// line 536
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["parcels"]) || array_key_exists("parcels", $context) ? $context["parcels"] : (function () { throw new RuntimeError('Variable "parcels" does not exist.', 536, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["parcel"]) {
// line 537
echo " <div class=\"col-lg-3 col-md-3 col-sm-6 col-xs-12\" style=\"background: #FFFFFF; /*box-shadow: 5px 3px 20px #888888;*/ margin-top: 10px; padding-top: 10px; margin-right: 20px;\">
<div class=\"col-lg-12\">
<fieldset>
<legend>Parcel #";
// line 540
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["parcel"], "number", [], "any", false, false, false, 540), "html", null, true);
echo "</legend>
<h5>";
// line 541
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["parcel"], "description", [], "any", false, false, false, 541), "html", null, true);
echo "</h5>
</fieldset>
<fieldset>
<legend><i class=\"fa fa-arrow-circle-down\"></i></legend>
<fieldset>
<legend>Location</legend>
<h5>IN OFFICE :";
// line 548
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 548, $this->source); })()), "wayBill", [], "any", false, false, false, 548), "fromStation", [], "any", false, false, false, 548), "html", null, true);
echo "
<p class=\"detail\">From: <i class=\"fas fa-hand-point-right\"></i>";
// line 549
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 549, $this->source); })()), "wayBill", [], "any", false, false, false, 549), "createdAt", [], "any", false, false, false, 549), "F jS, Y \\a\\t g:ia"), "html", null, true);
echo "</p>
";
// line 553
echo " </h5>
</fieldset>
";
// line 557
echo "
";
// line 558
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Parcels\\ParcelController::getParcelDeliveryData", ["parcel_id" => twig_get_attribute($this->env, $this->source, $context["parcel"], "id", [], "any", false, false, false, 558)]));
echo "
";
// line 575
echo "
";
// line 589
echo "
";
// line 599
echo " </fieldset>
<div style=\"align-content: center; text-align: center;\">
<img alt=\"Coding Sips\" src=\"/barcode?text=";
// line 601
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 601, $this->source); })()), "wayBill", [], "any", false, false, false, 601), "id", [], "any", false, false, false, 601), "html", null, true);
echo "/";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["parcel"], "number", [], "any", false, false, false, 601), "html", null, true);
echo "&Codetype=Code128&size=60&print=true\" />
</div>
</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['parcel'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 609
echo "
</div>
";
// line 612
if ((array_key_exists("sms", $context) && (isset($context["sms"]) || array_key_exists("sms", $context) ? $context["sms"] : (function () { throw new RuntimeError('Variable "sms" does not exist.', 612, $this->source); })()))) {
// line 613
echo " <hr>
<div class=\"row\">
<table class=\"table table-bordered\">
<thead>
<tr>
<th>#</th>
<th>RECEIVER</th>
<th>STATUS</th>
<th>Sent Via Phone</th>
<th>MESSAGE</th>
</tr>
</thead>
<tbody>
";
// line 626
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["sms"]) || array_key_exists("sms", $context) ? $context["sms"] : (function () { throw new RuntimeError('Variable "sms" does not exist.', 626, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
// line 627
echo " <tr>
<td>";
// line 628
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 628), "html", null, true);
echo " </td>
<td>";
// line 629
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["message"], "recepient", [], "any", false, false, false, 629), "html", null, true);
echo "</td>
<td>
";
// line 632
if (twig_get_attribute($this->env, $this->source, $context["message"], "status", [], "any", false, false, false, 632)) {
// line 633
echo " ";
if (((twig_get_attribute($this->env, $this->source, $context["message"], "status", [], "any", false, false, false, 633) == "Success") || (twig_get_attribute($this->env, $this->source, $context["message"], "status", [], "any", false, false, false, 633) == "Sent"))) {
// line 634
echo " <span class=\"alert-success\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["message"], "status", [], "any", false, false, false, 634), "html", null, true);
echo "</span>
";
} else {
// line 636
echo " <span class=\"alert-danger\">
";
// line 637
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["message"], "status", [], "any", false, false, false, 637), "html", null, true);
echo " <br>
";
// line 638
if ((twig_get_attribute($this->env, $this->source, $context["message"], "statusCode", [], "any", false, false, false, 638) < 1000)) {
// line 639
echo " ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["statusChart"]) || array_key_exists("statusChart", $context) ? $context["statusChart"] : (function () { throw new RuntimeError('Variable "statusChart" does not exist.', 639, $this->source); })()), twig_get_attribute($this->env, $this->source, $context["message"], "statusCode", [], "any", false, false, false, 639), [], "array", false, false, false, 639), "html", null, true);
echo " [";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["message"], "statusCode", [], "any", false, false, false, 639), "html", null, true);
echo "]
";
}
// line 641
echo " </span>
";
}
// line 643
echo " ";
} else {
// line 644
echo " <span>N/A</span>
";
}
// line 646
echo "
</td>
<td>
";
// line 649
if (((twig_get_attribute($this->env, $this->source, $context["message"], "status", [], "any", false, false, false, 649) != "Success") || (twig_get_attribute($this->env, $this->source, $context["message"], "status", [], "any", false, false, false, 649) != "Sent"))) {
// line 650
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["message"], "manuallySent", [], "any", false, false, false, 650)) {
// line 651
echo " <i class=\"fas fa-check-circle\" style=\"color: green;\"></i>
";
}
// line 653
echo " ";
}
// line 654
echo " </td>
<td>";
// line 655
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["message"], "sms", [], "any", false, false, false, 655), "html", null, true);
echo "</td>
</tr>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['message'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 658
echo " </tbody>
</table>
</div>
";
}
// line 663
echo "
<div class=\"print-area\" id=\"print-area\">
</div>
<script>
let printReceipt = async () => {
\$(\".se-pre-con\").fadeIn(\"slow\");
let completeTransaction = await fetch(\"";
// line 678
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("register_transaction_as_complete", ["id" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 678, $this->source); })()), "wayBill", [], "any", false, false, false, 678), "id", [], "any", false, false, false, 678)]), "html", null, true);
echo "\", {
method: 'POST'
}).then(response => {
response.json().then(json => {
if(response.status === 200){
printJS({
printable:'print-area',
type: 'html',
css:'../../../../../assets/css/print.css'});
}else{
console.log('error occurred');
}
})
}).finally(() => {
\$(\".se-pre-con\").fadeOut(\"slow\");
});
};
jQuery(document).bind(\"keyup keydown\", function(e){
if(e.ctrlKey && e.keyCode === 80){
console.log(\"printing ...\");
printReceipt();
}
});
window.jsPDF = window.jspdf.jsPDF;
function download() {
let renderHtml = \$('#print-area').html();
let pdf = new jsPDF('p','mm', [254, 80]);
pdf.html(renderHtml, {
callback: function (pdf) {
window.open(pdf.output('bloburl'));
}
});
}
// download();
// \$( document ).ready(function() {
// window.jsPDF = window.jspdf.jsPDF;
//
// // Default export is a4 paper, portrait, using millimeters for units
// var doc = window.jsPDF;
// var specialElementHandlers = {
// '#editor': function (element, renderer) {
// return true;
// }
// };
//
// doc.html(\$('.receipt-print').html(), 15, 15, {
// 'width': 170,
// 'elementHandlers': specialElementHandlers
// });
// doc.save('sample-file.pdf');
// });
function save() {
var content = [\"your-content-here\"];
var bl = new Blob(content, {type: \"application/pdf\"});
var a = document.createElement(\"a\");
a.href = URL.createObjectURL(\"http://localhost:8000/fos/receipt/";
// line 740
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 740, $this->source); })()), "wayBill", [], "any", false, false, false, 740), "id", [], "any", false, false, false, 740), "html", null, true);
echo "\");
a.download = \"";
// line 741
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["transaction"]) || array_key_exists("transaction", $context) ? $context["transaction"] : (function () { throw new RuntimeError('Variable "transaction" does not exist.', 741, $this->source); })()), "wayBill", [], "any", false, false, false, 741), "id", [], "any", false, false, false, 741), "html", null, true);
echo ".pdf\";
a.hidden = true;
document.body.appendChild(a);
a.click();
}
function print(url){
// \$(\".se-pre-con\").fadeIn(\"slow\");
// printJS(url);
printJS({
printable: url,
type:'pdf',
showModal:true,
modalMessage: 'Downloading receipt please wait!',
onError: function (error) {
console.log(error);
alert('Could not generate receipt please try again ')
}
});
}
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "fos/parcels/view_parcel.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 1125 => 741, 1121 => 740, 1056 => 678, 1039 => 663, 1032 => 658, 1015 => 655, 1012 => 654, 1009 => 653, 1005 => 651, 1002 => 650, 1000 => 649, 995 => 646, 991 => 644, 988 => 643, 984 => 641, 976 => 639, 974 => 638, 970 => 637, 967 => 636, 961 => 634, 958 => 633, 956 => 632, 950 => 629, 946 => 628, 943 => 627, 926 => 626, 911 => 613, 909 => 612, 904 => 609, 888 => 601, 884 => 599, 880 => 589, 877 => 575, 872 => 558, 869 => 557, 864 => 553, 860 => 549, 856 => 548, 846 => 541, 842 => 540, 837 => 537, 833 => 536, 828 => 533, 824 => 501, 821 => 500, 811 => 493, 805 => 490, 800 => 488, 797 => 487, 790 => 483, 786 => 482, 779 => 478, 774 => 477, 772 => 476, 765 => 471, 762 => 470, 759 => 469, 743 => 455, 739 => 453, 731 => 446, 728 => 437, 720 => 432, 717 => 431, 714 => 430, 705 => 425, 697 => 420, 694 => 419, 692 => 418, 682 => 412, 679 => 410, 677 => 409, 673 => 407, 671 => 406, 667 => 403, 660 => 399, 655 => 398, 653 => 397, 647 => 393, 644 => 391, 641 => 390, 639 => 389, 626 => 378, 623 => 377, 618 => 375, 612 => 373, 609 => 372, 607 => 371, 597 => 366, 588 => 360, 583 => 357, 577 => 356, 574 => 355, 569 => 352, 565 => 351, 562 => 350, 559 => 349, 555 => 348, 549 => 345, 542 => 341, 538 => 340, 516 => 321, 505 => 313, 494 => 305, 477 => 291, 466 => 283, 455 => 275, 438 => 263, 435 => 262, 425 => 261, 218 => 61, 208 => 60, 198 => 48, 193 => 46, 191 => 45, 189 => 44, 179 => 43, 166 => 37, 156 => 36, 141 => 53, 136 => 49, 134 => 43, 128 => 39, 126 => 36, 110 => 22, 96 => 9, 86 => 8, 73 => 6, 63 => 5, 40 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'fos/base.html.twig' %}
{% block firstnav %}
{{ render(controller('App\\\\Parcels\\\\DefaultController::nav')) }}
{% endblock %}
{% block secondnav %}
<script src=\"https://printjs-4de6.kxcdn.com/print.min.js\"></script>
<link rel=\"stylesheet\" type=\"text/css\" href=\"https://printjs-4de6.kxcdn.com/print.min.css\">
<script src=\"https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js\"></script>
<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js\"
integrity=\"sha512-BNaRQnYJYiPSqHHDb58B0yaPfCu+Wgds8Gp/gU33kqBtgNS4tSPHuGibyoeqMV/TJlSKda6FXzoEyYGjTe+vXA==\"
crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>
<script src=\"https://cdnjs.cloudflare.com/ajax/libs/dompurify/2.4.0/purify.min.js\" integrity=\"sha512-/hVAZO5POxCKdZMSLefw30xEVwjm94PAV9ynjskGbIpBvHO9EBplEcdUlBdCKutpZsF+La8Ag4gNrG0gAOn3Ig==\" crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>
{# <script src=\"https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.2/jspdf.min.js\"></script>#}
<!-- Second Nav -->
<nav class=\"navbar-second navbar navbar-default navbar-static-top\" role=\"navigation\">
<div class=\"container-fluid\">
<div class=\"navbar-header\">
<button type=\"button\" class=\"navbar-toggle collapsed\" data-toggle=\"collapse\"
data-target=\"#bs-example-navbar-collapse-1\">
<span class=\"sr-only\">Toggle navigation</span>
<span class=\"icon-bar\"></span>
<span class=\"icon-bar\"></span>
<span class=\"icon-bar\"></span>
</button>
<!-- Brand -->
{% block current %}
<span class=\"navbar-brand\" href=\"#\"><i class=\"fa fa-gears\"></i> PARCEL TO {{ transaction.wayBill.toStation }}</span>
{% endblock %}
</div>
<div class=\"collapse navbar-collapse animated fadeIn\" id=\"bs-example-navbar-collapse-1\">
<ul class=\"nav navbar-nav animated fadeIn\">
{% block secondarylinkblock %}
{#<li><a href=\"{{ path('new-parcel') }}\"><i class=\"fa fa-plus-circle\"></i> Register Parcel</a></li>#}
{#<li class=\"\"><a href=\"#\"><i class=\"fa fa-th-list\"></i> Parcels</a></li>#}
<li class=\"\"><a href=\"{{ app.request.headers.get('referer') }}\"><i class=\"fa fa-arrow-circle-left\"></i> Back</a></li>
{#<li class=\"active\"><a href=\"\"><i class=\"fa fa-plus-circle\"></i> View Parcel #{{ transaction.waybill.parcel.id }}</a></li>#}
{% endblock %}
</ul>
<ul class=\"nav navbar-nav navbar-right\">
<li class=\"\"><a></a></li>
{#<li><p class=\"navbar-text\"></p></li>#}
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
{% endblock %}
{% block stylesheets %}
<style>
/*@import \"../../../../../web/assets/css/print.css\";*/
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: none;
/*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 .col-lg-6 + fieldset {
box-shadow: 5px 3px 20px #888888;
}
.sender_receiver fieldset{
background-color: beige;
border-top: 1px solid #d3cece;
}
.sender_receiver fieldset legend{
background-color: beige;
border: 1px solid #d3cece;
}
.sender_receiver fieldset h5{
background: none;
}
.destinations {
float: left;
width: 50%;
padding: 10px;
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: 37px;
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;
}
</style>
{% endblock %}
{% block main %}
<div class=\"row pro\" style=\"padding: 10px 0px 20px 20px; /*border-right: 1px solid #888888;*/ background: #FFFFFF; /*box-shadow: 5px 3px 20px #888888;*/\">
<h3 style=\"font-family:Serif;margin-top: 30px;\">WayBill: {{ transaction.wayBill.id }} - {{ transaction.cuInvoiceNumber }}</h3>
<div class=\"col-lg-6 pro\">
<div class=\"row sender_receiver\">
<div class=\"col-lg-6\">
<fieldset style=\"box-shadow: 5px 5px 0px #888888;\">
<legend class=\"top-legend\">SENDER</legend>
<div class=\"row\">
<div class=\"col-lg-12\">
<fieldset>
<legend>Name</legend>
<h5>{{ transaction.waybill.senderName | upper }}</h5>
</fieldset>
</div>
</div>
<div class=\"row\">
<div class=\"col-lg-12\">
<fieldset>
<legend>Phone</legend>
<h5>{{ transaction.waybill.senderPhoneNumber }}</h5>
</fieldset>
</div>
</div>
<div class=\"row\">
<div class=\"col-lg-12\">
<fieldset>
<legend>From</legend>
<h5>{{ transaction.waybill.fromStation }}</h5>
</fieldset>
</div>
</div>
</fieldset>
</div>
<div class=\"col-lg-6\">
<fieldset style=\"box-shadow:5px 5px 0px #888888\">
<legend class=\"top-legend\">RECEIVER</legend>
<div class=\"row\">
<div class=\"col-lg-12\">
<fieldset>
<legend>Name</legend>
<h5>{{ transaction.wayBill.receiverName | upper }}</h5>
</fieldset>
</div>
</div>
<div class=\"row\">
<div class=\"col-lg-12\">
<fieldset>
<legend>Phone</legend>
<h5>{{ transaction.waybill.receiverPhoneNumber }}</h5>
</fieldset>
</div>
</div>
<div class=\"row\">
<div class=\"col-lg-12\">
<fieldset>
<legend>To</legend>
<h5>{{ transaction.waybill.toStation }}</h5>
</fieldset>
</div>
</div>
</fieldset>
</div>
</div>
</div>
<div class=\"receipt\" >
<div class=\"row pro\">
<div class=\"col-lg-4 col-md-6\">
<fieldset align=\"center\" style=\"border: 1px dotted black; padding-bottom: 10px;\">
<legend>Cost</legend>
<table width=\"90%\" 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: 'Fjord One', Serif; font-weight: bolder;\">{{ (transaction.taxAmount) | number_format(2, '.', ',') }}</td>
</tr>
<tr style=\"\">
<td align=\"left\"><h5 align=\"left\" style=\"border: none;\">COST</h5></td>
<td align=\"right\" style=\"font-family: 'Fjord One', Serif;font-weight: bolder;\">{{ (transaction.grossAmount - transaction.taxAmount) | number_format(2, '.', ',') }}</td>
</tr>
{% 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: 'Fjord One', Serif; font-weight: bolder;border-right: none;\">-{{ expense.amount }}</td>
</tr>
{#{% set expenseAmount = (expenseAmount + expense.amount) %}#}
{% endif %}
{% endfor %}
<tr style=\"border-bottom: 2px double black;border-top: 2px double black;\">
<td align=\"right\"><h4 align=\"left\" style=\"border: none;\">TOTAL</h4></td>
<td align=\"right\" style=\"font-family: 'Fjord One', Serif; font-weight: bolder;\">KSH {{ (transaction.stationBalance ) | number_format }}</td>
</tr>
</table>
</fieldset>
<p style=\"border:none;\">Transaction by: {{ transaction.waybill.createdBy.person.secondName }} {{ transaction.waybill.createdBy.person.sirName }}</p>
{% if transaction.isCancelled == false %}
{% if transaction.isComplete == false or is_granted('ROLE_BOS_USER') or is_granted('ROLE_STATION_ADMIN') %}
{{ form_start(cancelForm) }}
<button type=\"submit\" class=\"btn btn-sm btn-warning \">cancel transaction</button>
{{ form_end(cancelForm) }}
{% endif %}
{% endif %}
</div>
</div>
</div>
</div>
<div class=\"row\">
<div class=\"row\">
{% if transaction.isPaid %}
{% if transaction.isCancelled != true %}
<div class=\"col-lg\">
{#{% if transaction.isCancelled == false and isCancellable == true %}#}
<div class=\"row pro kkk\" style=\"padding: 10px 0px 20px 20px; background: #FFFFFF; margin-left: auto\">
<div class=\"col-lg-12\">
<fieldset>
<legend>Print</legend>
{% if isCashCanChangeMpesa %}
<a href=\"{{ path('payment_request_view', {'waybill': transaction.wayBill.id}) }}\" class=\"btn btn-success\" style=\"float: left;\">
<i><img src=\"{{ asset('fos/images/m-pesa-icon.svg') }}\" alt=\"\"></i>
change payment to M-PESA
</a>
{%endif%}
<div align=\"right\">
{#<a href=\"{{ path('pdf_report', {'id': transaction.waybill.id }) }}\" class=\"btn btn-success\" target=\"_blank\"><i class=\"fa fa-print\"></i> Print</a>#}
{#<a href=\"javascript:window.print()\" class=\"btn btn-success\" target=\"_blank\"><i class=\"fa fa-print\"></i> Print</a>#}
{% if tims is not null %}
{% if tims.type == 'TYPEC' and tims.supplierCode == 'PARGAMON' %}
{# {% if tims.type == 'TYPEC' and tims.supplierCode == 'PARGAMON' and is_granted('ROLE_BOS_USER')%}#}
<a href=\"{{ path('receipt_action', {'waybill_': transaction.wayBill.id }) }}\" download=\"application/pdf\">
<button type=\"button\" class=\"btn btn-success print\">
<i class=\"fa fa-print\"></i>
Print PDF
</button>
</a>
{% elseif tims.type == 'TYPEC' and tims.supplierCode == 'TREMOL' %}
<button type=\"button\" class=\"btn btn-success print\" onclick=\"print('/fos/receipt/g03/{{ transaction.wayBill.id }}')\">
<i class=\"fa fa-print\"></i>
Print Receipt
</button>
{% else %}
<button type=\"button\" class=\"btn btn-success print\" onclick=\"print('/fos/receipt/{{ transaction.wayBill.id }}')\">
<i class=\"fa fa-print\"></i>
Print Receipt
</button>
{% endif %}
{% else %}
----
<button type=\"button\" class=\"btn btn-success print\" onclick=\"print('/fos/receipt/{{ transaction.wayBill.id }}')\">
<i class=\"fa fa-print\"></i>
Print Receipt
</button>
{% endif %}
{# <button type=\"button\" class=\"btn btn-success print\" onclick=\"printReceipt()\">#}
{# <i class=\"fa fa-print\"></i>#}
{# Print#}
{# </button>#}
{# <button type=\"button\" class=\"btn btn-success print\" onclick=\"save()\">#}
{# <i class=\"fa fa-print\"></i>#}
{# Print#}
{# </button>#}
</div>
</fieldset>
</div>
</div>
{#{% endif %}#}
</div>
{% else %}
<div class=\"col-lg\">
<fieldset>
<legend>Print</legend>
<div align=\"right\">
<button type=\"button\" class=\"btn btn-danger print\" style=\"width: auto\" disabled>
<i class=\"fa fa-print\"></i>
this transaction is cancelled
</button>
</div>
</fieldset>
<b></b>
</div>
{% endif %}
{% else %}
{% if transaction.isCancelled != true %}
<div class=\"col-lg\"s>
<div class=\"row pro kkk\" style=\"padding: 10px 0px 20px 20px; background: #FFFFFF; margin-left: auto\">
<div class=\"col-lg-12\">
<fieldset class=\"payment\">
<legend>Select Payment option</legend>
{% if isMpesaAvailable %}
<a href=\"{{ path('payment_request_view', {'waybill': transaction.wayBill.id}) }}\" class=\"btn btn-success\" style=\"float: left;\">
<i><img src=\"{{ asset('fos/images/m-pesa-icon.svg') }}\" alt=\"\"></i>
M-PESA
</a>
{%else%}
<button {#href=\"{{ path('payment_request_view', {'waybill': transaction.wayBill.id}) }}\"#} class=\"btn btn-success\" style=\"float: left;\" disabled>
<i><img src=\"{{ asset('fos/images/m-pesa-icon.svg') }}\" alt=\"\"></i>
M-PESA
</button>
{%endif%}
{{ form_start(cashPaymentOptionForm) }}
<button type=\"submit\" class=\"btn btn-warning cash\">
<i><img src=\"{{ asset('fos/images/money_icon.png') }}\" alt=\"\"></i>
Cash
</button>
{{ form_end(cashPaymentOptionForm) }}
</fieldset>
</div>
</div>
</div>
{% endif %}
{% endif %}
</div>
</div>
{# <div class=\"row\" style=\"padding: 10px 0px 20px 20px; border-right: 1px solid #888888; background: #FFFFFF; box-shadow: 5px 3px 20px #888888;\">
{{ form_start(form) }}
<fieldset>
<legend>WayBill Expense</legend>
<div class=\"row\">
<div class=\"col-lg-3 col-md-3\">
<label for=\"sender_name\">Expense Type</label>
{{ form_widget(form.expenseType,{'attr':{'class':'form-control' }} ) }}
<div class=\"invalid-feedback\">
{{ form_errors(form.expenseType) }}
</div>
</div>
<div class=\"col-lg-2 col-md-4\">
<label for=\"sender_name\">Amount</label>
{{ form_widget(form.amount,{'attr':{'class':'form-control' }} ) }}
<div class=\"invalid-feedback\">
{{ form_errors(form.amount) }}
</div>
</div>
</div>
<div class=\"row\" style=\"margin-top: 10px;\">
<div class=\"col-lg-1 col-md-1\">
<button type=\"submit\" class=\"btn btn-success right-align\">Save</button>
</div>
</div>
</fieldset>
{{ form_end(form) }}
</div>#}
<div class=\" row pro\">
{% for parcel in parcels %}
<div class=\"col-lg-3 col-md-3 col-sm-6 col-xs-12\" style=\"background: #FFFFFF; /*box-shadow: 5px 3px 20px #888888;*/ margin-top: 10px; padding-top: 10px; margin-right: 20px;\">
<div class=\"col-lg-12\">
<fieldset>
<legend>Parcel #{{ parcel.number }}</legend>
<h5>{{ parcel.description }}</h5>
</fieldset>
<fieldset>
<legend><i class=\"fa fa-arrow-circle-down\"></i></legend>
<fieldset>
<legend>Location</legend>
<h5>IN OFFICE :{{ transaction.wayBill.fromStation }}
<p class=\"detail\">From: <i class=\"fas fa-hand-point-right\"></i>{{ transaction.wayBill.createdAt | date(\"F jS, Y \\\\a\\\\t g:ia\") }}</p>
{# {% if parcel.isEnRoute %}
<p class=\"detail\">To: <i class=\"fas fa-hand-point-right\"></i>{{ parcel.enRouteFrom | date(\"F jS, Y \\\\a\\\\t g:ia\") }}</p>
{% endif %}#}
</h5>
</fieldset>
{#{{ render(controller('App\\\\Parcels\\\\DefaultController::nav')) }}#}
{{ render(controller('App\\\\Parcels\\\\ParcelController::getParcelDeliveryData',{'parcel_id':parcel.id})) }}
{#{% if parcel.isEnRoute %}
<fieldset>
<legend>En route</legend>
<h5>REG: {{ parcel.vehicle.regNumber }}
<p class=\"detail\">Loaded By: {{ transaction.waybill.createdBy.person.secondName }} {{ transaction.waybill.createdBy.person.sirName }}</p>
{% if parcel.isEnRoute %}
<p class=\"detail\">From: <i class=\"fas fa-hand-point-right\"></i>{{ parcel.enRouteFrom | date(\"F jS, Y \\\\a\\\\t g:ia\") }}</p>
{% endif %}
{% if parcel.isReceived %}
<p class=\"detail\">To: <i class=\"fas fa-hand-point-right\"></i>{{ parcel.receivedAt | date(\"F jS, Y \\\\a\\\\t g:ia\") }}</p>
{% endif %}
</h5>
</fieldset>
{% endif %}#}
{#{% if parcel.isReceived %}
<fieldset>
<legend>Received By</legend>
<h5>USER: {{ parcel.receivedBy.person.firstName | upper }} {{ parcel.receivedBy.person.secondName | upper }} {{parcel.receivedBy.person.sirName | upper }}
{% if parcel.isReceived %}
<p class=\"detail\">From: <i class=\"fas fa-hand-point-right\"></i>{{ parcel.receivedAt | date(\"F jS, Y \\\\a\\\\t g:ia\") }}</p>
{% endif %}
{% if transaction.wayBill.isCollected %}
<p class=\"detail\">to: <i class=\"fas fa-hand-point-right\"></i>{{ parcel.collectedAt | date(\"F jS, Y \\\\a\\\\t g:ia\") }}</p>
{% endif %}
</h5>
</fieldset>
{% endif %}#}
{#{% if parcel.isCollected %}
<fieldset>
<legend>Collected By</legend>
<h5>National ID: {{ parcel.collectorNationalId }}</h5>
<h5>USER: {{ parcel.collectedOfficerBy.person.firstName | upper }} {{ parcel.collectedOfficerBy.person.secondName | upper }} {{parcel.collectedOfficerBy.person.sirName | upper }}</h5>
<p class=\"detail\">At: <i class=\"fas fa-hand-point-right\"></i>{{ parcel.collectedAt | date(\"F jS, Y \\\\a\\\\t g:ia\") }}</p>
</fieldset>
{% endif %}#}
</fieldset>
<div style=\"align-content: center; text-align: center;\">
<img alt=\"Coding Sips\" src=\"/barcode?text={{ transaction.wayBill.id }}/{{ parcel.number }}&Codetype=Code128&size=60&print=true\" />
</div>
</div>
</div>
{% endfor %}
</div>
{% if sms is defined and sms %}
<hr>
<div class=\"row\">
<table class=\"table table-bordered\">
<thead>
<tr>
<th>#</th>
<th>RECEIVER</th>
<th>STATUS</th>
<th>Sent Via Phone</th>
<th>MESSAGE</th>
</tr>
</thead>
<tbody>
{% for message in sms %}
<tr>
<td>{{ loop.index }} </td>
<td>{{ message.recepient }}</td>
<td>
{% if message.status %}
{% if message.status == 'Success' or message.status == 'Sent' %}
<span class=\"alert-success\">{{ message.status }}</span>
{% else %}
<span class=\"alert-danger\">
{{ message.status }}{#[{{ message.statusCode }}]#} <br>
{% if message.statusCode < 1000 %}
{{ statusChart[message.statusCode] }} [{{ message.statusCode }}]
{% endif %}
</span>
{% endif %}
{% else %}
<span>N/A</span>
{% endif %}
</td>
<td>
{% if message.status != 'Success' or message.status != 'Sent' %}
{% if message.manuallySent %}
<i class=\"fas fa-check-circle\" style=\"color: green;\"></i>
{% endif %}
{% endif %}
</td>
<td>{{ message.sms }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
<div class=\"print-area\" id=\"print-area\">
</div>
<script>
let printReceipt = async () => {
\$(\".se-pre-con\").fadeIn(\"slow\");
let completeTransaction = await fetch(\"{{ path('register_transaction_as_complete', {'id': transaction.wayBill.id }) }}\", {
method: 'POST'
}).then(response => {
response.json().then(json => {
if(response.status === 200){
printJS({
printable:'print-area',
type: 'html',
css:'../../../../../assets/css/print.css'});
}else{
console.log('error occurred');
}
})
}).finally(() => {
\$(\".se-pre-con\").fadeOut(\"slow\");
});
};
jQuery(document).bind(\"keyup keydown\", function(e){
if(e.ctrlKey && e.keyCode === 80){
console.log(\"printing ...\");
printReceipt();
}
});
window.jsPDF = window.jspdf.jsPDF;
function download() {
let renderHtml = \$('#print-area').html();
let pdf = new jsPDF('p','mm', [254, 80]);
pdf.html(renderHtml, {
callback: function (pdf) {
window.open(pdf.output('bloburl'));
}
});
}
// download();
// \$( document ).ready(function() {
// window.jsPDF = window.jspdf.jsPDF;
//
// // Default export is a4 paper, portrait, using millimeters for units
// var doc = window.jsPDF;
// var specialElementHandlers = {
// '#editor': function (element, renderer) {
// return true;
// }
// };
//
// doc.html(\$('.receipt-print').html(), 15, 15, {
// 'width': 170,
// 'elementHandlers': specialElementHandlers
// });
// doc.save('sample-file.pdf');
// });
function save() {
var content = [\"your-content-here\"];
var bl = new Blob(content, {type: \"application/pdf\"});
var a = document.createElement(\"a\");
a.href = URL.createObjectURL(\"http://localhost:8000/fos/receipt/{{ transaction.wayBill.id }}\");
a.download = \"{{ transaction.wayBill.id }}.pdf\";
a.hidden = true;
document.body.appendChild(a);
a.click();
}
function print(url){
// \$(\".se-pre-con\").fadeIn(\"slow\");
// printJS(url);
printJS({
printable: url,
type:'pdf',
showModal:true,
modalMessage: 'Downloading receipt please wait!',
onError: function (error) {
console.log(error);
alert('Could not generate receipt please try again ')
}
});
}
</script>
{% endblock %}
", "fos/parcels/view_parcel.html.twig", "/var/www/html/courier/templates/fos/parcels/view_parcel.html.twig");
}
}