I was reading that an easy way would be to use the invoicing layout and change the direction things are flowing.
Since (at least within the database) these “directions” are merely labels, you could just to add a new one (label), i.e. combine orders and purchases under the umbrella of “transactions”.
Let transaction line items (internally) enter their amounts as plus or minus, depending on their parent's transaction; use the same mechanism to decide if you need to add or subtract from your stock level per product.
Thank you for the help