Sales GL showing Gross Sales instead of Net Sales when using Discount Accounting (ERPNext v15)

Hi Everyone,

We are facing an accounting issue in ERPNext v15.65.2 and would like to understand whether this is expected behavior or if we have a configuration issue.

Environment

  • ERPNext: 15.65.2

  • Frappe: 15.71.0

Scenario

We have line-item discounts on Sales Invoices.

Example:

Item Selling Price Discount Final Amount
Administration Charges 4000.00 2762.71 1237.29
Labour Charges 4584.74 3000.00 1584.74

The Sales Invoice values are correct:

  • Net Total = ₹9,830.74

  • Grand Total = ₹11,600.28

The Sales Invoice Item also stores the correct values:

  • amount = net_amount

  • base_amount = base_net_amount

Issue

However, the generated GL Entry is:

Dr Debtors                11,600.00
Cr Sales                  15,593.45
Cr Output Tax             1,769.54
Dr Cost of Goods Sold     5,762.71

The Sales account is credited with ₹15,593.45 instead of the invoice net amount ₹9,830.74.

The difference (₹5,762.71) is exactly equal to the total line-item discount.

Investigation Done

  • No custom Server Scripts.
    No custom override of Sales Invoice.
    Invoice data is correct.
    doc.get_gl_entries() itself generates the above GL.
    Enable Discount Accounting is enabled.
    We found that all discounted invoice items have:
Income Account   : Sales - MEL
Discount Account : Cost of Goods Sold - MEL
Expense Account  : Cost of Goods Sold - MEL

There are 1189 Sales Invoice Items with:

discount_account = Cost of Goods Sold - MEL

We also checked get_default_discount_account() and it currently returns None, so we are not sure how these values were originally populated.

Questions

  1. Is this expected behavior when Enable Discount Accounting is enabled?

  2. Should the Sales account show Gross Sales and the discount be posted separately?

  3. Should discount_account ever point to Cost of Goods Sold, or should it be a dedicated Discount Allowed / Sales Discount account?

  4. Could this explain why our Sales ledger is higher than the Net Sales shown in our accounting system (Tally)?

Any guidance would be greatly appreciated.

Thank you!

I think this as per standard behaviour. Your P&L is actual not impacted as Income - Expense would give you net amount. Whatever discount you provide to customer is actually considered as expense to your company.

This is because you have not specified a specialized discount ledger in company settings. Do that if you want to record discounts given separately otherwise it will hit the GL of Cost of Goods Sold.

Thank you for your response, Team.

After disabling “Discount Accounting for Selling”, the issue has been resolved. Both the GST Report and the General Ledger are now showing the correct amounts.