> 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/configurations/sale-voucher-configuration/other-settings-1/retrieve-c.d-from-sale-order.md).

# Retrieve C.D From Sale Order

**YouTube Link:** [How to Retrieve Discounts Entered in the Sale Order in Sale Bill?](https://www.youtube.com/watch?v=9TmIMMtmWaU)

## How to Retrieve Discounts Entered in the Sale Order in Sale Bill?

### Introduction

In this Tutorial, we demonstrate how to retrieve cash discounts (CD) from sales orders when generating sales bills in Logic ERP. This automated process ensures that discounts in your sales orders accurately reflect in your sales bills.

### Steps to Retrieve CD Discounts

1. **Generate a Sales Order**\
   Begin by creating a Sales Order. Define the 10 % cash discount for any item under the CD percentage section.&#x20;
2. **Configure Sales Voucher**
   * Navigate to the "Sales Voucher Configuration".
   * Select the Relevant Billing Series.
   * Enable the option "Retrieve C.D From Sale Order".

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2Fn4KpHwcgVduYqSrsYEd3%2FRetrieve%20CD%20From%20Sale%20Order%20Configuration.png?alt=media&amp;token=4e191d54-c77a-4a92-838f-0872aa7ab0d2" alt=""><figcaption><p>Let's enable this feature and observe its impact</p></figcaption></figure>

* **Save Changes:** Ensure all changes are saved to update the settings.
* **Retrieve the Sales Order**
  * Verify the feature by generating a Sales Bill.
  * Ensure the Customer has an existing sales order.
  * Click on "Retrieve Order"

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FJRbJvoqQMGQMt3F9Q4hs%2FCD%20Retrieved%20in%20Sale%20bill.png?alt=media&amp;token=f5c1b838-30a8-48bc-a7b2-466bb6b8dbc6" alt=""><figcaption><p>CD has been automatically retrieved</p></figcaption></figure>

* **Optimize Your Billing Process**\
  Upon retrieval, the cash discount will be automatically updated based on the sales order. This feature optimizes billing by ensuring a seamless and accurate transaction, automatically applying applicable discounts from the sales order to the sales bill.

By following these steps, you can effortlessly incorporate the CD (cash discounts) from your sales orders into your sales bills, enhancing accuracy and efficiency in your billing process.


---

# 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/setups/configurations/sale-voucher-configuration/other-settings-1/retrieve-c.d-from-sale-order.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.
