<?php

/* DorcasTabithaBundle:Assistance:assistanceloop.html.twig */
class __TwigTemplate_36fcb6edd1b2df41dc4b9ba91921cad2 extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = false;

        $this->blocks = array(
        );
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        // line 1
        echo "
<h4>
    Previous Dates Food Was Given
</h4>
<article style=\"background-color: #00b5cb; padding-top: 8px; padding-left: 5px; height: 60px; color: white;\">
";
        // line 6
        $context["fgstatus"] = 0;
        // line 7
        $context['_parent'] = (array) $context;
        $context['_seq'] = twig_ensure_traversable($this->getContext($context, "assistances"));
        foreach ($context['_seq'] as $context["_key"] => $context["assistance"]) {
            // line 8
            echo "    
        <div style=\" float:left;\">
            ";
            // line 10
            if ((((!(null === $this->getAttribute($this->getContext($context, "assistance"), "foodgivendate"))) && (twig_date_format_filter($this->env, $this->getAttribute($this->getContext($context, "assistance"), "foodgivendate"), "Y") > 0)) && ($this->getAttribute($this->getContext($context, "assistance"), "isActiveFood") == 1))) {
                // line 11
                echo " 
                ";
                // line 12
                echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute($this->getContext($context, "assistance"), "foodgivendate"), "m/d/Y"), "html", null, true);
                echo "  

                ";
                // line 14
                $context["uri"] = $this->getAttribute($this->getAttribute($this->getContext($context, "app"), "request"), "uri");
                // line 15
                echo "                ";
                if (($this->env->getExtension('security')->isGranted("ROLE_ADMIN") && (!twig_in_filter("/assistance/", $this->getContext($context, "uri"))))) {
                    // line 16
                    echo "                    ";
                    $context["urlpath"] = $this->env->getExtension('routing')->getPath("DorcasTabithaBundle_assistance_delete_food", array("assistance_id" => $this->getAttribute($this->getContext($context, "assistance"), "assistanceid")));
                    // line 17
                    echo "                    <input type=\"button\" value=\"Del\" onClick=\"location.href='";
                    echo twig_escape_filter($this->env, $this->getContext($context, "urlpath"), "html", null, true);
                    echo "'\" />            
                ";
                }
                // line 19
                echo "                &nbsp;&nbsp;&nbsp;
                ";
                // line 20
                $context["fgstatus"] = 1;
                // line 21
                echo "            ";
            }
            // line 22
            echo "        </div>

";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['assistance'], $context['_parent'], $context['loop']);
        $context = array_merge($_parent, array_intersect_key($context, $_parent));
        // line 25
        if (($this->getContext($context, "fgstatus") == 0)) {
            // line 26
            echo "    <p>There has been no food given for this client. </p>
";
        }
        // line 28
        echo "    </article>
                <hr size=\"0\" color=\"black\" noshade/ style = \"position:relative; top:-10px;\">


 <h4>Previous Checks Issued</h4>

<div style=\"width:15%; float:left;\">
    Purpose
</div>
<div style=\"width:11%; float:left;\">
    Date           
</div>
<div style=\"width:24%; float:left;\">
    Payee          
</div>
<div style=\"width:10%; float:left;\">
    Dorcas \$        
</div>
<div style=\"width:10%; float:left;\">
    OASIS \$       
</div>
<div style=\"width:10%; float:left;\">
    SFUMC \$        
</div>
<div style=\"width:10%; float:left;\">
    Other \$         
</div>

<br/>
<hr size=\"2\" color=\"black\" noshade/>

";
        // line 59
        $context["dorcas"] = 0;
        // line 60
        $context["oasis"] = 0;
        // line 61
        $context["sfumc"] = 0;
        // line 62
        $context["other"] = 0;
        // line 63
        $context["cistatus"] = 0;
        // line 64
        $context['_parent'] = (array) $context;
        $context['_seq'] = twig_ensure_traversable($this->getContext($context, "assistances"));
        foreach ($context['_seq'] as $context["_key"] => $context["assistance"]) {
            // line 65
            echo "
    ";
            // line 66
            if ((((($this->getAttribute($this->getContext($context, "assistance"), "checkdorcas") || $this->getAttribute($this->getContext($context, "assistance"), "checkoasis")) || $this->getAttribute($this->getContext($context, "assistance"), "checksfumc")) || $this->getAttribute($this->getContext($context, "assistance"), "checkother")) && ($this->getAttribute($this->getContext($context, "assistance"), "isActiveCheck") == 1))) {
                // line 68
                echo "        ";
                $context["cistatus"] = 1;
                // line 69
                echo "        <article style=\"background-color: #00b5cb; padding-top: 8px; padding-left: 5px; color: white;\">
            <div style=\"width:15%; float:left;\">
                ";
                // line 71
                echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "assistance"), "checkpurpose"), "html", null, true);
                echo "
            </div>

            <div style=\"width:11%; float:left;\">
                        ";
                // line 75
                echo twig_escape_filter($this->env, ((twig_test_empty($this->getAttribute($this->getContext($context, "assistance"), "checksissueddate"))) ? ("") : (twig_date_format_filter($this->env, $this->getAttribute($this->getContext($context, "assistance"), "checksissueddate"), "m/d/Y"))), "html", null, true);
                echo " &nbsp;
            </div>
            <div style=\"width:24%; float:left;\">
                        ";
                // line 78
                echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "assistance"), "checksissuedpayee"), "html", null, true);
                echo " &nbsp;
            </div>
            <div style=\"width:10%; float:left;\">
                        ";
                // line 81
                echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->getAttribute($this->getContext($context, "assistance"), "checkdorcas"), 2, ".", ","), "html", null, true);
                echo " &nbsp;
            </div>
            <div style=\"width:10%; float:left;\">
                        ";
                // line 84
                echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->getAttribute($this->getContext($context, "assistance"), "checkoasis"), 2, ".", ","), "html", null, true);
                echo " &nbsp;
            </div>
            <div style=\"width:10%; float:left;\">
                        ";
                // line 87
                echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->getAttribute($this->getContext($context, "assistance"), "checksfumc"), 2, ".", ","), "html", null, true);
                echo " &nbsp;
            </div>
            <div style=\"width:10%; float:left;\">
                        ";
                // line 90
                echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->getAttribute($this->getContext($context, "assistance"), "checkother"), 2, ".", ","), "html", null, true);
                echo " &nbsp;
            </div>

            ";
                // line 93
                $context["uri"] = $this->getAttribute($this->getAttribute($this->getContext($context, "app"), "request"), "uri");
                // line 94
                echo "            ";
                // line 95
                echo "
            ";
                // line 96
                if (($this->env->getExtension('security')->isGranted("ROLE_ADMIN") && (!twig_in_filter("/assistance/", $this->getContext($context, "uri"))))) {
                    // line 97
                    echo "                ";
                    $context["urlpath"] = $this->env->getExtension('routing')->getPath("DorcasTabithaBundle_assistance_update", array("assistance_id" => $this->getAttribute($this->getContext($context, "assistance"), "assistanceid")));
                    // line 98
                    echo "                <input type=\"button\" value=\"Edit\" onclick=\"window.open(' ";
                    echo twig_escape_filter($this->env, $this->getContext($context, "urlpath"), "html", null, true);
                    echo " ','','width=880,height=310,location=no')\" />
                ";
                    // line 99
                    $context["urlpath"] = $this->env->getExtension('routing')->getPath("DorcasTabithaBundle_assistance_delete_check", array("assistance_id" => $this->getAttribute($this->getContext($context, "assistance"), "assistanceid")));
                    // line 100
                    echo "                <input type=\"button\" value=\"Del\" onClick=\"location.href='";
                    echo twig_escape_filter($this->env, $this->getContext($context, "urlpath"), "html", null, true);
                    echo "'\" />
            ";
                }
                // line 102
                echo "
            ";
                // line 103
                $context["dorcas"] = ($this->getContext($context, "dorcas") + $this->getAttribute($this->getContext($context, "assistance"), "checkdorcas"));
                // line 104
                echo "            ";
                $context["oasis"] = ($this->getContext($context, "oasis") + $this->getAttribute($this->getContext($context, "assistance"), "checkoasis"));
                // line 105
                echo "            ";
                $context["sfumc"] = ($this->getContext($context, "sfumc") + $this->getAttribute($this->getContext($context, "assistance"), "checksfumc"));
                // line 106
                echo "            ";
                $context["other"] = ($this->getContext($context, "other") + $this->getAttribute($this->getContext($context, "assistance"), "checkother"));
                // line 107
                echo "

            <br>
            <hr size=\"0\" color=\"black\" noshade/>
        </article>
    ";
            }
            // line 113
            echo "

    ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['assistance'], $context['_parent'], $context['loop']);
        $context = array_merge($_parent, array_intersect_key($context, $_parent));
        // line 116
        echo "    ";
        if (($this->getContext($context, "cistatus") == 0)) {
            // line 117
            echo "        <p>There are no checks issued for this client. </p>
    ";
        }
        // line 119
        echo "
<hr size=\"0\" color=\"black\" noshade/>

";
        // line 122
        $context["grandtotal"] = ((($this->getContext($context, "dorcas") + $this->getContext($context, "oasis")) + $this->getContext($context, "sfumc")) + $this->getContext($context, "other"));
        // line 123
        echo "<div style=\"width:50%; float:left;\">
            Total to Date 
</div>

<div style=\"width:10%; float:left;\">
           \$";
        // line 128
        echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->getContext($context, "dorcas"), 2, ".", ","), "html", null, true);
        echo " &nbsp;
</div>
<div style=\"width:10%; float:left;\">
            \$";
        // line 131
        echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->getContext($context, "oasis"), 2, ".", ","), "html", null, true);
        echo " &nbsp;
</div>
<div style=\"width:10%; float:left;\">
            \$";
        // line 134
        echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->getContext($context, "sfumc"), 2, ".", ","), "html", null, true);
        echo " &nbsp;
</div>
<div style=\"width:10%; float:left;\">
            \$";
        // line 137
        echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->getContext($context, "other"), 2, ".", ","), "html", null, true);
        echo " &nbsp;
</div>
<div style=\"width:10%; float:right;\">
            \$";
        // line 140
        echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->getContext($context, "grandtotal"), 2, ".", ","), "html", null, true);
        echo " <br/>Grand Total &nbsp;
</div>
<br/><br/>


 <h4>Previous Special Programs</h4>

<div style=\"width:20%; float:left;\">
    Program
</div>
<div style=\"width:12%; float:left;\">
    Date           
</div>
<div style=\"width:24%; float:left;\">
    Recipient's Name          
</div>
<div style=\"width:24%; float:left;\">
    Parent's Name          
</div>
<div style=\"width:10%; float:left;\">
    Amount \$        
</div>

<br/>
<hr size=\"2\" color=\"black\" noshade/>

";
        // line 166
        $context["spstatus"] = 0;
        // line 167
        $context['_parent'] = (array) $context;
        $context['_seq'] = twig_ensure_traversable($this->getContext($context, "assistances"));
        foreach ($context['_seq'] as $context["_key"] => $context["assistance"]) {
            // line 168
            if ((($this->getAttribute($this->getContext($context, "assistance"), "specialprogramcheck") && ($this->getAttribute($this->getContext($context, "assistance"), "specialprogram") != "")) && ($this->getAttribute($this->getContext($context, "assistance"), "isActiveProgram") == 1))) {
                // line 169
                echo "    ";
                $context["spstatus"] = 1;
                // line 170
                echo "    <article style=\"background-color: #00b5cb; padding-top: 8px; padding-left: 5px; color: white;\">
            <div style=\"width:20%; float:left;\">
                ";
                // line 172
                echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "assistance"), "specialprogram"), "html", null, true);
                echo "
            </div>

            <div style=\"width:12%; float:left;\">
                        ";
                // line 176
                echo twig_escape_filter($this->env, ((twig_test_empty($this->getAttribute($this->getContext($context, "assistance"), "specialprogramdate"))) ? ("") : (twig_date_format_filter($this->env, $this->getAttribute($this->getContext($context, "assistance"), "specialprogramdate"), "m/d/Y"))), "html", null, true);
                echo " &nbsp;
            </div>
            <div style=\"width:24%; float:left;\">
                        ";
                // line 179
                echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "assistance"), "specialprogramrecipientname"), "html", null, true);
                echo " &nbsp;
            </div>
            <div style=\"width:24%; float:left;\">
                        ";
                // line 182
                echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "assistance"), "specialprogramparentname"), "html", null, true);
                echo " &nbsp;
            </div>
            <div style=\"width:10%; float:left;\">
                        ";
                // line 185
                echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->getAttribute($this->getContext($context, "assistance"), "specialprogramcheck"), 2, ".", ","), "html", null, true);
                echo " &nbsp;
            </div>

            ";
                // line 188
                $context["uri"] = $this->getAttribute($this->getAttribute($this->getContext($context, "app"), "request"), "uri");
                // line 189
                echo "            ";
                // line 190
                echo "
            ";
                // line 191
                if (($this->env->getExtension('security')->isGranted("ROLE_ADMIN") && (!twig_in_filter("/assistance/", $this->getContext($context, "uri"))))) {
                    // line 192
                    echo "                ";
                    $context["urlpath"] = $this->env->getExtension('routing')->getPath("DorcasTabithaBundle_assistance_updatesp", array("assistance_id" => $this->getAttribute($this->getContext($context, "assistance"), "assistanceid")));
                    // line 193
                    echo "                <input type=\"button\" value=\"Edit\" onclick=\"window.open(' ";
                    echo twig_escape_filter($this->env, $this->getContext($context, "urlpath"), "html", null, true);
                    echo " ','','width=980,height=310,location=no')\" /> 
                ";
                    // line 194
                    $context["urlpath"] = $this->env->getExtension('routing')->getPath("DorcasTabithaBundle_assistance_delete_program", array("assistance_id" => $this->getAttribute($this->getContext($context, "assistance"), "assistanceid")));
                    // line 195
                    echo "                <input type=\"button\" value=\"Del\" onClick=\"location.href='";
                    echo twig_escape_filter($this->env, $this->getContext($context, "urlpath"), "html", null, true);
                    echo "'\" />
            ";
                }
                // line 197
                echo "
            <br>
            <hr size=\"0\" color=\"black\" noshade/>
        </article>
    ";
            }
            // line 202
            echo "    ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['assistance'], $context['_parent'], $context['loop']);
        $context = array_merge($_parent, array_intersect_key($context, $_parent));
        // line 203
        echo "    ";
        if (($this->getContext($context, "spstatus") == 0)) {
            // line 204
            echo "        <p>There are no special programs for this client. </p>
    ";
        }
        // line 206
        echo "
";
    }

    public function getTemplateName()
    {
        return "DorcasTabithaBundle:Assistance:assistanceloop.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  402 => 206,  398 => 204,  395 => 203,  389 => 202,  382 => 197,  376 => 195,  374 => 194,  369 => 193,  366 => 192,  364 => 191,  361 => 190,  359 => 189,  357 => 188,  351 => 185,  345 => 182,  339 => 179,  333 => 176,  326 => 172,  322 => 170,  319 => 169,  317 => 168,  313 => 167,  311 => 166,  282 => 140,  276 => 137,  270 => 134,  264 => 131,  258 => 128,  251 => 123,  249 => 122,  244 => 119,  240 => 117,  237 => 116,  229 => 113,  221 => 107,  218 => 106,  215 => 105,  212 => 104,  210 => 103,  207 => 102,  201 => 100,  199 => 99,  194 => 98,  191 => 97,  189 => 96,  186 => 95,  184 => 94,  182 => 93,  176 => 90,  170 => 87,  164 => 84,  158 => 81,  152 => 78,  146 => 75,  139 => 71,  135 => 69,  132 => 68,  130 => 66,  127 => 65,  123 => 64,  121 => 63,  119 => 62,  117 => 61,  115 => 60,  113 => 59,  80 => 28,  76 => 26,  74 => 25,  66 => 22,  63 => 21,  61 => 20,  58 => 19,  52 => 17,  49 => 16,  46 => 15,  44 => 14,  39 => 12,  36 => 11,  34 => 10,  30 => 8,  26 => 7,  24 => 6,  17 => 1,);
    }
}
