[IMP] Improved code for opportunity fields calculation and in sps_sale.