> For the complete documentation index, see [llms.txt](https://docs.xorosoft.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xorosoft.com/xoroerp-1/accounting/xoro-accounting-deep-dive/how-to-create-a-journal-entry-je-in-ar-and-ap.md).

# How to Create a Journal Entry (JE) in AR and AP

### Overview

In certain accounting scenarios, you may need to create a **Journal Entry (JE)** involving **Accounts Receivable (AR)** or **Accounts Payable (AP)** to adjust balances or resolve variances.

When AR or AP is used in a Journal Entry in XoroERP, the system automatically generates a related transactional document such as an **Invoice, Credit Memo, Bill, or Vendor Credit**. These documents are system-generated and remain linked to the original Journal Entry.

This article explains how to correctly create a Journal Entry in **AR** and **AP**, and how the related documents are created automatically.

***

### Creating a Journal Entry in Accounts Receivable (AR)

Follow the steps below to create a Journal Entry using **Accounts Receivable**.

#### Step 1: Navigate to the Journal Entry Module

1. Go to the **JE (Journal Entry) module**.
2. Click **Create New Journal Entry**.

***

#### Step 2: Select AR Account

1. In the **Account** field, select **Accounts Receivable (AR)**.
2. Enter the **Amount**.
3. Select the **Entity (Customer)**.
4. Choose the **Store** associated with the transaction.

{% hint style="info" %}

* When **AR is used in a Journal Entry**, selecting the **Customer (Entity)** is mandatory.
* The **Customer Currency must match the Account Currency**.
* If applicable, select the **Tax Code**.
  {% endhint %}

***

#### Step 3: Balance the Journal Entry

Add a **credit or debit entry** to balance the Journal Entry variance.

A Journal Entry can only be saved once the **total debit and credit amounts are equal**.

#### Currency Rule

The **Journal Entry currency must match both:**

* The **Account currency**
* The **Entity (Customer) currency**

***

### System Behaviour After Creating AR Journal Entry

Once the Journal Entry is created, the system automatically generates a related document.

You can view this document in the **Credit Memo Centre**.

#### Important Rule

{% hint style="warning" %}
The **Accounts Receivable account should not have a tax code assigned**.
{% endhint %}

***

#### Case 1: AR Used as Credit with Customer Entity

If **AR is credited in the Journal Entry** with a **Customer selected as the Entity**:

The system automatically creates a **Credit Memo**.

#### Important Notes

* This **Credit Memo is system-generated**.
* It **cannot be edited or voided directly**.
* To void the Credit Memo, you must **void the linked Journal Entry**.
* When the **Journal Entry is voided**, the **associated Credit Memo is automatically voided**.

***

#### Case 2: AR Used as Debit with Customer Entity

If **AR is debited in the Journal Entry** with a **Customer selected as the Entity**:

The system automatically creates an **Invoice**.

#### Important Notes

* This **Invoice is system-generated**.
* It **cannot be edited or voided directly**.
* To void the Invoice, you must **void the linked Journal Entry**.
* When the **Journal Entry is voided**, the **associated Invoice is automatically voided**.

***

### Creating a Journal Entry in Accounts Payable (AP)

The process for **Accounts Payable (AP)** is largely the same as AR, with the main difference being the **Entity type**.

Instead of selecting a **Customer**, you must select a **Vendor**.

***

#### Step 1: Navigate to the Journal Entry Module

1. Go to the **JE module**.
2. Create a new Journal Entry.

***

#### Step 2: Select AP Account

1. In the **Account field**, select **Accounts Payable (AP)**.
2. Enter the **Amount**.
3. Select the **Entity (Vendor)**.
4. Select the **Store**.

***

#### Step 3: Balance the Journal Entry

Create the necessary **debit or credit line** to balance the Journal Entry.

The same rules apply:

* **Account currency must match the Vendor currency**
* Debit and Credit totals must balance.

***

### System Behavior After Creating AP Journal Entry

When AP is used in a Journal Entry, XoroERP automatically creates related vendor documents.

***

#### Case 1: AP Used as Credit with Vendor Entity

If **AP is credited in the Journal Entry** with a **Vendor selected as the Entity**:

The system automatically creates a **Bill**.

#### Important Notes

* The **Bill is system-generated**.
* It **cannot be edited or voided directly**.
* To void the Bill, the **linked Journal Entry must be voided**.
* When the **Journal Entry is voided**, the **associated Bill is automatically voided**.

***

#### Case 2: AP Used as Debit with Vendor Entity

If **AP is debited in the Journal Entry** with a **Vendor selected as the Entity**:

The system automatically creates a **Vendor Credit**.

#### Important Notes

* The **Vendor Credit is system-generated**.
* It **cannot be edited or voided directly**.
* To void the Vendor Credit, the **linked Journal Entry must be voided**.
* When the **Journal Entry is voided**, the **associated Vendor Credit is automatically voided**.

***

### Summary

When AR or AP accounts are used in a Journal Entry in XoroERP:

* The **Customer or Vendor must be selected as the Entity**.
* The **currency must match between Account, Entity, and Journal Entry**.
* The system **automatically generates related documents** such as:
  * Invoice
  * Credit Memo
  * Bill
  * Vendor Credit
* These documents **cannot be edited or voided independently**.
* To remove them, you must **void the linked Journal Entry**.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.xorosoft.com/xoroerp-1/accounting/xoro-accounting-deep-dive/how-to-create-a-journal-entry-je-in-ar-and-ap.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
