Home Blog Acumatica Knowledge Base articles on StackOverflow

Acumatica Knowledge Base articles on StackOverflow

Mark Franks | February 13, 2017

We use StackOverflow extensively to support our developer-partner community – a place were you can post questions and get answers from our community and our team of developer-support staff. Often these questions get response within a few hours or so.

In this post, we wanted to make you aware of an initiative that our team has started to make available knowledge base articles on StackOverflow. Team has created documentation topics on Stackoverflow such as “Getting started with Acumatica”, “Adding Attribute Support to out-of-box Sales Order Entity”, among others which are enumerated at the end of this post. To give you a sample of this work, we publish here part of the Freight Calculation topic which is the most recent work completed.

Freight Calculation

Acumatica ERP enables you to manage freight to better control any additional costs and revenues on sales transactions. The freight amount you charge your customers may include not only the freight your company is charged by carriers, but also insurance, handling and packaging fees defined by your shipping terms and premium freight.

Out of the box Acumatica allows to create and maintain the list of shipping terms in the system. Shipping terms are used to define the shipping, packaging and handling costs, depending on the shipment amount.

In this example I will show how to calculate freight amount for a shipment based on sales order amount, which would allow users to create multiple shipments per sales order with same shipping terms automatically applied to all shipments.


The FreightCalculator class is responsible for calculation of Freight Cost and Freight Terms. For the purpose of this example, our interest will be only around the GetFreightTerms method:

public class FreightCalculator

    protected virtual ShipTermsDetail GetFreightTerms(string shipTermsID, decimal? lineTotal)
        return PXSelect<ShipTermsDetail,
            Where<ShipTermsDetail.shipTermsID, Equal<Required>,
            And<ShipTermsDetail.breakAmount, LessEqual<Required>>>,
            OrderBy<Desc>>.Select(graph, shipTermsID, lineTotal);


Both the Sales Orders and the Shipments screens utilize FreightCalculator class to calculate freight amount based on sales order’s and shipment’s amount respectively…

Click to continue reading.

Full List of Topics on StackOverflow

Want to see other topics covered here? Please visit the Knowledge Base on StackOverflow and request a topic.

Blog Author

Mark is responsible for Acumatica's Developer Community and making life for developers great, if not the best experience ever. If that's not the case for you, please contact him (mfranks@acumatica.com) and let him know how he can make your experience better.

Receive blog updates in your Inbox.