> For the complete documentation index, see [llms.txt](https://kb.logicerp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/setups/setup-accounts/setup-customer-database/set-customer-points-configuration/calculate-points-earned-for-last-____-days.md).

# Calculate Points Earned for Last \_\_\_\_ Days

**YouTube:** [How to Configure Loyalty Points Earned Based on the Last n Days?](https://www.youtube.com/watch?v=Jej9ImwDjt4\&t=62s)

## How to Configure Loyalty Points Earned Based on the Last n Days?

In this tutorial, we will learn how to configure the **"Calculate Points Earned for Last \_\_\_\_ Days"** option in Logic ERP and understand how different calculation methods affect the customer's eligible loyalty point balance.

***

### Objective of This Feature

* Calculate loyalty points based on a defined number of days
* Restrict eligible points to a specific time period
* Calculate points based on earned and redeemed values
* Calculate points using total points earned
* Calculate balance based on the last redemption
* Provide greater control over loyalty point redemption

***

### Access to the Customer Points Configuration

* Navigate to the **Set Customer Points Configuration** module.

**Existing Loyalty Settings**

For this example:

* **₹100 Purchase = 1 Loyalty Point.**
* **1 Loyalty Point = ₹10.**

<div><figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2F2hPk9KNCc6yH1yCxoQ70%2FLP.png?alt=media&amp;token=0947f177-2fed-4e3e-8b12-4c33a6684d20" alt=""><figcaption></figcaption></figure> <figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FpkYste5qAIgRbYX9jegh%2FVL.png?alt=media&amp;token=9340bf5c-75da-4449-819b-707939acbafc" alt=""><figcaption></figcaption></figure></div>

***

### Select Points Earned Minus Redeemed

* Locate the option labeled as:

> **"Calculate Points Earned for Last \_\_\_\_ Days"**

* Define the number of days as **10**.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FJW3mKo5IZBFebqDVi6En%2FCNF.png?alt=media&amp;token=99d8cb20-932a-47f1-bc51-8acdf1edb959" alt=""><figcaption></figcaption></figure>

* Once the number of days is defined, the **Points Earned of Last Number of Days As** option becomes available with three parameters.
  * Point Earned - Redeemed&#x20;
  * Total Point Earned
  * Balance since Last redeem within n of Days.

***

### **Option 1: Points Earned - Redeemed**

This option calculates the eligible points by considering:

* Points earned within the last **10 days.**
* Less points redeemed within the same period.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FwreUqObFB9ZgdoOCP6Nv%2FOption%201.png?alt=media&amp;token=48352b52-bca0-471d-8239-20fd7f77f0e3" alt=""><figcaption></figcaption></figure>

* Save the configuration changes.

***

### Review Customer Point Ledger

* Open the **Customer Point Ledger Report**.
* Review the customer's existing loyalty point transactions.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FVY9sjCCSXVRTbx6Uf4Dy%2FReport%201.png?alt=media&amp;token=4a3cbb36-8d16-4152-89a1-521264ac2f41" alt=""><figcaption></figcaption></figure>

**Example**

Assume the current date is **19 August 2026**.

Since the system is configured to consider the last **10 days**, transactions falling outside this period are excluded from the calculation.

For example:

* **1st August 2026** → Outside the 10-day period → **Not considered**
* Transactions within the defined 10-day period → **Considered**

Within the eligible period:

* **Points Earned:** 80
* **Points Redeemed:** 20
* **Eligible Balance:** 60 Points

**Calculation**

* **80 Earned − 20 Redeemed = 60 Eligible Points**

#### Verify Eligible Points in Sales Bill

* Navigate to the **Sales Bill** module.
* Select the existing loyalty customer.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2Fj83PxYdUWfwm2MPBKB45%2F60.png?alt=media&amp;token=8f99f3a6-ba32-4bc8-9a31-f359af698d34" alt=""><figcaption></figcaption></figure>

**Result**

The customer's eligible point balance is displayed as **60 Points**, matching the calculation from the Customer Point Ledger.

***

### Select Total Points Earned

Return to the **Set Customer Points Configuration** module.

* Select **Total Points Earned** under **Points Earned for Last Number of Days As**.
* Keep the period as **10 days**.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FniaOfbGZnAV399k2lqn7%2F2nd%20Option.png?alt=media&amp;token=119d14f5-ecef-4965-ab1d-d5affa65a4e7" alt=""><figcaption></figcaption></figure>

* Save the configuration.

**Functionality**

* This option considers only the **total points earned within the last 10 days**.
* Points earned outside the defined period are not considered.

***

### Verify Total Points Earned

* Review the **Customer Point Ledger Report** again.
* Within the configured 10-day period:
  * **Total Points Earned:** 70
  * Points from transactions outside the period are excluded.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FfYGazO6DH6FO3IJJBPqq%2FReport%201.png?alt=media&amp;token=5da14dbb-6ec4-4a27-aab8-74bd85da893f" alt=""><figcaption></figcaption></figure>

**Result**

* The customer's eligible point balance is now **70 Points**.
* When the same customer is selected in the **Sales Bill** module, the eligible balance is also displayed as **70 Points**.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FvB1Nuwr3nfXnCLUnDWaF%2F2nd%20Impl.png?alt=media&amp;token=cb19acb4-8956-4eb3-b298-3da03282c1c3" alt=""><figcaption></figcaption></figure>

***

### Select Balance Since Last Redeem Within Number of Days

* Return to the **Set Customer Points Configuration** module.
* Select: **Balance Since Last Redeem Within Number of Days.**
* Keep the period as **10 days** and save the configuration.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FVruEvd0jiOz92rmE2pli%2F3rd%20option.png?alt=media&amp;token=03bae410-fc81-4bb6-bb8e-a1e2978e5311" alt=""><figcaption></figcaption></figure>

**Functionality**

This option calculates the eligible balance by:

* Considering points earned within the defined period
* Deducting the points redeemed in the customer's **last redemption**

***

### Verify the Eligible Balance

Open the **Customer Point Ledger Report**.

* Transactions outside the 10-day period are excluded.
* Eligible transactions within the 10-day period are considered.
* **Total Points Earned:** 70
* **Last Redeemed Points:** 20

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FSmXthRCxvW1bW4ROsOn9%2FReport%201.png?alt=media&amp;token=fe3fd901-5b4e-48f7-9106-89affb7a1dc9" alt=""><figcaption></figcaption></figure>

**Calculation**

**70 Earned − 20 Last Redeemed = 50 Eligible Points**

***

### Verify in Sales Bill

* Navigate to the **Sales Bill** module.
* Select the same loyalty customer.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2Fs7TUNIl1BFeQSJFwBinN%2FLAst.png?alt=media&amp;token=069c9027-cf32-4e3c-ad53-97355e2578c5" alt=""><figcaption></figcaption></figure>

**Result**

The customer's eligible point balance is correctly displayed as **100 points**.

***

### Key Benefits

* **Time-Based Eligibility:** Limits loyalty point calculation to a defined period.
* **Flexible Calculation Methods:** Provides three different ways to determine eligible points.
* **Controlled Redemption:** Prevents customers from using points outside the configured period.
* **Accurate Point Tracking:** Uses the Customer Point Ledger for transparent calculations.
* **Better Loyalty Management:** Helps businesses define customized redemption eligibility.

***

### Important Note

The selected calculation method determines how the customer's eligible loyalty points are calculated within the configured number of days. Transactions outside the defined period are excluded from the calculation.

***

### Final Outcome

By configuring **"Calculate Points Earned for Last \_\_\_\_ Days"**, Logic ERP allows businesses to control the loyalty points that customers can use based on a defined time period. Depending on the selected parameter, the system can calculate eligible points as **Points Earned Minus Redeemed, Total Points Earned, or Balance Since Last Redeem Within Number of Days**.


---

# 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.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/setups/setup-accounts/setup-customer-database/set-customer-points-configuration/calculate-points-earned-for-last-____-days.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.
