Skip to content

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

Conversation

viral-wagento
Copy link
Contributor

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:

  1. 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

  2. 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 (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-engcom-team magento-engcom-team added Partner: Wagento Pull Request is created by partner Wagento partners-contribution Pull Request is created by Magento Partner Component: Sales Release Line: 2.3 labels Nov 21, 2018
@magento-engcom-team
Copy link
Contributor

Hi @viral-wagento. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@viral-wagento
Copy link
Contributor Author

viral-wagento commented Nov 21, 2018

@sivaschenko , can you please look into this?
Travis CI build gave below error:
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Thanks!

@orlangur orlangur self-assigned this Nov 21, 2018
@VladimirZaets VladimirZaets self-assigned this Nov 21, 2018
@VladimirZaets
Copy link
Contributor

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

@VladimirZaets
Copy link
Contributor

@viral-wagento The build on Travis was terminated. It's some infrastructure problem, so don't worry about it. Thanks

Copy link
Contributor

@orlangur orlangur left a 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>
Copy link
Contributor

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

Copy link
Contributor Author

@viral-wagento viral-wagento Nov 21, 2018

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

Copy link
Contributor

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.

Copy link
Contributor Author

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!

Copy link
Contributor

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.

Copy link
Member

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

Copy link
Contributor Author

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!

Copy link
Contributor

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.

Copy link
Contributor Author

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>
Copy link
Contributor

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
Copy link
Contributor

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.

@orlangur
Copy link
Contributor

@magento-engcom-team give me 2.3-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @orlangur. Thank you for your request. I'm working on Magento 2.3-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @orlangur, here is your Magento instance.
Admin access: https://i-19288-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

@sivaschenko sivaschenko self-assigned this Nov 26, 2018
//case when paid amount is refunded and order has creditmemo created

$creditmemos = ($this->getCreditmemosCollection() === false) ?
$creditMemos = ($this->getCreditmemosCollection() === false) ?
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@orlangur
Done

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

@viral-wagento viral-wagento Nov 28, 2018

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?

Copy link
Contributor

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

Copy link
Contributor Author

@viral-wagento viral-wagento Nov 28, 2018

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

Copy link
Contributor

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.

@viral-wagento viral-wagento force-pushed the feature-creditmemo-typos branch from 83aaeb6 to 6918011 Compare November 29, 2018 11:17
Copy link
Contributor

@orlangur orlangur left a comment

Choose a reason for hiding this comment

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

Great @viral-wagento !

@magento-engcom-team
Copy link
Contributor

Hi @sidolov, thank you for the review.
ENGCOM-3631 has been created to process this Pull Request

@magento-engcom-team magento-engcom-team merged commit 6918011 into magento:2.3-develop Dec 9, 2018
@magento-engcom-team
Copy link
Contributor

Hi @viral-wagento. Thank you for your contribution.
We will aim to release these changes as part of 2.3.1.
Please check the release notes for final confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Sales Partner: Wagento Pull Request is created by partner Wagento partners-contribution Pull Request is created by Magento Partner Progress: accept Release Line: 2.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants