-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Retroport: FIX determine multi-currency price on object line create tpl (#28021) #30535
Conversation
Sorry, but you put "NEW" in the title of this PR and it seems to be a FIX. |
I changed the title, but I juste copied/pasted the original PR title. In fact, currently, when you add a product on a supplier order, the price taken into account is the one in your own currency. With this fix, the price in its original currency is used to calculate all prices: the price in supplier's currency is the good one, and the one in your currency is also correct. |
} else { | ||
jQuery("#price_ht").val(up_locale); | ||
var multicurrency_code = $('option:selected', this).attr('data-multicurrency-code'); // When select is done from HTML select | ||
if (multicurrency_code == undefined) { multicurrency_code = jQuery('#idprodfournprice').attr('data-multicurrency-code'); } // When select is done from HTML input with ajax autocomplete |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why to use here "== undefined" and not "typeof multicurrency_code === 'undefined'" like in other parts of this JS script ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only because it's a back port of an existing PR. Maybe this change should also be done in develop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think.
@eldy What is your advice ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we are in a v18 submission, and it is a backport, code must be the much as possible similar than original,even if code is not as "clean" as we can.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems ok for me (note: but i don't have multicurrency setup so i can't make real tests)
Related to the PR #30473 but with a clean commit.