Webshop Prices not affected by Margin Rate in Pricing Rule

Hello,

Webshop Prices not affected by Margin Rate in Pricing Rule,
only by the Discount Percentage.

This creates a conflict, Internally Erpnext cares only about the Margin Rate, but the Shop only cares about the Discount Percentage. The logic should be the same.

The easiest solution and outcome, the shop price is affected by the Pricing Rule Margin Rate.

Is there any variable that includes this?

This is the culprit file:

This code:

		# Show Price if logged in.
		# If not logged in, check if price is hidden for guest.
		if not is_guest or not cart_settings.hide_price_for_guest:
			price = get_price(
				item_code,
				selling_price_list,
				cart_settings.default_customer_group,
				cart_settings.company,
				party=party,
			)

It is getting the clean price of “selling_price_list” which should apply margin rate of the princing rule also.

Heeeeelp!