I believe this is an issue but I need to confirm that the way I think is the way it supposed to be…
I have my shipping rules created
And this is my Sales Order
As you can see my total is $ 5.00
But when I select the shipping I get $ 0.00
I checked the function apply_shipping_rule in erpnext/controllers/selling_controller.py and I noticed that the issue is the wrong assignment in line 88 and 90, change ‘rate’ for ‘tax_amount’
if existing_shipping_charge:
# take the last record found
existing_shipping_charge[-1].rate = shipping_amount
else:
shipping_charge["rate"] = shipping_amount
they should be
if existing_shipping_charge:
# take the last record found
existing_shipping_charge[-1].tax_amount = shipping_amount
else:
shipping_charge["tax_amount"] = shipping_amount
After that the shipping is charged to the Sales Order