Committed to Committing Commissions
by in CodeSOD on 2014-11-17Simon worked in a small shop that supported a sales system. One of the features of the system was that sales commissions were stored in the database. For the sake of simplicity, the sales commissions were stored as the multiplier factor needed to compute the total sale. For example, a 5% commission on $100 would be $5, so the factor would be 1.05 so you could just multiply: 100 * 1.05 -> 105.
Of course, when they needed a report that showed the percent commission for a given sale, they had to work backward from the multiplier to get the actual value.