Skip to content
New issue

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

Loyalty Points calculation is not based on actual payment ? #3

Open
wooxudong opened this issue Mar 25, 2021 · 0 comments
Open

Loyalty Points calculation is not based on actual payment ? #3

wooxudong opened this issue Mar 25, 2021 · 0 comments

Comments

@wooxudong
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant