<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;
use Twig\TemplateWrapper;
/* fos/parcels/view_parcel.html.twig */
class __TwigTemplate_9ba2ddc99e46a3f9212d7bd469af39a5 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $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): bool|string|Template|TemplateWrapper
{
// line 1
return "fos/base.html.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$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);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 5
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_firstnav(array $context, array $blocks = []): iterable
{
$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
yield " ";
yield $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Parcels\\DefaultController::nav"));
yield "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 8
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_secondnav(array $context, array $blocks = []): iterable
{
$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
yield "
<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
yield "
<!-- 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
yield from $this->unwrap()->yieldBlock('current', $context, $blocks);
// line 39
yield " </div>
<div class=\"collapse navbar-collapse animated fadeIn\" id=\"bs-example-navbar-collapse-1\">
<ul class=\"nav navbar-nav animated fadeIn\">
";
// line 43
yield from $this->unwrap()->yieldBlock('secondarylinkblock', $context, $blocks);
// line 49
yield " </ul>
<ul class=\"nav navbar-nav navbar-right\">
<li class=\"\"><a></a></li>
";
// line 53
yield " </ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 36
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_current(array $context, array $blocks = []): iterable
{
$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
yield " <span class=\"navbar-brand\" href=\"#\"><i class=\"fa fa-gears\"></i> PARCEL TO ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($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);
yield "</span>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 43
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_secondarylinkblock(array $context, array $blocks = []): iterable
{
$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
yield " ";
// line 45
yield " ";
// line 46
yield " <li class=\"\"><a href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($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);
yield "\"><i class=\"fa fa-arrow-circle-left\"></i> Back</a></li>
";
// line 48
yield " ";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 60
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_stylesheets(array $context, array $blocks = []): iterable
{
$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
yield " <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);
yield from [];
}
// line 261
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_main(array $context, array $blocks = []): iterable
{
$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
yield " <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
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($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);
yield " - ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($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);
yield "</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
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::upper($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($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);
yield "</h5>
</fieldset>
</div>
</div>
<div class=\"row\">
<div class=\"col-lg-12\">
<fieldset>
<legend>Phone</legend>
<h5>";
// line 283
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($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);
yield "</h5>
</fieldset>
</div>
</div>
<div class=\"row\">
<div class=\"col-lg-12\">
<fieldset>
<legend>From</legend>
<h5>";
// line 291
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($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);
yield "</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
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::upper($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($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);
yield "</h5>
</fieldset>
</div>
</div>
<div class=\"row\">
<div class=\"col-lg-12\">
<fieldset>
<legend>Phone</legend>
<h5>";
// line 313
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($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);
yield "</h5>
</fieldset>
</div>
</div>
<div class=\"row\">
<div class=\"col-lg-12\">
<fieldset>
<legend>To</legend>
<h5>";
// line 321
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($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);
yield "</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
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($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);
yield "% V.A.T</h5></td>
<td align=\"right\" style=\"font-family: 'Fjord One', Serif; font-weight: bolder;\">";
// line 341
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(CoreExtension::getAttribute($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);
yield "</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
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber((CoreExtension::getAttribute($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) - CoreExtension::getAttribute($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);
yield "</td>
</tr>
";
// line 348
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($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
yield " ";
if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["expense"], "expenseType", [], "any", false, false, false, 349), "isAutomatic", [], "any", false, false, false, 349) == false)) {
// line 350
yield " <tr style=\"border-bottom: 1px solid black;\">
<td align=\"left\"><h5 align=\"left\" style=\"border: none;\">";
// line 351
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::upper($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["expense"], "expenseType", [], "any", false, false, false, 351), "expenseName", [], "any", false, false, false, 351)), "html", null, true);
yield "</h5></td>
<td align=\"right\" style=\"font-family: 'Fjord One', Serif; font-weight: bolder;border-right: none;\">-";
// line 352
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["expense"], "amount", [], "any", false, false, false, 352), "html", null, true);
yield "</td>
</tr>
";
// line 355
yield " ";
}
// line 356
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['expense'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 357
yield "
<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
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(CoreExtension::getAttribute($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);
yield "</td>
</tr>
</table>
</fieldset>
<p style=\"border:none;\">Transaction by: ";
// line 366
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($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);
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($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);
yield "</p>
";
// line 371
if ((CoreExtension::getAttribute($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
yield " ";
if ((((CoreExtension::getAttribute($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
yield " ";
yield $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');
yield "
<button type=\"submit\" class=\"btn btn-sm btn-warning \">cancel transaction</button>
";
// line 375
yield $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');
yield "
";
}
// line 377
yield " ";
}
// line 378
yield " </div>
</div>
</div>
</div>
<div class=\"row\">
<div class=\"row\">
";
// line 389
if (CoreExtension::getAttribute($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
yield " ";
if ((CoreExtension::getAttribute($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
yield " <div class=\"col-lg\">
";
// line 393
yield " <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
yield " <a href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("payment_request_view", ["waybill" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($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);
yield "\" class=\"btn btn-success\" style=\"float: left;\">
<i><img src=\"";
// line 399
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("fos/images/m-pesa-icon.svg"), "html", null, true);
yield "\" alt=\"\"></i>
change payment to M-PESA
</a>
";
}
// line 403
yield "
<div align=\"right\">
";
// line 406
yield " ";
// line 407
yield "
";
// 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
yield " ";
if (((CoreExtension::getAttribute($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") && (CoreExtension::getAttribute($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
yield " <a href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("receipt_action", ["waybill_" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($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);
yield "\" download=\"application/pdf\">
<button type=\"button\" class=\"btn btn-success print\">
<i class=\"fa fa-print\"></i>
Print PDF
</button>
</a>
";
} elseif (((CoreExtension::getAttribute($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") && (CoreExtension::getAttribute($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
yield "
<button type=\"button\" class=\"btn btn-success print\" onclick=\"print('/fos/receipt/g03/";
// line 420
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($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);
yield "')\">
<i class=\"fa fa-print\"></i>
Print Receipt
</button>
";
} else {
// line 425
yield " <button type=\"button\" class=\"btn btn-success print\" onclick=\"print('/fos/receipt/";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($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);
yield "')\">
<i class=\"fa fa-print\"></i>
Print Receipt
</button>
";
}
// line 430
yield " ";
} else {
// line 431
yield " ----
<button type=\"button\" class=\"btn btn-success print\" onclick=\"print('/fos/receipt/";
// line 432
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($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);
yield "')\">
<i class=\"fa fa-print\"></i>
Print Receipt
</button>
";
}
// line 437
yield "
";
// line 446
yield "
</div>
</fieldset>
</div>
</div>
";
// line 453
yield " </div>
";
} else {
// line 455
yield " <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
yield " ";
} else {
// line 470
yield " ";
if ((CoreExtension::getAttribute($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
yield " <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
yield " <a href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("payment_request_view", ["waybill" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($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);
yield "\" class=\"btn btn-success\" style=\"float: left;\">
<i><img src=\"";
// line 478
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("fos/images/m-pesa-icon.svg"), "html", null, true);
yield "\" alt=\"\"></i>
M-PESA
</a>
";
} else {
// line 482
yield " <button ";
yield " class=\"btn btn-success\" style=\"float: left;\" disabled>
<i><img src=\"";
// line 483
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("fos/images/m-pesa-icon.svg"), "html", null, true);
yield "\" alt=\"\"></i>
M-PESA
</button>
";
}
// line 487
yield "
";
// line 488
yield $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');
yield "
<button type=\"submit\" class=\"btn btn-warning cash\">
<i><img src=\"";
// line 490
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("fos/images/money_icon.png"), "html", null, true);
yield "\" alt=\"\"></i>
Cash
</button>
";
// line 493
yield $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');
yield "
</fieldset>
</div>
</div>
</div>
";
}
// line 500
yield " ";
}
// line 501
yield " </div>
</div>
";
// line 533
yield "
<div class=\" row pro\">
";
// line 536
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((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
yield " <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
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["parcel"], "number", [], "any", false, false, false, 540), "html", null, true);
yield "</legend>
<h5>";
// line 541
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["parcel"], "description", [], "any", false, false, false, 541), "html", null, true);
yield "</h5>
</fieldset>
<fieldset>
<legend><i class=\"fa fa-arrow-circle-down\"></i></legend>
<fieldset>
<legend>Location</legend>
<h5>IN OFFICE :";
// line 548
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($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);
yield "
<p class=\"detail\">From: <i class=\"fas fa-hand-point-right\"></i>";
// line 549
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($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);
yield "</p>
";
// line 553
yield " </h5>
</fieldset>
";
// line 557
yield "
";
// line 558
yield $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Parcels\\ParcelController::getParcelDeliveryData", ["parcel_id" => CoreExtension::getAttribute($this->env, $this->source, $context["parcel"], "id", [], "any", false, false, false, 558)]));
yield "
";
// line 575
yield "
";
// line 589
yield "
";
// line 599
yield " </fieldset>
<div style=\"align-content: center; text-align: center;\">
<img alt=\"Coding Sips\" src=\"/barcode?text=";
// line 601
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($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);
yield "/";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["parcel"], "number", [], "any", false, false, false, 601), "html", null, true);
yield "&Codetype=Code128&size=60&print=true\" />
</div>
</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['parcel'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 609
yield "
</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
yield " <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'] = CoreExtension::ensureTraversable((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
yield " <tr>
<td>";
// line 628
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 628), "html", null, true);
yield " </td>
<td>";
// line 629
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["message"], "recepient", [], "any", false, false, false, 629), "html", null, true);
yield "</td>
<td>
";
// line 632
if (CoreExtension::getAttribute($this->env, $this->source, $context["message"], "status", [], "any", false, false, false, 632)) {
// line 633
yield " ";
if (((CoreExtension::getAttribute($this->env, $this->source, $context["message"], "status", [], "any", false, false, false, 633) == "Success") || (CoreExtension::getAttribute($this->env, $this->source, $context["message"], "status", [], "any", false, false, false, 633) == "Sent"))) {
// line 634
yield " <span class=\"alert-success\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["message"], "status", [], "any", false, false, false, 634), "html", null, true);
yield "</span>
";
} else {
// line 636
yield " <span class=\"alert-danger\">
";
// line 637
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["message"], "status", [], "any", false, false, false, 637), "html", null, true);
yield " <br>
";
// line 638
if ((CoreExtension::getAttribute($this->env, $this->source, $context["message"], "statusCode", [], "any", false, false, false, 638) < 1000)) {
// line 639
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($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); })()), CoreExtension::getAttribute($this->env, $this->source, $context["message"], "statusCode", [], "any", false, false, false, 639), [], "array", false, false, false, 639), "html", null, true);
yield " [";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["message"], "statusCode", [], "any", false, false, false, 639), "html", null, true);
yield "]
";
}
// line 641
yield " </span>
";
}
// line 643
yield " ";
} else {
// line 644
yield " <span>N/A</span>
";
}
// line 646
yield "
</td>
<td>
";
// line 649
if (((CoreExtension::getAttribute($this->env, $this->source, $context["message"], "status", [], "any", false, false, false, 649) != "Success") || (CoreExtension::getAttribute($this->env, $this->source, $context["message"], "status", [], "any", false, false, false, 649) != "Sent"))) {
// line 650
yield " ";
if (CoreExtension::getAttribute($this->env, $this->source, $context["message"], "manuallySent", [], "any", false, false, false, 650)) {
// line 651
yield " <i class=\"fas fa-check-circle\" style=\"color: green;\"></i>
";
}
// line 653
yield " ";
}
// line 654
yield " </td>
<td>";
// line 655
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["message"], "sms", [], "any", false, false, false, 655), "html", null, true);
yield "</td>
</tr>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['message'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 658
yield " </tbody>
</table>
</div>
";
}
// line 663
yield "
<div class=\"print-area\" id=\"print-area\">
</div>
<script>
let printReceipt = async () => {
\$(\".se-pre-con\").fadeIn(\"slow\");
let completeTransaction = await fetch(\"";
// line 678
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("register_transaction_as_complete", ["id" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($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);
yield "\", {
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
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($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);
yield "\");
a.download = \"";
// line 741
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($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);
yield ".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);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "fos/parcels/view_parcel.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 1153 => 741, 1149 => 740, 1084 => 678, 1067 => 663, 1060 => 658, 1043 => 655, 1040 => 654, 1037 => 653, 1033 => 651, 1030 => 650, 1028 => 649, 1023 => 646, 1019 => 644, 1016 => 643, 1012 => 641, 1004 => 639, 1002 => 638, 998 => 637, 995 => 636, 989 => 634, 986 => 633, 984 => 632, 978 => 629, 974 => 628, 971 => 627, 954 => 626, 939 => 613, 937 => 612, 932 => 609, 916 => 601, 912 => 599, 908 => 589, 905 => 575, 900 => 558, 897 => 557, 892 => 553, 888 => 549, 884 => 548, 874 => 541, 870 => 540, 865 => 537, 861 => 536, 856 => 533, 852 => 501, 849 => 500, 839 => 493, 833 => 490, 828 => 488, 825 => 487, 818 => 483, 814 => 482, 807 => 478, 802 => 477, 800 => 476, 793 => 471, 790 => 470, 787 => 469, 771 => 455, 767 => 453, 759 => 446, 756 => 437, 748 => 432, 745 => 431, 742 => 430, 733 => 425, 725 => 420, 722 => 419, 720 => 418, 710 => 412, 707 => 410, 705 => 409, 701 => 407, 699 => 406, 695 => 403, 688 => 399, 683 => 398, 681 => 397, 675 => 393, 672 => 391, 669 => 390, 667 => 389, 654 => 378, 651 => 377, 646 => 375, 640 => 373, 637 => 372, 635 => 371, 625 => 366, 616 => 360, 611 => 357, 605 => 356, 602 => 355, 597 => 352, 593 => 351, 590 => 350, 587 => 349, 583 => 348, 577 => 345, 570 => 341, 566 => 340, 544 => 321, 533 => 313, 522 => 305, 505 => 291, 494 => 283, 483 => 275, 466 => 263, 463 => 262, 450 => 261, 242 => 61, 229 => 60, 218 => 48, 213 => 46, 211 => 45, 209 => 44, 196 => 43, 182 => 37, 169 => 36, 153 => 53, 148 => 49, 146 => 43, 140 => 39, 138 => 36, 122 => 22, 108 => 9, 95 => 8, 81 => 6, 68 => 5, 45 => 1,);
}
public function getSourceContext(): Source
{
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");
}
}