As mentioned earlier, our objective for this chapter is to diagnose the current state of business and find new opportunities. To start with, we will look at three business metrics from different angles. The metrics are number of sales, profits, and profit ratios. They tell us how much The Food Factory is selling in quantity, how much it's earning in money (profit), and where it's growth opportunities are (profit ratio). Keep in mind that this is not a professional financial assessment and, as always, the focus is on the programming techniques not the actual results from the analysis.
The first thing we need to do is add to each sale its corresponding profits and profit ratio. We assume that the only way we can count a profit is if the sale order has been delivered and has been paid. Otherwise, we'll state the profit and profit...