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

fix percentage issue #19345

Merged
merged 6 commits into from
Oct 15, 2024
Merged

fix percentage issue #19345

merged 6 commits into from
Oct 15, 2024

Conversation

Jali-Khusi
Copy link
Contributor

@Jali-Khusi Jali-Khusi commented Oct 7, 2024

@Jali-Khusi Jali-Khusi requested a review from a team as a code owner October 7, 2024 11:54
@github-actions github-actions bot marked this pull request as draft October 7, 2024 11:54
const discountAmount = (basePrice * discountPercentage) / 100;
return basePrice - discountAmount;
if (
basePrice !== undefined &&

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Baseprice you are already doing a null check when the function is called do you thing undefined is needed?

@@ -52,11 +52,18 @@ export class CpqQuoteDiscountComponent implements OnInit, OnDestroy {
}
getDiscountedPrice(
basePrice: number | undefined,
Copy link

@vigneshkrish8691 vigneshkrish8691 Oct 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the price be of type number, or can it be of any other type?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it ll be numeric

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

base price can be like 58.50 . If its number wont it change the price?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the number type can represent both integer and floating-point values, including decimals like 58.50.

@Jali-Khusi Jali-Khusi marked this pull request as ready for review October 15, 2024 06:44
Copy link

cypress bot commented Oct 15, 2024

spartacus    Run #45320

Run Properties:  status check passed Passed #45320  •  git commit b135d3978a ℹ️: Merge 9ef644f2dcd0a97be6d69bc091978cb946e1ccaa into 1404d80f10650f100527783a7dd3...
Project spartacus
Run status status check passed Passed #45320
Run duration 03m 44s
Commit git commit b135d3978a ℹ️: Merge 9ef644f2dcd0a97be6d69bc091978cb946e1ccaa into 1404d80f10650f100527783a7dd3...
Committer Jali-Khusi
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 3
Tests that did not run due to a developer annotating a test with .skip  Pending 2
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 125

@github-actions github-actions bot marked this pull request as draft October 15, 2024 14:31
@RadhepS RadhepS marked this pull request as ready for review October 15, 2024 14:33
@Jali-Khusi Jali-Khusi merged commit 7c15b1a into develop Oct 15, 2024
28 checks passed
@Jali-Khusi Jali-Khusi deleted the fix-percentage branch October 15, 2024 17:06
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

Successfully merging this pull request may close these issues.

3 participants