We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The business rule is stating that loyalty points calculation are based on amount spent on the product.
if (product.getProductCode().startsWith("DIS_10")) { discount = (product.getPrice() * 0.1); loyaltyPointsEarned += (product.getPrice() / 10); } else if (product.getProductCode().startsWith("DIS_15")) { discount = (product.getPrice() * 0.15); loyaltyPointsEarned += (product.getPrice() / 15); } else { loyaltyPointsEarned += (product.getPrice() / 5); }
The code that is calculating the loyalty points does not deduct the discounts and based on the original price. Is this expected?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The business rule is stating that loyalty points calculation are based on amount spent on the product.
The code that is calculating the loyalty points does not deduct the discounts and based on the original price. Is this expected?
The text was updated successfully, but these errors were encountered: