src/Eccube/Resource/template/admin/Order/edit.twig line 1

Open in your IDE?
  1. {#
  2. This file is part of EC-CUBE
  3. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  4. http://www.ec-cube.co.jp/
  5. For the full copyright and license information, please view the LICENSE
  6. file that was distributed with this source code.
  7. #}
  8. {% extends '@admin/default_frame.twig' %}
  9. {% set menus = ['order', 'order_edit'] %}
  10. {% block title %}{{ 'admin.order.order_registration'|trans }}{% endblock %}
  11. {% block sub_title %}{{ 'admin.order.order_management'|trans }}{% endblock %}
  12. {% form_theme form '@admin/Form/bootstrap_4_horizontal_layout.html.twig' %}
  13. {% form_theme searchCustomerModalForm '@admin/Form/bootstrap_4_horizontal_layout.html.twig' %}
  14. {% form_theme searchProductModalForm '@admin/Form/bootstrap_4_horizontal_layout.html.twig' %}
  15. {% block javascript %}
  16.     <script src="https://yubinbango.github.io/yubinbango/yubinbango.js" charset="UTF-8"></script>
  17.     <script>
  18.         $(function() {
  19.             // 項目数が多く、入力している項目によってEnter押下時に期待する動作が変わるので、いったん禁止
  20.             $('input').on('keydown', function(e) {
  21.                 if ((e.which && e.which === 13) || (e.keyCode && e.keyCode === 13)) {
  22.                     return false;
  23.                 } else {
  24.                     return true;
  25.                 }
  26.             });
  27.             // 会員検索
  28.             $('#searchCustomerModalButton').on('click', function() {
  29.                 var list = $('#searchCustomerModalList');
  30.                 list.children().remove();
  31.                 $.ajax({
  32.                     url: '{{ url('admin_order_search_customer_html') }}',
  33.                     type: 'POST',
  34.                     dataType: 'html',
  35.                     data: {'search_word': $('#admin_search_customer_multi').val()}
  36.                 }).done(function(data) {
  37.                     $('#searchCustomerModalList').html(data);
  38.                 }).fail(function(data) {
  39.                     alert('search customer failed.');
  40.                 });
  41.             });
  42.             // 商品検索
  43.             $('#searchProductModalButton').on('click', function() {
  44.                 var list = $('#searchProductModalList');
  45.                 list.children().remove();
  46.                 $.ajax({
  47.                     url: '{{ url('admin_order_search_product') }}',
  48.                     type: 'POST',
  49.                     dataType: 'html',
  50.                     data: {
  51.                         'id': $('#admin_search_product_id').val(),
  52.                         'category_id': $('#admin_search_product_category_id').val()
  53.                     }
  54.                 }).done(function(data) {
  55.                     $('#searchProductModalList').html(data);
  56.                 }).fail(function(data) {
  57.                     alert('search product failed.');
  58.                 });
  59.             });
  60.             // その他明細
  61.             $('#addOrderItemType').on('show.bs.modal', function(e) {
  62.                 var list = $('#searchOrderItemTypeList');
  63.                 list.children().remove();
  64.                 $.ajax({
  65.                     url: '{{ url('admin_order_search_order_item_type') }}',
  66.                     type: 'POST',
  67.                     dataType: 'html'
  68.                 }).done(function(data) {
  69.                     $('#searchOrderItemTypeList').html(data);
  70.                 }).fail(function(data) {
  71.                     alert('search order item type failed.');
  72.                 });
  73.             });
  74.             // ページング処理
  75.             $(document).on('click', '#searchProductModalList ul.pagination li.page-item a.page-link', function(e) {
  76.                 e.preventDefault();
  77.                 var list = $('#searchProductModalList');
  78.                 list.children().remove();
  79.                 var url = $(this).attr('href');
  80.                 $.ajax({
  81.                     url: url,
  82.                     type: 'GET',
  83.                     dataType: 'html'
  84.                 }).done(function(data) {
  85.                     $('#searchProductModalList').html(data);
  86.                 }).fail(function(data) {
  87.                     alert('search product failed.');
  88.                 });
  89.             });
  90.             // 商品追加
  91.             $collectionHolder = $('#table-form-field');
  92.             index = $collectionHolder.find('tbody > tr').length;
  93.             formIdPrefix = '#order_OrderItems_';
  94.             if (index > 0) {
  95.                 let row = '#' + $collectionHolder.find('tbody > tr').last().data("row");
  96.                 index = row.replace(formIdPrefix, '');
  97.             }
  98.             $(document).on('click', '.delete', function(e) {
  99.                 // 商品削除
  100.                 $(this).parents('tr').remove();
  101.                 index--;
  102.                 $("#calculate").trigger('click');
  103.             });
  104.             // 計算結果の更新が押されたらページ内リンクさせる
  105.             $('.btn').click(function() {
  106.                 var data = $(this).data();
  107.                 if (data.link) {
  108.                     $('#form1').attr('action', '#' + data.link).submit();
  109.                     return false;
  110.                 }
  111.             });
  112.             // 注文者情報をコピー
  113.             $('.copy-customer').on('click', function() {
  114.                 $('#order_Shipping_name_name01').val($('#order_name_name01').val());
  115.                 $('#order_Shipping_name_name02').val($('#order_name_name02').val());
  116.                 $('#order_Shipping_kana_kana01').val($('#order_kana_kana01').val());
  117.                 $('#order_Shipping_kana_kana02').val($('#order_kana_kana02').val());
  118.                 $('#order_Shipping_postal_code').val($('#order_postal_code').val());
  119.                 $('#order_Shipping_address_pref').val($('#order_address_pref').val());
  120.                 $('#order_Shipping_address_addr01').val($('#order_address_addr01').val());
  121.                 $('#order_Shipping_address_addr02').val($('#order_address_addr02').val());
  122.                 $('#order_Shipping_email').val($('#order_email').val());
  123.                 $('#order_Shipping_phone_number').val($('#order_phone_number').val());
  124.                 $('#order_Shipping_company_name').val($('#order_company_name').val());
  125.             });
  126.             // PDF出力(単一)
  127.             $('.pdf-print').click(function() {
  128.                 window.open(this.href, 'newwin', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=700, height=700');
  129.                 return false;
  130.             });
  131.             // お届け時間の初期表示
  132.             $('#order_Shipping_Delivery').change();
  133.             var confirmFormChange = function(form, target, modal) {
  134.                 var returnLink = form.find('input[type="hidden"][name*="return_link"]'),
  135.                     saveBtn = modal.find('a[data-action="save"]'),
  136.                     cancelBtn = modal.find('a[data-action="cancel"]');
  137.                 modal.on('hidden.bs.modal', function() {
  138.                     returnLink.val('');
  139.                 });
  140.                 saveBtn.on('click', function() {
  141.                     returnLink.val($(this).data('return-link'));
  142.                     $(this).addClass('disabled');
  143.                     $('#form1').append('<input type="hidden" name="mode" value="register">');
  144.                     form.submit();
  145.                 });
  146.                 target.on('click', function() {
  147.                     modal.find('.modal-body .screen-name').text($(this).attr('title'));
  148.                     modal.modal('show');
  149.                     saveBtn.data('return-link', $(this).attr('href'));
  150.                     cancelBtn.attr('href', $(this).attr('href'));
  151.                     return false;
  152.                 });
  153.             };
  154.             confirmFormChange($('#form1'), $('a[data-action="confirm"]'), $('#confirmFormChangeModal'))
  155.             // 配送業者選択時にお届け時間を設定
  156.             var times = {{ shippingDeliveryTimes|raw }};
  157.             $('#order_Shipping_Delivery').change(function() {
  158.                 var deliveryId = $(this).val();
  159.                 var $shippingDeliveryTime = $('#order_Shipping_DeliveryTime');
  160.                 $shippingDeliveryTime.find('option').remove();
  161.                 $shippingDeliveryTime.append($('<option></option>').val('').text('{{ 'admin.common.select__unspecified'|trans }}'));
  162.                 if (typeof(times[deliveryId]) !== 'undefined') {
  163.                     for (var timeId in times[deliveryId]) {
  164.                         timeValue = times[deliveryId][timeId];
  165.                         $shippingDeliveryTime.append($('<option></option>')
  166.                             .val(timeId)
  167.                             .text(timeValue));
  168.                     }
  169.                 }
  170.             });
  171.         });
  172.         {# ポイント機能が有効かつ会員の場合のみポイントの割引金額を変更する #}
  173.         {% if BaseInfo.isOptionPoint and Order.Customer is not null %}
  174.             // 再計算時のポイントの割引金額の更新
  175.             function updatePointItem() {
  176.                 // ポイント換算レート
  177.                 var pointConversionRate = {{ BaseInfo.point_conversion_rate }};
  178.                 // 利用ポイント
  179.                 var usePoint = $('#order_use_point').val();
  180.                 // 利用ポイントが数値以外の時は割引金額を更新しない
  181.                 if (isNaN(usePoint)) return;
  182.                 // 割引金額を計算
  183.                 var discountPrice = (-1) * pointConversionRate * usePoint;
  184.                 // ポイント明細の金額の要素を取得
  185.                 var $pointPrice = $('.pointPrice');
  186.                 // ポイント明細の金額の要素がある場合はポイントの更新
  187.                 if ($pointPrice.length) {
  188.                     $pointPrice.val(discountPrice);
  189.                 }
  190.             }
  191.         {% endif %}
  192.     </script>
  193. {% endblock javascript %}
  194. {% block main %}
  195.     {# 決済処理中/購入処理中ステータスは登録・更新等の操作を無効にする #}
  196.     {% set action_disabled = false %}
  197.     {% if Order.OrderStatus is not empty and Order.OrderStatus.id in [
  198.         constant('Eccube\\Entity\\Master\\OrderStatus::PROCESSING'), constant('Eccube\\Entity\\Master\\OrderStatus::PENDING')] -%}
  199.         {% set action_disabled = true %}
  200.     {%- endif %}
  201.     <!-- 移動確認モーダル-->
  202.     <div class="modal fade" id="confirmFormChangeModal" tabindex="-1" role="dialog"
  203.          aria-labelledby="confirmFormChangeModal" aria-hidden="true">
  204.         <div class="modal-dialog" role="document">
  205.             <div class="modal-content">
  206.                 <div class="modal-header">
  207.                     <h5 class="modal-title">{{ 'admin.common.move_to_confirm_title'|trans }}</h5>
  208.                     <button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Close">
  209.                     </button>
  210.                 </div>
  211.                 <div class="modal-body">
  212.                     <p class="screen-name"></p>
  213.                 </div>
  214.                 <div class="modal-footer">
  215.                     <a class="btn btn-ec-conversion" data-action="save" href="javascript:void(0)">
  216.                         {{ 'admin.common.move_to_confirm_save_and_move'|trans }}
  217.                     </a>
  218.                     <a class="btn btn-ec-sub" data-action="cancel" href="javascript:void(0)">
  219.                         {{ 'admin.common.move_to_confirm_move_only'|trans }}
  220.                     </a>
  221.                 </div>
  222.             </div>
  223.         </div>
  224.     </div>
  225.     <form name="form1" id="form1" method="post" action="?"{% if BaseInfo.isOptionPoint and Order.Customer is not null %} onsubmit="updatePointItem()"{% endif %}>
  226.         <input type="hidden" name="mode" value="">
  227.         {{ form_widget(form._token) }}
  228.         {{ form_widget(form.return_link) }}
  229.         <div class="c-contentsArea__cols">
  230.             <div class="c-contentsArea__primaryCol">
  231.                 <div class="c-primaryCol">
  232.                     <div class="card rounded border-0 mb-4">
  233.                         <div class="card-header">
  234.                             <div class="row">
  235.                                 <div class="col-8">
  236.                                     <div class="d-inline-block" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ 'tooltip.order.order_info'|trans }}"><span class="card-title">{{ 'admin.order.order_info'|trans }}</span><i class="fa fa-question-circle fa-lg ms-1"></i></div>
  237.                                 </div>
  238.                                 <div class="col-4 text-end"><a data-bs-toggle="collapse" href="#orderOverview" aria-expanded="false" aria-controls="orderOverview"><i class="fa fa-angle-up fa-lg"></i></a></div>
  239.                             </div>
  240.                         </div>
  241.                         <div class="collapse show ec-cardCollapse" id="orderOverview">
  242.                             <div class="card-body">
  243.                                 <div class="row">
  244.                                     <div class="col-6">
  245.                                         <div class="row mb-3">
  246.                                             <div class="col-3" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ 'tooltip.order.order_no'|trans }}">{{ 'admin.order.order_no'|trans }}<i class="fa fa-question-circle fa-lg ms-1"></i></div>
  247.                                             <div class="col">{{ Order.order_no }}</div>
  248.                                         </div>
  249.                                         <div class="row mb-3">
  250.                                             <label class="col-3 col-form-label" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ 'tooltip.order.order_status'|trans }}">{{ 'admin.order.order_status'|trans }}<i class="fa fa-question-circle fa-lg ms-1"></i></label>
  251.                                             <div class="col">
  252.                                                 {% if Order.id is not empty %}
  253.                                                     {{ form_widget(form.OrderStatus) }}
  254.                                                     {{ form_errors(form.OrderStatus) }}
  255.                                                 {% endif %}
  256.                                             </div>
  257.                                         </div>
  258.                                         <div class="row mb-3">
  259.                                             <label class="col-3 col-form-label">{{ 'admin.common.payment_method'|trans }}</label>
  260.                                             <div class="col">
  261.                                                 {{ form_widget(form.Payment) }}
  262.                                                 {{ form_errors(form.Payment) }}
  263.                                                 <p class="form-text fw-bold text-danger mb-0">{{ 'admin.order.change_payment_method_message'|trans }}</p>
  264.                                             </div>
  265.                                         </div>
  266.                                     </div>
  267.                                     <div class="col-6">
  268.                                         <div class="row mb-3">
  269.                                             <div class="col-3"><i class="fa fa-inbox fa-fw me-1" aria-hidden="true"></i>{{ 'admin.order.order_date'|trans }}</div>
  270.                                             <div class="col">{{ Order.order_date ? Order.order_date|date_sec : '' }}</div>
  271.                                         </div>
  272.                                         <div class="row mb-3">
  273.                                             <div class="col-3"><i class="fa fa-money fa-fw me-1" aria-hidden="true"></i>{{ 'admin.order.payment_date'|trans }}</div>
  274.                                             <div class="col">{{ Order.payment_date ? Order.payment_date|date_sec : '' }}</div>
  275.                                         </div>
  276.                                         {% if not Order.isMultiple %}
  277.                                             <div class="row mb-3">
  278.                                                 <div class="col-3"><i class="fa fa-truck fa-fw me-1" aria-hidden="true"></i>{{ 'admin.order.shipping_date'|trans }}</div>
  279.                                                 <div class="col">
  280.                                                     {{ Order.Shippings[0].shipping_date|date_sec }}
  281.                                                 </div>
  282.                                             </div>
  283.                                         {% endif %}
  284.                                         <div class="row mb-3">
  285.                                             <div class="col-3"><i class="fa fa-refresh fa-fw me-1" aria-hidden="true"></i>{{ 'admin.common.update_date'|trans }}</div>
  286.                                             <div class="col">{{ Order.update_date ? Order.update_date|date_sec : '' }}</div>
  287.                                         </div>
  288.                                         <div class="row mb-3">
  289.                                             <div class="col-3"><i class="fa fa-mobile fa-fw me-1" aria-hidden="true"></i>{{ 'admin.common.device_type'|trans }}</div>
  290.                                             <div class="col">{{ Order.device_type }}</div>
  291.                                         </div>
  292.                                         <div class="row mb-3">
  293.                                             <div class="col-3"><i class="fa fa-commenting fa-fw me-1" aria-hidden="true"></i>{{ 'admin.order.message'|trans }}</div>
  294.                                             <div class="col">{{ Order.message ? Order.message|nl2br : '' }}</div>
  295.                                         </div>
  296.                                     </div>
  297.                                 </div>
  298.                                 {# エンティティ拡張の自動出力 #}
  299.                                 {% for f in form|filter(f => f.vars.eccube_form_options.auto_render) %}
  300.                                     {% if f.vars.eccube_form_options.form_theme %}
  301.                                         {% form_theme f f.vars.eccube_form_options.form_theme %}
  302.                                         {{ form_row(f) }}
  303.                                     {% else %}
  304.                                         <div class="row">
  305.                                             <div class="col-6">
  306.                                                 <div class="row mb-3">
  307.                                                     <div class="col-3">
  308.                                                         <span>{{ f.vars.label|trans }}</span>
  309.                                                     </div>
  310.                                                     <div class="col">
  311.                                                         {{ form_widget(f) }}
  312.                                                         {{ form_errors(f) }}
  313.                                                     </div>
  314.                                                 </div>
  315.                                             </div>
  316.                                         </div>
  317.                                     {% endif %}
  318.                                 {% endfor %}
  319.                             </div>
  320.                         </div>
  321.                     </div><!-- .card.rounded -->
  322.                     <div class="card rounded border-0 mb-4">
  323.                         <div class="card-header">
  324.                             <div class="row">
  325.                                 <div class="col-2">
  326.                                     <div class="d-inline-block"><span class="card-title">{{ 'admin.order.orderer'|trans }}</span></div>
  327.                                 </div>
  328.                                 <div class="col">{% if id %}<span class="me-5">{% if form.Customer.vars.value is empty %}{{ 'admin.order.non_member'|trans }}{% else %}<a href="{{ url('admin_customer_edit', {'id': form.Customer.vars.value}) }}">{{ form.Customer.vars.value }}</a>{% endif %}</span>{{ Order.full_name }} ({{ Order.full_name_kana }}) 〒{{ Order.postal_code }} {{ Order.pref }}{{ Order.addr01 }}{{ Order.addr02 }} {{ Order.email }}{% endif %}</div>
  329.                                 <div class="col-1 text-end"><a class="d-block" data-bs-toggle="collapse" href="#ordererInfo" aria-expanded="false" aria-controls="ordererInfo"><i class="fa {{ id ? 'fa-angle-down' : 'fa-angle-up' }} fa-lg"></i></a></div>
  330.                             </div>
  331.                         </div>
  332.                         <div class="collapse {{ id ? '' : 'show' }} ec-cardCollapse h-adr" id="ordererInfo">
  333.                             <span class="p-country-name" style="display:none;">Japan</span>
  334.                             <div class="card-body">
  335.                                 {% if Order.id is empty %}
  336.                                     <div class="row mb-3">
  337.                                         <div class="col-auto">
  338.                                             <a class="btn btn-ec-regular px-3" data-bs-toggle="modal" data-bs-target="#searchCustomerModal">{{ 'admin.order.search_from_customer'|trans }}</a>
  339.                                         </div>
  340.                                     </div>
  341.                                     <!-- 会員検索モーダル -->
  342.                                     <div class="modal fade" id="searchCustomerModal" tabindex="-1" role="dialog" aria-labelledby="searchCustomerModal" aria-hidden="true">
  343.                                         <div class="modal-dialog modal-lg" role="document">
  344.                                             <div class="modal-content">
  345.                                                 <div class="modal-header">
  346.                                                     <h5 class="modal-title fw-bold">{{ 'admin.order.search_customer_title'|trans }}</h5>
  347.                                                     <button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Close"></button>
  348.                                                 </div>
  349.                                                 <div class="modal-body">
  350.                                                     {{ form_widget(searchCustomerModalForm.multi, { attr : {'class': 'mb-2searchCustomerModal', placeholder : 'admin.customer.multi_search_label' }}) }}
  351.                                                     <button type="button" id="searchCustomerModalButton" class="btn btn-ec-conversion px-5 mb-4 mt-2">{{ 'admin.common.search'|trans }}</button>
  352.                                                     <div class="mb-3" id="searchCustomerModalList"></div>
  353.                                                 </div>
  354.                                             </div>
  355.                                         </div>
  356.                                     </div>
  357.                                 {% endif %}
  358.                                 <div class="row">
  359.                                     <div class="col-6">
  360.                                         <div class="row">
  361.                                             <label class="col-3 col-form-label" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ 'tooltip.order.customer_id'|trans }}">{{ 'admin.customer.customer_id'|trans }}<i class="fa fa-question-circle fa-lg ms-1"></i></label>
  362.                                             <div class="col">
  363.                                                 <p id="order_CustomerId">{% if form.Customer.vars.value is empty %}{{ 'admin.order.non_member'|trans }}{% else %}<a href="{{ url('admin_customer_edit', {'id': form.Customer.vars.value}) }}">{{ form.Customer.vars.value }}</a>{% endif %}</p>
  364.                                                 {{ form_widget(form.Customer) }}
  365.                                                 {{ form_errors(form.Customer) }}
  366.                                             </div>
  367.                                         </div>
  368.                                         <div class="row mb-3">
  369.                                             <label class="col-3 col-form-label">{{ 'admin.common.name'|trans }}<span class="badge bg-primary ms-1">{{ 'admin.common.required'|trans }}</span></label>
  370.                                             <div class="col">
  371.                                                 <div class="row">
  372.                                                     <div class="col">
  373.                                                         {{ form_widget(form.name.name01) }}
  374.                                                         {{ form_errors(form.name.name01) }}
  375.                                                     </div>
  376.                                                     <div class="col">
  377.                                                         {{ form_widget(form.name.name02) }}
  378.                                                         {{ form_errors(form.name.name02) }}
  379.                                                     </div>
  380.                                                 </div>
  381.                                             </div>
  382.                                         </div>
  383.                                         <div class="row mb-3">
  384.                                             <label class="col-3 col-form-label">{{ 'admin.common.kana'|trans }}<span class="badge bg-primary ms-1">{{ 'admin.common.required'|trans }}</span></label>
  385.                                             <div class="col">
  386.                                                 <div class="row">
  387.                                                     <div class="col">
  388.                                                         {{ form_widget(form.kana.kana01) }}
  389.                                                         {{ form_errors(form.kana.kana01) }}
  390.                                                     </div>
  391.                                                     <div class="col">
  392.                                                         {{ form_widget(form.kana.kana02) }}
  393.                                                         {{ form_errors(form.kana.kana02) }}
  394.                                                     </div>
  395.                                                 </div>
  396.                                             </div>
  397.                                         </div>
  398.                                         <div class="row mb-3">
  399.                                             <label class="col-3 col-form-label">{{ 'admin.common.address'|trans }}<span class="badge bg-primary ms-1">{{ 'admin.common.required'|trans }}</span></label>
  400.                                             <div class="col">
  401.                                                 <div class="row mb-3">
  402.                                                     <div class="col row align-items-center">
  403.                                                         <span class="col-auto">{{ 'admin.common.postal_symbol'|trans }}</span>
  404.                                                         <span class="col-auto ps-0">{{ form_widget(form.postal_code) }}</span>
  405.                                                         {{ form_errors(form.postal_code) }}
  406.                                                     </div>
  407.                                                 </div>
  408.                                                 <div class="row mb-3">
  409.                                                     <div class="col">
  410.                                                         {{ form_widget(form.address.pref) }}
  411.                                                         {{ form_errors(form.address.pref) }}
  412.                                                     </div>
  413.                                                 </div>
  414.                                                 <div class="row mb-3">
  415.                                                     <div class="col">
  416.                                                         {{ form_widget(form.address.addr01) }}
  417.                                                         {{ form_errors(form.address.addr01) }}
  418.                                                     </div>
  419.                                                 </div>
  420.                                                 <div class="row">
  421.                                                     <div class="col">
  422.                                                         {{ form_widget(form.address.addr02) }}
  423.                                                         {{ form_errors(form.address.addr02) }}
  424.                                                     </div>
  425.                                                 </div>
  426.                                             </div>
  427.                                         </div>
  428.                                     </div>
  429.                                     <div class="col-6">
  430.                                         <div class="row mb-3">
  431.                                             <label class="col-3 col-form-label">{{ 'admin.common.mail_address'|trans }}<span class="badge bg-primary ms-1">{{ 'admin.common.required'|trans }}</span></label>
  432.                                             <div class="col">
  433.                                                 {{ form_widget(form.email) }}
  434.                                                 {{ form_errors(form.email) }}
  435.                                             </div>
  436.                                         </div>
  437.                                         <div class="row mb-3">
  438.                                             <label class="col-3 col-form-label">{{ 'admin.common.phone_number'|trans }}<span class="badge bg-primary ms-1">{{ 'admin.common.required'|trans }}</span></label>
  439.                                             <div class="col">
  440.                                                 {{ form_widget(form.phone_number) }}
  441.                                                 {{ form_errors(form.phone_number) }}
  442.                                             </div>
  443.                                         </div>
  444.                                         <div class="row mb-3">
  445.                                             <label class="col-3 col-form-label">{{ 'admin.common.company_name'|trans }}</label>
  446.                                             <div class="col">
  447.                                                 {{ form_widget(form.company_name) }}
  448.                                                 {{ form_errors(form.company_name) }}
  449.                                             </div>
  450.                                         </div>
  451.                                         <div class="row mb-3">
  452.                                             <label class="col-3 col-form-label">{{ 'admin.order.message'|trans }}</label>
  453.                                             <div class="col">
  454.                                                 {{ form_widget(form.message, { attr : {'rows': 8 }}) }}
  455.                                                 {{ form_errors(form.message) }}
  456.                                             </div>
  457.                                         </div>
  458.                                     </div>
  459.                                 </div>
  460.                             </div>
  461.                         </div>
  462.                     </div><!-- .card.rounded -->
  463.                     <div class="card rounded border-0 mb-4">
  464.                         <div class="card-header">
  465.                             <div class="row">
  466.                                 <div class="col-8">
  467.                                     <div class="d-inline-block" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ 'tooltip.order.shipping_info'|trans }}"><span class="card-title">{{ 'admin.order.shipping_info'|trans }}</span><i class="fa fa-question-circle fa-lg ms-1"></i></div>
  468.                                 </div>
  469.                                 <div class="col-4 text-end"><a data-bs-toggle="collapse" href="#shippingInfo" aria-expanded="false" aria-controls="shippingInfo"><i class="fa fa-angle-up fa-lg"></i></a></div>
  470.                             </div>
  471.                         </div>
  472.                         <div class="collapse show ec-cardCollapse" id="shippingInfo">
  473.                             <div class="card-body">
  474.                                 {% if Order.isMultiple %}
  475.                                     {# 複数配送の場合は配送先の表示のみ #}
  476.                                     <div class="mb-3">
  477.                                         <a id="shipping-add" class="btn btn-ec-regular" data-action="confirm" title="{{ 'admin.common.move_to_confirm_message'|trans({'%name%' : 'admin.order.shipping_registration'|trans
  478.                                            }) }}" href="{{ path("admin_shipping_edit", {id: Order.id}) }}">{{ 'admin.order.edit_multiple_shipping'|trans }}</a>
  479.                                         <span class="ml-3">{{ 'admin.order.edit_multiple_shipping_description'|trans }}</span>
  480.                                     </div>
  481.                                     {% for shipping in Order.Shippings %}
  482.                                         <div class="col">
  483.                                             <span class="me-5">{{ 'admin.order.delivery'|trans }}({{ loop.index }})</span>
  484.                                             {% set shipping_name = shipping.full_name ~ '(' ~ shipping.full_name_kana ~ ')' ~ (shipping.company_name is not null ? ' ' ~ shipping.company_name : '') %}
  485.                                             {% set shipping_addr = 'admin.common.postal_symbol'|trans ~ shipping.postal_code ~ ' ' ~ shipping.pref ~ shipping.addr01 ~ shipping.addr02 %}
  486.                                             {% set shipping_date = shipping.shipping_date is not null ? shipping.shipping_date|date_day : '' %}
  487.                                             {{ shipping_name }} {{ shipping_addr }} {{ shipping.phone_number }} {{ shipping_date }}
  488.                                         </div>
  489.                                     {% endfor %}
  490.                                 {% else %}
  491.                                     {# 単数配送の場合は配送先の編集が可能 #}
  492.                                     <div class="row mb-3">
  493.                                         <div class="col-6">
  494.                                             <button type="button" class="btn btn-ec-regular copy-customer">{{ 'admin.order.copy_orderer'|trans }}</button>
  495.                                             {% if Order.id is not empty %}
  496.                                                 <a class="btn btn-ec-regular pdf-print" href="{{ url('admin_order_export_pdf') }}?ids[]={{ Order.Shippings[0].id }}">{{ 'admin.order.output_delivery_note'|trans }}</a>
  497.                                             {% endif %}
  498.                                         </div>
  499.                                         {% if Order.id is not empty %}
  500.                                             <div class="col-6 text-end">
  501.                                                 <a id="shipping-add" class="btn btn-ec-regular w-25" data-action="confirm" title="{{ 'admin.common.move_to_confirm_message'|trans({'%name%' : 'admin.order.shipping_registration'|trans
  502.                                            }) }}" href="{{ path("admin_shipping_edit", {id: Order.id}) }}">{{ 'admin.order.add_shipping'|trans }}</a>
  503.                                             </div>
  504.                                         {% endif %}
  505.                                     </div>
  506.                                     <div class="row h-adr">
  507.                                         <span class="p-country-name" style="display:none;">Japan</span>
  508.                                         <div class="col-6">
  509.                                             <div class="row mb-3">
  510.                                                 <label class="col-3 col-form-label">{{ 'admin.common.name'|trans }}<span class="badge bg-primary ms-1">{{ 'admin.common.required'|trans }}</span></label>
  511.                                                 <div class="col">
  512.                                                     <div class="row">
  513.                                                         <div class="col">
  514.                                                             {{ form_widget(form.Shipping.name.name01) }}
  515.                                                             {{ form_errors(form.Shipping.name.name01) }}
  516.                                                         </div>
  517.                                                         <div class="col">
  518.                                                             {{ form_widget(form.Shipping.name.name02) }}
  519.                                                             {{ form_errors(form.Shipping.name.name02) }}
  520.                                                         </div>
  521.                                                     </div>
  522.                                                 </div>
  523.                                             </div>
  524.                                             <div class="row mb-3">
  525.                                                 <label class="col-3 col-form-label">{{ 'admin.common.kana'|trans }}<span class="badge bg-primary ms-1">{{ 'admin.common.required'|trans }}</span></label>
  526.                                                 <div class="col">
  527.                                                     <div class="row">
  528.                                                         <div class="col">
  529.                                                             {{ form_widget(form.Shipping.kana.kana01) }}
  530.                                                             {{ form_errors(form.Shipping.kana.kana01) }}
  531.                                                         </div>
  532.                                                         <div class="col">
  533.                                                             {{ form_widget(form.Shipping.kana.kana02) }}
  534.                                                             {{ form_errors(form.Shipping.kana.kana02) }}
  535.                                                         </div>
  536.                                                     </div>
  537.                                                 </div>
  538.                                             </div>
  539.                                             <div class="row mb-3">
  540.                                                 <label class="col-3 col-form-label">{{ 'admin.common.address'|trans }}<span class="badge bg-primary ms-1">{{ 'admin.common.required'|trans }}</span></label>
  541.                                                 <div class="col">
  542.                                                     <div class="row mb-3">
  543.                                                         <div class="col row align-items-center">
  544.                                                             <span class="col-auto">{{ 'admin.common.postal_symbol'|trans }}</span>
  545.                                                             <span class="col-auto ps-0">{{ form_widget(form.Shipping.postal_code) }}</span>
  546.                                                             {{ form_errors(form.Shipping.postal_code) }}
  547.                                                         </div>
  548.                                                     </div>
  549.                                                     <div class="row mb-3">
  550.                                                         <div class="col">
  551.                                                             {{ form_widget(form.Shipping.address.pref) }}
  552.                                                             {{ form_errors(form.Shipping.address.pref) }}
  553.                                                         </div>
  554.                                                     </div>
  555.                                                     <div class="row mb-3">
  556.                                                         <div class="col">
  557.                                                             {{ form_widget(form.Shipping.address.addr01) }}
  558.                                                             {{ form_errors(form.Shipping.address.addr01) }}
  559.                                                         </div>
  560.                                                     </div>
  561.                                                     <div class="row">
  562.                                                         <div class="col">
  563.                                                             {{ form_widget(form.Shipping.address.addr02) }}
  564.                                                             {{ form_errors(form.Shipping.address.addr02) }}
  565.                                                         </div>
  566.                                                     </div>
  567.                                                 </div>
  568.                                             </div>
  569.                                         </div>
  570.                                         <div class="col-6">
  571.                                             <div class="row mb-3">
  572.                                                 <label class="col-3 col-form-label">{{ 'admin.common.phone_number'|trans }}<span class="badge bg-primary ms-1">{{ 'admin.common.required'|trans }}</span></label>
  573.                                                 <div class="col">
  574.                                                     {{ form_widget(form.Shipping.phone_number) }}
  575.                                                     {{ form_errors(form.Shipping.phone_number) }}
  576.                                                 </div>
  577.                                             </div>
  578.                                             <div class="row mb-3">
  579.                                                 <label class="col-3 col-form-label">{{ 'admin.common.company_name'|trans }}</label>
  580.                                                 <div class="col">
  581.                                                     {{ form_widget(form.Shipping.company_name) }}
  582.                                                     {{ form_errors(form.Shipping.company_name) }}
  583.                                                 </div>
  584.                                             </div>
  585.                                         </div>
  586.                                         <div class="col-12">
  587.                                             <hr>
  588.                                         </div>
  589.                                         <div class="col-6">
  590.                                             <div class="row mb-3">
  591.                                                 <label class="col-3 col-form-label" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ 'tooltip.order.shipping_info.tracking_number'|trans }}">{{ 'admin.order.tracking_number'|trans }}<i class="fa fa-question-circle fa-lg ms-1"></i></label>
  592.                                                 <div class="col">
  593.                                                     {{ form_widget(form.Shipping.tracking_number) }}
  594.                                                     {{ form_errors(form.Shipping.tracking_number) }}
  595.                                                 </div>
  596.                                             </div>
  597.                                             <div class="row mb-3">
  598.                                                 <label class="col-3 col-form-label" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ 'tooltip.order.shipping_info.delivery_provider'|trans }}">{{ 'admin.order.delivery_provider'|trans }}<span class="badge bg-primary ms-1"></span><i class="fa fa-question-circle fa-lg ms-1"></i></label>
  599.                                                 <div class="col">
  600.                                                     {{ form_widget(form.Shipping.Delivery) }}
  601.                                                     {{ form_errors(form.Shipping.Delivery) }}
  602.                                                 </div>
  603.                                             </div>
  604.                                             <div class="row mb-3">
  605.                                                 <label class="col-3 col-form-label" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ 'tooltip.order.shipping_info.shop_memo'|trans }}">{{ 'admin.order.shop_memo_for_shipped'|trans }}<i class="fa fa-question-circle fa-lg ms-1"></i></label>
  606.                                                 <div class="col">
  607.                                                     {{ form_widget(form.Shipping.note) }}
  608.                                                     {{ form_errors(form.Shipping.note) }}
  609.                                                 </div>
  610.                                             </div>
  611.                                         </div>
  612.                                         <div class="col-6">
  613.                                             <div class="row mb-3">
  614.                                                 <label class="col-3 col-form-label"><i class="fa fa-calendar-check-o fa-fw me-1" aria-hidden="true"></i>{{ 'admin.order.delivery_date'|trans }}</label>
  615.                                                 <div class="col">
  616.                                                     {{ form_widget(form.Shipping.shipping_delivery_date) }}
  617.                                                     {{ form_errors(form.Shipping.shipping_delivery_date) }}
  618.                                                 </div>
  619.                                             </div>
  620.                                             <div class="row mb-3">
  621.                                                 <label class="col-3 col-form-label"><i class="fa fa-clock-o fa-fw me-1" aria-hidden="true"></i>{{ 'admin.order.delivery_time'|trans }}</label>
  622.                                                 <div class="col">
  623.                                                     {{ form_widget(form.Shipping.DeliveryTime) }}
  624.                                                     {{ form_errors(form.Shipping.DeliveryTime) }}
  625.                                                 </div>
  626.                                             </div>
  627.                                         </div>
  628.                                     </div>
  629.                                 {% endif %}
  630.                             </div>
  631.                         </div>
  632.                     </div><!-- .card.rounded -->
  633.                     <div id="order-product" class="card rounded border-0 mb-4">
  634.                         <div class="card-header">
  635.                             <div class="row">
  636.                                 <div class="col-8">
  637.                                     <div class="d-inline-block" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ 'tooltip.order.product_info'|trans }}"><span class="card-title">{{ 'admin.order.product_info'|trans }}<i class="fa fa-question-circle fa-lg ms-1"></i></span></div>
  638.                                 </div>
  639.                                 <div class="col-4 text-end"><a data-bs-toggle="collapse" href="#orderItem" aria-expanded="false" aria-controls="orderItem"><i class="fa fa-angle-up fa-lg"></i></a></div>
  640.                             </div>
  641.                         </div>
  642.                         <div class="collapse show ec-cardCollapse" id="orderItem">
  643.                             <div class="card-body">
  644.                                 <div class="row justify-content-between mb-2">
  645.                                     <div class="col-6">
  646.                                         {# 複数配送の場合は商品追加できない #}
  647.                                         {% if not Order.isMultiple %}
  648.                                             <a class="btn btn-ec-regular me-2 add" data-bs-toggle="modal" data-bs-target="#addProduct">{{ 'admin.order.add_product_item'|trans }}</a>
  649.                                             <div class="modal fade" id="addProduct" tabindex="-1" role="dialog" aria-labelledby="addProduct" aria-hidden="true">
  650.                                                 <div class="modal-dialog modal-lg" role="document">
  651.                                                     <div class="modal-content">
  652.                                                         <div class="modal-header">
  653.                                                             <h5 class="modal-title">{{ 'admin.order.add_product_item'|trans }}</h5>
  654.                                                             <button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Close"></button>
  655.                                                         </div>
  656.                                                         <div class="modal-body">
  657.                                                             {{ form_widget(searchProductModalForm.id, { attr : {'class': 'mb-3', 'placeholder': 'admin.product.multi_search_label' }}) }}
  658.                                                             {{ form_widget(searchProductModalForm.category_id) }}
  659.                                                             <button type="button" id="searchProductModalButton" class="btn btn-ec-conversion px-5 mb-4 mt-2">{{ 'admin.common.search'|trans }}</button>
  660.                                                             <div id="searchProductModalList"></div>
  661.                                                         </div>
  662.                                                     </div>
  663.                                                 </div>
  664.                                             </div>
  665.                                         {% endif %}
  666.                                         <a class="btn btn-ec-regular me-2" data-bs-toggle="modal" data-bs-target="#addOrderItemType">{{ 'admin.order.add_other_item'|trans }}</a>
  667.                                         <div class="modal fade" id="addOrderItemType" tabindex="-1" role="dialog" aria-labelledby="addOrderItemType" aria-hidden="true">
  668.                                             <div class="modal-dialog modal-lg" role="document">
  669.                                                 <div class="modal-content">
  670.                                                     <div class="modal-header">
  671.                                                         <h5 class="modal-title">{{ 'admin.order.add_other_item'|trans }}</h5>
  672.                                                         <button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Close"></button>
  673.                                                     </div>
  674.                                                     <div class="modal-body">
  675.                                                         <div id="searchOrderItemTypeList"></div>
  676.                                                     </div>
  677.                                                 </div>
  678.                                             </div>
  679.                                         </div>
  680.                                         {{ form_errors(form.OrderItemsErrors) }}
  681.                                     </div>
  682.                                     <div class="col-5 text-end">
  683.                                         <button type="submit" class="btn btn-ec-regular me-2" name="mode" value="calc" data-link="order-product" id="calculate"{{ action_disabled ? ' disabled="disabled"' }}>{{ 'admin.order.update_calculation_results'|trans }}</button>
  684.                                     </div>
  685.                                 </div>
  686.                                 <table id="table-form-field" class="table table-striped table-sm mb-0"
  687.                                        data-prototype="{% apply escape %}{{ include('@admin/Order/order_item_prototype.twig', {'orderItemForm': form.OrderItems.vars.prototype}) }}{% endapply %}">
  688.                                     <thead class="table-active">
  689.                                     <tr class="text-nowrap">
  690.                                         <th class="pt-2 pb-2 ps-3">{{ 'admin.product.product_name_and_code'|trans }}</th>
  691.                                         <th class="pt-2 pb-2">
  692.                                             <div class="col-8">{{ 'admin.order.amount'|trans }}</div>
  693.                                         </th>
  694.                                         <th class="pt-2 pb-2">
  695.                                             <div class="col-8">{{ 'admin.order.quantity'|trans }}</div>
  696.                                         </th>
  697.                                         <th class="pt-2 pb-2">
  698.                                             <div class="col-8">{{ 'admin.order.tax_rate'|trans }}</div>
  699.                                         </th>
  700.                                         <th class="pt-2 pb-2">
  701.                                             <div class="col-8">{{ 'admin.order.tax_type'|trans }}</div>
  702.                                         </th>
  703.                                         <th class="pt-2 pb-2">
  704.                                             <div class="col-8">{{ 'admin.order.subtotal'|trans }}</div>
  705.                                         </th>
  706.                                         <th class="pt-2 pb-2 pe-3"></th>
  707.                                     </tr>
  708.                                     </thead>
  709.                                     <tbody>
  710.                                     {% for orderItemForm in form.OrderItems %}
  711.                                         {% set OrderItem = orderItemForm.vars.data %}
  712.                                         <tr data-row="{{ orderItemForm.vars.id }}">
  713.                                             {# hidden values #}
  714.                                             {{ form_widget(orderItemForm.ProductClass) }}
  715.                                             {{ form_widget(orderItemForm.order_item_type) }}
  716.                                             {{ form_widget(orderItemForm.point_rate) }}
  717.                                             {{ form_widget(orderItemForm.tax_type) }}
  718.                                             <!-- 商品名 -->
  719.                                             <td class="align-middle w-25 ps-3">
  720.                                                 <p class="mb-0 fw-bold">
  721.                                                     {# 商品とポイント値引きは名前変更できない #}
  722.                                                     {% if OrderItem.isProduct or OrderItem.isPoint %}
  723.                                                         {% if OrderItem.isProduct %}
  724.                                                             <a href="{{ url('admin_product_product_edit', {id: OrderItem.ProductClass.Product.id}) }}" target="_blank">
  725.                                                                 {{ OrderItem.product_name }}
  726.                                                             </a>
  727.                                                         {% else %}
  728.                                                             {{ OrderItem.product_name }}
  729.                                                         {% endif %}
  730.                                                         {{ form_widget(orderItemForm.product_name, { 'type': 'hidden' }) }}
  731.                                                     {% else %}
  732.                                                         {{ form_widget(orderItemForm.product_name) }}
  733.                                                     {% endif %}
  734.                                                 </p>
  735.                                                 <span>
  736.                                                     {{ OrderItem.product_code }}
  737.                                                     {% if OrderItem.class_category_name1 is not empty %}
  738.                                                         / (
  739.                                                         {{ OrderItem.class_name1 }}:
  740.                                                         {{ OrderItem.class_category_name1 }}
  741.                                                         {% if OrderItem.class_category_name2 is not empty %}
  742.                                                             /
  743.                                                             {{ OrderItem.class_name2 }}:
  744.                                                             {{ OrderItem.class_category_name2 }}
  745.                                                         {% endif %}
  746.                                                         )
  747.                                                     {% endif %}
  748.                                                 </span>
  749.                                                 {{ form_errors(orderItemForm.product_name) }}
  750.                                             </td>
  751.                                             <!-- 金額 -->
  752.                                             <td class="align-middle">
  753.                                                 <div class="col mt-3">
  754.                                                     {# ポイント値引きは価格変更できない #}
  755.                                                     {% if OrderItem.isPoint %}
  756.                                                         {{ form_widget(orderItemForm.price, {'attr': { 'readonly': 'readonly', 'class': 'pointPrice' } }) }}
  757.                                                     {% else %}
  758.                                                         {{ form_widget(orderItemForm.price) }}
  759.                                                     {% endif %}
  760.                                                     <div class="text-end small">({{ OrderItem.TaxDisplayType }})</div>
  761.                                                     {{ form_errors(orderItemForm.price) }}
  762.                                                 </div>
  763.                                             </td>
  764.                                             <!-- 数量 -->
  765.                                             <td class="align-middle">
  766.                                                 <div class="col-12 col-xl-8">
  767.                                                     {# 複数配送の場合は商品の個数を変更できない、ポイントの場合も個数を変更できない #}
  768.                                                     {% if (Order.isMultiple and OrderItem.isProduct) or OrderItem.isPoint %}
  769.                                                         {{ form_widget(orderItemForm.quantity, { 'attr': { 'readonly': 'readonly' } }) }}
  770.                                                     {% else %}
  771.                                                         {{ form_widget(orderItemForm.quantity) }}
  772.                                                     {% endif %}
  773.                                                     {{ form_errors(orderItemForm.quantity) }}
  774.                                                 </div>
  775.                                             </td>
  776.                                             <!-- 税率 -->
  777.                                             <td class="align-middle">
  778.                                                 <div class="col-12 col-xl-8">
  779.                                                     {# 複数配送・ポイント明細・不課税明細は商品の税率を変更できない #}
  780.                                                     {% if (Order.isMultiple and OrderItem.isProduct) or OrderItem.isPoint or OrderItem.TaxType.id == constant('Eccube\\Entity\\Master\\TaxType::NON_TAXABLE') %}
  781.                                                         {{ form_widget(orderItemForm.tax_rate, { 'attr': { 'readonly': 'readonly' } }) }}
  782.                                                     {% else %}
  783.                                                         {{ form_widget(orderItemForm.tax_rate) }}
  784.                                                     {% endif %}
  785.                                                     {{ form_errors(orderItemForm.tax_rate) }}
  786.                                                 </div>
  787.                                             </td>
  788.                                             <!-- 課税区分 -->
  789.                                             <td class="align-middle">
  790.                                                 <div class="col">
  791.                                                     {{ OrderItem.tax_type }}
  792.                                                 </div>
  793.                                             </td>
  794.                                             <!-- 小計 -->
  795.                                             <td class="align-middle">
  796.                                                 <div class="col">
  797.                                                     <span>{{ OrderItem.total_price|price }}</span>
  798.                                                 </div>
  799.                                             </td>
  800.                                             <td class="align-middle text-end pe-3">
  801.                                                 <div class="row justify-content-end">
  802.                                                     {# 複数配送の場合は商品を削除できない #}
  803.                                                     {% if (Order.isMultiple and OrderItem.isProduct) or OrderItem.isPoint %}
  804.                                                         <div class="col-auto text-center">
  805.                                                             <div class="d-inline-block me-3" data-bs-toggle="tooltip"
  806.                                                                  data-bs-placement="top" title="{{ 'admin.common.delete'|trans }}">
  807.                                                                 <a class="btn btn-ec-actionIcon disabled">
  808.                                                                     <i class="fa fa-close fa-lg text-secondary" aria-hidden="true"></i>
  809.                                                                 </a>
  810.                                                             </div>
  811.                                                         </div>
  812.                                                     {% else %}
  813.                                                         <div class="col-auto text-center">
  814.                                                             <div class="d-inline-block me-3" data-bs-toggle="tooltip"
  815.                                                                  data-bs-placement="top" title="{{ 'admin.common.delete'|trans }}">
  816.                                                                 <a class="btn btn-ec-actionIcon" data-bs-toggle="modal" data-bs-target="#delete_{{ orderItemForm.vars.id }}">
  817.                                                                     <i class="fa fa-close fa-lg text-secondary" aria-hidden="true"></i>
  818.                                                                 </a>
  819.                                                             </div>
  820.                                                             <!-- 明細の削除確認モーダル -->
  821.                                                             <div class="modal fade" id="delete_{{ orderItemForm.vars.id }}" tabindex="-1" role="dialog" aria-labelledby="delete_{{ orderItemForm.vars.id }}" aria-hidden="true">
  822.                                                                 <div class="modal-dialog" role="document">
  823.                                                                     <div class="modal-content">
  824.                                                                         <div class="modal-header">
  825.                                                                             <h5 class="modal-title fw-bold">{{ 'admin.common.delete_modal__title'|trans }}</h5>
  826.                                                                             <button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Close">
  827.                                                                             </button>
  828.                                                                         </div>
  829.                                                                         <div class="modal-body text-start">
  830.                                                                             <p class="text-start">{{ 'admin.order.delete_item__confirm_message'|trans({ '%name%' : OrderItem.product_name }) }}</p>
  831.                                                                         </div>
  832.                                                                         <div class="modal-footer">
  833.                                                                             <button class="btn btn-ec-sub" type="button" data-bs-dismiss="modal">{{ 'admin.common.cancel'|trans }}</button>
  834.                                                                             <a href="#order-product" class="btn delete btn-ec-delete">{{ 'admin.common.delete'|trans }}</a>
  835.                                                                         </div>
  836.                                                                     </div>
  837.                                                                 </div>
  838.                                                             </div>
  839.                                                         </div>
  840.                                                     {% endif %}
  841.                                                 </div>
  842.                                             </td>
  843.                                         </tr>
  844.                                     {% endfor %}
  845.                                     </tbody>
  846.                                 </table>
  847.                                 <hr class="mt-0">
  848.                                 <!-- 小計 -->
  849.                                 <div class="row justify-content-end mb-3">
  850.                                     <div class="col-auto"><span class="align-middle">{{ 'admin.order.subtotal'|trans }}</span></div>
  851.                                     <div class="col-2 text-end"><span class="h4 align-middle fw-normal">{{ Order.subtotal|price }}</span></div>
  852.                                 </div>
  853.                                 <!-- 送料 -->
  854.                                 <div class="row justify-content-end mb-3">
  855.                                     <div class="col-auto"><span class="align-middle">{{ 'admin.order.delivery_fee'|trans }}</span></div>
  856.                                     <div class="col-2 text-end"><span class="h4 align-middle fw-normal">{{ Order.delivery_fee_total|price }}</span></div>
  857.                                 </div>
  858.                                 <!-- 手数料 -->
  859.                                 <div class="row justify-content-end mb-3">
  860.                                     <div class="col-auto"><span class="align-middle">{{ 'admin.common.charge'|trans }}</span></div>
  861.                                     <div class="col-2 text-end"><span class="h4 align-middle fw-normal">{{ Order.charge|price }}</span></div>
  862.                                 </div>
  863.                                 <!-- 値引き -->
  864.                                 <div class="row justify-content-end mb-3">
  865.                                     <div class="col-auto"><span class="align-middle">{{ 'admin.order.discount'|trans }}</span></div>
  866.                                     <div class="col-2 text-end"><span class="h4 align-middle text-danger fw-normal">{{ Order.taxable_discount|price }}</span></div>
  867.                                 </div>
  868.                                 <hr>
  869.                                 <!-- 合計 -->
  870.                                 <div class="row justify-content-end mb-3">
  871.                                     <div class="col-auto"><span class="align-middle">{{ 'admin.order.total'|trans }}</span></div>
  872.                                     <div class="col-2 text-end"><span class="h4 align-middle fw-normal">{{ Order.taxable_total|price }}</span></div>
  873.                                 </div>
  874.                                 {% for item in Order.tax_free_discount_items %}
  875.                                 <div class="row justify-content-end mb-3">
  876.                                     <div class="col-auto"><span class="align-middle">{{ item.product_name }}</span></div>
  877.                                     <div class="col-2 text-end"><span class="h4 align-middle text-danger fw-normal">{{ item.total_price|price }}</span></div>
  878.                                 </div>
  879.                                 {% endfor %}
  880.                                 <!-- お支払い合計 -->
  881.                                 <div class="row justify-content-end mb-3">
  882.                                     <div class="col-auto"><span class="align-middle">{{ 'admin.order.payment_total'|trans }}</span></div>
  883.                                     <div class="col-2 text-end"><span class="h4 align-middle fw-normal">{{ Order.payment_total|price }}</span></div>
  884.                                 </div>
  885.                                 <hr>
  886.                                 <!-- 消費税額 -->
  887.                                 {% for rate, total in Order.total_by_tax_rate %}
  888.                                     <div class="row justify-content-end mb-3">
  889.                                         <div class="col-auto"><span class="align-middle">{{ 'common.tax_rate_target'|trans({ '%rate%': rate }) }}</span></div>
  890.                                         <div class="col-2 text-end"><span class="align-middle fw-normal">{{ total|price }}</span>({{ 'common.tax_amount'|trans }} {{ Order.tax_by_tax_rate[rate]|price }})</div>
  891.                                     </div>
  892.                                 {% endfor %}
  893.                                 <hr>
  894.                                 <!-- 加算ポイント -->
  895.                                 <div class="row justify-content-end mb-3">
  896.                                     <div class="col-auto"><span class="align-middle">{{ 'admin.order.add_point'|trans }}</span></div>
  897.                                     <div class="col-2 text-end">
  898.                                         <span class="h4 align-middle fw-normal">
  899.                                             {{ form.vars.value.addpoint|number_format }}
  900.                                         </span>
  901.                                     </div>
  902.                                 </div>
  903.                                 <!-- 利用ポイント -->
  904.                                 <div class="row justify-content-end mb-3">
  905.                                     <div class="col-auto"><span class="align-middle">{{ 'admin.order.use_point'|trans }}</span></div>
  906.                                     <div class="col-2 text-end">
  907.                                         <span class="h4 align-middle fw-normal">
  908.                                             {# ポイント機能が有効かつ会員の場合のみポイントを編集可能とする #}
  909.                                             {% if BaseInfo.isOptionPoint and Order.Customer is not null %}
  910.                                                 {{ form_widget(form.use_point) }}
  911.                                             {% else %}
  912.                                                 {{ form_widget(form.use_point, {'attr': { 'readonly': 'readonly' } }) }}
  913.                                             {% endif %}
  914.                                             {{ form_errors(form.use_point) }}
  915.                                         </span>
  916.                                     </div>
  917.                                 </div>
  918.                             </div>
  919.                         </div>
  920.                     </div><!-- .card.rounded -->
  921.                     <!-- ショップ用メモ欄 -->
  922.                     <div class="card rounded border-0 mb-4">
  923.                         <div class="card-header">
  924.                             <div class="row">
  925.                                 <div class="col-8">
  926.                                     <div class="d-inline-block" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ 'tooltip.order.shop_memo'|trans }}"><span class="card-title">{{ 'admin.common.shop_memo'|trans }}<i class="fa fa-question-circle fa-lg ms-1"></i></span></div>
  927.                                 </div>
  928.                                 <div class="col-4 text-end"><a data-bs-toggle="collapse" href="#freeArea" aria-expanded="false" aria-controls="freeArea"><i class="fa fa-angle-up fa-lg"></i></a></div>
  929.                             </div>
  930.                         </div>
  931.                         <div class="collapse show ec-cardCollapse" id="freeArea">
  932.                             <div class="card-body">
  933.                                 {{ form_widget(form.note, {'attr': {'rows': 8}}) }}
  934.                             </div>
  935.                         </div>
  936.                     </div><!-- .card.rounded -->
  937.                     <!-- メール送信履歴 -->
  938.                     {% if id is not null %}
  939.                         <div class="card rounded border-0 mb-4">
  940.                             <div class="card-header">
  941.                                 <div class="row">
  942.                                     <div class="col-8">
  943.                                         <div class="d-inline-block" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ 'tooltip.order.mail_history'|trans }}"><span class="card-title">{{ 'admin.order.mail_history'|trans }}</span><i class="fa fa-question-circle fa-lg ms-1"></i></div>
  944.                                     </div>
  945.                                     <div class="col-4 text-end"><a data-bs-toggle="collapse" href="#mailHistory" aria-expanded="false" aria-controls="mailHistory"><i class="fa fa-angle-up fa-lg"></i></a></div>
  946.                                 </div>
  947.                             </div>
  948.                             <div class="collapse show ec-cardCollapse" id="mailHistory">
  949.                                 <div class="card-body">
  950.                                     <table class="table table-striped">
  951.                                         <thead class="table-active">
  952.                                         <tr>
  953.                                             <th class="pt-2 pb-2 ps-3">{{ 'admin.order.mail_send_date'|trans }}</th>
  954.                                             <th class="pt-2 pb-2 pe-3">{{ 'admin.order.mail_subject'|trans }}</th>
  955.                                         </tr>
  956.                                         </thead>
  957.                                         <tbody>
  958.                                         {% for MailHistory in Order.MailHistories %}
  959.                                             <tr>
  960.                                                 <td class="ps-3">{{ MailHistory.send_date|date_min }}</td>
  961.                                                 <td class="pe-3">
  962.                                                     <a class="text-primary" data-bs-toggle="modal" data-bs-target="#mail2-{{ loop.index }}">{{ MailHistory.mail_subject }}</a>
  963.                                                     <div class="modal fade" id="mail2-{{ loop.index }}" tabindex="-1" role="dialog" aria-labelledby="mail2-{{ loop.index }}" aria-hidden="true">
  964.                                                         <div class="modal-dialog" role="document">
  965.                                                             <div class="modal-content">
  966.                                                                 <div class="modal-header">
  967.                                                                     <h5 class="modal-title">{{ MailHistory.mail_subject }}</h5>
  968.                                                                     <button class="btn-close" type="button" data-bs-dismiss="modal" aria-label="Close"></button>
  969.                                                                 </div>
  970.                                                                 <div class="modal-body">
  971.                                                                     <p>
  972.                                                                         {% if MailHistory.mail_html_body|length > 0 %}
  973.                                                                             {{ MailHistory.mail_html_body|raw|purify }}
  974.                                                                         {% else %}
  975.                                                                             {{ MailHistory.mail_body|nl2br }}
  976.                                                                         {% endif %}
  977.                                                                     </p>
  978.                                                                 </div>
  979.                                                                 <div class="modal-footer">
  980.                                                                     <button class="btn btn-ec-regular" type="button" data-bs-dismiss="modal">{{ 'admin.common.close'|trans }}</button>
  981.                                                                 </div>
  982.                                                             </div>
  983.                                                         </div>
  984.                                                     </div>
  985.                                                 </td>
  986.                                             </tr>
  987.                                         {% endfor %}
  988.                                         </tbody>
  989.                                     </table>
  990.                                     <div class="text-center">
  991.                                         <a class="btn btn-ec-regular" data-action="confirm" title="{{ 'admin.common.move_to_confirm_message'|trans({
  992.                                                '%name%' : 'admin.order.mail'|trans
  993.                                            }) }}" href="{{ path('admin_order_mail', { id : Order.id }) }}">{{ 'admin.order.mail_create'|trans }}</a>
  994.                                     </div>
  995.                                 </div>
  996.                             </div>
  997.                         </div><!-- .card.rounded -->
  998.                     {% endif %}
  999.                 </div>
  1000.             </div>
  1001.         </div>
  1002.         <!-- コンバージョンエリア -->
  1003.         <div class="c-conversionArea">
  1004.             <div class="c-conversionArea__container">
  1005.                 <div class="row justify-content-between align-items-center">
  1006.                     <div class="col-6">
  1007.                         <div class="c-conversionArea__leftBlockItem">
  1008.                             <a class="c-baseLink" href="{{ url('admin_order', { 'resume': 1 }) }}"><i class="fa fa-backward" aria-hidden="true"></i><span>{{ 'admin.order.order_list'|trans }}</span></a>
  1009.                         </div>
  1010.                     </div>
  1011.                     <div class="col-6">
  1012.                         <div class="row align-items-center justify-content-end">
  1013.                             <div class="col-auto">
  1014.                                 <button type="submit" class="btn btn-ec-conversion px-5" name="mode" value="register"{{ action_disabled ? ' disabled="disabled"' }}>{{ 'admin.common.registration'|trans }}</button>
  1015.                             </div>
  1016.                         </div>
  1017.                     </div>
  1018.                 </div>
  1019.             </div>
  1020.         </div>
  1021.     </form>
  1022. {% endblock %}