When we want to post item purchase, we can do it in one step (posting receipt and invoice in the same time) or in two steps (posting receipt in the first step, and then posting invoice). In my example, I have used second example. In my example, I also use line and invoice discounts, for better example.