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

Use better description in pos_payment.js #42081

Merged

Conversation

mahsem
Copy link
Contributor

@mahsem mahsem commented Jun 28, 2024

Use Change Amount instead of Change and To Be Paid in pos_payment.js and be consistent with other strings

Use Change Amount instead of Change and To Be Paid in pos_payment.js and be consistent with other strings
@@ -584,7 +584,7 @@ erpnext.PointOfSale.Payment = class {
const remaining = grand_total - doc.paid_amount;
const change = doc.change_amount || remaining <= 0 ? -1 * remaining : undefined;
const currency = doc.currency;
const label = change ? __("Change") : __("To Be Paid");
const label = change ? __("Change Amount") : __("Change Amount");
Copy link
Contributor

Choose a reason for hiding this comment

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

Both the true and false branches of the ternary operator are the same.

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 but logically thinking from sales person view it is right

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes but logically thinking from sales person view it is right

That's okay, I was talking about the way you fix it. It should be const label = __("Change Amount"); not const label = change ? __("Change Amount") : __("Change Amount");

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do new PR

Copy link
Contributor

Choose a reason for hiding this comment

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

Make the change in this PR only?

Copy link
Contributor Author

@mahsem mahsem left a comment

Choose a reason for hiding this comment

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

Fixed

Copy link

stale bot commented Jul 18, 2024

This pull request has been automatically marked as inactive because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing.

@stale stale bot added the inactive label Jul 18, 2024
@ruthra-kumar ruthra-kumar self-assigned this Dec 5, 2024
@ruthra-kumar ruthra-kumar merged commit 138ffc4 into frappe:develop Dec 5, 2024
10 of 11 checks passed
mergify bot pushed a commit that referenced this pull request Dec 5, 2024
* Use better description in pos_payment.js

Use Change Amount instead of Change and To Be Paid in pos_payment.js and be consistent with other strings

* change_amount_pos_payment.js

(cherry picked from commit 138ffc4)
mergify bot pushed a commit that referenced this pull request Dec 5, 2024
* Use better description in pos_payment.js

Use Change Amount instead of Change and To Be Paid in pos_payment.js and be consistent with other strings

* change_amount_pos_payment.js

(cherry picked from commit 138ffc4)
ruthra-kumar added a commit that referenced this pull request Dec 5, 2024
…-42081

Use better description in pos_payment.js (backport #42081)
ruthra-kumar added a commit that referenced this pull request Dec 5, 2024
…-42081

Use better description in pos_payment.js (backport #42081)
@mahsem mahsem deleted the Use-better-description-in-pos_payment.js branch December 5, 2024 10:21
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants