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

13851 Added improvements for credit memo total fields #27343

Conversation

sergiy-v
Copy link
Contributor

@sergiy-v sergiy-v commented Mar 18, 2020

Description

Added improvements for credit memo (new page) total fields.

Related Pull Requests

#27492

Fixed Issues

#13851

Manual testing scenarios

See #13851 issue description for details.

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 are green)

@m2-assistant
Copy link

m2-assistant bot commented Mar 18, 2020

Hi @sergiy-v. 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 give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@magento-engcom-team magento-engcom-team added Area: Frontend Component: Sales Release Line: 2.4 Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner labels Mar 18, 2020
@sergiy-v sergiy-v linked an issue Mar 18, 2020 that may be closed by this pull request
@sergiy-v
Copy link
Contributor Author

work in progress

Copy link
Contributor

@lbajsarowicz lbajsarowicz left a comment

Choose a reason for hiding this comment

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

Please keep backwards compatible constructors :-)

\Magento\Framework\Serialize\Serializer\Json $serializer = null
) {
$this->convertor = $convertOrderFactory->create();
$this->taxConfig = $taxConfig;
$this->localeFormat = $localeFormat;
$this->serializer = $serializer ?: \Magento\Framework\App\ObjectManager::getInstance()->get(
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove backward compatible class loader and add your dependency as last.

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 changes has been added, thank you.

@ghost ghost assigned lbajsarowicz Mar 18, 2020
@sergiy-v sergiy-v force-pushed the 13851-new-credit-memo-total-fields-improvements branch from 4080a6c to c939a4b Compare March 19, 2020 07:02
Copy link
Contributor

@lbajsarowicz lbajsarowicz left a comment

Choose a reason for hiding this comment

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

Only import the Json class and fix the Static Tests failure.

) {
$this->convertor = $convertOrderFactory->create();
$this->taxConfig = $taxConfig;
$this->serializer = $serializer ?: \Magento\Framework\App\ObjectManager::getInstance()->get(
$this->serializer = $serializer ?: ObjectManager::getInstance()->get(
\Magento\Framework\Serialize\Serializer\Json::class
Copy link
Contributor

Choose a reason for hiding this comment

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

You can also import that class. I recommend you to use alias JsonSerializer to be explicit what it does.

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 changes has been added, thank you for recommendation.

@sergiy-v sergiy-v force-pushed the 13851-new-credit-memo-total-fields-improvements branch from 9f35810 to 60ce499 Compare March 20, 2020 06:10
@sergiy-v
Copy link
Contributor Author

I believe the tests errors not related to the changes, @lbajsarowicz could you please check it.

Thank you.

@sergiy-v sergiy-v requested a review from lbajsarowicz March 20, 2020 10:27
@lbajsarowicz
Copy link
Contributor

@magento run all tests
Let's restart them.

@sergiy-v
Copy link
Contributor Author

@lbajsarowicz please check the changes once you will have a chance.

Thank you.

@sergiy-v sergiy-v force-pushed the 13851-new-credit-memo-total-fields-improvements branch from 60ce499 to 4046760 Compare March 30, 2020 06:20
Copy link
Contributor

@eduard13 eduard13 left a comment

Choose a reason for hiding this comment

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

The failing tests aren't related with this PR. I've linked the PR that should fix the failing Unit Test.
Thank you.

@ghost ghost assigned eduard13 Mar 30, 2020
@eduard13 eduard13 added Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Award: bug fix labels Mar 30, 2020
@magento-engcom-team
Copy link
Contributor

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

@eduard13
Copy link
Contributor

@magento run all tests

@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

Manual testing scenario:

  1. Create a Credit Memo for an order;
  2. Enter an amount with decimals in the field Adjustment Refund;
  3. Create an offline payment (finish credit memo)

Before:
creditmemobefore

After:
credit after

@slavvka
Copy link
Member

slavvka commented Apr 9, 2020

@magento run all tests

@VladimirZaets VladimirZaets added Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Severity: S1 Affects critical data or functionality and forces users to employ a workaround. labels Apr 9, 2020
@VladimirZaets VladimirZaets added this to the 2.4.0 milestone Apr 9, 2020
@sdzhepa
Copy link
Contributor

sdzhepa commented Apr 9, 2020

@engcom-Alfa

After reviewing with Product managers was decided to add the PR to the next 2.4.0 Magento release.
But this functionality affect's order management process and financial documents
So it was decided to do extended testing for this PR additionally to be sure that we do not brake or change any functionality around it.

I would request to check the next scenarios:

  • full credit memo
  • partial credit memo
  • cases with multiple currencies configured on the store(e.g. default/base and admin but different on a couple of websites/store-views)
  • Localization settings, like digit delimiter, is "," or "." (12,01 and 12.01)
  • reports about the credit memo shown in the email (numbers are correct?)
  • reports about credit memo shown on Storefront(My account) as Comments related to order
  • advanced ability "Notify Customer by email" from Admin Panel
  • Orders with taxes
  • Orders with discounts/reward points/store credits etc
  • ...
  • any additional user flows and cases that I could miss in this list

As a QA report should be:

  • Short description of what was tested
  • If need more details about precondition or additional configuration
  • Confirmation that bugs if fixed and/or other functionality works as previously(expected)

@m2-assistant
Copy link

m2-assistant bot commented Apr 10, 2020

Hi @sergiy-v, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@sdzhepa
Copy link
Contributor

sdzhepa commented Apr 10, 2020

Hello @engcom-Alfa

I know that you have done additional and advanced testing for this PR before the merge.
We discussed it in today internal sync.
Could you please add here a detailed QA report(what was tested) to be transparent with all participants?

@engcom-Alfa
Copy link
Contributor

Hello @sdzhepa

I checked the PR and everything works well.
Fixed the issue described in #13851 and other functionality works as previously (expected).

What was tested:

1. The issue described in #13851

  • Create a Credit Memo for an order

  • Enter an amount with decimals (by example 1.23) in the fields Adjustment Refund, Adjustment Fee

  • Create an offline payment (finish credit memo)

Before: ✖️

13

After: ✔️

12

2. Also checked additional cases:

  • [ ✔️ ] full credit memo;

screenshot1

  • [ ✔️ ] partial credit memo;

screenshot2

  • [ ✔️ ] credit memo on other locale (German locale in my case) with digit delimiter ",";

9
10

  • [ ✔️ ] multiple currencies configured on the store (in my case $ and €);

screenshot3

  • [ ✔️ ] credit memo with taxes (including and excluding);

Screenshot from 2020-04-10 22-43-50

screenshot4

  • [ ✔️ ] credit memo on Storefront(My account) with related to order comments

screenshot6

  • [ ✔️ ] ☑️ Email Copy of Credit Memo

screenshot7
screenshot8

  • [ ✔️ ] Print PDF credit memo

Screenshot from 2020-04-10 22-58-08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Frontend Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Award: bug fix Award: MFTF test coverage Component: Sales Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: accept Release Line: 2.4 Severity: S1 Affects critical data or functionality and forces users to employ a workaround.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Credit doesn't recognize amount after comma
9 participants