> ## Documentation Index
> Fetch the complete documentation index at: https://docsv4.mile.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating a Bill

> Set up a bill on the Initial page and a field app page, then create tasks with bills from a spreadsheet.

This guide sets up a working bill from start to finish: the bill on the Initial page, the bill the field worker uses, and tasks that carry bill data.

## 1. Set up the Initial page bill

<div align="center">
  <img src="https://mintcdn.com/mileappv4/Xul_B0hUk35UiMLk/images/v4/workflow/components/bill-initial.png?fit=max&auto=format&n=Xul_B0hUk35UiMLk&q=85&s=18f4e8725a75449e1db434ae0528d70e" alt="Initial page bill" width="600" data-path="images/v4/workflow/components/bill-initial.png" />
</div>

1. Open the task type and click **Add component** on the **Initial page**. Choose **Bill**.
2. Give it a clear **Title**, such as *Order Bill*. The field app page bill will point to this name.
3. Under **Items**, add every product: type the **Item name** and **Item price** and click **+**. The header shows how many items you have.
4. Under **Add-ons** (optional), add the costs and discounts: choose **Cost** or **Discount**, write the name and the amount, and click **+**.
5. Leave **Visible** on.

## 2. Set up the field app page bill

<div align="center">
  <img src="https://mintcdn.com/mileappv4/Xul_B0hUk35UiMLk/images/v4/workflow/components/bill-page.png?fit=max&auto=format&n=Xul_B0hUk35UiMLk&q=85&s=5565d7df53870ccd9dfce7a242d665ab" alt="Field app page bill" width="600" data-path="images/v4/workflow/components/bill-page.png" />
</div>

1. Add a **Bill** on the field app page where the worker records what was delivered or sold. Give it its own **Title**.
2. Set **Use Bill from** to the Initial page bill. Its items, add-ons and values appear here.
3. Turn **Add New** on if the worker may add items that were not ordered.
4. Pick a **Quantity Rule** if quantities may only go up or down.
5. Click **Save**.

## 3. Check the preview

In the **Mobile app preview**, go to the field app page and tap **Open** on the bill:

* the **Item** tab lists the items with their price and quantity,
* the **Cost** tab lists the costs and discounts,
* the **Summary** tab shows the totals.

See [Bill](/pages/workflow/task-type/components/bill/introduction#on-the-field-app) for each tab.

## 4. Create tasks with bills

Bill data can be entered when creating a task on the web, or for many tasks at once from a spreadsheet:

1. Open **Activities › Task**, click the arrow beside **New** and choose **Bulk**.
2. Pick the task type with the bill.
3. Click **Download template**. The spreadsheet has the columns this task type needs.
4. Fill in the spreadsheet, then drag it onto the upload area.

The spreadsheet has two kinds of sheets:

| Sheet | Holds | Bill columns |
| - | - | - |
| **Main sheet** | One row per task | An **id** column that links the task to its bill rows, one column per cost the bill declares (`{Bill title}.costs.{Cost name}`), and with Advanced Discount a `{Bill title}.discount` column for the rule name |
| **Bill sheet** | One row per item | **id** (the same id as the task on the main sheet; repeat it for each item of that task), **name**, **qty** and **unitPrice** |

For example, a task with id `1` on the main sheet and three products has three rows with id `1` on the bill sheet.

See [Creating a Task](/pages/activities/task/create-task) and [Import](/pages/export-import/import).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.