> For the complete documentation index, see [llms.txt](https://kb.bevica.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.bevica.com/documentation/reporting-and-analytics/bevica_power_bi/sales_and_purchase_ledger_-bevica_power_bi.md).

# Sales and Purchase Ledger (Bevica Power BI)

Analyse customer and vendor ledger entries for ageing, debtors, and payables.

### Sales and Purchase Ledger (Bevica Power BI)

This exports:

* Customer Ledger Entries
* Vendor Ledger Entries

It is linked to the core **Bevica Dataset** model.

Its purpose is to allow analysis of aged debt and receivables.

Hover over a measure in Power BI to see its description.

### Measures

### Customer Ledger Entries

NB - LCY values, posted currency values (FX), and Additional Reporting Currency (ACY) values are in these reports.

* Original Amount - original posted amount (as per CLE)
* Overdue Amount - remaining amount which is overdue based on 'TODAY' at run time
* Remaining Amount - remaining amount (as per CLE)
* Avg. Debtor Days - average debtor days based on the Due Date less Closed At Date from the CLE
* Count of Invoices
* Last Invoice Date - max date of last invoice in CLE
* Last Payment Date - max date of last payment in CLE

**CLE Only Measures**

* Ageing brackets (all based on 'today')
* Days Overdue (avg.) - calculates overdue days (open invoices only which are overdue) and can be used at an aggregate level (e.g., customer or salesperson) or down to individual documents

### Vendor Ledger Entries

As per Customer Ledger but for the vendor ledger.

### Currencies

### LCY vs. FX

* LCY is in system local currency. This is from the value in the ledgers in Business Central and is not calculated in the model.
* FX is in the posted transaction currency from Business Central. Bear in mind that this could be in multiple currencies so it is recommended to use the Currency Filter.

### Currency Filter

This can be used to filter ledger entries by a specific currency. For example, to see only values in EUR where there could be entries in a range of currencies.

### Dates

You can use the **Date Type Filter (Cust/Vendor Ledger)** feature to change the date relationship. The options are:

* Posting Date - this is the default behaviour and uses the ledger posting date
* Due Date - this uses the Due Date for the relationship
* Closed At Date - uses the Closed At Date for the relationship

If you want to therefore do an aged debt type report you should use the Due Date filter to change the calculations to be based on the due date.

For example, the image below shows the date type filter in action. Note the 81'505 value is:

* Posted in 2023-03
* Due in 2023-05
* Closed in blank (as it has not yet been closed)


---

# 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://kb.bevica.com/documentation/reporting-and-analytics/bevica_power_bi/sales_and_purchase_ledger_-bevica_power_bi.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.
