> 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/utilities/import-masters-transactions-from-external-files/import-sale-bills-from-external-file/import-sale-bills-from-external-file-configuration/divide-rate-by-quantity.md).

# Divide Rate By Quantity

**YouTube:** [How to Configure Rate Division by Quantity in Sales Bill Import?](https://youtu.be/ZDGOqwnpco4?si=kqmBy5LD9UsEQ6d7)

## How to Configure Rate Division by Quantity in Sales Bill Import?

In this tutorial, we will learn how to use the **Divide Rate By Quantity** feature while importing a sale bill from an external file in Logic ERP.

This feature allows the system to calculate the per-unit rate by dividing the rate specified in the external file by the corresponding quantity.

***

### Access to the Configuration

* Navigate to the **Import Sale Bills from External File** module.
* Open the **Configuration** option and go to the **Import Settings** tab.
* Locate the option labeled as:

> **"Divide Rate By Quantity"**

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FFx5xXnRdzR0hk0pzFg4A%2FCNF%20-%20Default.png?alt=media&#x26;token=8aa1095b-41da-4818-8838-a280e1d73a82" alt=""><figcaption></figcaption></figure>

* This feature is useful when the rate specified in the external file represents the total amount for the given quantity, and you want the system to calculate the per-unit rate.

***

### Verify the Feature When Disabled

* Keep the **Divide Rate By Quantity** feature disabled.
* Save the configuration.
* Import the sale bill using the Excel sheet.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FnpkcZV4uFIACzySfCpX7%2FRate.png?alt=media&#x26;token=874e2764-4546-4c1b-bf0f-a2fd35f2eafe" alt=""><figcaption></figcaption></figure>

* As you can see, the system imports the rate exactly as specified in the Excel sheet without dividing it by the quantity.

***

### Enable the Divide Rate By Quantity Feature

* Return to the **Configuration** window.
* Enable the **Divide Rate By Quantity** feature.
* Save the configuration.
* Import the same Excel sheet again to verify the functionality.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2Fya3DkBHh4XN1ij6o4Qyn%2FRate%20Devided.png?alt=media&#x26;token=3d7dac2d-ebaf-4dfc-8276-21109300317a" alt=""><figcaption></figcaption></figure>

**Observe the Rate Calculation**

* After enabling the feature, the system divides the imported rate by the specified quantity to calculate the per-unit rate.
* For example, if the imported rate is ₹2,000 and the quantity is 5, the calculated per-unit rate will be ₹400.
* The division works the same way for Excel files and Text files.
* Rows with a quantity of zero or less (for example, return rows with a negative quantity) are not divided; their rate is kept as given in the file.
* The result is not rounded (for example, ₹1,000 for 3 pieces gives ₹333.333…).
* If **Match Rate with Logic Lot Rate** is also enabled, the divided rate is the one compared with the lot's sale rate.

***

### Verify the Imported Sale Bill

* Proceed with importing the sale bill.
* Once the import is complete, navigate to the **Sale Bill** module.
* Open the imported sale bill and verify the rate.
* As you can see, the sale bill reflects the rate calculated by dividing the imported rate by the specified quantity.

***

### Objective of This Feature

* Calculate the per-unit rate from the total rate specified in the external file.
* Automatically divide the imported rate by the corresponding quantity.
* Simplify sale bill imports when the Excel sheet contains a total amount instead of a per-unit rate.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/utilities/import-masters-transactions-from-external-files/import-sale-bills-from-external-file/import-sale-bills-from-external-file-configuration/divide-rate-by-quantity.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
