Differentiate Sales Orders and Purchase Orders

Hi All,

I was trying to explore how we can differentiate between Sales Orders and Purchase Orders in Moqui as I could not find any specific field like orderType.

While exploring the Orders screen [1], found a way to create Purchase Orders and Sales Orders separately.

Upon further analysis of the logic [2], I could understand that it is differentiated based on the below points.

  1. If the Vendor is an internal organization the order is a Sales order.
  2. If the Customer is an internal organization then the order is a Purchase order.

I just wanted to share my understanding and would like to know if I am missing any more conditions here or above is the way to identify Sales/Purchase Orders.

[1] Webroot - Login

[2] SimpleScreens/FindOrder.xml at master Ā· moqui/SimpleScreens Ā· GitHub

Thanks!

3 Likes

There is one more case: where the Vendor and Customer are both internal orgs. The Invoice screens and services support this pretty well (both From and To Parties are internal), but the Order screens and services do not yet. The general idea is that when both are Internal Orgs then you can only determine whether it is a Sales or Purchase Order (or Receivable or Payable Invoice) by specifying first which perspective you are talking aboutā€¦ because itā€™s a Sales Order for the Vendor Party, but a Purchase Order for the Customer Party. With Invoices this is done using the Active Organization feature, and sooner or later weā€™ll do the same with Orders.

3 Likes

Hi David,

Thanks for your response!

You also have the case where none of the parties is an internal organization. This makes sense when you are considering a system that tracks activities between external parties.

The way I try to explain this concept to people used to have either ā€œPurchase Ordersā€ and ā€œSales Ordersā€ as separate entities is that each order is both, a Purchase and a Sales order, depending on behalf of which party you look at it. And the concept of internal organization is from which side you might look at it. Which means that, in the fourth case where neither customer nor vendor is an internal organization, it is neither a purchase nor a sales order but just a plain order between third parties.

1 Like

Good point Jens, yes, another option that some Moqui users are actually using is orders neither Customer nor Vendor are internal orgs. The term Iā€™ve used for these is ā€˜third party ordersā€™ such as when a platform party like Amazon is the original vendor, and you want to keep a record of that original order. The customer will be the same as on the internal order with an internal org as the Vendor, but there is an additional order representing the order for the upstream vendor. To date Iā€™ve only used such orders for analytics and not for processing, ie just drop the data in and only change it if more data comes from the upstream vendor as opposed to doing any sort of order processing (by running various services on it, ie there are lots of services you wouldnā€™t use on this sort of order, and editing mostly prevented by using statuses such as Placed and Completed).

1 Like