-
Notifications
You must be signed in to change notification settings - Fork 9.4k
fixed typos for zero order credit memo feature #19288
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
fixed typos for zero order credit memo feature #19288
Conversation
Hi @viral-wagento. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
@sivaschenko , can you please look into this? |
Hi @viral-wagento. Thanks for the collaboration. Please add the translation for "Allow Zero GrandTotal for Credit Memos" and "Allow Zero GrandTotal for Credit Memos" phrases to en_US.csv |
@viral-wagento The build on Travis was terminated. It's some infrastructure problem, so don't worry about it. Thanks |
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.
Please revert wrong changes and squash all into single commit.
@@ -49,9 +49,9 @@ | |||
</field> | |||
</group> | |||
<group id="zerograndtotal_creditmemo" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1"> | |||
<label>Allow Zero GrandTotal</label> | |||
<label>Allow Zero GrandTotal for Credit Memos</label> |
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.
This is not needed - understandable from context
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.
I think we should add label - 'Allow Zero GrandTotal for Credit Memos'
because if we have only label - 'Allow Zero GrandTotoal' - how can one understand about what we are talking?
It is fine from your point that - I will name filed - 'Allow Zero GrandTotal' - that is understandable.
@orlangur , once you respond, i will commit my changes
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.
@viral-wagento it was just fine: "Allow Zero GrandTotal" for [potential] group of fields, "Allow Zero GrandTotal for Creditmemo" for specific one.
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.
@orlangur
Ohh, I have updated my changes earlier, let me know if any.
Thanks!
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.
@viral-wagento to summarize: changes in app/code/Magento/Sales/etc/adminhtml/system.xml
are not needed, changes creditmemo
-> credit memo
are not needed, please squash all needed changes into a single commit and force push.
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.
@orlangur Do you think it should be "Allow Zero GrandTotal" or "Allow Zero GrandTotal for Credit Memos" in system xmk? @viral-wagento can you please also remove unused translation from csv, once decided with system.xml
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.
@orlangur and @sivaschenko
once system.xml changes are finalised from both of you, i will do changes in system.xml and its respected changes in translation csv.
Thanks!
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.
@sivaschenko should not be changed: "Allow Zero GrandTotal" for group, "Allow Zero GrandTotal for Credit Memos" for field.
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.
Done, as per your last comment - @orlangur
<field id="allow_zero_grandtotal" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1"> | ||
<label>Allow Zero GrandTotal for Creditmemo</label> | ||
<label>Allow Zero GrandTotal for Credit Memos</label> |
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.
There are hundreds of "reditmemo" occurrences in code, including csv
files. Please revert "credtimemo" -> "credit memo" changes.
"%name,","%name," | ||
"Thank you f |
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.
Please generate csv
properly so that quotes remain in place.
@magento-engcom-team give me 2.3-develop instance |
Hi @orlangur. Thank you for your request. I'm working on Magento 2.3-develop instance for you |
Hi @orlangur, here is your Magento instance. |
//case when paid amount is refunded and order has creditmemo created | ||
|
||
$creditmemos = ($this->getCreditmemosCollection() === false) ? | ||
$creditMemos = ($this->getCreditmemosCollection() === false) ? |
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.
@viral-wagento please revert changes in app/code/Magento/Sales/Model/Order.php
related to credit memos too.
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.
@orlangur
Done
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.
@viral-wagento please check https://github.com/magento/magento2/pull/19288/files to see all items which are not done, apply changes and then squash them into a single commit.
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.
@viral-wagento almost there: https://github.com/magento/magento2/pull/19288/files
Please remove unneeded space "credit memo" -> "creditmemo" and squash changes into a single commit performing a force push.
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.
@orlangur Ok, so i should do this change 'Allow Zero GrandTotal for Credit memo' => 'Allow Zero GrandTotal for Creditmemo' - in system.xml and csv file. Right?
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.
@viral-wagento and in comment
// Case when Adjustment Fee (adjustment_negative) has been used for first credit memo
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.
@orlangur , okay going to change there too.
But then what about Retrieve order credit memo (refund) availability
Retrieve credit memo for zero total refunded availability.
and Retrieve credit memo for zero total availability.
Should i change - credit memo => creditmemo here?
They are function description
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.
@viral-wagento thanks! No need to change, as they were there before, not really worth fixing.
Changes look good to me now, please squash them into a single commit. Talk to me if you need any assistance with that.
83aaeb6
to
6918011
Compare
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.
Great @viral-wagento !
Hi @sidolov, thank you for the review. |
Hi @viral-wagento. Thank you for your contribution. |
Description
Fixed typos and added proper variable names in below files:
app/code/Magento/Sales/Model/Order.php
app/code/Magento/Sales/etc/adminhtml/system.xml
Manual testing scenarios
Changes done as below:
app/code/Magento/Sales/Model/Order.php
Line:668 - replaced $hasActinFlag to $hasActionFlag
Line:688 - replaced $dueAmountCondition to $hasDueAmount
Line:690 - replaced $creditmemos to $creditMemos
app/code/Magento/Sales/etc/adminhtml/system.xml
Line:52 - replaced Allow Zero GrandTotal to Allow Zero GrandTotal for Credit Memos
Line:54 - replaced Allow Zero GrandTotal for Creditmemo to Allow Zero GrandTotal for Credit Memos
Contribution checklist (*)