Order invoice

Sent to the customer by Shopify, when the order has an outstanding balance.

الفاتورة {{name}}
<!DOCTYPE html>
<html lang="ar">
{% if payment_terms.type == 'fulfillment' and payment_terms.next_payment.due_at == nil %}
  {% assign due_on_fulfilllment_terms = true %}
{% else %}
  {% assign due_on_fulfilllment_terms = false %}
{% endif %}
{% if source_name == 'shopify_draft_order' and financial_status == 'pending' %}
  {% assign order_from_draft = true %}
{% else %}
  {% assign order_from_draft = false %}
{% endif %}
<head>
  <title>{{ email_title }}</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta name="viewport" content="width=device-width">
  <link rel="stylesheet" type="text/css" href="/assets/notifications/styles.css">
  <style>
    /*
     * Arabic Shopify Notifications - By Enfitah - www.enfitah.com
     */
    
    body {
      direction: rtl
    }
    
    .container {
        text-align: right;
    }
    
    .actions {
        margin-top: 20px
    }
    
    .main-action-cell {
        float: right;
        margin-left: 15px;
      margin-right: unset
    }
    
    @media (max-width: 600px) {
        .main-action-cell {
            margin-left: 0 !important;
        margin-right: unset !important;
        }
    }
    
    .text-icon {
        padding-left: 8px;
      padding-right: unset
    }
    
    .order-number__cell {
        text-align: left;
    }
    
    @media (max-width: 600px) {
        .order-number__cell {
            text-align: right !important;
        }
    }
    
    .or {
        margin-left: 10px;
      margin-right: unset;
    }
    
    @media (max-width: 600px) {
        .or {
            margin-left: 0 !important;
        margin-right: unset !important;
        }
    }
    
    .customer-info__item-credit {
        margin-left: 10px;
      margin-right: unset;
    }
    
    .order-list__product-image {
        margin-left: 15px;
      margin-right: unset;
    }
    
    .order-list__item-original-price {
        text-align: left;
    }
    
    .order-list__item-price {
        text-align: left;
        margin-right: 15px;
      margin-left: unset;
    }
    
    .subtotal-line__value {
        text-align: left
    }
    .order-list__no-image-cell {
      margin-left: 15px;
      margin-right: 0;
    }
        .button__cell { background: {{ shop.email_accent_color }}; }
        a, a:hover, a:active, a:visited { color: {{ shop.email_accent_color }}; }
    </style>
</head>

<body>
<table class="body">
  <tr>
    <td>
      <table class="header row">
  <tr>
    <td class="header__cell">
      <center>

        <table class="container">
          <tr>
            <td>

              <table class="row">
                <tr>
                  <td class="shop-name__cell">
                    {%- if shop.email_logo_url %}
                      <img src="{{shop.email_logo_url}}" alt="{{ shop.name }}" width="{{ shop.email_logo_width }}">
                    {%- else %}
                      <h1 class="shop-name__text">
                        <a href="{{shop.url}}">{{ shop.name }}</a>
                      </h1>
                    {%- endif %}
                  </td>

                    <td>
                      <table class="order-po-number__container">
                        <tr>
                          <td class="order-number__cell">
                            <span class="order-number__text">
                              فاتورة {{ order_name }}
                            </span>
                          </td>
                        </tr>
                        {%- if po_number %}
                            <tr>
                              <td class="po-number__cell">
                                <span class="po-number__text">
                                  رقم أمر الشراء #{{ po_number }}
                                </span>
                              </td>
                            </tr>
                        {%- endif %}
                      </table>
                    </td>
                </tr>
              </table>

            </td>
          </tr>
        </table>

      </center>
    </td>
  </tr>
</table>

      <table class="row content">
  <tr>
    <td class="content__cell">
      <center>
        <table class="container">
          <tr>
            <td>
              
        {% if payment_terms.type == 'receipt' and payment_terms.next_payment.due_at == nil %}
          {% assign due_date = 'now' %}
        {% else %}
          {% assign due_date = payment_terms.next_payment.due_at | default: nil %}
        {% endif %}

        {% if due_on_fulfilllment_terms == true and payment_terms.automatic_capture_at_fulfillment == false or payment_terms.automatic_capture_at_fulfillment == true and order_from_draft == true %}
          <h2>الدفعة المستحقة {{ order.total_outstanding | money }} عند التنفيذ</h2>
        {% else %}
          <h2>الدفعة المستحقة {{ order.total_outstanding | money }} في {{ due_date | date: format: 'date' }}</h2>
        {% endif %}
        {% if custom_message != blank %}
        <p>{{ custom_message }}</p>
        {% endif %}
        {% if checkout_payment_collection_url %}
        <table class="row actions">
  <tr>
    <td class="actions__cell">
      <table class="button main-action-cell">
        <tr>
          <td class="button__cell"><a href="{{ checkout_payment_collection_url }}" class="button__text">ادفع الآن</a></td>
        </tr>
      </table>
    </td>
  </tr>
</table>

        {% endif %}

            </td>
          </tr>
        </table>
      </center>
    </td>
  </tr>
</table>

      <table class="row section">
  <tr>
    <td class="section__cell">
      <center>
        <table class="container">
          <tr>
            <td>
              <h3>ملخص الطلب</h3>
            </td>
          </tr>
        </table>
        <table class="container">
          <tr>
            <td>
              
        {% if line_items_including_zero_quantity == empty %}
          
<table class="row">
  {% for line in subtotal_line_items %}
  <tr class="order-list__item">
    <td class="order-list__item__cell">
      <table>
          {% assign expand_bundles = false %}
        {% if expand_bundles and line.bundle_parent? %}
          <td class="order-list__parent-image-cell">
            {% if line.image %}
              <img src="{{ line | img_url: 'compact_cropped' }}" align="right" width="60" height="60" class="order-list__product-image"/>
            {% else %}
              <div class="order-list__no-image-cell">
                <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="right" width="60" height="60" class="order-list__no-product-image"/>
              </div>
            {% endif %}
          </td>
        {% else %}
          <td class="order-list__image-cell">
            {% if line.image %}
              <img src="{{ line | img_url: 'compact_cropped' }}" align="right" width="60" height="60" class="order-list__product-image"/>
            {% else %}
              <div class="order-list__no-image-cell">
                <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="right" width="60" height="60" class="order-list__no-product-image"/>
              </div>
            {% endif %}
          </td>
        {% endif %}
        <td class="order-list__product-description-cell">
          {% if line.product.title %}
            {% assign line_title = line.product.title %}
          {% else %}
            {% assign line_title = line.title %}
          {% endif %}

          {% if line.quantity < line.quantity %}
            {% capture line_display %}
              {{ line.quantity }} من {{ line.quantity }}
            {% endcapture %}
          {% else %}
            {% assign line_display = line.quantity  %}
          {% endif %}

          <span class="order-list__item-title">{{ line_title }}&nbsp;&times;&nbsp;{{ line_display }}</span><br/>

          {% if line.variant.title != 'Default Title' and line.bundle_parent? == false %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% elsif line.variant.title != 'Default Title' and line.bundle_parent? and expand_bundles == false %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% endif %}

          {% if expand_bundles %}
            {% for component in line.bundle_components %}
              <table>
                <tr class="order-list__item">
                  <td class="order-list__bundle-item">
                    <table>
                      <td class="order-list__image-cell">
                        {% if component.image %}
                          <img src="{{ component | img_url: 'compact_cropped' }}" align="right" width="40" height="40" class="order-list__product-image"/>
                        {% else %}
                          <div class="order-list__no-image-cell small">
                            <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="right" width="40" height="40" class="order-list__no-product-image small"/>
                          </div>
                        {% endif %}
                      </td>

                      <td class="order-list__product-description-cell">
                        {% if component.product.title %}
                          {% assign component_title = component.product.title %}
                        {% else %}
                          {% assign component_title = component.title %}
                        {% endif %}

                        {% assign component_display = component.quantity %}

                        <span class="order-list__item-title">{{ component_title }}&nbsp;&times;&nbsp;{{ component_display }}</span><br>

                        {% if component.variant.title != 'Default Title'%}
                          <span class="order-list__item-variant">{{ component.variant.title }}</span>
                        {% endif %}
                      </td>
                    </table>
                  </td>
                </tr>
              </table>
            {% endfor %}
          {% else %}
            {% for group in line.groups %}
              <span class="order-list__item-variant">جزء من: {{ group.display_title }}</span><br/>
            {% endfor %}
          {% endif %}

            {% if line.gift_card and line.properties["__shopify_send_gift_card_to_recipient"] %}
              {% for property in line.properties %}
  {% assign property_first_char = property.first | slice: 0 %}
  {% if property.last != blank and property_first_char != '_' %}
    <div class="order-list__item-property">
      <dt>{{ property.first }}:</dt>
      <dd>
      {% if property.last contains '/uploads/' %}
        <a href="{{ property.last }}" class="link" target="_blank">
        {{ property.last | split: '/' | last }}
        </a>
      {% else %}
        {{ property.last }}
      {% endif %}
      </dd>
    </div>
  {% endif %}
{% endfor %}

            {% endif %}

          {% if line.selling_plan_allocation %}
            <span class="order-list__item-variant">{{ line.selling_plan_allocation.selling_plan.name }}</span><br/>
          {% endif %}

          {% if line.aggregated_update %}
            <span class="order-list__item-update-status">{{line.aggregated_update}}</span>
          {% elsif line.refunded_quantity > 0 %}
            <span class="order-list__item-refunded">تم الاسترداد</span>
          {% endif %}

          {% if line.discount_allocations %}
            {% for discount_allocation in line.discount_allocations %}
              {% if discount_allocation.discount_application.target_selection != 'all' %}
                <p>
                  <span class="order-list__item-discount-allocation">
                    <img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
                    <span>
                      {{ discount_allocation.discount_application.title | upcase }}
                      (-{{ discount_allocation.amount | money }})
                    </span>
                  </span>
                </p>
              {% endif %}
            {% endfor %}
          {% endif %}
        </td>
          {% if expand_bundles and line.bundle_parent? %}
            <td class="order-list__parent-price-cell">
          {% else %}
            <td class="order-list__price-cell">
          {% endif %}
          {% if line.original_line_price != line.final_line_price %}
            <del class="order-list__item-original-price">{{ line.original_line_price | money }}</del>
          {% endif %}
            <p class="order-list__item-price">
              {% if line.final_line_price > 0 or line.quantity == 0 %}
                {{ line.final_line_price | money }}
              {% else %}
                مجاناً
              {% endif %}
            </p>
          </td>
      </table>
    </td>
  </tr>{% endfor %}
</table>

        {% else %}
          
<table class="row">
  {% for line in line_items_including_zero_quantity %}
  <tr class="order-list__item">
    <td class="order-list__item__cell">
      <table>
          {% assign expand_bundles = false %}
        {% if expand_bundles and line.bundle_parent? %}
          <td class="order-list__parent-image-cell">
            {% if line.image %}
              <img src="{{ line | img_url: 'compact_cropped' }}" align="right" width="60" height="60" class="order-list__product-image"/>
            {% else %}
              <div class="order-list__no-image-cell">
                <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="right" width="60" height="60" class="order-list__no-product-image"/>
              </div>
            {% endif %}
          </td>
        {% else %}
          <td class="order-list__image-cell">
            {% if line.image %}
              <img src="{{ line | img_url: 'compact_cropped' }}" align="right" width="60" height="60" class="order-list__product-image"/>
            {% else %}
              <div class="order-list__no-image-cell">
                <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="right" width="60" height="60" class="order-list__no-product-image"/>
              </div>
            {% endif %}
          </td>
        {% endif %}
        <td class="order-list__product-description-cell">
          {% if line.product.title %}
            {% assign line_title = line.product.title %}
          {% else %}
            {% assign line_title = line.title %}
          {% endif %}

          {% if line.quantity < line.quantity %}
            {% capture line_display %}
              {{ line.quantity }} من {{ line.quantity }}
            {% endcapture %}
          {% else %}
            {% assign line_display = line.quantity  %}
          {% endif %}

          <span class="order-list__item-title">{{ line_title }}&nbsp;&times;&nbsp;{{ line_display }}</span><br/>

          {% if line.variant.title != 'Default Title' and line.bundle_parent? == false %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% elsif line.variant.title != 'Default Title' and line.bundle_parent? and expand_bundles == false %}
            <span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
          {% endif %}

          {% if expand_bundles %}
            {% for component in line.bundle_components %}
              <table>
                <tr class="order-list__item">
                  <td class="order-list__bundle-item">
                    <table>
                      <td class="order-list__image-cell">
                        {% if component.image %}
                          <img src="{{ component | img_url: 'compact_cropped' }}" align="right" width="40" height="40" class="order-list__product-image"/>
                        {% else %}
                          <div class="order-list__no-image-cell small">
                            <img src="{{ 'notifications/no-image.png' | shopify_asset_url }}" align="right" width="40" height="40" class="order-list__no-product-image small"/>
                          </div>
                        {% endif %}
                      </td>
<td class="order-list__product-description-cell">
  {% if component.product.title %}
    {% assign component_title = component.product.title %}
  {% else %}
    {% assign component_title = component.title %}
  {% endif %}

  {% assign component_display = component.quantity %}

  <span class="order-list__item-title">{{ component_title }}&nbsp;&times;&nbsp;{{ component_display }}</span><br>

  {% if component.variant.title != 'Default Title'%}
    <span class="order-list__item-variant">{{ component.variant.title }}</span>
  {% endif %}
</td>
</table>
</td>
</tr>
</table>
{% endfor %}
{% else %}
{% for group in line.groups %}
<span class="order-list__item-variant">جزء من: {{ group.display_title }}</span><br/>
{% endfor %}
{% endif %}

{% if line.gift_card and line.properties["__shopify_send_gift_card_to_recipient"] %}
{% for property in line.properties %}
{% assign property_first_char = property.first | slice: 0 %}
{% if property.last != blank and property_first_char != '_' %}
<div class="order-list__item-property">
<dt>{{ property.first }}:</dt>
<dd>
{% if property.last contains '/uploads/' %}
<a href="{{ property.last }}" class="link" target="_blank">
{{ property.last | split: '/' | last }}
</a>
{% else %}
{{ property.last }}
{% endif %}
</dd>
</div>
{% endif %}
{% endfor %}

{% endif %}

{% if line.selling_plan_allocation %}
<span class="order-list__item-variant">{{ line.selling_plan_allocation.selling_plan.name }}</span><br/>
{% endif %}

{% if line.aggregated_update %}
<span class="order-list__item-update-status">{{line.aggregated_update}}</span>
{% elsif line.refunded_quantity > 0 %}
<span class="order-list__item-refunded">تم الاسترداد</span>
{% endif %}

{% if line.discount_allocations %}
{% for discount_allocation in line.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != 'all' %}
<p>
<span class="order-list__item-discount-allocation">
<img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
<span>
{{ discount_allocation.discount_application.title | upcase }}
(-{{ discount_allocation.amount | money }})
</span>
</span>
</p>
{% endif %}
{% endfor %}
{% endif %}
</td>
{% if expand_bundles and line.bundle_parent? %}
<td class="order-list__parent-price-cell">
{% else %}
<td class="order-list__price-cell">
{% endif %}
{% if line.original_line_price != line.final_line_price %}
<del class="order-list__item-original-price">{{ line.original_line_price | money }}</del>
{% endif %}
<p class="order-list__item-price">
{% if line.final_line_price > 0 or line.quantity == 0 %}
{{ line.final_line_price | money }}
{% else %}
مجاناً
{% endif %}
</p>
</td>
</table>
</td>
</tr>{% endfor %}
</table>

{% endif %}
<table class="row subtotal-lines">
<tr>
<td class="subtotal-spacer"></td>
<td>
<table class="row subtotal-table">


{% assign order_discount_count = 0 %}
{% assign total_order_discount_amount = 0 %}
{% assign has_shipping_discount = false %}

{% for discount_application in discount_applications %}
{% if discount_application.target_selection == 'all' and discount_application.target_type == 'line_item' %}
{% assign order_discount_count = order_discount_count | plus: 1 %}
{% assign total_order_discount_amount = total_order_discount_amount | plus: discount_application.total_allocated_amount  %}
{% endif %}
{% if discount_application.target_type == 'shipping_line' %}
{% assign has_shipping_discount = true %}
{% assign shipping_discount = discount_application.title %}
{% assign shipping_amount = discount_application.total_allocated_amount %}
{% endif %}
{% endfor %}



<tr class="subtotal-line">
<td class="subtotal-line__title">
<p>
<span>المجموع الفرعي</span>
</p>
</td>
<td class="subtotal-line__value">
<strong>{{ subtotal_price | plus: total_order_discount_amount | money }}</strong>
</td>
</tr>



{% if order_discount_count > 0 %}
{% if order_discount_count == 1 %}

<tr class="subtotal-line">
<td class="subtotal-line__title">
<p>
<span>خصم الطلب</span>
</p>
</td>
<td class="subtotal-line__value">
<strong>-{{ total_order_discount_amount | money }}</strong>
</td>
</tr>

{% endif %}
{% if order_discount_count > 1 %}

<tr class="subtotal-line">
<td class="subtotal-line__title">
<p>
<span>خصومات الطلب</span>
</p>
</td>
<td class="subtotal-line__value">
<strong>-{{ total_order_discount_amount | money }}</strong>
</td>
</tr>

{% endif %}
{% for discount_application in discount_applications %}
{% if discount_application.target_selection == 'all' and discount_application.target_type != 'shipping_line' %}
<tr class="subtotal-line">
<td class="subtotal-line__title">
<p>
<span class="subtotal-line__discount">
<img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
<span class="subtotal-line__discount-title">{{ discount_application.title }} (-{{ discount_application.total_allocated_amount | money }})</span>
</span>
</p>
</td>
</tr>

{% endif %}
{% endfor %}
{% endif %}


{% if has_shipping_discount %}

<tr class="subtotal-line">
<td class="subtotal-line__title">
<p>
<span>الشحن</span>
</p>
</td>
<td class="subtotal-line__value">
<strong>مجاناً</strong>
</td>
</tr>

<tr class="subtotal-line">
<td class="subtotal-line__title">
<p>
<span class="subtotal-line__discount">
<img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
<span class="subtotal-line__discount-title">{{ shipping_discount }} (-{{ shipping_amount | money }})</span>
</span>
</p>
</td>
</tr>

{% else %}

<tr class="subtotal-line">
<td class="subtotal-line__title">
<p>
<span>الشحن</span>
</p>
</td>
<td class="subtotal-line__value">
<strong>{{ shipping_price | money }}</strong>
</td>
</tr>

{% endif %}


{% for fee in fees %}

<tr class="subtotal-line">
<td class="subtotal-line__title">
<p>
<span>{{ fee.title }}</span>
</p>
</td>
<td class="subtotal-line__value">
<strong>{{ fee.subtotal | money }}</strong>
</td>
</tr>

{% endfor %}



<tr class="subtotal-line">
<td class="subtotal-line__title">
<p>
<span>الضرائب المقدرة</span>
</p>
</td>
<td class="subtotal-line__value">
<strong>{{ tax_price | money }}</strong>
</td>
</tr>


{% if total_tip_received and total_tip_received > 0 %}

<tr class="subtotal-line">
<td class="subtotal-line__title">
<p>
<span>البقشيش</span>
</p>
</td>
<td class="subtotal-line__value">
<strong>{{ total_tip_received | money }}</strong>
</td>
</tr>

{% endif %}
</table>
</td>
</tr>
</table>

<table class="row subtotal-lines">
<tr>
{% if total_price > total_outstanding %}
<td class="subtotal-spacer"></td>
<td>
<table class="row subtotal-table">

<tr class="subtotal-line">
<td class="subtotal-line__title">
<p>
<span>الإجمالي المحدث</span>
</p>
</td>
<td class="subtotal-line__value">
<strong>{{ total_price | money }}</strong>
</td>
</tr>


<tr class="subtotal-line">
<td class="subtotal-line__title">
<p>
<span>تم دفعه بالفعل</span>
</p>
</td>
<td class="subtotal-line__value">
<strong>{{ net_payment | money }}</strong>
</td>
</tr>

</table>
<table class="row subtotal-table subtotal-table--total">

<tr class="subtotal-line">
<td class="subtotal-line__title">
<p>
<span>المبلغ المستحق الدفع</span>
</p>
</td>
<td class="subtotal-line__value">
<strong>{{ total_outstanding | money_with_currency }}</strong>
</td>
</tr>

</table>
</td>
{% else %}
<table class="row subtotal-table subtotal-table--total">

<tr class="subtotal-line">
<td class="subtotal-line__title">
<p>
<span>المبلغ المستحق الدفع</span>
</p>
</td>
<td class="subtotal-line__value">
<strong>{{ total_outstanding | money_with_currency }}</strong>
</td>
</tr>

</table>
{% endif %}
</tr>
</table>


</td>
</tr>
</table>
</center>
</td>
</tr>
</table>

{% if shipping_address or billing_address or shipping_method or company_location or payment_terms and payment_terms.automatic_capture_at_fulfillment == false %}
<table class="row section">
<tr>
<td class="section__cell">
<center>
<table class="container">
<tr>
<td>
<h3>معلومات العميل</h3>
</td>
</tr>
</table>
<table class="container">
<tr>
<td>

<table class="row">
<tr>
{% if shipping_address %}
<td class="customer-info__item">
<h4>عنوان الشحن</h4>
{{ shipping_address | format_address }}
</td>
{% endif %}

{% if billing_address %}
<td class="customer-info__item">
<h4>عنوان الفواتير</h4>
{{ billing_address | format_address }}
</td>
{% endif %}
</tr>
</table>

<table class="row">
<tr>
{% if company_location %}
<td class="customer-info__item">
<h4>الموقع</h4>
<p>
{{ company_location.name }}
</p>
</td>
{% endif %}

{% if payment_terms and payment_terms.automatic_capture_at_fulfillment == false %}
<td class="customer-info__item">
<h4>الدفع</h4>
{% if payment_terms.type == 'receipt' and payment_terms.next_payment.due_at == nil %}
{% assign due_date = 'now' %}
{% else %}
{% assign due_date = payment_terms.next_payment.due_at | default: nil %}
{% endif %}
{% if payment_terms.type == 'fulfillment' and payment_terms.next_payment.due_at == nil %}
<p>{{ payment_terms.translated_name }}</p>
{% else %}
<p>{{ payment_terms.translated_name }}: مستحق {{ due_date | date: format: 'date' }}</p>
{% endif %}
{% endif %}
</td>
</tr>
<tr>
{% if shipping_method %}
<td class="customer-info__item">
<h4>طريقة الشحن</h4>
<p>{{ shipping_method.title }}<br/>{{ shipping_method.price | money }}</p>
</td>
{% endif %}
</tr>
</table>

</td>
</tr>
</table>
</center>
</td>
</tr>
</table>
{% endif %}

<table class="row footer">
<tr>
<td class="footer__cell">
<center>
<table class="container">
<tr>
<td>

<p class="disclaimer__subtext">إذا كان لديك أي أسئلة، يرجى الرد على هذا البريد الإلكتروني أو الاتصال بنا على <a href="mailto:{{ shop.email }}">{{ shop.email }}</a></p>
</td>
</tr>
</table>
</center>
</td>
</tr>
</table>

<img src="{{ 'notifications/spacer.png' | shopify_asset_url }}" class="spacer" height="1" />

</td>
</tr>
</table>
</body>
</html>

Last updated