<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;

/* @ApteqPeriodical/admin/Order/periodical.twig */
class __TwigTemplate_d996504629bf1bbd624e8cd9bf1fe03872384d10900e9075a0216925d1fca826 extends \Eccube\Twig\Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->parent = false;

        $this->blocks = [
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 1
        echo "<script>
    \$(function () {
        \$('.teikiInfo___append').insertAfter(\$('#order-product'));
        
        // 定期購入・次回の受注データを作成
        \$('#next_order').on('click', function() {
            if (confirm(\"次回の注文データを作成しますか？\")){
                \$('#form1').append('<input type=\"hidden\" name=\"mode\" value=\"add_next_periodical\">');
                //\$('#form1').append('<input type=\"hidden\" name=\"preodical_id\" value=\"'+";
        // line 9
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["Periodical"] ?? null), "id", [], "any", false, false, false, 9), "html", null, true);
        echo "+'\">');
                //document.form1.mode.value = \"add_next_periodical\";
                document.form1.submit();
            }
        });
    })
</script>

<div class=\"teikiInfo___append card rounded border-0 mb-4\">
    <a id=\"teikiInfo\"></a>
    <div class=\"card-header\">
        <div class=\"row\">
            <div class=\"col-8\">
                <span class=\"card-title\">定期購入商品情報</span>
            </div>
        </div>
    </div>
    <div class=\"card-body\">
        <div class=\"row\">
            <div class=\"col-3\">
                <span class=\"card-title\">定期ID</span>
            </div>
            <div class=\"col-9\">
                ";
        // line 32
        echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, ($context["Periodical"] ?? null), "id", [], "any", false, false, false, 32), "html", null, true);
        echo "
            </div>
        </div>
        <div class=\"row mt-2\">
            <div class=\"col-3\">
                <span class=\"card-title\">継続状況</span>
            </div>
            <div class=\"col-9\">
                <span class=\"mt-1\">
                    ";
        // line 41
        if ((twig_get_attribute($this->env, $this->source, ($context["Periodical"] ?? null), "periodical_status", [], "any", false, false, false, 41) == 1)) {
            // line 42
            echo "                        継続
                    ";
        } elseif ((twig_get_attribute($this->env, $this->source,         // line 43
($context["Periodical"] ?? null), "periodical_status", [], "any", false, false, false, 43) == 2)) {
            // line 44
            echo "                        休止
                    ";
        } else {
            // line 46
            echo "                        解約
                    ";
        }
        // line 48
        echo "                </span>
            
                <a class=\"btn btn-ec-regular\" data-toggle=\"modal\" data-target=\"#changePeriodical\">継続状況を変更する</a>
                <div class=\"modal fade\" id=\"changePeriodical\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"changePeriodical\" aria-hidden=\"true\">
                    <div class=\"modal-dialog modal-md\" role=\"document\">
                        <div class=\"modal-content\">
                            <div class=\"modal-header\">
                                <h5 class=\"modal-title\">定期購入継続状況を変更する</h5>
                                <button class=\"close\" type=\"button\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">×</span></button>
                            </div>
                            <div class=\"modal-body\">
                                <a class=\"btn btn-ec-conversion px-5 mb-4 mt-2\" href=\"";
        // line 59
        echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\IgnoreRoutingNotFoundExtension']->getPath("apteq_periodical_admin_order_cahnge_periodical_status", ["id" => twig_get_attribute($this->env, $this->source, ($context["Order"] ?? null), "id", [], "any", false, false, false, 59), "status" => 1]), "html", null, true);
        echo "\">継続</a>
                                <a class=\"btn btn-ec-conversion px-5 mb-4 mt-2\" href=\"";
        // line 60
        echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\IgnoreRoutingNotFoundExtension']->getPath("apteq_periodical_admin_order_cahnge_periodical_status", ["id" => twig_get_attribute($this->env, $this->source, ($context["Order"] ?? null), "id", [], "any", false, false, false, 60), "status" => 2]), "html", null, true);
        echo "\">休止</a>
                                <a class=\"btn btn-ec-conversion px-5 mb-4 mt-2\" href=\"";
        // line 61
        echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\IgnoreRoutingNotFoundExtension']->getPath("apteq_periodical_admin_order_cahnge_periodical_status", ["id" => twig_get_attribute($this->env, $this->source, ($context["Order"] ?? null), "id", [], "any", false, false, false, 61), "status" => 3]), "html", null, true);
        echo "\">解約</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class=\"row mt-2\">
            <div class=\"col-3\">
                <span class=\"card-title\">回数</span>
            </div>
            <div class=\"col-9\">
                 ";
        // line 73
        echo twig_escape_filter($this->env, ($context["count"] ?? null), "html", null, true);
        echo "回目 （";
        echo twig_escape_filter($this->env, ($context["total_count"] ?? null), "html", null, true);
        echo "回目の注文まで受付済み）
            </div>
        </div>
        <div class=\"row mt-2\">
            <div class=\"col-3\">
                <span class=\"card-title\">前回発送予定日</span>
            </div>
            <div class=\"col-9\">
                ";
        // line 81
        if ((null === twig_get_attribute($this->env, $this->source, ($context["PeriodicalDetail"] ?? null), "last_shipping_date", [], "any", false, false, false, 81))) {
            // line 82
            echo "                    ―
                ";
        } else {
            // line 83
            echo "                
                    ";
            // line 84
            echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getDateFormatFilter(twig_get_attribute($this->env, $this->source, ($context["PeriodicalDetail"] ?? null), "last_shipping_date", [], "any", false, false, false, 84), "", "Y年m月d日"), "html", null, true);
            echo "
                ";
        }
        // line 86
        echo "            </div>
        </div>
        <div class=\"row mt-2\">
            <div class=\"col-3\">
                <span class=\"card-title\">今回発送予定日</span>
            </div>
            <div class=\"col-6\"> 
                ";
        // line 93
        if ((null === twig_get_attribute($this->env, $this->source, ($context["PeriodicalDetail"] ?? null), "this_shipping_date", [], "any", false, false, false, 93))) {
            // line 94
            echo "                    希望なし
                ";
        } else {
            // line 95
            echo " 
                    ";
            // line 96
            echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getDateFormatFilter(twig_get_attribute($this->env, $this->source, ($context["PeriodicalDetail"] ?? null), "this_shipping_date", [], "any", false, false, false, 96), "", "Y年m月d日"), "html", null, true);
            echo "
                ";
        }
        // line 97
        echo "                
            </div>
        </div>
        <div class=\"row mt-2\">
            <div class=\"col-3\">
                <span class=\"card-title\">次回発送予定日</span>
            </div>
            <div class=\"col-9\">
                 ";
        // line 105
        echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getDateFormatFilter(twig_get_attribute($this->env, $this->source, ($context["PeriodicalDetail"] ?? null), "next_shipping_date", [], "any", false, false, false, 105), "", "Y年m月d日"), "html", null, true);
        echo "
            </div>
        </div>
        <div class=\"text-center m-3\">
            <a id=\"next_order\" class=\"btn btn-secondary text-white\" href=\"javascript:;\">次回の注文データを発行する</a>
        </div>
    </div>
    
</div>";
    }

    public function getTemplateName()
    {
        return "@ApteqPeriodical/admin/Order/periodical.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  196 => 105,  186 => 97,  181 => 96,  178 => 95,  174 => 94,  172 => 93,  163 => 86,  158 => 84,  155 => 83,  151 => 82,  149 => 81,  136 => 73,  121 => 61,  117 => 60,  113 => 59,  100 => 48,  96 => 46,  92 => 44,  90 => 43,  87 => 42,  85 => 41,  73 => 32,  47 => 9,  37 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "@ApteqPeriodical/admin/Order/periodical.twig", "/home/probiotech2/www/mamebio/app/Plugin/ApteqPeriodical/Resource/template/admin/Order/periodical.twig");
    }
}
