var/cache/dev/twig/cc/ccd708e3896a01810b6b8dfec5ce4c81.php line 43

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* fos/parcels/view_parcel.html.twig */
  14. class __TwigTemplate_17ad5efce4aa4aed53d3207772ea37f5 extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'firstnav' => [$this'block_firstnav'],
  24.             'secondnav' => [$this'block_secondnav'],
  25.             'current' => [$this'block_current'],
  26.             'secondarylinkblock' => [$this'block_secondarylinkblock'],
  27.             'stylesheets' => [$this'block_stylesheets'],
  28.             'main' => [$this'block_main'],
  29.         ];
  30.     }
  31.     protected function doGetParent(array $context)
  32.     {
  33.         // line 1
  34.         return "fos/base.html.twig";
  35.     }
  36.     protected function doDisplay(array $context, array $blocks = [])
  37.     {
  38.         $macros $this->macros;
  39.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  40.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""fos/parcels/view_parcel.html.twig"));
  41.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  42.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""fos/parcels/view_parcel.html.twig"));
  43.         $this->parent $this->loadTemplate("fos/base.html.twig""fos/parcels/view_parcel.html.twig"1);
  44.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  45.         
  46.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  47.         
  48.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  49.     }
  50.     // line 5
  51.     public function block_firstnav($context, array $blocks = [])
  52.     {
  53.         $macros $this->macros;
  54.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  55.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""firstnav"));
  56.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  57.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""firstnav"));
  58.         // line 6
  59.         echo "    ";
  60.         echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Parcels\\DefaultController::nav"));
  61.         echo "
  62. ";
  63.         
  64.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  65.         
  66.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  67.     }
  68.     // line 8
  69.     public function block_secondnav($context, array $blocks = [])
  70.     {
  71.         $macros $this->macros;
  72.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  73.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""secondnav"));
  74.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  75.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""secondnav"));
  76.         // line 9
  77.         echo "
  78.     <script src=\"https://printjs-4de6.kxcdn.com/print.min.js\"></script>
  79.     <link rel=\"stylesheet\" type=\"text/css\" href=\"https://printjs-4de6.kxcdn.com/print.min.css\">
  80.     <script src=\"https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js\"></script>
  81.     <script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js\"
  82.             integrity=\"sha512-BNaRQnYJYiPSqHHDb58B0yaPfCu+Wgds8Gp/gU33kqBtgNS4tSPHuGibyoeqMV/TJlSKda6FXzoEyYGjTe+vXA==\"
  83.             crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>
  84.     <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>
  85.     ";
  86.         // line 22
  87.         echo "
  88.     <!-- Second Nav -->
  89.     <nav class=\"navbar-second navbar navbar-default navbar-static-top\" role=\"navigation\">
  90.         <div class=\"container-fluid\">
  91.             <div class=\"navbar-header\">
  92.                 <button type=\"button\" class=\"navbar-toggle collapsed\" data-toggle=\"collapse\"
  93.                         data-target=\"#bs-example-navbar-collapse-1\">
  94.                     <span class=\"sr-only\">Toggle navigation</span>
  95.                     <span class=\"icon-bar\"></span>
  96.                     <span class=\"icon-bar\"></span>
  97.                     <span class=\"icon-bar\"></span>
  98.                 </button>
  99.                 <!-- Brand -->
  100.                 ";
  101.         // line 36
  102.         $this->displayBlock('current'$context$blocks);
  103.         // line 39
  104.         echo "            </div>
  105.             <div class=\"collapse navbar-collapse animated fadeIn\" id=\"bs-example-navbar-collapse-1\">
  106.                 <ul class=\"nav navbar-nav animated fadeIn\">
  107.                     ";
  108.         // line 43
  109.         $this->displayBlock('secondarylinkblock'$context$blocks);
  110.         // line 49
  111.         echo "                </ul>
  112.                 <ul class=\"nav navbar-nav navbar-right\">
  113.                     <li class=\"\"><a></a></li>
  114.                     ";
  115.         // line 53
  116.         echo "                </ul>
  117.             </div><!-- /.navbar-collapse -->
  118.         </div><!-- /.container-fluid -->
  119.     </nav>
  120. ";
  121.         
  122.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  123.         
  124.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  125.     }
  126.     // line 36
  127.     public function block_current($context, array $blocks = [])
  128.     {
  129.         $macros $this->macros;
  130.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  131.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""current"));
  132.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  133.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""current"));
  134.         // line 37
  135.         echo "                    <span class=\"navbar-brand\" href=\"#\"><i class=\"fa fa-gears\"></i> PARCEL TO ";
  136.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse37), "toStation", [], "any"falsefalsefalse37), "html"nulltrue);
  137.         echo "</span>
  138.                 ";
  139.         
  140.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  141.         
  142.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  143.     }
  144.     // line 43
  145.     public function block_secondarylinkblock($context, array $blocks = [])
  146.     {
  147.         $macros $this->macros;
  148.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  149.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""secondarylinkblock"));
  150.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  151.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""secondarylinkblock"));
  152.         // line 44
  153.         echo "                        ";
  154.         // line 45
  155.         echo "                        ";
  156.         // line 46
  157.         echo "                        <li class=\"\"><a href=\"";
  158.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse46), "headers", [], "any"falsefalsefalse46), "get", ["referer"], "method"falsefalsefalse46), "html"nulltrue);
  159.         echo "\"><i class=\"fa fa-arrow-circle-left\"></i> Back</a></li>
  160.                         ";
  161.         // line 48
  162.         echo "                    ";
  163.         
  164.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  165.         
  166.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  167.     }
  168.     // line 60
  169.     public function block_stylesheets($context, array $blocks = [])
  170.     {
  171.         $macros $this->macros;
  172.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  173.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  174.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  175.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  176.         // line 61
  177.         echo "    <style>
  178.         /*@import \"../../../../../web/assets/css/print.css\";*/
  179.         h6{
  180.             font-weight: bold;
  181.         }
  182.         h3 {
  183.             /*font-size: 20px;*/
  184.         }
  185.         h5,h3,h4,p {
  186.             padding: 0px;
  187.             font-family: \"Amaranth\", sans-serif;
  188.             background: #ffffff;
  189.          }
  190.         legend {
  191.             border: none;
  192.             padding: 5px;
  193.         }
  194.         .print-area h5, .print-area h3, .print-area h4 {
  195.             padding: 0px;
  196.             font-family: \"Nova Flat\", sans-serif;
  197.             background: #ffffff;
  198.             border: none;
  199.             margin: 0;
  200.         }
  201.         .print-area p {
  202.             font-size: 12px;
  203.             padding: 4px;
  204.             margin: 0px;
  205.             line-height: 10px;
  206.             border: none;
  207.         }
  208.         hr {
  209.             margin-top: 1px;
  210.             margin-bottom: 1px;
  211.             border-top: 2px dashed rgba(0, 0, 0, 0.99);
  212.         }
  213.         .print-area hr {
  214.             border-top: 1px dashed rgba(0, 0, 0, 0.99);
  215.         }
  216.         .print-area {
  217.             width: 28%;
  218.             background: white;
  219.             /*border: 1px dotted;*/
  220.             padding: 2%;
  221.             display: none;
  222.             /*background-color: firebrick;*/
  223.         }
  224.         .print-area table {
  225.             font-family: 'Fjord One', serif;
  226.         }
  227.         element.style {
  228.         }
  229.         fieldset {
  230.             display: block;
  231.             margin-left: 0px;
  232.             margin-right: 2px;
  233.             border-top: 1px dotted black;
  234.         }
  235.         .kkk fieldset{
  236.             float: right;
  237.             width: 40%;
  238.         }
  239.         .detail{
  240.             padding: 0px;
  241.             font-size: 11px;
  242.             border: none;
  243.         }
  244.         @media print {
  245.             .sf-toolbar, .sf-display-none, .sf-minitoolbar {
  246.                 display: none;
  247.             }
  248.             .print-area {
  249.                 display: block;
  250.             }
  251.             @page {
  252.                 margin: 0 !important;
  253.             }
  254.             html {
  255.                 margin: 0 !important;
  256.             }
  257.             body {margin:0 !important;}
  258.             .print-area {
  259.                 width: 100%;
  260.             }
  261.             .pro {
  262.                 display: none;
  263.             }
  264.             .sf-toolbar, .sf-toolbarreset, .sf-minitoolbar {
  265.                 display: none;
  266.             }
  267.             /*.page-break {display: block; page-break-before: always }*/
  268.             .page-break {
  269.                 page-break-before: avoid;
  270.             }
  271.             .page-break {
  272.                 page-break-after: always;
  273.             }
  274.             pre, blockquote {
  275.                 page-break-inside: avoid;
  276.             }
  277.         }
  278.         .parcel {
  279.             font-family: 'Big Shoulders Text', cursive;
  280.             margin-bottom: 10px;
  281.             margin-left: 10px;
  282.         }
  283.         .parcel h3, .parcel span{
  284.             font-family: 'Merriweather', serif;
  285.             margin-top: 15px;
  286.         }
  287.         .sender_receiver .col-lg-6 + fieldset {
  288.             box-shadow: 5px 3px 20px #888888;
  289.         }
  290.         .sender_receiver fieldset{
  291.             background-color: beige;
  292.             border-top: 1px solid #d3cece;
  293.         }
  294.         .sender_receiver fieldset legend{
  295.             background-color: beige;
  296.             border: 1px solid #d3cece;
  297.         }
  298.         .sender_receiver fieldset h5{
  299.             background: none;
  300.         }
  301.         .destinations {
  302.             float: left;
  303.             width: 50%;
  304.             padding: 10px;
  305.             font-family: 'Open Sans', sans-serif;
  306.             margin-bottom: 15px;
  307.         }
  308.         .destinations h4, .destinations b {
  309.             font-family: 'Merriweather', serif;
  310.         }
  311.         .destinations h3 {
  312.             margin-bottom: 10px;
  313.         }
  314.         .description {
  315.             font-size: 37px;
  316.             margin-left: 10px;
  317.         }
  318.         .all_parcels{
  319.             text-transform: uppercase;
  320.             -ms-transform: rotate(90deg);
  321.             -moz-transform: rotate(90deg);
  322.             -webkit-transform: rotate(90deg);
  323.             -o-transform: rotate(90deg);
  324.             margin-top: 115px;
  325.             width: 430px;
  326.             margin-left: -60px;
  327.         }
  328.         .payment button, .print, .payment a {
  329.             width: 150px;
  330.             border-radius: 30px;
  331.         }
  332.         .payment .cash {
  333.             float: right;
  334.         }
  335.         .payment .cash img {
  336.             height: 20px;
  337.         }
  338.     </style>
  339. ";
  340.         
  341.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  342.         
  343.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  344.     }
  345.     // line 261
  346.     public function block_main($context, array $blocks = [])
  347.     {
  348.         $macros $this->macros;
  349.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  350.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  351.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  352.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  353.         // line 262
  354.         echo "    <div class=\"row pro\" style=\"padding: 10px 0px 20px 20px; /*border-right: 1px solid #888888;*/ background: #FFFFFF; /*box-shadow: 5px 3px 20px #888888;*/\">
  355.         <h3 style=\"font-family:Serif;margin-top: 30px;\">WayBill: ";
  356.         // line 263
  357.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse263), "id", [], "any"falsefalsefalse263), "html"nulltrue);
  358.         echo " - ";
  359.         echo twig_escape_filter($this->envtwig_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"falsefalsefalse263), "html"nulltrue);
  360.         echo "</h3>
  361.         <div class=\"col-lg-6 pro\">
  362.             <div class=\"row sender_receiver\">
  363.                 <div class=\"col-lg-6\">
  364.                     <fieldset style=\"box-shadow: 5px 5px 0px #888888;\">
  365.                         <legend class=\"top-legend\">SENDER</legend>
  366.                         <div class=\"row\">
  367.                             <div class=\"col-lg-12\">
  368.                                 <fieldset>
  369.                                     <legend>Name</legend>
  370.                                     <h5>";
  371.         // line 275
  372.         echo twig_escape_filter($this->envtwig_upper_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse275), "senderName", [], "any"falsefalsefalse275)), "html"nulltrue);
  373.         echo "</h5>
  374.                                 </fieldset>
  375.                             </div>
  376.                         </div>
  377.                         <div class=\"row\">
  378.                             <div class=\"col-lg-12\">
  379.                                 <fieldset>
  380.                                     <legend>Phone</legend>
  381.                                     <h5>";
  382.         // line 283
  383.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse283), "senderPhoneNumber", [], "any"falsefalsefalse283), "html"nulltrue);
  384.         echo "</h5>
  385.                                 </fieldset>
  386.                             </div>
  387.                         </div>
  388.                         <div class=\"row\">
  389.                             <div class=\"col-lg-12\">
  390.                                 <fieldset>
  391.                                     <legend>From</legend>
  392.                                     <h5>";
  393.         // line 291
  394.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse291), "fromStation", [], "any"falsefalsefalse291), "html"nulltrue);
  395.         echo "</h5>
  396.                                 </fieldset>
  397.                             </div>
  398.                         </div>
  399.                     </fieldset>
  400.                 </div>
  401.                 <div class=\"col-lg-6\">
  402.                     <fieldset style=\"box-shadow:5px 5px 0px #888888\">
  403.                         <legend class=\"top-legend\">RECEIVER</legend>
  404.                         <div class=\"row\">
  405.                             <div class=\"col-lg-12\">
  406.                                 <fieldset>
  407.                                     <legend>Name</legend>
  408.                                     <h5>";
  409.         // line 305
  410.         echo twig_escape_filter($this->envtwig_upper_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse305), "receiverName", [], "any"falsefalsefalse305)), "html"nulltrue);
  411.         echo "</h5>
  412.                                 </fieldset>
  413.                             </div>
  414.                         </div>
  415.                         <div class=\"row\">
  416.                             <div class=\"col-lg-12\">
  417.                                 <fieldset>
  418.                                     <legend>Phone</legend>
  419.                                     <h5>";
  420.         // line 313
  421.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse313), "receiverPhoneNumber", [], "any"falsefalsefalse313), "html"nulltrue);
  422.         echo "</h5>
  423.                                 </fieldset>
  424.                             </div>
  425.                         </div>
  426.                         <div class=\"row\">
  427.                             <div class=\"col-lg-12\">
  428.                                 <fieldset>
  429.                                     <legend>To</legend>
  430.                                     <h5>";
  431.         // line 321
  432.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse321), "toStation", [], "any"falsefalsefalse321), "html"nulltrue);
  433.         echo "</h5>
  434.                                 </fieldset>
  435.                             </div>
  436.                         </div>
  437.                     </fieldset>
  438.                 </div>
  439.             </div>
  440.         </div>
  441.         <div class=\"receipt\" >
  442.             <div class=\"row pro\">
  443.                 <div  class=\"col-lg-4 col-md-6\">
  444.                     <fieldset align=\"center\" style=\"border: 1px dotted black; padding-bottom: 10px;\">
  445.                         <legend>Cost</legend>
  446.                         <table width=\"90%\" style=\"text-align: center; align-content: center;\">
  447.                             <tr>
  448.                                 <td align=\"left\"><h5 align=\"left\" style=\"border: none;\">";
  449.         // line 340
  450.         echo twig_escape_filter($this->envtwig_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"falsefalsefalse340), "html"nulltrue);
  451.         echo "% V.A.T</h5></td>
  452.                                 <td align=\"right\" style=\"font-family: 'Fjord One', Serif; font-weight: bolder;\">";
  453.         // line 341
  454.         echo twig_escape_filter($this->envtwig_number_format_filter($this->envtwig_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"falsefalsefalse341), 2"."","), "html"nulltrue);
  455.         echo "</td>
  456.                             </tr>
  457.                             <tr style=\"\">
  458.                                 <td align=\"left\"><h5 align=\"left\" style=\"border: none;\">COST</h5></td>
  459.                                 <td align=\"right\" style=\"font-family: 'Fjord One', Serif;font-weight: bolder;\">";
  460.         // line 345
  461.         echo twig_escape_filter($this->envtwig_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"falsefalsefalse345) - 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"falsefalsefalse345)), 2"."","), "html"nulltrue);
  462.         echo "</td>
  463.                             </tr>
  464.                             ";
  465.         // line 348
  466.         $context['_parent'] = $context;
  467.         $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"falsefalsefalse348));
  468.         foreach ($context['_seq'] as $context["_key"] => $context["expense"]) {
  469.             // line 349
  470.             echo "                                ";
  471.             if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["expense"], "expenseType", [], "any"falsefalsefalse349), "isAutomatic", [], "any"falsefalsefalse349) == false)) {
  472.                 // line 350
  473.                 echo "                                    <tr style=\"border-bottom: 1px solid black;\">
  474.                                         <td align=\"left\"><h5 align=\"left\" style=\"border: none;\">";
  475.                 // line 351
  476.                 echo twig_escape_filter($this->envtwig_upper_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["expense"], "expenseType", [], "any"falsefalsefalse351), "expenseName", [], "any"falsefalsefalse351)), "html"nulltrue);
  477.                 echo "</h5></td>
  478.                                         <td align=\"right\" style=\"font-family: 'Fjord One', Serif; font-weight: bolder;border-right: none;\">-";
  479.                 // line 352
  480.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["expense"], "amount", [], "any"falsefalsefalse352), "html"nulltrue);
  481.                 echo "</td>
  482.                                     </tr>
  483.                                     ";
  484.                 // line 355
  485.                 echo "                                ";
  486.             }
  487.             // line 356
  488.             echo "                            ";
  489.         }
  490.         $_parent $context['_parent'];
  491.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['expense'], $context['_parent'], $context['loop']);
  492.         $context array_intersect_key($context$_parent) + $_parent;
  493.         // line 357
  494.         echo "
  495.                             <tr style=\"border-bottom: 2px double black;border-top: 2px double black;\">
  496.                                 <td align=\"right\"><h4 align=\"left\" style=\"border: none;\">TOTAL</h4></td>
  497.                                 <td align=\"right\" style=\"font-family: 'Fjord One', Serif; font-weight: bolder;\">KSH ";
  498.         // line 360
  499.         echo twig_escape_filter($this->envtwig_number_format_filter($this->envtwig_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"falsefalsefalse360)), "html"nulltrue);
  500.         echo "</td>
  501.                             </tr>
  502.                         </table>
  503.                     </fieldset>
  504.                     <p style=\"border:none;\">Transaction by: ";
  505.         // line 366
  506.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse366), "createdBy", [], "any"falsefalsefalse366), "person", [], "any"falsefalsefalse366), "secondName", [], "any"falsefalsefalse366), "html"nulltrue);
  507.         echo " ";
  508.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse366), "createdBy", [], "any"falsefalsefalse366), "person", [], "any"falsefalsefalse366), "sirName", [], "any"falsefalsefalse366), "html"nulltrue);
  509.         echo "</p>
  510.                     ";
  511.         // line 371
  512.         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"falsefalsefalse371) == false)) {
  513.             // line 372
  514.             echo "                        ";
  515.             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"falsefalsefalse372) == false) || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_BOS_USER")) || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_STATION_ADMIN"))) {
  516.                 // line 373
  517.                 echo "                                ";
  518.                 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');
  519.                 echo "
  520.                                         <button type=\"submit\" class=\"btn btn-sm btn-warning \">cancel transaction</button>
  521.                                 ";
  522.                 // line 375
  523.                 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');
  524.                 echo "
  525.                         ";
  526.             }
  527.             // line 377
  528.             echo "                    ";
  529.         }
  530.         // line 378
  531.         echo "                </div>
  532.             </div>
  533.         </div>
  534.     </div>
  535.     <div class=\"row\">
  536.         <div class=\"row\">
  537.             ";
  538.         // line 389
  539.         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"falsefalsefalse389)) {
  540.             // line 390
  541.             echo "                ";
  542.             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"falsefalsefalse390) != true)) {
  543.                 // line 391
  544.                 echo "                    <div class=\"col-lg\">
  545.                         ";
  546.                 // line 393
  547.                 echo "                        <div class=\"row pro kkk\" style=\"padding: 10px 0px 20px 20px; background: #FFFFFF;  margin-left: auto\">
  548.                             <div class=\"col-lg-12\">
  549.                                 <fieldset>
  550.                                     <legend>Print</legend>
  551.                                     ";
  552.                 // line 397
  553.                 if ((isset($context["isCashCanChangeMpesa"]) || array_key_exists("isCashCanChangeMpesa"$context) ? $context["isCashCanChangeMpesa"] : (function () { throw new RuntimeError('Variable "isCashCanChangeMpesa" does not exist.'397$this->source); })())) {
  554.                     // line 398
  555.                     echo "                                        <a href=\"";
  556.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("payment_request_view", ["waybill" => twig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse398), "id", [], "any"falsefalsefalse398)]), "html"nulltrue);
  557.                     echo "\" class=\"btn btn-success\" style=\"float: left;\">
  558.                                             <i><img src=\"";
  559.                     // line 399
  560.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("fos/images/m-pesa-icon.svg"), "html"nulltrue);
  561.                     echo "\" alt=\"\"></i>
  562.                                             change payment to M-PESA
  563.                                         </a>
  564.                                     ";
  565.                 }
  566.                 // line 403
  567.                 echo "
  568.                                     <div align=\"right\">
  569.                                         ";
  570.                 // line 406
  571.                 echo "                                        ";
  572.                 // line 407
  573.                 echo "
  574.                                         ";
  575.                 // line 409
  576.                 if ( !(null === (isset($context["tims"]) || array_key_exists("tims"$context) ? $context["tims"] : (function () { throw new RuntimeError('Variable "tims" does not exist.'409$this->source); })()))) {
  577.                     // line 410
  578.                     echo "                                            ";
  579.                     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"falsefalsefalse410) == "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"falsefalsefalse410) == "PARGAMON"))) {
  580.                         // line 412
  581.                         echo "                                                <a href=\"";
  582.                         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("receipt_action", ["waybill_" => twig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse412), "id", [], "any"falsefalsefalse412)]), "html"nulltrue);
  583.                         echo "\" download=\"application/pdf\">
  584.                                                     <button type=\"button\" class=\"btn btn-success print\">
  585.                                                         <i class=\"fa fa-print\"></i>
  586.                                                         Print PDF
  587.                                                     </button>
  588.                                                 </a>
  589.                                             ";
  590.                     } elseif (((twig_get_attribute($this->env$this->source,                     // line 418
  591. (isset($context["tims"]) || array_key_exists("tims"$context) ? $context["tims"] : (function () { throw new RuntimeError('Variable "tims" does not exist.'418$this->source); })()), "type", [], "any"falsefalsefalse418) == "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"falsefalsefalse418) == "TREMOL"))) {
  592.                         // line 419
  593.                         echo "
  594.                                                 <button type=\"button\" class=\"btn btn-success print\" onclick=\"print('/fos/receipt/g03/";
  595.                         // line 420
  596.                         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse420), "id", [], "any"falsefalsefalse420), "html"nulltrue);
  597.                         echo "')\">
  598.                                                     <i class=\"fa fa-print\"></i>
  599.                                                     Print Receipt
  600.                                                 </button>
  601.                                             ";
  602.                     } else {
  603.                         // line 425
  604.                         echo "                                                <button type=\"button\" class=\"btn btn-success print\" onclick=\"print('/fos/receipt/";
  605.                         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse425), "id", [], "any"falsefalsefalse425), "html"nulltrue);
  606.                         echo "')\">
  607.                                                     <i class=\"fa fa-print\"></i>
  608.                                                     Print Receipt
  609.                                                 </button>
  610.                                             ";
  611.                     }
  612.                     // line 430
  613.                     echo "                                        ";
  614.                 } else {
  615.                     // line 431
  616.                     echo "                                                ----
  617.                                             <button type=\"button\" class=\"btn btn-success print\" onclick=\"print('/fos/receipt/";
  618.                     // line 432
  619.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse432), "id", [], "any"falsefalsefalse432), "html"nulltrue);
  620.                     echo "')\">
  621.                                                 <i class=\"fa fa-print\"></i>
  622.                                                 Print Receipt
  623.                                             </button>
  624.                                         ";
  625.                 }
  626.                 // line 437
  627.                 echo "
  628. ";
  629.                 // line 446
  630.                 echo "
  631.                                     </div>
  632.                                 </fieldset>
  633.                             </div>
  634.                         </div>
  635.                         ";
  636.                 // line 453
  637.                 echo "                    </div>
  638.                 ";
  639.             } else {
  640.                 // line 455
  641.                 echo "                    <div class=\"col-lg\">
  642.                         <fieldset>
  643.                             <legend>Print</legend>
  644.                             <div align=\"right\">
  645.                                 <button type=\"button\" class=\"btn btn-danger print\" style=\"width: auto\" disabled>
  646.                                     <i class=\"fa fa-print\"></i>
  647.                                     this transaction is cancelled
  648.                                 </button>
  649.                             </div>
  650.                         </fieldset>
  651.                         <b></b>
  652.                     </div>
  653.                 ";
  654.             }
  655.             // line 469
  656.             echo "            ";
  657.         } else {
  658.             // line 470
  659.             echo "                ";
  660.             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"falsefalsefalse470) != true)) {
  661.                 // line 471
  662.                 echo "                    <div class=\"col-lg\"s>
  663.                         <div class=\"row pro kkk\" style=\"padding: 10px 0px 20px 20px; background: #FFFFFF;  margin-left: auto\">
  664.                             <div class=\"col-lg-12\">
  665.                                 <fieldset class=\"payment\">
  666.                                     <legend>Select Payment option</legend>
  667.                                     ";
  668.                 // line 476
  669.                 if ((isset($context["isMpesaAvailable"]) || array_key_exists("isMpesaAvailable"$context) ? $context["isMpesaAvailable"] : (function () { throw new RuntimeError('Variable "isMpesaAvailable" does not exist.'476$this->source); })())) {
  670.                     // line 477
  671.                     echo "                                        <a href=\"";
  672.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("payment_request_view", ["waybill" => twig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse477), "id", [], "any"falsefalsefalse477)]), "html"nulltrue);
  673.                     echo "\" class=\"btn btn-success\" style=\"float: left;\">
  674.                                             <i><img src=\"";
  675.                     // line 478
  676.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("fos/images/m-pesa-icon.svg"), "html"nulltrue);
  677.                     echo "\" alt=\"\"></i>
  678.                                             M-PESA
  679.                                         </a>
  680.                                     ";
  681.                 } else {
  682.                     // line 482
  683.                     echo "                                        <button ";
  684.                     echo " class=\"btn btn-success\" style=\"float: left;\" disabled>
  685.                                             <i><img src=\"";
  686.                     // line 483
  687.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("fos/images/m-pesa-icon.svg"), "html"nulltrue);
  688.                     echo "\" alt=\"\"></i>
  689.                                             M-PESA
  690.                                         </button>
  691.                                     ";
  692.                 }
  693.                 // line 487
  694.                 echo "
  695.                                     ";
  696.                 // line 488
  697.                 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');
  698.                 echo "
  699.                                     <button type=\"submit\" class=\"btn btn-warning cash\">
  700.                                         <i><img src=\"";
  701.                 // line 490
  702.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("fos/images/money_icon.png"), "html"nulltrue);
  703.                 echo "\" alt=\"\"></i>
  704.                                         Cash
  705.                                     </button>
  706.                                     ";
  707.                 // line 493
  708.                 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');
  709.                 echo "
  710.                                 </fieldset>
  711.                             </div>
  712.                         </div>
  713.                     </div>
  714.                 ";
  715.             }
  716.             // line 500
  717.             echo "            ";
  718.         }
  719.         // line 501
  720.         echo "        </div>
  721.     </div>
  722.     ";
  723.         // line 533
  724.         echo "
  725.     <div class=\" row pro\">
  726.             ";
  727.         // line 536
  728.         $context['_parent'] = $context;
  729.         $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); })()));
  730.         foreach ($context['_seq'] as $context["_key"] => $context["parcel"]) {
  731.             // line 537
  732.             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;\">
  733.                 <div class=\"col-lg-12\">
  734.                     <fieldset>
  735.                         <legend>Parcel #";
  736.             // line 540
  737.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["parcel"], "number", [], "any"falsefalsefalse540), "html"nulltrue);
  738.             echo "</legend>
  739.                         <h5>";
  740.             // line 541
  741.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["parcel"], "description", [], "any"falsefalsefalse541), "html"nulltrue);
  742.             echo "</h5>
  743.                     </fieldset>
  744.                     <fieldset>
  745.                         <legend><i class=\"fa fa-arrow-circle-down\"></i></legend>
  746.                         <fieldset>
  747.                             <legend>Location</legend>
  748.                             <h5>IN OFFICE :";
  749.             // line 548
  750.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse548), "fromStation", [], "any"falsefalsefalse548), "html"nulltrue);
  751.             echo "
  752.                                 <p class=\"detail\">From: <i class=\"fas fa-hand-point-right\"></i>";
  753.             // line 549
  754.             echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse549), "createdAt", [], "any"falsefalsefalse549), "F jS, Y \\a\\t g:ia"), "html"nulltrue);
  755.             echo "</p>
  756.                                ";
  757.             // line 553
  758.             echo "                            </h5>
  759.                         </fieldset>
  760.                         ";
  761.             // line 557
  762.             echo "
  763.                         ";
  764.             // line 558
  765.             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"falsefalsefalse558)]));
  766.             echo "
  767.                         ";
  768.             // line 575
  769.             echo "
  770.                         ";
  771.             // line 589
  772.             echo "
  773.                         ";
  774.             // line 599
  775.             echo "                    </fieldset>
  776.                     <div style=\"align-content: center; text-align: center;\">
  777.                         <img alt=\"Coding Sips\" src=\"/barcode?text=";
  778.             // line 601
  779.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse601), "id", [], "any"falsefalsefalse601), "html"nulltrue);
  780.             echo "/";
  781.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["parcel"], "number", [], "any"falsefalsefalse601), "html"nulltrue);
  782.             echo "&Codetype=Code128&size=60&print=true\" />
  783.                     </div>
  784.                 </div>
  785.             </div>
  786.             ";
  787.         }
  788.         $_parent $context['_parent'];
  789.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['parcel'], $context['_parent'], $context['loop']);
  790.         $context array_intersect_key($context$_parent) + $_parent;
  791.         // line 609
  792.         echo "
  793.     </div>
  794.     ";
  795.         // line 612
  796.         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); })()))) {
  797.             // line 613
  798.             echo "        <hr>
  799.         <div class=\"row\">
  800.             <table class=\"table table-bordered\">
  801.                 <thead>
  802.                 <tr>
  803.                     <th>#</th>
  804.                     <th>RECEIVER</th>
  805.                     <th>STATUS</th>
  806.                     <th>Sent Via Phone</th>
  807.                     <th>MESSAGE</th>
  808.                 </tr>
  809.                 </thead>
  810.                 <tbody>
  811.                 ";
  812.             // line 626
  813.             $context['_parent'] = $context;
  814.             $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); })()));
  815.             $context['loop'] = [
  816.               'parent' => $context['_parent'],
  817.               'index0' => 0,
  818.               'index'  => 1,
  819.               'first'  => true,
  820.             ];
  821.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  822.                 $length count($context['_seq']);
  823.                 $context['loop']['revindex0'] = $length 1;
  824.                 $context['loop']['revindex'] = $length;
  825.                 $context['loop']['length'] = $length;
  826.                 $context['loop']['last'] = === $length;
  827.             }
  828.             foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
  829.                 // line 627
  830.                 echo "                    <tr>
  831.                         <td>";
  832.                 // line 628
  833.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsefalse628), "html"nulltrue);
  834.                 echo " </td>
  835.                         <td>";
  836.                 // line 629
  837.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["message"], "recepient", [], "any"falsefalsefalse629), "html"nulltrue);
  838.                 echo "</td>
  839.                         <td>
  840.                             ";
  841.                 // line 632
  842.                 if (twig_get_attribute($this->env$this->source$context["message"], "status", [], "any"falsefalsefalse632)) {
  843.                     // line 633
  844.                     echo "                                ";
  845.                     if (((twig_get_attribute($this->env$this->source$context["message"], "status", [], "any"falsefalsefalse633) == "Success") || (twig_get_attribute($this->env$this->source$context["message"], "status", [], "any"falsefalsefalse633) == "Sent"))) {
  846.                         // line 634
  847.                         echo "                                    <span class=\"alert-success\">";
  848.                         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["message"], "status", [], "any"falsefalsefalse634), "html"nulltrue);
  849.                         echo "</span>
  850.                                 ";
  851.                     } else {
  852.                         // line 636
  853.                         echo "                                    <span class=\"alert-danger\">
  854.                                         ";
  855.                         // line 637
  856.                         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["message"], "status", [], "any"falsefalsefalse637), "html"nulltrue);
  857.                         echo " <br>
  858.                                         ";
  859.                         // line 638
  860.                         if ((twig_get_attribute($this->env$this->source$context["message"], "statusCode", [], "any"falsefalsefalse638) < 1000)) {
  861.                             // line 639
  862.                             echo "                                            ";
  863.                             echo twig_escape_filter($this->envtwig_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"falsefalsefalse639), [], "array"falsefalsefalse639), "html"nulltrue);
  864.                             echo " [";
  865.                             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["message"], "statusCode", [], "any"falsefalsefalse639), "html"nulltrue);
  866.                             echo "]
  867.                                         ";
  868.                         }
  869.                         // line 641
  870.                         echo "                                    </span>
  871.                                 ";
  872.                     }
  873.                     // line 643
  874.                     echo "                            ";
  875.                 } else {
  876.                     // line 644
  877.                     echo "                                <span>N/A</span>
  878.                             ";
  879.                 }
  880.                 // line 646
  881.                 echo "
  882.                         </td>
  883.                         <td>
  884.                             ";
  885.                 // line 649
  886.                 if (((twig_get_attribute($this->env$this->source$context["message"], "status", [], "any"falsefalsefalse649) != "Success") || (twig_get_attribute($this->env$this->source$context["message"], "status", [], "any"falsefalsefalse649) != "Sent"))) {
  887.                     // line 650
  888.                     echo "                                ";
  889.                     if (twig_get_attribute($this->env$this->source$context["message"], "manuallySent", [], "any"falsefalsefalse650)) {
  890.                         // line 651
  891.                         echo "                                    <i class=\"fas fa-check-circle\" style=\"color: green;\"></i>
  892.                                 ";
  893.                     }
  894.                     // line 653
  895.                     echo "                            ";
  896.                 }
  897.                 // line 654
  898.                 echo "                        </td>
  899.                         <td>";
  900.                 // line 655
  901.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["message"], "sms", [], "any"falsefalsefalse655), "html"nulltrue);
  902.                 echo "</td>
  903.                     </tr>
  904.                 ";
  905.                 ++$context['loop']['index0'];
  906.                 ++$context['loop']['index'];
  907.                 $context['loop']['first'] = false;
  908.                 if (isset($context['loop']['length'])) {
  909.                     --$context['loop']['revindex0'];
  910.                     --$context['loop']['revindex'];
  911.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  912.                 }
  913.             }
  914.             $_parent $context['_parent'];
  915.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['message'], $context['_parent'], $context['loop']);
  916.             $context array_intersect_key($context$_parent) + $_parent;
  917.             // line 658
  918.             echo "                </tbody>
  919.             </table>
  920.         </div>
  921.     ";
  922.         }
  923.         // line 663
  924.         echo "
  925.     <div class=\"print-area\" id=\"print-area\">
  926.     </div>
  927.     <script>
  928.         let printReceipt = async () => {
  929.             \$(\".se-pre-con\").fadeIn(\"slow\");
  930.             let completeTransaction = await fetch(\"";
  931.         // line 678
  932.         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->sourcetwig_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"falsefalsefalse678), "id", [], "any"falsefalsefalse678)]), "html"nulltrue);
  933.         echo "\", {
  934.                 method: 'POST'
  935.             }).then(response => {
  936.                 response.json().then(json => {
  937.                     if(response.status === 200){
  938.                         printJS({
  939.                             printable:'print-area',
  940.                             type: 'html',
  941.                             css:'../../../../../assets/css/print.css'});
  942.                     }else{
  943.                         console.log('error occurred');
  944.                     }
  945.                 })
  946.             }).finally(() => {
  947.                 \$(\".se-pre-con\").fadeOut(\"slow\");
  948.             });
  949.         };
  950.         jQuery(document).bind(\"keyup keydown\", function(e){
  951.             if(e.ctrlKey && e.keyCode === 80){
  952.                 console.log(\"printing ...\");
  953.                 printReceipt();
  954.             }
  955.         });
  956.         window.jsPDF = window.jspdf.jsPDF;
  957.         function download() {
  958.             let renderHtml = \$('#print-area').html();
  959.             let pdf = new jsPDF('p','mm', [254, 80]);
  960.             pdf.html(renderHtml, {
  961.                 callback: function (pdf) {
  962.                     window.open(pdf.output('bloburl'));
  963.                 }
  964.             });
  965.         }
  966.         // download();
  967.         // \$( document ).ready(function() {
  968.         //     window.jsPDF = window.jspdf.jsPDF;
  969.         //
  970.         //     // Default export is a4 paper, portrait, using millimeters for units
  971.         //     var doc = window.jsPDF;
  972.         //     var specialElementHandlers = {
  973.         //         '#editor': function (element, renderer) {
  974.         //             return true;
  975.         //         }
  976.         //     };
  977.         //
  978.         //     doc.html(\$('.receipt-print').html(), 15, 15, {
  979.         //         'width': 170,
  980.         //         'elementHandlers': specialElementHandlers
  981.         //     });
  982.         //     doc.save('sample-file.pdf');
  983.         // });
  984.         function save() {
  985.             var content = [\"your-content-here\"];
  986.             var bl = new Blob(content, {type: \"application/pdf\"});
  987.             var a = document.createElement(\"a\");
  988.             a.href = URL.createObjectURL(\"http://localhost:8000/fos/receipt/";
  989.         // line 740
  990.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse740), "id", [], "any"falsefalsefalse740), "html"nulltrue);
  991.         echo "\");
  992.             a.download = \"";
  993.         // line 741
  994.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse741), "id", [], "any"falsefalsefalse741), "html"nulltrue);
  995.         echo ".pdf\";
  996.             a.hidden = true;
  997.             document.body.appendChild(a);
  998.             a.click();
  999.         }
  1000.         function print(url){
  1001.             // \$(\".se-pre-con\").fadeIn(\"slow\");
  1002.             // printJS(url);
  1003.             printJS({
  1004.                 printable: url,
  1005.                 type:'pdf',
  1006.                 showModal:true,
  1007.                 modalMessage: 'Downloading receipt please wait!',
  1008.                 onError: function (error) {
  1009.                     console.log(error);
  1010.                     alert('Could not generate receipt please try again  ')
  1011.                 }
  1012.             });
  1013.         }
  1014.     </script>
  1015. ";
  1016.         
  1017.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  1018.         
  1019.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  1020.     }
  1021.     public function getTemplateName()
  1022.     {
  1023.         return "fos/parcels/view_parcel.html.twig";
  1024.     }
  1025.     public function isTraitable()
  1026.     {
  1027.         return false;
  1028.     }
  1029.     public function getDebugInfo()
  1030.     {
  1031.         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,);
  1032.     }
  1033.     public function getSourceContext()
  1034.     {
  1035.         return new Source("{% extends 'fos/base.html.twig' %}
  1036. {% block firstnav %}
  1037.     {{ render(controller('App\\\\Parcels\\\\DefaultController::nav')) }}
  1038. {% endblock %}
  1039. {% block secondnav %}
  1040.     <script src=\"https://printjs-4de6.kxcdn.com/print.min.js\"></script>
  1041.     <link rel=\"stylesheet\" type=\"text/css\" href=\"https://printjs-4de6.kxcdn.com/print.min.css\">
  1042.     <script src=\"https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js\"></script>
  1043.     <script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js\"
  1044.             integrity=\"sha512-BNaRQnYJYiPSqHHDb58B0yaPfCu+Wgds8Gp/gU33kqBtgNS4tSPHuGibyoeqMV/TJlSKda6FXzoEyYGjTe+vXA==\"
  1045.             crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>
  1046.     <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>
  1047.     {#    <script src=\"https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.2/jspdf.min.js\"></script>#}
  1048.     <!-- Second Nav -->
  1049.     <nav class=\"navbar-second navbar navbar-default navbar-static-top\" role=\"navigation\">
  1050.         <div class=\"container-fluid\">
  1051.             <div class=\"navbar-header\">
  1052.                 <button type=\"button\" class=\"navbar-toggle collapsed\" data-toggle=\"collapse\"
  1053.                         data-target=\"#bs-example-navbar-collapse-1\">
  1054.                     <span class=\"sr-only\">Toggle navigation</span>
  1055.                     <span class=\"icon-bar\"></span>
  1056.                     <span class=\"icon-bar\"></span>
  1057.                     <span class=\"icon-bar\"></span>
  1058.                 </button>
  1059.                 <!-- Brand -->
  1060.                 {% block current %}
  1061.                     <span class=\"navbar-brand\" href=\"#\"><i class=\"fa fa-gears\"></i> PARCEL TO {{ transaction.wayBill.toStation }}</span>
  1062.                 {% endblock %}
  1063.             </div>
  1064.             <div class=\"collapse navbar-collapse animated fadeIn\" id=\"bs-example-navbar-collapse-1\">
  1065.                 <ul class=\"nav navbar-nav animated fadeIn\">
  1066.                     {% block  secondarylinkblock %}
  1067.                         {#<li><a href=\"{{ path('new-parcel') }}\"><i class=\"fa fa-plus-circle\"></i> Register Parcel</a></li>#}
  1068.                         {#<li class=\"\"><a href=\"#\"><i class=\"fa fa-th-list\"></i> Parcels</a></li>#}
  1069.                         <li class=\"\"><a href=\"{{ app.request.headers.get('referer') }}\"><i class=\"fa fa-arrow-circle-left\"></i> Back</a></li>
  1070.                         {#<li class=\"active\"><a href=\"\"><i class=\"fa fa-plus-circle\"></i> View Parcel #{{ transaction.waybill.parcel.id }}</a></li>#}
  1071.                     {% endblock %}
  1072.                 </ul>
  1073.                 <ul class=\"nav navbar-nav navbar-right\">
  1074.                     <li class=\"\"><a></a></li>
  1075.                     {#<li><p class=\"navbar-text\"></p></li>#}
  1076.                 </ul>
  1077.             </div><!-- /.navbar-collapse -->
  1078.         </div><!-- /.container-fluid -->
  1079.     </nav>
  1080. {% endblock %}
  1081. {% block stylesheets %}
  1082.     <style>
  1083.         /*@import \"../../../../../web/assets/css/print.css\";*/
  1084.         h6{
  1085.             font-weight: bold;
  1086.         }
  1087.         h3 {
  1088.             /*font-size: 20px;*/
  1089.         }
  1090.         h5,h3,h4,p {
  1091.             padding: 0px;
  1092.             font-family: \"Amaranth\", sans-serif;
  1093.             background: #ffffff;
  1094.          }
  1095.         legend {
  1096.             border: none;
  1097.             padding: 5px;
  1098.         }
  1099.         .print-area h5, .print-area h3, .print-area h4 {
  1100.             padding: 0px;
  1101.             font-family: \"Nova Flat\", sans-serif;
  1102.             background: #ffffff;
  1103.             border: none;
  1104.             margin: 0;
  1105.         }
  1106.         .print-area p {
  1107.             font-size: 12px;
  1108.             padding: 4px;
  1109.             margin: 0px;
  1110.             line-height: 10px;
  1111.             border: none;
  1112.         }
  1113.         hr {
  1114.             margin-top: 1px;
  1115.             margin-bottom: 1px;
  1116.             border-top: 2px dashed rgba(0, 0, 0, 0.99);
  1117.         }
  1118.         .print-area hr {
  1119.             border-top: 1px dashed rgba(0, 0, 0, 0.99);
  1120.         }
  1121.         .print-area {
  1122.             width: 28%;
  1123.             background: white;
  1124.             /*border: 1px dotted;*/
  1125.             padding: 2%;
  1126.             display: none;
  1127.             /*background-color: firebrick;*/
  1128.         }
  1129.         .print-area table {
  1130.             font-family: 'Fjord One', serif;
  1131.         }
  1132.         element.style {
  1133.         }
  1134.         fieldset {
  1135.             display: block;
  1136.             margin-left: 0px;
  1137.             margin-right: 2px;
  1138.             border-top: 1px dotted black;
  1139.         }
  1140.         .kkk fieldset{
  1141.             float: right;
  1142.             width: 40%;
  1143.         }
  1144.         .detail{
  1145.             padding: 0px;
  1146.             font-size: 11px;
  1147.             border: none;
  1148.         }
  1149.         @media print {
  1150.             .sf-toolbar, .sf-display-none, .sf-minitoolbar {
  1151.                 display: none;
  1152.             }
  1153.             .print-area {
  1154.                 display: block;
  1155.             }
  1156.             @page {
  1157.                 margin: 0 !important;
  1158.             }
  1159.             html {
  1160.                 margin: 0 !important;
  1161.             }
  1162.             body {margin:0 !important;}
  1163.             .print-area {
  1164.                 width: 100%;
  1165.             }
  1166.             .pro {
  1167.                 display: none;
  1168.             }
  1169.             .sf-toolbar, .sf-toolbarreset, .sf-minitoolbar {
  1170.                 display: none;
  1171.             }
  1172.             /*.page-break {display: block; page-break-before: always }*/
  1173.             .page-break {
  1174.                 page-break-before: avoid;
  1175.             }
  1176.             .page-break {
  1177.                 page-break-after: always;
  1178.             }
  1179.             pre, blockquote {
  1180.                 page-break-inside: avoid;
  1181.             }
  1182.         }
  1183.         .parcel {
  1184.             font-family: 'Big Shoulders Text', cursive;
  1185.             margin-bottom: 10px;
  1186.             margin-left: 10px;
  1187.         }
  1188.         .parcel h3, .parcel span{
  1189.             font-family: 'Merriweather', serif;
  1190.             margin-top: 15px;
  1191.         }
  1192.         .sender_receiver .col-lg-6 + fieldset {
  1193.             box-shadow: 5px 3px 20px #888888;
  1194.         }
  1195.         .sender_receiver fieldset{
  1196.             background-color: beige;
  1197.             border-top: 1px solid #d3cece;
  1198.         }
  1199.         .sender_receiver fieldset legend{
  1200.             background-color: beige;
  1201.             border: 1px solid #d3cece;
  1202.         }
  1203.         .sender_receiver fieldset h5{
  1204.             background: none;
  1205.         }
  1206.         .destinations {
  1207.             float: left;
  1208.             width: 50%;
  1209.             padding: 10px;
  1210.             font-family: 'Open Sans', sans-serif;
  1211.             margin-bottom: 15px;
  1212.         }
  1213.         .destinations h4, .destinations b {
  1214.             font-family: 'Merriweather', serif;
  1215.         }
  1216.         .destinations h3 {
  1217.             margin-bottom: 10px;
  1218.         }
  1219.         .description {
  1220.             font-size: 37px;
  1221.             margin-left: 10px;
  1222.         }
  1223.         .all_parcels{
  1224.             text-transform: uppercase;
  1225.             -ms-transform: rotate(90deg);
  1226.             -moz-transform: rotate(90deg);
  1227.             -webkit-transform: rotate(90deg);
  1228.             -o-transform: rotate(90deg);
  1229.             margin-top: 115px;
  1230.             width: 430px;
  1231.             margin-left: -60px;
  1232.         }
  1233.         .payment button, .print, .payment a {
  1234.             width: 150px;
  1235.             border-radius: 30px;
  1236.         }
  1237.         .payment .cash {
  1238.             float: right;
  1239.         }
  1240.         .payment .cash img {
  1241.             height: 20px;
  1242.         }
  1243.     </style>
  1244. {% endblock %}
  1245. {% block main %}
  1246.     <div class=\"row pro\" style=\"padding: 10px 0px 20px 20px; /*border-right: 1px solid #888888;*/ background: #FFFFFF; /*box-shadow: 5px 3px 20px #888888;*/\">
  1247.         <h3 style=\"font-family:Serif;margin-top: 30px;\">WayBill: {{ transaction.wayBill.id }} - {{ transaction.cuInvoiceNumber }}</h3>
  1248.         <div class=\"col-lg-6 pro\">
  1249.             <div class=\"row sender_receiver\">
  1250.                 <div class=\"col-lg-6\">
  1251.                     <fieldset style=\"box-shadow: 5px 5px 0px #888888;\">
  1252.                         <legend class=\"top-legend\">SENDER</legend>
  1253.                         <div class=\"row\">
  1254.                             <div class=\"col-lg-12\">
  1255.                                 <fieldset>
  1256.                                     <legend>Name</legend>
  1257.                                     <h5>{{ transaction.waybill.senderName | upper }}</h5>
  1258.                                 </fieldset>
  1259.                             </div>
  1260.                         </div>
  1261.                         <div class=\"row\">
  1262.                             <div class=\"col-lg-12\">
  1263.                                 <fieldset>
  1264.                                     <legend>Phone</legend>
  1265.                                     <h5>{{ transaction.waybill.senderPhoneNumber }}</h5>
  1266.                                 </fieldset>
  1267.                             </div>
  1268.                         </div>
  1269.                         <div class=\"row\">
  1270.                             <div class=\"col-lg-12\">
  1271.                                 <fieldset>
  1272.                                     <legend>From</legend>
  1273.                                     <h5>{{ transaction.waybill.fromStation }}</h5>
  1274.                                 </fieldset>
  1275.                             </div>
  1276.                         </div>
  1277.                     </fieldset>
  1278.                 </div>
  1279.                 <div class=\"col-lg-6\">
  1280.                     <fieldset style=\"box-shadow:5px 5px 0px #888888\">
  1281.                         <legend class=\"top-legend\">RECEIVER</legend>
  1282.                         <div class=\"row\">
  1283.                             <div class=\"col-lg-12\">
  1284.                                 <fieldset>
  1285.                                     <legend>Name</legend>
  1286.                                     <h5>{{ transaction.wayBill.receiverName | upper }}</h5>
  1287.                                 </fieldset>
  1288.                             </div>
  1289.                         </div>
  1290.                         <div class=\"row\">
  1291.                             <div class=\"col-lg-12\">
  1292.                                 <fieldset>
  1293.                                     <legend>Phone</legend>
  1294.                                     <h5>{{ transaction.waybill.receiverPhoneNumber }}</h5>
  1295.                                 </fieldset>
  1296.                             </div>
  1297.                         </div>
  1298.                         <div class=\"row\">
  1299.                             <div class=\"col-lg-12\">
  1300.                                 <fieldset>
  1301.                                     <legend>To</legend>
  1302.                                     <h5>{{ transaction.waybill.toStation }}</h5>
  1303.                                 </fieldset>
  1304.                             </div>
  1305.                         </div>
  1306.                     </fieldset>
  1307.                 </div>
  1308.             </div>
  1309.         </div>
  1310.         <div class=\"receipt\" >
  1311.             <div class=\"row pro\">
  1312.                 <div  class=\"col-lg-4 col-md-6\">
  1313.                     <fieldset align=\"center\" style=\"border: 1px dotted black; padding-bottom: 10px;\">
  1314.                         <legend>Cost</legend>
  1315.                         <table width=\"90%\" style=\"text-align: center; align-content: center;\">
  1316.                             <tr>
  1317.                                 <td align=\"left\"><h5 align=\"left\" style=\"border: none;\">{{ transaction.taxPercentage }}% V.A.T</h5></td>
  1318.                                 <td align=\"right\" style=\"font-family: 'Fjord One', Serif; font-weight: bolder;\">{{ (transaction.taxAmount) | number_format(2, '.', ',') }}</td>
  1319.                             </tr>
  1320.                             <tr style=\"\">
  1321.                                 <td align=\"left\"><h5 align=\"left\" style=\"border: none;\">COST</h5></td>
  1322.                                 <td align=\"right\" style=\"font-family: 'Fjord One', Serif;font-weight: bolder;\">{{ (transaction.grossAmount - transaction.taxAmount) | number_format(2, '.', ',') }}</td>
  1323.                             </tr>
  1324.                             {% for expense in transaction.wayBillExpenses %}
  1325.                                 {% if expense.expenseType.isAutomatic == false %}
  1326.                                     <tr style=\"border-bottom: 1px solid black;\">
  1327.                                         <td align=\"left\"><h5 align=\"left\" style=\"border: none;\">{{ expense.expenseType.expenseName | upper }}</h5></td>
  1328.                                         <td align=\"right\" style=\"font-family: 'Fjord One', Serif; font-weight: bolder;border-right: none;\">-{{ expense.amount  }}</td>
  1329.                                     </tr>
  1330.                                     {#{% set expenseAmount = (expenseAmount + expense.amount) %}#}
  1331.                                 {% endif %}
  1332.                             {% endfor %}
  1333.                             <tr style=\"border-bottom: 2px double black;border-top: 2px double black;\">
  1334.                                 <td align=\"right\"><h4 align=\"left\" style=\"border: none;\">TOTAL</h4></td>
  1335.                                 <td align=\"right\" style=\"font-family: 'Fjord One', Serif; font-weight: bolder;\">KSH {{ (transaction.stationBalance ) | number_format }}</td>
  1336.                             </tr>
  1337.                         </table>
  1338.                     </fieldset>
  1339.                     <p style=\"border:none;\">Transaction by: {{ transaction.waybill.createdBy.person.secondName }} {{ transaction.waybill.createdBy.person.sirName }}</p>
  1340.                     {% if transaction.isCancelled == false %}
  1341.                         {% if transaction.isComplete == false or is_granted('ROLE_BOS_USER') or is_granted('ROLE_STATION_ADMIN') %}
  1342.                                 {{ form_start(cancelForm) }}
  1343.                                         <button type=\"submit\" class=\"btn btn-sm btn-warning \">cancel transaction</button>
  1344.                                 {{ form_end(cancelForm) }}
  1345.                         {% endif %}
  1346.                     {% endif %}
  1347.                 </div>
  1348.             </div>
  1349.         </div>
  1350.     </div>
  1351.     <div class=\"row\">
  1352.         <div class=\"row\">
  1353.             {% if transaction.isPaid %}
  1354.                 {% if transaction.isCancelled != true %}
  1355.                     <div class=\"col-lg\">
  1356.                         {#{% if transaction.isCancelled == false and isCancellable == true %}#}
  1357.                         <div class=\"row pro kkk\" style=\"padding: 10px 0px 20px 20px; background: #FFFFFF;  margin-left: auto\">
  1358.                             <div class=\"col-lg-12\">
  1359.                                 <fieldset>
  1360.                                     <legend>Print</legend>
  1361.                                     {% if isCashCanChangeMpesa %}
  1362.                                         <a href=\"{{ path('payment_request_view', {'waybill': transaction.wayBill.id}) }}\" class=\"btn btn-success\" style=\"float: left;\">
  1363.                                             <i><img src=\"{{ asset('fos/images/m-pesa-icon.svg') }}\" alt=\"\"></i>
  1364.                                             change payment to M-PESA
  1365.                                         </a>
  1366.                                     {%endif%}
  1367.                                     <div align=\"right\">
  1368.                                         {#<a href=\"{{ path('pdf_report', {'id': transaction.waybill.id }) }}\" class=\"btn btn-success\" target=\"_blank\"><i class=\"fa fa-print\"></i> Print</a>#}
  1369.                                         {#<a href=\"javascript:window.print()\" class=\"btn btn-success\" target=\"_blank\"><i class=\"fa fa-print\"></i> Print</a>#}
  1370.                                         {% if tims is not null %}
  1371.                                             {% if tims.type == 'TYPEC' and tims.supplierCode == 'PARGAMON' %}
  1372. {#                                            {% if tims.type == 'TYPEC' and tims.supplierCode == 'PARGAMON' and is_granted('ROLE_BOS_USER')%}#}
  1373.                                                 <a href=\"{{ path('receipt_action', {'waybill_': transaction.wayBill.id }) }}\" download=\"application/pdf\">
  1374.                                                     <button type=\"button\" class=\"btn btn-success print\">
  1375.                                                         <i class=\"fa fa-print\"></i>
  1376.                                                         Print PDF
  1377.                                                     </button>
  1378.                                                 </a>
  1379.                                             {% elseif tims.type == 'TYPEC' and tims.supplierCode == 'TREMOL' %}
  1380.                                                 <button type=\"button\" class=\"btn btn-success print\" onclick=\"print('/fos/receipt/g03/{{ transaction.wayBill.id }}')\">
  1381.                                                     <i class=\"fa fa-print\"></i>
  1382.                                                     Print Receipt
  1383.                                                 </button>
  1384.                                             {% else %}
  1385.                                                 <button type=\"button\" class=\"btn btn-success print\" onclick=\"print('/fos/receipt/{{ transaction.wayBill.id }}')\">
  1386.                                                     <i class=\"fa fa-print\"></i>
  1387.                                                     Print Receipt
  1388.                                                 </button>
  1389.                                             {% endif %}
  1390.                                         {% else %}
  1391.                                                 ----
  1392.                                             <button type=\"button\" class=\"btn btn-success print\" onclick=\"print('/fos/receipt/{{ transaction.wayBill.id }}')\">
  1393.                                                 <i class=\"fa fa-print\"></i>
  1394.                                                 Print Receipt
  1395.                                             </button>
  1396.                                         {% endif %}
  1397. {#                                        <button type=\"button\" class=\"btn btn-success print\" onclick=\"printReceipt()\">#}
  1398. {#                                            <i class=\"fa fa-print\"></i>#}
  1399. {#                                            Print#}
  1400. {#                                        </button>#}
  1401. {#                                        <button type=\"button\" class=\"btn btn-success print\" onclick=\"save()\">#}
  1402. {#                                            <i class=\"fa fa-print\"></i>#}
  1403. {#                                            Print#}
  1404. {#                                        </button>#}
  1405.                                     </div>
  1406.                                 </fieldset>
  1407.                             </div>
  1408.                         </div>
  1409.                         {#{% endif %}#}
  1410.                     </div>
  1411.                 {% else %}
  1412.                     <div class=\"col-lg\">
  1413.                         <fieldset>
  1414.                             <legend>Print</legend>
  1415.                             <div align=\"right\">
  1416.                                 <button type=\"button\" class=\"btn btn-danger print\" style=\"width: auto\" disabled>
  1417.                                     <i class=\"fa fa-print\"></i>
  1418.                                     this transaction is cancelled
  1419.                                 </button>
  1420.                             </div>
  1421.                         </fieldset>
  1422.                         <b></b>
  1423.                     </div>
  1424.                 {% endif %}
  1425.             {% else %}
  1426.                 {% if transaction.isCancelled != true %}
  1427.                     <div class=\"col-lg\"s>
  1428.                         <div class=\"row pro kkk\" style=\"padding: 10px 0px 20px 20px; background: #FFFFFF;  margin-left: auto\">
  1429.                             <div class=\"col-lg-12\">
  1430.                                 <fieldset class=\"payment\">
  1431.                                     <legend>Select Payment option</legend>
  1432.                                     {% if isMpesaAvailable %}
  1433.                                         <a href=\"{{ path('payment_request_view', {'waybill': transaction.wayBill.id}) }}\" class=\"btn btn-success\" style=\"float: left;\">
  1434.                                             <i><img src=\"{{ asset('fos/images/m-pesa-icon.svg') }}\" alt=\"\"></i>
  1435.                                             M-PESA
  1436.                                         </a>
  1437.                                     {%else%}
  1438.                                         <button {#href=\"{{ path('payment_request_view', {'waybill': transaction.wayBill.id}) }}\"#} class=\"btn btn-success\" style=\"float: left;\" disabled>
  1439.                                             <i><img src=\"{{ asset('fos/images/m-pesa-icon.svg') }}\" alt=\"\"></i>
  1440.                                             M-PESA
  1441.                                         </button>
  1442.                                     {%endif%}
  1443.                                     {{ form_start(cashPaymentOptionForm) }}
  1444.                                     <button type=\"submit\" class=\"btn btn-warning cash\">
  1445.                                         <i><img src=\"{{ asset('fos/images/money_icon.png') }}\" alt=\"\"></i>
  1446.                                         Cash
  1447.                                     </button>
  1448.                                     {{ form_end(cashPaymentOptionForm) }}
  1449.                                 </fieldset>
  1450.                             </div>
  1451.                         </div>
  1452.                     </div>
  1453.                 {% endif %}
  1454.             {% endif %}
  1455.         </div>
  1456.     </div>
  1457.     {# <div class=\"row\" style=\"padding: 10px 0px 20px 20px; border-right: 1px solid #888888; background: #FFFFFF; box-shadow: 5px 3px 20px #888888;\">
  1458.         {{ form_start(form) }}
  1459.         <fieldset>
  1460.             <legend>WayBill Expense</legend>
  1461.             <div class=\"row\">
  1462.                 <div class=\"col-lg-3 col-md-3\">
  1463.                     <label for=\"sender_name\">Expense Type</label>
  1464.                     {{ form_widget(form.expenseType,{'attr':{'class':'form-control' }} ) }}
  1465.                     <div class=\"invalid-feedback\">
  1466.                         {{ form_errors(form.expenseType) }}
  1467.                     </div>
  1468.                 </div>
  1469.                 <div class=\"col-lg-2 col-md-4\">
  1470.                     <label for=\"sender_name\">Amount</label>
  1471.                     {{ form_widget(form.amount,{'attr':{'class':'form-control' }} ) }}
  1472.                     <div class=\"invalid-feedback\">
  1473.                         {{ form_errors(form.amount) }}
  1474.                     </div>
  1475.                 </div>
  1476.             </div>
  1477.             <div class=\"row\" style=\"margin-top: 10px;\">
  1478.                 <div class=\"col-lg-1 col-md-1\">
  1479.                     <button type=\"submit\" class=\"btn btn-success right-align\">Save</button>
  1480.                 </div>
  1481.             </div>
  1482.         </fieldset>
  1483.         {{ form_end(form) }}
  1484.     </div>#}
  1485.     <div class=\" row pro\">
  1486.             {% for parcel in parcels %}
  1487.             <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;\">
  1488.                 <div class=\"col-lg-12\">
  1489.                     <fieldset>
  1490.                         <legend>Parcel #{{ parcel.number  }}</legend>
  1491.                         <h5>{{ parcel.description }}</h5>
  1492.                     </fieldset>
  1493.                     <fieldset>
  1494.                         <legend><i class=\"fa fa-arrow-circle-down\"></i></legend>
  1495.                         <fieldset>
  1496.                             <legend>Location</legend>
  1497.                             <h5>IN OFFICE :{{ transaction.wayBill.fromStation }}
  1498.                                 <p class=\"detail\">From: <i class=\"fas fa-hand-point-right\"></i>{{ transaction.wayBill.createdAt | date(\"F jS, Y \\\\a\\\\t g:ia\") }}</p>
  1499.                                {# {% if parcel.isEnRoute %}
  1500.                                     <p class=\"detail\">To: <i class=\"fas fa-hand-point-right\"></i>{{ parcel.enRouteFrom | date(\"F jS, Y \\\\a\\\\t g:ia\") }}</p>
  1501.                                 {% endif %}#}
  1502.                             </h5>
  1503.                         </fieldset>
  1504.                         {#{{ render(controller('App\\\\Parcels\\\\DefaultController::nav')) }}#}
  1505.                         {{ render(controller('App\\\\Parcels\\\\ParcelController::getParcelDeliveryData',{'parcel_id':parcel.id})) }}
  1506.                         {#{% if parcel.isEnRoute %}
  1507.                         <fieldset>
  1508.                             <legend>En route</legend>
  1509.                             <h5>REG: {{ parcel.vehicle.regNumber }}
  1510.                             <p class=\"detail\">Loaded By: {{ transaction.waybill.createdBy.person.secondName }} {{ transaction.waybill.createdBy.person.sirName }}</p>
  1511.                             {% if parcel.isEnRoute %}
  1512.                                 <p class=\"detail\">From: <i class=\"fas fa-hand-point-right\"></i>{{ parcel.enRouteFrom | date(\"F jS, Y \\\\a\\\\t g:ia\") }}</p>
  1513.                             {% endif %}
  1514.                             {% if parcel.isReceived %}
  1515.                                 <p class=\"detail\">To: <i class=\"fas fa-hand-point-right\"></i>{{ parcel.receivedAt | date(\"F jS, Y \\\\a\\\\t g:ia\") }}</p>
  1516.                             {% endif %}
  1517.                             </h5>
  1518.                         </fieldset>
  1519.                         {% endif %}#}
  1520.                         {#{% if parcel.isReceived %}
  1521.                             <fieldset>
  1522.                                 <legend>Received By</legend>
  1523.                                 <h5>USER: {{ parcel.receivedBy.person.firstName | upper }}  {{ parcel.receivedBy.person.secondName | upper }}  {{parcel.receivedBy.person.sirName | upper }}
  1524.                                 {% if parcel.isReceived %}
  1525.                                     <p class=\"detail\">From: <i class=\"fas fa-hand-point-right\"></i>{{ parcel.receivedAt | date(\"F jS, Y \\\\a\\\\t g:ia\") }}</p>
  1526.                                 {% endif %}
  1527.                                 {% if transaction.wayBill.isCollected %}
  1528.                                     <p class=\"detail\">to: <i class=\"fas fa-hand-point-right\"></i>{{ parcel.collectedAt | date(\"F jS, Y \\\\a\\\\t g:ia\") }}</p>
  1529.                                 {% endif %}
  1530.                                 </h5>
  1531.                             </fieldset>
  1532.                         {% endif %}#}
  1533.                         {#{% if parcel.isCollected %}
  1534.                             <fieldset>
  1535.                                 <legend>Collected By</legend>
  1536.                                 <h5>National ID: {{ parcel.collectorNationalId }}</h5>
  1537.                                 <h5>USER: {{ parcel.collectedOfficerBy.person.firstName | upper }}  {{ parcel.collectedOfficerBy.person.secondName | upper }}  {{parcel.collectedOfficerBy.person.sirName | upper }}</h5>
  1538.                                 <p class=\"detail\">At: <i class=\"fas fa-hand-point-right\"></i>{{ parcel.collectedAt | date(\"F jS, Y \\\\a\\\\t g:ia\") }}</p>
  1539.                             </fieldset>
  1540.                         {% endif %}#}
  1541.                     </fieldset>
  1542.                     <div style=\"align-content: center; text-align: center;\">
  1543.                         <img alt=\"Coding Sips\" src=\"/barcode?text={{ transaction.wayBill.id }}/{{ parcel.number }}&Codetype=Code128&size=60&print=true\" />
  1544.                     </div>
  1545.                 </div>
  1546.             </div>
  1547.             {% endfor %}
  1548.     </div>
  1549.     {% if sms is defined  and sms %}
  1550.         <hr>
  1551.         <div class=\"row\">
  1552.             <table class=\"table table-bordered\">
  1553.                 <thead>
  1554.                 <tr>
  1555.                     <th>#</th>
  1556.                     <th>RECEIVER</th>
  1557.                     <th>STATUS</th>
  1558.                     <th>Sent Via Phone</th>
  1559.                     <th>MESSAGE</th>
  1560.                 </tr>
  1561.                 </thead>
  1562.                 <tbody>
  1563.                 {% for message in sms %}
  1564.                     <tr>
  1565.                         <td>{{ loop.index }} </td>
  1566.                         <td>{{ message.recepient }}</td>
  1567.                         <td>
  1568.                             {% if message.status  %}
  1569.                                 {% if message.status == 'Success' or message.status == 'Sent' %}
  1570.                                     <span class=\"alert-success\">{{ message.status }}</span>
  1571.                                 {% else %}
  1572.                                     <span class=\"alert-danger\">
  1573.                                         {{ message.status }}{#[{{ message.statusCode }}]#} <br>
  1574.                                         {% if message.statusCode < 1000 %}
  1575.                                             {{ statusChart[message.statusCode] }} [{{ message.statusCode }}]
  1576.                                         {% endif %}
  1577.                                     </span>
  1578.                                 {% endif %}
  1579.                             {% else %}
  1580.                                 <span>N/A</span>
  1581.                             {% endif %}
  1582.                         </td>
  1583.                         <td>
  1584.                             {% if message.status != 'Success' or message.status != 'Sent' %}
  1585.                                 {% if message.manuallySent %}
  1586.                                     <i class=\"fas fa-check-circle\" style=\"color: green;\"></i>
  1587.                                 {% endif %}
  1588.                             {% endif %}
  1589.                         </td>
  1590.                         <td>{{ message.sms }}</td>
  1591.                     </tr>
  1592.                 {% endfor %}
  1593.                 </tbody>
  1594.             </table>
  1595.         </div>
  1596.     {% endif %}
  1597.     <div class=\"print-area\" id=\"print-area\">
  1598.     </div>
  1599.     <script>
  1600.         let printReceipt = async () => {
  1601.             \$(\".se-pre-con\").fadeIn(\"slow\");
  1602.             let completeTransaction = await fetch(\"{{ path('register_transaction_as_complete', {'id': transaction.wayBill.id }) }}\", {
  1603.                 method: 'POST'
  1604.             }).then(response => {
  1605.                 response.json().then(json => {
  1606.                     if(response.status === 200){
  1607.                         printJS({
  1608.                             printable:'print-area',
  1609.                             type: 'html',
  1610.                             css:'../../../../../assets/css/print.css'});
  1611.                     }else{
  1612.                         console.log('error occurred');
  1613.                     }
  1614.                 })
  1615.             }).finally(() => {
  1616.                 \$(\".se-pre-con\").fadeOut(\"slow\");
  1617.             });
  1618.         };
  1619.         jQuery(document).bind(\"keyup keydown\", function(e){
  1620.             if(e.ctrlKey && e.keyCode === 80){
  1621.                 console.log(\"printing ...\");
  1622.                 printReceipt();
  1623.             }
  1624.         });
  1625.         window.jsPDF = window.jspdf.jsPDF;
  1626.         function download() {
  1627.             let renderHtml = \$('#print-area').html();
  1628.             let pdf = new jsPDF('p','mm', [254, 80]);
  1629.             pdf.html(renderHtml, {
  1630.                 callback: function (pdf) {
  1631.                     window.open(pdf.output('bloburl'));
  1632.                 }
  1633.             });
  1634.         }
  1635.         // download();
  1636.         // \$( document ).ready(function() {
  1637.         //     window.jsPDF = window.jspdf.jsPDF;
  1638.         //
  1639.         //     // Default export is a4 paper, portrait, using millimeters for units
  1640.         //     var doc = window.jsPDF;
  1641.         //     var specialElementHandlers = {
  1642.         //         '#editor': function (element, renderer) {
  1643.         //             return true;
  1644.         //         }
  1645.         //     };
  1646.         //
  1647.         //     doc.html(\$('.receipt-print').html(), 15, 15, {
  1648.         //         'width': 170,
  1649.         //         'elementHandlers': specialElementHandlers
  1650.         //     });
  1651.         //     doc.save('sample-file.pdf');
  1652.         // });
  1653.         function save() {
  1654.             var content = [\"your-content-here\"];
  1655.             var bl = new Blob(content, {type: \"application/pdf\"});
  1656.             var a = document.createElement(\"a\");
  1657.             a.href = URL.createObjectURL(\"http://localhost:8000/fos/receipt/{{ transaction.wayBill.id }}\");
  1658.             a.download = \"{{ transaction.wayBill.id }}.pdf\";
  1659.             a.hidden = true;
  1660.             document.body.appendChild(a);
  1661.             a.click();
  1662.         }
  1663.         function print(url){
  1664.             // \$(\".se-pre-con\").fadeIn(\"slow\");
  1665.             // printJS(url);
  1666.             printJS({
  1667.                 printable: url,
  1668.                 type:'pdf',
  1669.                 showModal:true,
  1670.                 modalMessage: 'Downloading receipt please wait!',
  1671.                 onError: function (error) {
  1672.                     console.log(error);
  1673.                     alert('Could not generate receipt please try again  ')
  1674.                 }
  1675.             });
  1676.         }
  1677.     </script>
  1678. {% endblock %}
  1679. ""fos/parcels/view_parcel.html.twig""/var/www/html/courier/templates/fos/parcels/view_parcel.html.twig");
  1680.     }
  1681. }