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.
Thanks Ludwig for the post .
I did not find weight related fields in Purchase order and sales order lines , Can i know how to get those item weight related fields and how does system calculate the weight for an item ?
Any setup need to be done in AX 2012 R2 ?
LikeLike
Hello Lally, The weight and volume related fields are not available out of the box. They are linked to the Russian configuration key and you need to make some code modifications to make this feature generally available. The weight and volume data are taken from the item master. All the best, Ludwig
LikeLike
Thanks for the reply ,
If the fields are not available then as per your example how does system takes the weight of the items in PO/SO ?
LikeLike
Hello Lally, If you make the code adjustments, the weight/volume fields become available for selection and AX is taking the weight/volume data automatically out of the gross weight respectively volume field of the item (manage inventory tab – weight measures and physical dimensions section). Without the code modification the fields are not available and AX does not consider the weight or volume of the item. All the best, Ludwig
LikeLike
Thanks for the reply,
Your blog does not talk about the code to enable the fields in PO and SO , If possible share that code also.
In the above reply you mentioned that ” AX does not consider the weight or volume of the item. “, What does it mean ?
LikeLike
Hello lally, please have a look at the section where I say something about the #iso country codes and what you need to do with the Enum. This should clarify things, Ludwig
LikeLike