# Principal invoices

## Principal invoices

A principal invoice is the finance record for an invoice issued on behalf of a principal.
It sits after the sales-job work and before the principal payment flow.

| If you need to… | Go to |
|---|---|
| Find an existing principal invoice | [Find and open a principal invoice](#find-and-open-a-principal-invoice) |
| Understand the list, record, and related tabs | [Understand the principal-invoice screen](#understand-the-principal-invoice-screen) |
| Change the record information | [Update the principal-invoice record](#update-the-principal-invoice-record) |
| Record a principal payment or deduction | [Manage payments, deductions, and paid status](#manage-payments-deductions-and-paid-status) |
| Continue with the general invoice status flow | [Invoice lifecycle](doc:invoice-lifecycle) |
| Work in the separate payment routes | [Record a payment](doc:record-payment) |

The application provides separate list and record routes for principal invoices. The finance
navigation destination is **Tracking Principal Invoices**. A principal invoice belongs to the
principal-side chain from principal sales invoice to principal incoming payment; the record can
also carry the **Awaiting Principal Payoff** status.

In the finance workspace, **Tracking Principal Invoices** is the active principal-invoice tab.
The same workspace also exposes **All**, **Sales Invoices**, **Commission Invoices**, and
**Incoming Payments**.

## Before you start

**Prerequisites**

- You are signed in. The record routes require authentication.
- The invoice record is loaded before record actions are available.
- The finance feature is included in your subscription.
- The list has a selected layout. The grid appears only after the layout is available.
- The list is not in minimum layout when you need its status filters.
- To use **Save** or **Save and Close**, you have permission to edit the record.
- For a record action, check the current **Status** first. The status controls whether
  **Consider As Paid**, **Consider As Not Paid**, **Comments**, **Deductions**, **Principal
  Payments**, and **Last Modifications** are available.

## Find and open a principal invoice

A principal-invoice list is the place to narrow the existing records before opening one record
for review or editing.

**Prerequisites**

- You can open `/finance/principal-invoices` or `/finance/principal-invoices/view`.

**Steps**

1. Open the principal-invoice list.

   ![Check the finance heading, status filters, and list headers.](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/53e12b5feac33d24203a21554c07b5de.png)

2. Select the filter that matches the work you need.

   | If you need to… | Select |
   |---|---|
   | See every principal invoice | **All** |
   | See upcoming invoices | **Upcoming** |
   | See receivable invoices | **Receivable** |
   | See paid invoices | **Paid** |

   ![Check the four status filters above the grid.](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/0e9bd3771f405bee7ec5e01a2a5505a6.png)

3. Select the invoice row you want to review.

**Result:** The selected principal-invoice record is open for review.

### Export the current principal-invoice list

**Prerequisites**

- The principal-invoice list is open.

**Steps**

1. Open the list toolbar's **Settings** menu.

2. Select **Export**.

**Result:** The export options for the current list are opened.

## Understand the principal-invoice screen

The principal-invoice screen combines a list with a record form and status-dependent
tabs. The list headers currently shown are:

| Header group | List headers |
|---|---|
| Record and dates | **Job no.**, **Invoice No.**, **Client**, **Principal**, `Invoice date`, `Shipment date` |
| Amounts and notes | **Note**, **Invoice amount**, **Paid**, **Deduction** |
| State | **Status** |

![Compare the visible grid headers with the list you are using.](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/7fbb43136ea6bdde301791351d89f87a.png)

The record information includes the following fields:

| Group | Fields |
|---|---|
| Record information | **Client**, **Vendor**, `Shipment Date`, **Invoice Date**, `Order Date`, `Delivery Date` |
| People and product | **End User**, **Salesperson Responsible**, **Product Type**, **Job Title**, **Item Description** |
| References | **Vendor Order No.**, **Client Order No.**, **Invoice No.**, **Note** |
| Payment popup | **Payment Date**, **comment**, and the amount control |
| Deduction popup | **Deduction reason**, **comment**, and the amount control |
| Consider-as-paid popup | **For Sure Paid**, **Probably Paid**, and **Reason For Consideration As Paid** |

The **Payment Date**, payment amount, and payment comment are required in the principal-payment
popup. The payment amount must be at least `1`, cannot exceed the remaining amount, and uses the
`#,##0.00` format. The payment date cannot be later than today.

The deduction amount, **Deduction reason**, and deduction comment are required in the
principal-deduction popup. The deduction amount must be at least `1`, cannot exceed the remaining
amount, and uses the `#,##0.00` format.

The **Deduction reason** list contains the reasons available to your company.
The seeded options are `Late Delivery`, `Technical Reason`, `Missed Parts`, `Missed Services`,
and `Unreasoned`.

The record tabs are **Comments**, **Deductions**, **Principal Payments**, and **Last
Modifications**. The deductions grid uses `Deduction reason`, `Amount`, and `Comment`. The
principal-payments grid uses `Payment date`, `Amount`, and `Comment`.

These tabs depend on the record and your access. **Comments** requires a loaded record, a
non-upcoming and non-awaiting status, and the Comments subscription. **Deductions** requires a
status of at least due. **Principal Payments** is hidden for a principal user. **Last
Modifications** requires a loaded record that is not upcoming or awaiting payoff.

The add control on **Deductions** is available when the record is not paid or considered paid.
The add control on **Principal Payments** is available for the due-to-paid payment statuses.

The list toolbar also exposes the button titles **Refresh**, **Table Layout**, and **Settings**.
The columns you see depend on the saved list layout, so work from the headers visible in your
list.

> **Note:** Use the headers visible in your list when the saved layout supplies a different set
> of columns.

Use the numeric amount box in the popup you opened: the payment popup's box is the payment
amount, and the deduction popup's box is the deduction amount.

## Update the principal-invoice record

Updating a principal invoice changes the information held on the finance record. **Client**,
**Vendor**, **Invoice No.**, and **Note** are required only where your company configures them as
mandatory; the other record fields listed above are not required by the form.

**Prerequisites**

- You have opened a saved principal-invoice record.
- You can edit the record.
- You know which record information needs changing.

**Steps**

1. Select the field you need to change: **Client**, **Vendor**, the shipment, invoice, order, or
   delivery date field, **End User**, **Salesperson Responsible**, **Product Type**,
   **Vendor Order No.**, **Client Order No.**, **Invoice No.**, **Job Title**, **Item Description**,
   or **Note**.

2. Enter or select the corrected value.

3. Choose the save action that matches what you want to do next.

   | If you want to… | Select |
   |---|---|
   | Keep the record open after the update | **Save** |
   | Save the update and leave the record | **Save and Close** |

4. Read the success message after the update.

   The message is `Your request was completed successfully`.

5. Choose what to do in the departure confirmation dialog.

   | If you want to… | Select |
   |---|---|
   | Leave without saving | **Don't Save** |
   | Save and leave | **Save** |
   | Stay on the record | **Cancel** |

**Result:** The principal-invoice record is updated, and **Save and Close** leaves the record
after the successful update.

## Manage payments, deductions, and paid status

Payment and deduction entries record how the principal invoice is settled. Paid-status actions
record whether the invoice is considered paid or returned to a due state.

### Consider an invoice paid

**Prerequisites**

- The record has a positive remaining amount.
- The record is not upcoming, paid, or already considered paid.

**Steps**

1. Select **Consider As Paid**.

2. Enter the required values in **For Sure Paid**, **Probably Paid**, and **Reason For
   Consideration As Paid**.

3. Select **Save** in the popup.

**Result:** The consider-as-paid popup has been completed, the invoice is considered paid after
the operation succeeds, and the message is `Updated successfully`.

### Return an invoice to due

**Prerequisites**

- The record is in the considered-paid status.

**Steps**

1. Select **Consider As Not Paid**.

**Result:** The invoice returns to the due status after the operation succeeds, and the message is
`Updated successfully`.

### Add a deduction or principal payment

**Prerequisites**

- For a deduction, the record status is at least due and the deductions tab is available.
- For a principal payment, you are not a principal user and the payment tab is available.
- The record is in a status that permits the corresponding add action.

**Steps**

1. Select the tab for the work you need.

   | If you need to… | Select |
   |---|---|
   | Add or review deductions | **Deductions** |
   | Add or review principal payments | **Principal Payments** |

2. In the toolbar above the selected tab's grid, select the plus control.

3. Complete the popup that matches the tab you selected.

   | If you selected… | Complete these fields |
   |---|---|
   | **Deductions** | the amount, **Deduction reason**, and required **comment** |
   | **Principal Payments** | the amount, **Payment Date**, and required **comment** |

4. Select **Save**.

5. Read the success message.

   The message is `Your request was completed successfully`.

**Result:** The saved deduction or principal payment is shown in its related grid.

## When a principal-invoice action fails

Use the message on screen to decide whether to correct the form, retry the list, or check the
record status and access.

| What you see | What it means | What to do |
|---|---|---|
| `Check validation` | A popup validation group rejected the values. | Check each required field and the amount or date rule, then select **Save** in the popup again. |
| `Updating error ` + error | The update service returned an error. | Check the record values and your edit access before retrying. |
| `Deductions Reasons failed to load` | The deduction-reason list could not load. | Return to the deduction entry after the list is available. |
| `NO Data to Export` | The list has no data to export. | Check the selected filter and list contents. |
| `Load data failed: ` + msg | The list load returned an error message. | Retry the list load and check the displayed message. |

## After reviewing a principal invoice

Saving a record update reports `Your request was completed successfully`. Status actions report
`Updated successfully`. Saving a principal payment or deduction reloads the related data, closes
its popup, and reports `Your request was completed successfully`.
The **Last Modifications** tab is the record-history destination.

Use [Invoice lifecycle](doc:invoice-lifecycle) for the general invoice workspace and status
flow. Use [Record a payment](doc:record-payment) for the separate finance payment routes.

**Result:** You know whether the principal-invoice record was updated or whether the payment or
deduction was saved, and you have the next finance procedure for the work that follows.
