Skip to content

Instantly share code, notes, and snippets.

@tbkyoto
Last active July 6, 2021 00:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tbkyoto/3cc6f533bf8628fbac7654a0da7223bc to your computer and use it in GitHub Desktop.
Save tbkyoto/3cc6f533bf8628fbac7654a0da7223bc to your computer and use it in GitHub Desktop.
Order Printerの納品書テンプレート by Ship&co
<p style="float: right; text-align: right; margin: 0;">
注文日: {{ processed_at | date: "%d/%m/%y" }}<br />
注文番号: {{ order_name }}
</p>
<div style="float: left; margin: 0 0 1.5em 0;" >
<strong style="font-size: 1em;">{{ shop_name }}</strong><br /><br />
</div>
<hr />
<p style="font-size: 9px; float: center; text-align: center; margin: 0;">
<strong style="font-size: 2em;">納品書</strong><br/>
</div>
<hr />
<p style="font-size: 10px; float: left; text-align: left; margin: 0;">
お届け先: {{ shipping_address.name }} 様</strong><br/>
〒{{ shipping_address.zip }}<br/>
{{ shipping_address.city }}{{ shipping_address.address1 }}<br/>
{{ shipping_address.address2 }}<br/>
{% if shipping_address.phone %}Tel: {{ shipping_address.phone }}<br/>{% endif %}
{% if shipping_address.email %}Mail: {{ shipping_email }}<br/>{% endif %}
<p style="font-size: 10px; float: right; text-align: right; margin: 0;">
発送元: {{ shop_name }}</strong><br/>
〒{{ shop.zip }}<br/>
{{ shop.city }}{{ shop.address }}<br/>
Tel: {{ shop.phone }}<br/>
Mail: {{ shop.email }}
<br/>
<br/>
</div>
<hr />
<p style="font-size: 12px; float: left; text-align: left; margin: 0;">
<strong style="font-size: 1em;">購⼊⾦額 : {{ total_price | money }}</strong><br/>
この度は、{{ shop_name }}の商品をお買い上げいただき、誠にありがとうございます。<br/><br/>
</div>
<hr />
<table class="table-tabular" style="margin: 0 0 1.5em 0;">
<thead>
<tr>
<th>商品名</th>
<th>単価 </th>
<th>数量</th>
<th>⼩計(税込)</th>
</tr>
</thead>
<tbody>
{% for line_item in line_items %}
<tr>
<td>{{ line_item.title }}</td>
<td>{{ line_item.quantity }}</td>
<td>{{ line_item.price | money }}</td>
<td> {{ line_item.line_price | money }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<table class="table-tabular" style="margin: 0 0 1.5em 0;">
<tr>
<td>⼩計(税込): </td>
<td>{{ subtotal_price | money }}</td>
</tr>
{% for discount in discounts %}
<tr>
<td>ディスカウント "{{ discount.code }}"</td>
<td>{{ discount.savings | money }}</td>
</tr>
{% endfor %}
<tr>
<td>消費税: </td>
<td>{{ tax_price | money }}</td>
</tr>
{% if shipping_address %}
<tr>
<td>送料: </td>
<td>{{ shipping_price | money }}</td>
</tr>
{% endif %}
<tr>
<td><strong>合計⾦額: </strong></td>
<td><strong>{{ total_price | money }}</strong></td>
</tr>
</table>
{% if shipping_address.address1 != billing_address.address1 %}
<h3 style="margin: 0 0 1em 0;">請求先: </h3>
<div style="margin: 0 0 1em 0; padding: 1em; border: 1px solid black;">
<strong>{{ billing_address.name }}</strong><br/>
{% if billing_address.company %}
{{ billing_address.company }}<br/>
{% endif %}
{{ billing_address.zip }}
{{ biliing_address.city }}{{ billing_address.street }}<br/>
{{ billing_address.phone }}<br/>
</div>
{% endif %}
<p>ご質問、お問い合わせは, こちらのアドレスまでお願い致します。 <u>{{ shop.email }}</u></p>
@tbkyoto
Copy link
Author

tbkyoto commented Jul 6, 2021

I'm not a dev :-) Feel free to add your corrections or share your template that would handle more cases (discount, digital products, taxes...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment