현금 반올림에 대한 POS 교환 V2 영수증 이메일 알림 업데이트

스토어에서 맞춤 설정된 알림 템플릿을 사용하는 경우, 영수증에 현금 반올림이 표시되도록 POS 교환 V2 영수증 이메일 알림을 수동으로 업데이트해야 할 수 있습니다.

이 변경 사항을 적용하려면 Shopify 알림 템플릿에 사용되는 코드에 익숙해야 합니다. 템플릿이 고도로 맞춤 설정되어 필요한 변경 사항을 적용하는 방법을 잘 모르는 경우 변경 작업을 수행한 개발자에게 문의하거나 기본값으로 되돌리기를 클릭하여 템플릿을 원래 상태로 복원하십시오. 기본값으로 되돌리면 모든 맞춤 설정 사항이 제거되지만 기본 템플릿을 통해 최신 템플릿 버전을 사용할 수 있습니다.

POS 교환 V2 영수증 이메일 알림 업데이트

POS 교환 V2 영수증 알림을 업데이트하여 교환 거래에서 발생하는 순 현금 반올림 금액과 반올림된 교환 총 금액을 영수증에 표시할 수 있습니다.

단계:

  1. Shopify 관리자에서 설정 > 알림으로 이동합니다.

  2. 고객 알림을 클릭합니다.

  3. Point of Sale 섹션에서 POS 교환 V2 영수증을 클릭합니다.

  4. 코드 편집을 클릭합니다.

  5. 순 현금 반올림 금액을 계산하고 exchange_total에 추가하는 논리를 추가합니다.

    1. <span>Exchange total</span>이 포함된 코드 블록을 찾습니다.
    2. 기존 코드 블록을 net_exchange_rounding을 계산하여 exchange_total에 추가하는 다음 코드 블록으로 교체하십시오.
<table class="row subtotal-table">
  <div class="subtotal-table--total subtotal-table--total-no-border">
    <tr class="subtotal-line">
      <td class="subtotal-line__title">
        <p>
          <span>Exchange total</span>
        </p>
      </td>
      <td class="subtotal-line__value">
        <strong>{% if exchange_total < 0 %}-{% endif %}{{ exchange_total | abs | money_with_currency }}</strong>
      </td>
    </tr>
  </div>
  {% assign net_exchange_rounding = 0 %}
  {% for transaction in transactions %}
    {% if transaction.status == "success" %}
      {% if transaction.kind == "sale" or transaction.kind == "capture"  %}
        {% if transaction.amount_rounding != nil %}
          {% assign net_exchange_rounding = net_exchange_rounding | plus: transaction.amount_rounding %}
        {% endif %}
      {% elsif transaction.kind == "refund" or transaction.kind == "change" %}
        {% if transaction.amount_rounding != nil %}
          {% assign net_exchange_rounding = net_exchange_rounding | minus: transaction.amount_rounding %}
        {% endif %}
      {% endif %}
    {% endif %}
  {% endfor %}
  {% if net_exchange_rounding != 0 %}
    <table class="row subtotal-table subtotal-table--total">
      <div class="subtotal-line__value-small">
        <tr class="subtotal-line">
          <td class="subtotal-line__title">
            <p> <span>Cash rounding</span> </p>
          </td>
          <td class="subtotal-line__value">
            <strong>{% if net_exchange_rounding < 0 %}-{% endif %} {{ net_exchange_rounding | abs | money }}</strong>
          </td>
        </tr>
      </div>
    </table>
    <table class="row subtotal-table subtotal-table--total">
      {% assign rounded_exchange_total = exchange_total | plus: net_exchange_rounding %}
      {% if rounded_exchange_total > 0 %}
        <tr class="subtotal-line">
          <td class="subtotal-line__title">
            <p> <span>Paid</span> </p>
          </td>
          <td class="subtotal-line__value">
            <strong>{{ rounded_exchange_total | money_with_currency }}</strong>
          </td>
        </tr>
      {% elsif rounded_exchange_total < 0 %}
        <tr class="subtotal-line">
        <td class="subtotal-line__title">
          <p> <span>Refund</span> </p>
        </td>
        <td class="subtotal-line__value">
          <strong>-{{ rounded_exchange_total | abs | money_with_currency }}</strong>
        </td>
      </tr>
      {% else %}
        <tr class="subtotal-line">
          <td class="subtotal-line__title">
            <p> <span>Adjusted exchange total</span> </p>
          </td>
          <td class="subtotal-line__value">
            <strong>{{ rounded_exchange_total | money_with_currency }}</strong>
          </td>
        </tr>
      {% endif %}
    </table>
  {% endif %}
</table>