/** * BoxBilling markdown */ function twig_bbmd_filter(Twig_Environment $env, $value) { $value = twig_markdown_filter($env, $value); return $value; }
public function block_content($context, array $blocks = array()) { // line 14 echo "\n"; // line 15 $context["seller"] = $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "seller"); // line 16 $context["buyer"] = $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "buyer"); // line 17 $context["company"] = $this->getAttribute(isset($context["guest"]) ? $context["guest"] : null, "system_company"); // line 18 echo "\n"; // line 19 if ($this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "status") == "unpaid") { // line 20 echo "<div class=\"row\">\n<article class=\"span12 data-block decent\">\n<div class=\"data-container\">\n\n\n<header>\n <h2>"; // line 26 echo gettext("Payment methods"); echo "</h2>\n <p>"; // line 27 echo gettext("Please choose payment type and pay for your chosen products."); echo "</p>\n</header>\n<form method=\"post\" action=\""; // line 29 echo $this->env->getExtension('bb')->twig_bb_client_link_filter("api/guest/invoice/payment"); echo "\" class=\"api-form\" data-api-redirect=\""; echo $this->env->getExtension('bb')->twig_bb_client_link_filter("invoice/" . $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "hash"), array("auto_redirect" => 1)); echo "\">\n <input type=\"hidden\" name=\"hash\" value=\""; // line 30 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "hash"), "html", null, true); echo "\"/>\n "; // line 31 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["guest"]) ? $context["guest"] : null, "invoice_gateways")); foreach ($context['_seq'] as $context["_key"] => $context["gtw"]) { // line 32 echo " "; if (twig_in_filter($this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "currency"), $this->getAttribute(isset($context["gtw"]) ? $context["gtw"] : null, "accepted_currencies"))) { // line 33 echo " "; $context["banklink"] = $this->env->getExtension('bb')->twig_bb_client_link_filter("invoice/banklink"); // line 34 echo " <button type=\"button\" class=\"logo-"; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["gtw"]) ? $context["gtw"] : null, "code"), "html", null, true); echo " hover-popover\" type=\"radio\" name=\"gateway_id\" gateway_id=\""; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["gtw"]) ? $context["gtw"] : null, "id"), "html", null, true); echo "\" data-toggle=\"tooltip\" title=\""; echo gettext("Pay with"); echo " "; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["gtw"]) ? $context["gtw"] : null, "title"), "html", null, true); echo "\" onclick=\"window.location.replace('"; echo twig_escape_filter($this->env, isset($context["banklink"]) ? $context["banklink"] : null, "html", null, true); echo "/"; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "hash"), "html", null, true); echo "/"; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["gtw"]) ? $context["gtw"] : null, "id"), "html", null, true); echo "')\")></button>\n "; } // line 36 echo " "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['gtw'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 37 echo " <input type=\"hidden\" name=\"gateway_id\" id=\"gateway_id\">\n</form>\n</div>\n</article>\n</div>\n\n"; } // line 44 echo "\n<div class=\"row\">\n <article class=\"span12 data-block\">\n <div class=\"data-container\">\n\n <header>\n <h1>"; // line 50 echo gettext("Invoice"); echo " "; echo twig_escape_filter($this->env, isset($context["nr"]) ? $context["nr"] : null, "html", null, true); echo "</h1><br/>\n "; // line 51 echo gettext("You can print this invoice or export it to PDF file by clicking on corresponding button."); // line 52 echo " <ul class=\"data-header-actions\">\n <li><a href=\""; // line 53 echo $this->env->getExtension('bb')->twig_bb_client_link_filter("invoice/pdf"); echo "/"; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "hash"), "html", null, true); echo "\" class=\"btn btn-alt btn-inverse\">"; echo gettext("PDF"); echo "</a></li>\n <li><a href=\""; // line 54 echo $this->env->getExtension('bb')->twig_bb_client_link_filter("invoice/print"); echo "/"; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "hash"), "html", null, true); echo "\" target=\"_blank\" class=\"btn btn-alt btn-inverse\">"; echo gettext("Print"); echo "</a></li>\n </ul>\n </header>\n\n <section>\n <div class=\"row-fluid\">\n <div class=\"span4\">\n "; // line 61 if ($this->getAttribute(isset($context["company"]) ? $context["company"] : null, "logo_url")) { // line 62 echo " <img src=\""; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["company"]) ? $context["company"] : null, "logo_url"), "html", null, true); echo "\" alt=\"Logo\">\n "; } // line 64 echo " <dl class=\"dl-horizontal\">\n <dt>"; // line 65 echo gettext("Invoice number"); echo ":</dt>\n <dd>"; // line 66 echo twig_escape_filter($this->env, isset($context["nr"]) ? $context["nr"] : null, "html", null, true); echo "</dd>\n <dt>"; // line 67 echo gettext("Invoice date"); echo ":</dt>\n <dd>"; // line 68 if ($this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "paid_at")) { // line 69 echo " "; echo twig_escape_filter($this->env, $this->env->getExtension('bb')->twig_bb_date($this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "paid_at")), "html", null, true); echo "\n "; } else { // line 71 echo " "; echo twig_escape_filter($this->env, $this->env->getExtension('bb')->twig_bb_date($this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "created_at")), "html", null, true); echo "\n "; } // line 73 echo " </dd>\n <dt>"; // line 74 echo gettext("Due date"); echo ":</dt>\n <dd>"; // line 75 if ($this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "due_at")) { // line 76 echo " "; echo twig_escape_filter($this->env, $this->env->getExtension('bb')->twig_bb_date($this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "due_at")), "html", null, true); echo "\n "; } else { // line 78 echo " -----\n "; } // line 80 echo " </dd>\n <dt>"; // line 81 echo gettext("Invoice status"); echo ":</dt>\n <dd>\n <span class=\"label "; // line 83 if ($this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "status") == "paid") { echo " label-success"; } elseif ($this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "status") == "unpaid") { echo "label-warning"; } echo "\">\n "; // line 84 echo twig_escape_filter($this->env, twig_capitalize_string_filter($this->env, $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "status")), "html", null, true); echo "\n </span>\n </dd>\n </dl>\n </div>\n <div class=\"span4\">\n <div class=\"well small\">\n <h4>"; // line 91 echo gettext("Company"); echo "</h4>\n <dl class=\"dl-horizontal\">\n "; // line 93 if ($this->getAttribute(isset($context["seller"]) ? $context["seller"] : null, "company")) { // line 94 echo " <dt>"; echo gettext("Name"); echo ":</dt>\n <dd>"; // line 95 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["seller"]) ? $context["seller"] : null, "company"), "html", null, true); echo "</dd>\n "; } // line 97 echo "\n "; // line 98 if ($this->getAttribute(isset($context["seller"]) ? $context["seller"] : null, "company_vat")) { // line 99 echo " <dt>"; echo gettext("VAT"); echo ":</dt>\n <dd>"; // line 100 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["seller"]) ? $context["seller"] : null, "company_vat"), "html", null, true); echo "</dd>\n "; } // line 102 echo "\n "; // line 103 if ($this->getAttribute(isset($context["seller"]) ? $context["seller"] : null, "address")) { // line 104 echo " <dt>"; echo gettext("Address"); echo ":</dt>\n <dd>"; // line 105 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["seller"]) ? $context["seller"] : null, "address"), "html", null, true); echo "</dd>\n "; } // line 107 echo "\n "; // line 108 if ($this->getAttribute(isset($context["seller"]) ? $context["seller"] : null, "phone")) { // line 109 echo " <dt>"; echo gettext("Phone"); echo ":</dt>\n <dd>"; // line 110 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["seller"]) ? $context["seller"] : null, "phone"), "html", null, true); echo "</dd>\n "; } // line 112 echo "\n "; // line 113 if ($this->getAttribute(isset($context["seller"]) ? $context["seller"] : null, "email")) { // line 114 echo " <dt>"; echo gettext("Email"); echo ":</dt>\n <dd>"; // line 115 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["seller"]) ? $context["seller"] : null, "email"), "html", null, true); echo "</dd>\n "; } // line 117 echo "\n "; // line 118 if ($this->getAttribute(isset($context["seller"]) ? $context["seller"] : null, "account_number")) { // line 119 echo " <dt>"; echo gettext("Account"); echo ":</dt>\n <dd>"; // line 120 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["seller"]) ? $context["seller"] : null, "account_number"), "html", null, true); echo "</dd>\n "; } // line 122 echo "\n "; // line 123 if ($this->getAttribute(isset($context["seller"]) ? $context["seller"] : null, "note")) { // line 124 echo " <dt>"; echo gettext("Note"); echo ":</dt>\n <dd>"; // line 125 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["seller"]) ? $context["seller"] : null, "note"), "html", null, true); echo "</dd>\n "; } // line 127 echo " </dl>\n\n </div>\n </div>\n\n\n <div class=\"span4\">\n <div class=\"well small\">\n <h4>"; // line 135 echo gettext("Billing & Delivery address"); echo "</h4>\n <dl class=\"dl-horizontal\">\n "; // line 137 if ($this->getAttribute(isset($context["buyer"]) ? $context["buyer"] : null, "first_name") || $this->getAttribute(isset($context["buyer"]) ? $context["buyer"] : null, "last_name")) { // line 138 echo " <dt>"; echo gettext("Name"); echo ":</dt>\n <dd>"; // line 139 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["buyer"]) ? $context["buyer"] : null, "first_name"), "html", null, true); echo " "; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["buyer"]) ? $context["buyer"] : null, "last_name"), "html", null, true); echo "</dd>\n "; } // line 141 echo "\n "; // line 142 if ($this->getAttribute(isset($context["buyer"]) ? $context["buyer"] : null, "company")) { // line 143 echo " <dt>"; echo gettext("Company"); echo ":</dt>\n <dd>"; // line 144 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["buyer"]) ? $context["buyer"] : null, "company"), "html", null, true); echo "</dd>\n "; } // line 146 echo "\n "; // line 147 if ($this->getAttribute(isset($context["buyer"]) ? $context["buyer"] : null, "company_number")) { // line 148 echo " <dt>"; echo gettext("Company number"); echo ":</dt>\n <dd>"; // line 149 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["buyer"]) ? $context["buyer"] : null, "company_number"), "html", null, true); echo "</dd>\n "; } // line 151 echo "\n "; // line 152 if ($this->getAttribute(isset($context["buyer"]) ? $context["buyer"] : null, "company_vat")) { // line 153 echo " <dt>"; echo gettext("Company VAT"); echo ":</dt>\n <dd>"; // line 154 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["buyer"]) ? $context["buyer"] : null, "company_vat"), "html", null, true); echo "</dd>\n "; } // line 156 echo "\n "; // line 157 if ($this->getAttribute(isset($context["buyer"]) ? $context["buyer"] : null, "address")) { // line 158 echo " <dt>"; echo gettext("Address"); echo ":</dt>\n <dd>"; // line 159 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["buyer"]) ? $context["buyer"] : null, "address"), "html", null, true); echo "</dd>\n <dd>"; // line 160 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["buyer"]) ? $context["buyer"] : null, "city"), "html", null, true); echo ", "; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["buyer"]) ? $context["buyer"] : null, "state"), "html", null, true); echo "</dd>\n <dd>"; // line 161 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["buyer"]) ? $context["buyer"] : null, "zip"), "html", null, true); echo ", "; echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["guest"]) ? $context["guest"] : null, "system_countries"), $this->getAttribute(isset($context["buyer"]) ? $context["buyer"] : null, "country"), array(), "array"), "html", null, true); echo "</dd>\n "; } // line 163 echo "\n "; // line 164 if ($this->getAttribute(isset($context["buyer"]) ? $context["buyer"] : null, "phone")) { // line 165 echo " <dt>"; echo gettext("Phone"); echo ":</dt>\n <dd>"; // line 166 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["buyer"]) ? $context["buyer"] : null, "phone"), "html", null, true); echo "</dd>\n "; } // line 168 echo " </dl>\n </div>\n </div>\n </div>\n\n "; // line 173 if ($this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "text_1")) { // line 174 echo " <div class=\"well\">\n "; // line 175 echo twig_markdown_filter($this->env, $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "text_1")); echo "\n </div>\n "; } // line 178 echo "\n <table class=\"table table-striped table-bordered table-condensed table-hover\">\n <thead>\n <tr>\n <th>"; // line 182 echo gettext("#"); echo "</th>\n <th>"; // line 183 echo gettext("Title"); echo "</th>\n <th>"; // line 184 echo gettext("Price"); echo "</th>\n <th>"; // line 185 echo gettext("Total"); echo "</th>\n </tr>\n </thead>\n <tbody>\n "; // line 189 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "lines")); foreach ($context['_seq'] as $context["i"] => $context["item"]) { // line 190 echo " <tr>\n <td>"; // line 191 echo twig_escape_filter($this->env, (isset($context["i"]) ? $context["i"] : null) + 1, "html", null, true); echo ".</td>\n <td>\n "; // line 193 if ($this->getAttribute(isset($context["item"]) ? $context["item"] : null, "order_id")) { // line 194 echo " <a href=\""; echo $this->env->getExtension('bb')->twig_bb_client_link_filter("/order/service"); echo "/manage/"; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["item"]) ? $context["item"] : null, "order_id"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["item"]) ? $context["item"] : null, "title"), "html", null, true); echo "</a>\n "; } else { // line 196 echo " "; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["item"]) ? $context["item"] : null, "title"), "html", null, true); echo "\n "; } // line 198 echo " </td>\n <td>\n "; // line 200 echo twig_money($this->env, $this->getAttribute(isset($context["item"]) ? $context["item"] : null, "price"), $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "currency")); echo "\n "; // line 201 if ($this->getAttribute(isset($context["item"]) ? $context["item"] : null, "quantity") > 1) { // line 202 echo " x "; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["item"]) ? $context["item"] : null, "quantity"), "html", null, true); echo " "; // line 203 echo " "; } // line 204 echo " </td>\n <td >"; // line 205 echo twig_money($this->env, $this->getAttribute(isset($context["item"]) ? $context["item"] : null, "total"), $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "currency")); echo "</td>\n </tr>\n\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['i'], $context['item'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 209 echo " </tbody>\n\n </table>\n\n <div class=\"row-fluid\">\n <div class=\"span4 offset8\">\n <table class=\"table table-bordered table-striped\">\n "; // line 216 if ($this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "tax") > 0) { // line 217 echo " <tr>\n <td>"; // line 218 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "taxname"), "html", null, true); echo " "; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "taxrate"), "html", null, true); echo "%</td>\n <td>"; // line 219 echo twig_money($this->env, $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "tax"), $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "currency")); echo "</td>\n </tr>\n "; } // line 222 echo " "; if ($this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "discount") > 0) { // line 223 echo " <tr>\n <td>"; // line 224 echo gettext("Discount"); echo "</td>\n <td>"; // line 225 echo twig_money($this->env, $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "discount"), $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "currency")); echo "</td>\n </tr>\n "; } // line 228 echo "\n <tr>\n <td><strong>"; // line 230 echo gettext("Total"); echo "</strong></td>\n <td><strong>"; // line 231 echo twig_money($this->env, $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "total"), $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "currency")); echo "</strong></td>\n </tr>\n </table>\n </div>\n </div>\n\n "; // line 237 if ($this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "text_2")) { // line 238 echo " <div class=\"well\">\n "; // line 239 echo twig_markdown_filter($this->env, $this->getAttribute(isset($context["invoice"]) ? $context["invoice"] : null, "text_2")); echo "\n </div>\n "; } // line 242 echo " </section>\n </div>\n </article>\n</div>\n"; }