1.7.25. Invoice ドロップ (up)

1.7.25.1. メソッド

1.7.25.1.1. errors

送付に失敗した後にこのモデルのフォームがレンダリングされると、発生したエラーを返します。

{{ invoice.errors.name | inline_errors }}
1.7.25.1.2. friendly_id

平易な ID を返します。

<td> {{ invoice.id }} </td>
<td> {{ invoice.name }} </td>
<td> {{ invoice.state }} </td>
<td> {{ invoice.cost }} {{ invoice.currency }} </td>
1.7.25.1.3. name

月と年で設定される文字列

1.7.25.1.4. state
1.7.25.1.5. cost

小数点以下 2 桁の数値を返します。

23.00
1.7.25.1.6. currency
1.7.25.1.7. cost_without_vat

VAT を除いたコストを返します。

1.7.25.1.8. vat_amount

VAT の額を返します。

1.7.25.1.9. exists_pdf?

PDF が生成されていれば true を返します。

1.7.25.1.10. period_begin
{{ invoice.period_begin | date: i18n.short_date }}
1.7.25.1.11. period_end
{{ invoice.period_end | date: i18n.long_date }}
1.7.25.1.12. issued_on
{{ invoice.issued_on | date: i18n.long_date }}
1.7.25.1.13. due_on
{{ invoice.due_on | date: i18n.long_date }}
1.7.25.1.15. vat_code
1.7.25.1.16. fiscal_code
1.7.25.1.17. アカウント

AccountDrop を返します。

1.7.25.1.18. buyer_account
1.7.25.1.19. line_items

LineItemDrop の配列を返します。

{% for line_item in invoice.line_items %}
  <tr class="line_item {% cycle 'odd', 'even' %}">
    <th>{{ line_item.name }}</th>
    <td>{{ line_item.description }}</td>
    <td>{{ line_item.quantity }}</td>
    <td>{{ line_item.cost }}</td>
  </tr>
{% endfor %}
1.7.25.1.20. payment_transactions

PaymentTransactionDrop の配列を返します。

{% for payment_transaction in invoice.payment_transactions %}
  <tr>
    <td> {% if payment_transaction.success? %} Success {% else %} Failure {% endif %} </td>
    <td> {{ payment_transaction.created_at }} </td>
    <td> {{ payment_transaction.reference }} </td>
    <td> {{ payment_transaction.message }} </td>
    <td> {{ payment_transaction.amount }} {{ payment_transaction.currency }} </td>
  </tr>
{% endfor %}
1.7.25.1.21. url

請求書のリソース URL を返します。

{{ "Show" | link_to: invoice.url }}
1.7.25.1.22. pdf_url

請求書の PDF のリソース URL を返します。

{{ "PDF" | link_to: invoice.pdf_url }}