# Apply per document

When you post a receipt or payment from a general journal and apply the line to several open entries of a customer or vendor, the system normally keeps a single journal line applied to all the selected documents.

With the **Apply per Document** option enabled on the journal batch, the system instead automatically creates a separate journal line for each selected document. This way each invoice or credit memo has its own line, with its own amount and reference.


1. Open the **General Journal Batches** page (for example from the general journal, **Batch Name** field).
2. Select the batch used for receipts and payments.
3. Turn on the **Apply per Document** field.

| Field | Description |
|---|---|
| **Apply per Document** | If enabled, applying a line to several open entries generates one journal line for each applied document. |


1. In a general journal using a batch with **Apply per Document** enabled, enter a line for the customer or vendor (as account or as balancing account).
2. Run the **Apply Entries** action.
3. On the open entries page, select the documents to apply with **Set Applies-to ID** and, if needed, enter the **Amount to Apply**.
4. Confirm with **OK**.


- For each selected document, a new journal line is created at the end of the batch, copying the data from the original line and setting:
  - the applies-to document type and number (in Italy also the installment number);
  - **Amount** equal to the document's amount to apply, with the correct sign depending on whether the customer/vendor is the account or the balancing account;
  - **External Document No.** of the applied document;
  - **Description** made of document type, external document number and customer/vendor name.
- If the batch already contains a line applied to the same document, no new line is created for it.
- The original line, if it was not applied to a specific document, is deleted and replaced by the new lines.
- If the option is not enabled on the batch, or no documents were selected, application works as standard.