[flat discount] implemented flat discount on client side