I have a project with prices including tax and I can't seem to be able to get the total tax amount (database field "Epi_ShippingTax" in Shipment table) for the shipment. The only way I can find is to use the internal inteface IShipmentCalculatedAmount to get the tax value from the shipment. Is there another way that is not internal? We send prices without tax back to the backend system so we need the calculated tax for the shipment.
I would assume the IShippingCalculator would give you the value you want:
/// Gets the shipping tax of an <see cref="T:EPiServer.Commerce.Order.IShipment" />.
/// <param name="shipment">The shipment.</param>
/// <param name="market">The market to be used in the calculation.</param>
/// <param name="currency">The currency to be used in the calculation.</param>
/// <code source="../CodeSamples/EPiServer.Commerce/Orders/OrderCalculatorsSample.cs" region="ShippingGetShippingTax" lang="cs" />
/// <returns>The shipping tax amount of the shipment.</returns>
Money GetShippingTax(IShipment shipment, IMarket market, Currency currency);
The MarketId and currency should be available on the IOrderGroup.