Transport charges with gst calculation but no discount applied

Suppose I’m making a sales order for item x value 1000

it has transport charges 100
So I want to give discount for 2 percent on net total it should go in ledger and the discount is only on item value
Not on transport charges
But I need gst calculation in both
How to go it in erpnext

@DakshKothari18

This is how you can record this scenario in sales order.

@DakshKothari18

Solution — Pure Standard ERPNext v15 (No Custom Code)

Core Idea:
Use a negative Actual row in the Sales Taxes and Charges table to post the discount directly to the Discount Allowed ledger — without using line-item discount or the Additional Discount field.

Step 1 — Create Required Accounts

Go to: Accounting → Chart of Accounts → Add Child

Account 1:

Name: Transportation Charges

Parent Account: Direct Income - TN

Account Type: Income

Is Group: No

Account 2:

Name : Discount Allowed

Parent Account: Direct Expense - TN

Account Type: Expense

Is Group : No

Note: These accounts may already exist in the standard India Chart of Accounts. Please verify before creating new ones.

Step 2 — Create Sales Taxes and Charges Template

Go to: Accounting → Sales Taxes and Charges Template → New

Title: Transport + VAT with Discount

Add exactly 3 rows as follows:

Row

Type

Account Head

Tax Rate

Amount

1

Actual

Transportation Charges - TN

0

+100

2

Actual

Discount Allowed - TN

0

-20

3

On Previous Row Total

Output VAT 10% - TN

10

auto

Important: In Row 3, set Row ID = 2 so that VAT is calculated on the running total after the discount row (Item + Transport − Discount).

Save the template.

Step 3 — Create Sales Order

Go to: Selling → Sales Order → New

Fill in the details:

Customer: Rajesh IT Solutions

Item: Dell Laptop XPS 15

Quantity: 1

Rate: ₹65,000 ← Enter full price. Do NOT apply any line-item discount.

In the Taxes section, select:

Sales Taxes and Charges Template: Transport + VAT with Discount

The tax table will automatically calculate as follows:

Row

Account

Amount

Running Total

1

Transportation Charges

+₹100

₹65,100

2

Discount Allowed

−₹20

₹65,080

3

Output VAT 10%

+₹6,508

₹71,588

Grand Total = ₹71,588