# Record a payment

An incoming payment is a payment recorded after money is received from an account.
Use the finance payment routes to find a payment or enter a new one.

Allocation applies the received amount against invoices while preserving the remaining balance.

```mermaid
flowchart LR
    A[Received amount] --> B[Select account]
    B --> C[Load invoices]
    C --> D[Enter allocated amount]
    D --> E[Save payment]
    D --> F[Remaining balance]
```

## Before you start

Have the account, payment date, amount, currency, and receiving method ready before you open
the form.

| If you need to… | Go to |
| --- | --- |
| Find an existing payment or open the payment route | [Find a payment](#find-a-payment) |
| Recognise the fields and allocation area | [Understand the payment screen](#understand-the-payment-screen) |
| Enter the account, date, amount, and method | [Enter payment details](#enter-payment-details) |
| Load invoices and adjust allocation | [Handle payment method and invoice allocation](#handle-payment-method-and-invoice-allocation) |
| Correct a validation message before saving again | [Save the payment and resolve errors](#save-the-payment-and-resolve-errors) |
| Continue with attached files | [Libraries](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/libraries-files) |
| Maintain the account used by **Received From** | [Accounts](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/accounts) |
| Maintain payment-method data | [Payment methods](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/configuration-sales-payments-methods) |
| Maintain bank accounts for bank transfers | [Bank accounts](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/configuration-finance-banks-accounts) |

The new-payment form requires **Received From**, **Receiving Date**, **Received Amount**, and
**Recieving Method**. If your subscription does not include the payment feature, the payment
form is replaced by a subscription-upgrade surface. Save controls appear only when editing is
allowed.

## Find a payment

Use the payment list to review incoming payments or open a new incoming-payment form. The
invoice route is a separate list, even though it also has an **Incoming Payments** tab.

**Prerequisites**

- You are signed in to PAMS.
- You know whether you are finding an existing payment or recording a new one.

**Steps**

1. Open the finance payment list.

   ![Payment list with its tabs and visible payment columns](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/bd8f887cd10539b50b8bfbafc7ab9eb2.png)

2. Select the payment-list tab that matches the payment state.

   | If you need to… | Select |
   | --- | --- |
   | Review every payment in the list | **All** |
   | Review payments that still have an unallocated amount | **Not completely Allocated** |
   | Review payments whose amount is completely allocated | **Completely Allocated** |

3. Read the payment rows under **Transaction no.**, **Receiving on**, **Account**, **Amount**,
   **Amount in €**, **Unallocated amount**, and **Unallocated Amount in €**.

4. Use **Refresh**, **Table Layout**, or **Settings** for the corresponding list-toolbar action.

5. Select **Incoming Payment** to open the new-payment route.

   ![Payment route entry from the finance list](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/0632793af05f159ff726217821f5a99b.png)

The invoice list is a different destination. Return to the payment list before using payment-list
tabs or toolbar actions. Treat **Export** on the invoice list as an invoice-list action.

The finance destinations are **All**, **Sales Invoices**, **Commission Invoices**, **Payment List**,
and **Principals Invoices**. The payment list shows 30 rows per page. Use header filtering, the
optional filter row, **Open**, or **Open in new tab** to review a payment. **Delete** appears when
your permission allows it.

**Result:** The payment list is open with its tabs and payment columns, or the new-payment form
is open. Continue with [Understand the payment screen](#understand-the-payment-screen).

### Export the payment list

1. Open the list toolbar's export action.

2. In **Exporting List:**, select **Export to Excel** or **Export to PDF**.

3. Select **Export** to start the export.

4. Select **Cancel** to close the export choices without starting an export.

**Result:** The export choices are closed.

If the list contains no data, it displays `NO Data to Export`.

### Delete a payment

**Prerequisites**

- You have permission to use **Delete**.
- You have opened the payment list.

**Steps**

1. Select **Delete** for the payment.

2. Confirm `Are you sure you want to Delete this payment ?`.

**Result:** The payment is deleted and `Data Deleted Successfully` is displayed.

## Understand the payment screen

The payment screen combines payment details at the top, invoice allocation in the middle, and
tabs for saved payments below. Read these areas before entering values.

### Payment details and readouts

The form contains these fields and readouts:

| Area | Labels |
| --- | --- |
| Payment details | **Received From**, **Receiving Date**, **Payment Number**, **Received Amount**, **Currency**, **Recieving Method**, **Reference #**, **Receiving Account**, **Bank Charges** (for **Bank transfer**), **Amount** |
| Allocation readouts | **No Invoices To Display**, **Recieved Amount**, **Allocated Amount**, **None Allocated Amount**, **Tickets** |
| Saved-payment tabs | **Attachment**, **Last Modifications** |

**Payment Number** and **Amount** are read-only when their conditions apply. The visible payment
list columns come from the selected list layout.

### Allocation grid

The invoice allocation grid uses **Invoice No.**, **Invoice Date**, **Job No.**, **Invoice
Amount**, **Paid Amount**, **badDebt Amount**, **Due Amount**, **Due Amount** in default currency,
and **Allocated Amount**. Only **Allocated Amount** is editable. Selecting an account loads its
invoice allocation data. Keep **Allocated Amount** no higher than the received payment amount.

![Payment screen with details and allocation areas](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/f2544bda02cd5cbf96391377f7f5df86.png)

Continue with [Enter payment details](#enter-payment-details).

## Enter payment details

Enter the payment in the order the form presents it: account, date, amount, currency, receiving
method, and any details required by that method.

**Prerequisites**

- You have opened the new-payment form.
- You have the account, date, amount, currency, and receiving method ready.

**Steps**

1. In **Received From**, select the account that made the payment.

2. In **Receiving Date**, enter the date the payment was received.

3. In **Received Amount**, enter the amount received.

4. In **Currency**, select the currency for the payment. Each option shows a code, name, and symbol.

5. In **Recieving Method**, select the method used for the payment.

6. Complete the method-specific detail.

   | If you selected… | Then… |
   | --- | --- |
   | **cheque** | Enter the cheque identifier in **Reference #**. |
| **Bank transfer** | Select the destination in **Receiving Account**. |
   | **Cash** | No method-specific field is listed for this choice. |

7. Review **Payment Number** and **Amount** without editing them. **Payment Number** is read-only
   for an existing payment, and **Amount** is read-only when its currency and payment data are
   available.

**Result:** The payment form contains the base details and the applicable method-specific detail.
Continue with [Handle payment method and invoice allocation](#handle-payment-method-and-invoice-allocation).

When the received amount is positive, a currency is selected, and assistant currencies are
available, the currency-assistant row displays **Amount** and `Rate to` for each displayed currency.

## Handle payment method and invoice allocation

The receiving method determines which method-specific fields appear, while the selected account
determines which invoices can be allocated. Use the method table in [Enter payment details](#enter-payment-details)
when you need to check the applicable field. Allocation cannot exceed the received payment amount.

Each option shows a code, name, and symbol. Select the currency that matches the payment. After you
select **Bank transfer**, **Receiving Account** becomes available.

**Prerequisites**

- You have entered the base payment details.
- You have selected **Received From** before reviewing invoice allocation.

**Steps**

1. Select **Received From** to load invoice allocation data for the account.

2. Review the invoices shown in the allocation grid.

3. Select **Enable Editing** when you need to change an existing payment.

4. Select **Adjust Allocation** when allocation adjustment is available.

5. Keep the total allocated amount at or below the value in **Received Amount**.

6. Select **Exit Enable Editing Mode** when you finish changing an existing payment.

7. If the invoice subscription is unavailable, read **Payable invoices** in the allocation area.

8. If no invoice is available, read `No Invoices To Display`.

**Result:** The applicable fields are complete, invoices for the selected account are available
for review, and the allocation does not exceed the received payment amount. Continue with
[Save the payment and resolve errors](#save-the-payment-and-resolve-errors).

An allocation recalculates the invoice due and paid amounts and the payment's allocated and
non-allocated amounts. If the allocated amount exceeds the invoice due, the form displays
`Allocated amount is bigger than Due Amount`. If it exceeds the received amount, the form displays
`Allocated amount is bigger than recieved amount`.

## Save the payment and resolve errors

Use **Save** to keep the payment on the form or **Save and Close** to save and leave the page.
When you select **Save** on an empty form, the page remains on the new-payment form and displays
`Check mandatory field(s)`.

> **Note:** An empty save keeps the new-payment form open and displays `Check mandatory field(s)`.

### Save the payment

**Prerequisites**

- You have completed the applicable payment fields.
- You have checked that the allocated amount does not exceed the payment amount.

**Steps**

1. Select the save action that matches what you need.

   | If you need to… | Select |
   | --- | --- |
   | Save the payment and remain on the form | **Save** |
   | Save the payment and leave the page | **Save and Close** |

**Result:** The selected save action has been submitted while the payment form remains available
or the page is left.

**Save** displays `Data saved Successfully`, and a new payment opens its saved record.

### Correct validation messages

**Prerequisites**

- The payment form displays a validation message.

**Steps**

1. Select the destination in **Receiving Account** when the form shows `Receiving account is required`
   or `Receiving bank account is required`.

2. Select **cheque** when the form shows `Reference # is required`.

3. Enter the cheque identifier in **Reference #**.

4. When the form shows a message, apply the matching correction.

   | If the message is… | Apply this correction |
   | --- | --- |
   | `Check mandatory field(s)` | Complete the field named by the validation message. |
   | `Client is Required` | Select the account in **Received From**. |
   | `Receiving Date is Required` | Enter the received date in **Receiving Date**. |
   | `Received Amount is Required` | Enter the payment amount in **Received Amount**. |
   | `Received Amount Currency is Required` | Select the payment currency in **Currency**. |
   | `Payment Method is Required` | Select the payment method in **Recieving Method**. |
    | `Receiving account is required` or `Receiving bank account is required` | Select the destination in **Receiving Account**. |
   | `The Allocated Amount is more than Payment Amount` | Reduce **Allocated Amount** so it does not exceed **Received Amount**. |
   | `Input contains forbidden characters(< , >). Please remove them and try again.` | Remove `<` and `>` from the entered value. |

5. Select **Save** again.

   ![Mandatory-field validation on the payment form](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/1ca40791d5fc9107398c78c74fe6aed5.png)

**Result:** The payment form displays the corrected field or allocation value, ready for another
save attempt. Continue with [After the payment is saved](#after-the-payment-is-saved).

The allocation-specific messages are `Allocated amount is bigger than Due Amount`,
`Allocated amount is bigger than recieved amount`, and `The Allocated Amount is more than Payment
Amount`.

## Out of scope

The **Deductions** tab is not available for payment work. If `Save error` appears, review the payment
values and use the specific validation message when one is displayed.

## After the payment is saved

After the payment is saved, use its supporting tabs to continue file work or review its history.
The save-success message is `Data saved Successfully`; editing-mode messages are
`Enable editing mode is active` and `Enable editing mode is inactive`.

**Prerequisites**

- The payment is saved.

**Steps**

1. Select **Attachment** to continue file work from the saved payment.

   The attached-documents area opens. Its document action opens the upload-file popup and refreshes
   the files when the popup closes.

2. Select **Last Modifications** to review the payment's audit-history surface.

**Result:** You can continue with attached files or review the payment's history.
