# Invoice settings

An invoice choice determines whether a company branch uses an editable proforma or a
non-editable invoice. Use Invoice settings to review or change that choice.

| If you need to… | Go to |
|---|---|
| Check access, subscription, and branch conditions | [Before you start](#before-you-start) |
| Open the settings page | [Open Invoice settings](#open-invoice-settings) |
| Locate the invoice choices and audit history | [Understand the Invoice settings screen](#understand-the-invoice-settings-screen) |
| Commit a changed invoice choice | [Change and save an invoice choice](#change-and-save-an-invoice-choice) |
| Decide how to leave after changing a choice | [Handle branch and unsaved-change variations](#handle-branch-and-unsaved-change-variations) |
| Match a failure to its operation | [When loading or saving goes wrong](#when-loading-or-saving-goes-wrong) |
| Review history or leave the page | [Continue after Invoice settings](#continue-after-invoice-settings) |

## Before you start

Invoice settings holds one invoice choice for each branch panel. A branch panel is the expandable
area for one branch. Confirm the feature is included, confirm that you can edit settings, and
identify the branch whose choice you intend to change.

**Prerequisites**

- The invoice-settings feature is included for the company. When it is not included,
  the branch panels and invoice-choice controls are not available; an upgrade surface is shown
  instead.
- You have permission to edit settings.
- You know which branch's invoice choice you are changing. When no branch was previously open, the
  page initially opens the signed-in user's branch.

No required marker is shown for the invoice choice, and no required rule, pattern, range, or other
field constraint is defined for this page.

## Open Invoice settings

Open Invoice settings from the configuration menu before reviewing or changing a branch choice.

**Prerequisites**

- The prerequisites in [Before you start](#before-you-start) are satisfied.

**Steps**

1. Open the configuration menu.
2. Select **Invoice settings**.
3. Confirm that **Invoice settings**, **Save**, and **Save and Close** are visible.

   ![Identify the Invoice settings page and its save actions](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/f12499360b96fb52bf83ea77af220d8b.png)

**Result:** The Invoice settings screen is open. The branch settings and editing actions depend on
your access and subscription.

## Understand the Invoice settings screen

The screen groups the invoice choice by branch. **Last Modifications** is the audit history for a
branch. Open a branch panel to find its choice.

| Surface | What to use it for | When it appears |
|---|---|---|
| Branch panel | Open a branch and work with its invoice choice | The feature is included; the panel body appears when that branch is open |
| **Auto generate** | Offers **Editable proforma** and **Non editable invoice** in the invoice-choice radio group | The feature is included and the branch panel is open |
| **Editable proforma** | Choose the editable-proforma setting | The feature is included and the branch panel is open |
| **Non editable invoice** | Choose the non-editable-invoice setting | The feature is included and the branch panel is open |
| **Last Modifications** | Open the audit history | The feature is included and the branch has a company identifier |

Each branch panel body appears only when that branch is open. The invoice choice is the
**Auto generate** radio group, with these choices:

| If the branch needs to… | Select |
|---|---|
| Use an editable proforma | **Editable proforma** |
| Use a non-editable invoice | **Non editable invoice** |

Select **Last Modifications** to review the branch history in chronological order.

![Find the expanded branch panel, invoice choices, and Last Modifications](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/9b72901ad458451965b6b6626eb6fb96.png)

## Change and save an invoice choice

Change the invoice choice when the branch needs either an editable proforma or a non-editable
invoice. The choice is committed when you save.

**Prerequisites**

- The invoice-settings feature is included.
- You can edit settings.
- The branch panel whose choice you are changing is open.

**Steps**

1. In the open branch panel, select the choice that matches the branch's process.

   | If the branch needs to… | Select |
   |---|---|
   | Use an editable proforma | **Editable proforma** |
   | Use a non-editable invoice | **Non editable invoice** |

2. Select **Save** to keep the page open, or select **Save and Close** to save and leave the page.

   **Save** calls the save action and is available only when the data has changed. **Save and
   Close** uses the save-and-close action and is also available only when the data has changed.

3. Read the message after the save attempt.

   On success, the page displays `Your company process approvall settings has been saved successfully`.
   A save failure displays `Server Error`.

**Result:** The selected invoice choice is submitted, or the displayed message identifies a save
failure. Saving closes the page only when you selected **Save and Close** and the save completes.

## Handle branch and unsaved-change variations

The available actions depend on editing permission, subscription inclusion, the selected branch, and
whether the current choice has changed.

| Situation | What to expect |
|---|---|
| Editing is allowed and the subscription includes the feature | **Save**, **Save and Close**, and **Close** are available according to their change conditions |
| Data has not changed | **Save** and **Save and Close** are not available because there is no change to commit |
| Editing is not allowed, while the feature is included | The close option for leaving the page is used |
| A branch was not previously open | The signed-in user's branch opens initially |
| A branch choice has unsaved changes | The popup for leaving the page can offer **Don't Save**, **Save**, and **Cancel** |

**Prerequisites**

- You are on Invoice settings.
- If you are leaving after a change, you know whether to keep or discard that change.

**Steps**

1. Check whether the branch panel you need is open.
2. If no branch was previously open, work in the signed-in user's initially opened branch.
3. If you changed a choice, select **Close**.
4. Choose the popup action that matches what you need:

   | If you need to… | Select |
   |---|---|
   | Discard the unsaved choice | **Don't Save** |
   | Commit the unsaved choice before leaving | **Save** |
   | Remain on the page without choosing | **Cancel** |

5. If the action is unavailable, confirm that the subscription includes the feature and that your
   access allows editing.

**Result:** You either keep working in the selected branch, commit or discard an unsaved choice,
or remain on Invoice settings.

## When loading or saving goes wrong

Loading and saving have different messages. Match the displayed text to the operation before
deciding what to do next.

| What you see | Operation | What to do |
|---|---|---|
| `An error occurred while processing your request` | Loading the settings | Use the message to identify a loading failure. |
| `Server Error` | Saving the invoice choice | Use the message to identify a saving failure. |

The save success message is `Your company process approvall settings has been saved successfully`.

## Continue after Invoice settings

After saving or reviewing a choice, use **Last Modifications** to review the branch's audit history
when a company identifier is present. **Close** leaves Invoice settings without saving a new change;
**Save and Close** saves the changed choice before closing the page.

**Prerequisites**

- You have finished reviewing or changing the branch invoice choice.

**Steps**

1. Select **Last Modifications** when the branch has a company identifier.
2. Review the audit-log row and its chronological description.
3. Select **Close** to leave without saving a new change, or select **Save and Close** after saving
   a changed invoice choice.

**Result:** You have reviewed the branch's audit history or left Invoice settings, with the current
route and the selected save result clear.
