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