Tags

, , ,

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 …
EN_68_0005
… entered a freight charge of $100 …
EN_68_0010
… 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.
EN_68_0015

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.
EN_68_0020
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” …
EN_68_0025
… and added the countries I required. Example:
EN_68_0030

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.
EN_68_0040
After allocating my total freight charges by using the standard charge allocation functionality …
EN_68_0045
… 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.
EN_68_0050
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.