# 原価データを出力する

本機能はCost and Usage Reportのデータを元に、AWSからRippleユーザーへの請求金額情報（原価）をCSV形式で出力する機能です。

{% hint style="info" %}
**CSVをダウンロードできるタイミング**\
→ Invoice IDが確定したタイミング。月内に複数のInvoice IDが存在する場合、確定した内容から出力が可能となります。
{% endhint %}

## 操作方法 <a href="#how-to-use" id="how-to-use"></a>

Ripple左メニューの`ツール`から`原価のデータの出力(.csv)`をクリックし、年月を選択する。

1. **ドルベースのCSVをダウンロードする場合**\
   右上の`原価データの一括出力`をクリックし、`米ドルで出力`ボタンからCSVをダウンロードする。\
   \*ドルのCSVでは小数点以下の丸め処理は行いません。<br>
2. **円ベースのCSVをダウンロードする場合**\
   表示されているInvoice ID横のチェックボックスを選択し、`為替レートの登録`ボタンを押す。全てのInvoice IDに対して為替レートを登録したのち、`原価データの一括出力`ボタンから小数点の丸め処理を選択、`日本円で出力`ボタンをクリックする。

## CSVの項目について <a href="#csv-data" id="csv-data"></a>

利用料はアカウント単位で一行、その他の費用及びInvoice IDが異なるものに関してはアイテムごとに一行出力されます。

出力したCSVには以下の項目が含まれます。

| 項目               | 請求グループID                                                                                               |
| ---------------- | ------------------------------------------------------------------------------------------------------ |
| BillingGroupID   | 請求グループのID                                                                                              |
| BillingGroupName | 請求グループ名                                                                                                |
| Project Code     | <p>プロジェクトコード<br>（設定していない場合は空欄）</p>                                                                     |
| Payer accountID  | そのアカウントが紐づくPayerアカウントのID                                                                               |
| Vendor           | クラウドの種類                                                                                                |
| Invoice ID       | <p>AWSにより請求書単位で設定されているID</p><p>CUR上の「bill/InvoiceId」</p>                                               |
| CustomerID       | AWSアカウントID                                                                                             |
| Type             | <p>利用料 (Usage)、Fee (購入費用)、返金 (Refund)、クレジット (Credit) を区別する項目</p><p>CUR上の「lineItem/LineItemType」が基準</p> |
| Description      | <p>TypeがFee, Refund, Creditの場合のアイテムの説明。</p><p>CUR上の「lineItem/LineItemDescription」</p>                  |
| Charge           | 税抜きの金額                                                                                                 |
| Tax              | 税額                                                                                                     |
| Total            | 税込金額（Charge + Tax）                                                                                     |
| Exchange rate    | Ripple上で登録された為替レート                                                                                     |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.alphaus.cloud/ripple/more-info/export-original-cost.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
