, , ,

Recently, a colleague asked me whether it is possible allocating freight charges based on the weight or volume of the products ordered. To check this, I setup a new purchase order with different items …
… entered a freight charge of $100 …
… and tried to allocate those charges to the different purchase order lines based on the weight of the products ordered. Unfortunately, I noticed that the standard application does not offer the possibility allocating freight charges based on the weight of products.

As I could not believe myself and the standard AX behavior, I had a look at the Enum that stands behind the charge allocation field (“MarkupAllocateAfter”) and noticed that AX seems to have a feature for allocating freight charges based on weight and volume for companies operating in Russia.
Eager to identify whether this feature can also be used in other countries, I simply added the CountryRegionCode configuration and added additional countries. In addition, I checked the MarkupAllocation class for the region “#isoRU” …
… and added the countries I required. Example:

Equipped with this setup, I recorded a new purchase order for the same items as before. The quantities ordered, the product weights and the expected freight allocation are shown in the next table.
After allocating my total freight charges by using the standard charge allocation functionality …
… I noticed that this little change does the job. The next screenshot shows you exemplary the freight that has been allocated to the third line.
I also tested the freight allocation based on product volume successfully but did not include it here for reasons of brevity and leave testing the freight allocation based on volume to you.

Hope that you found this information useful and look forward to seeing you in the next post.