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

Tests - VAT nr Checker #71

Open
5 of 6 tasks
georgmaisser opened this issue Jun 2, 2024 · 11 comments
Open
5 of 6 tasks

Tests - VAT nr Checker #71

georgmaisser opened this issue Jun 2, 2024 · 11 comments
Assignees
Labels
enhancement New feature or request

Comments

@georgmaisser
Copy link
Contributor

georgmaisser commented Jun 2, 2024

  • - Go to checkout with an item & taxes turned on

  • - Add vat nr and make sure, VAT is set to 0%

  • - Store Vat Nr in ledger items (still to do, also we need to add column ).

  • Make sure feature works with different settings:

  • - net and gross prices

  • - billing address (solved under Test - Adresses #72)

  • - installments

@semteacher semteacher added the enhancement New feature or request label Jun 3, 2024
@eynimeni
Copy link
Contributor

eynimeni commented Jun 3, 2024

TODO

  • make sure to proceed with net prices only when actual VAT is verified.
    (For the moment, a verified VAT deduces the price but if you put in a false one afterwards, taxes are not added again)

update for @semteacher this works as intended as georg said. I didn't know yet in the video. so a valid vat will be used until checkbox unchecked or other valid vat entered

@eynimeni
Copy link
Contributor

eynimeni commented Jun 3, 2024

@semteacher I have made a screenrecording to show to you in detail this new feature.
Please make sure you have checked out booking 401_DEV and shopping_cart feature_installment_subbooking branches.
You can download the video here: https://we.tl/t-xVgcXS4wP8
Please let me know if anything was unclear!

@eynimeni eynimeni mentioned this issue Jun 3, 2024
3 tasks
@eynimeni
Copy link
Contributor

eynimeni commented Jun 3, 2024

An example for a valid VAT would be the one of wunderbyte: U74259768

@semteacher
Copy link
Collaborator

semteacher commented Jun 3, 2024

Potential issue: for the following setting
image
I would expect presence of "Verify VAT" on the checkout page. But it does not shown
image
It is necessary to fill all fields
image
to see "Verify VAT" on the checkout page.
image
Which is, it turn, demand from user to input country/VAT manually again. However the word "automatic" in settings told me that once I provide it - verification must be performed automatically - so price has to be altered automatically (as well as form on the "checkout" page - I would expect to see values from settings page in case of "automatically")...

semteacher added a commit that referenced this issue Jun 3, 2024
@semteacher
Copy link
Collaborator

semteacher commented Jun 3, 2024

Cannot open dialog to edit addresses from checkout page due to error
image

  • UPD: solved. Reason: incorrect import:

import Templates from "../../../../lib/amd/src/templates";
should be
import Templates from 'core/templates';
fixed, pushed
Another error appears

{
    "error": true,
    "exception": {
        "message": "Exception - Warning: Undefined array key \"name\" in [dirroot]/local/shopping_cart/classes/form/modal_new_address.php on line 55",
        "errorcode": "generalexceptionmessage",
        "backtrace": "* line 157 of /lib/behat/lib.php: Exception thrown\n* line 55 of /local/shopping_cart/classes/form/modal_new_address.php: call to behat_error_handler()\n* line 217 of /lib/formslib.php: call to local_shopping_cart\\form\\modal_new_address->definition()\n* line 73 of /lib/form/classes/dynamic_form.php: call to moodleform->__construct()\n* line 71 of /lib/form/classes/external/dynamic_form.php: call to core_form\\dynamic_form->__construct()\n* line ? of unknownfile: call to core_form\\external\\dynamic_form::execute()\n* line 253 of /lib/external/classes/external_api.php: call to call_user_func_array()\n* line 83 of /lib/ajax/service.php: call to core_external\\external_api::call_external_function()\n",
        "link": "http://webserver/local/shopping_cart/address.php",
        "moreinfourl": "https://docs.moodle.org/403/en/error/moodle/generalexceptionmessage",
        "debuginfo": "\nError code: generalexceptionmessage"
    }
}
  • UPD: solved. Reason: defaults were not provided:

fixed, pushed

UPD: "dev_testing" branch has been used now

semteacher added a commit that referenced this issue Jun 3, 2024
semteacher added a commit that referenced this issue Jun 4, 2024
semteacher added a commit that referenced this issue Jun 4, 2024
semteacher added a commit that referenced this issue Jun 4, 2024
semteacher added a commit that referenced this issue Jun 4, 2024
semteacher added a commit that referenced this issue Jun 4, 2024
…w behat Scenario: Shopping Cart taxes: use VAT number and German address to reduce gross price of single item (#71 #72)
@semteacher
Copy link
Collaborator

An issue: Area on the cehckout page wit horiginal price has been updated when installment on/off with page reload:

  • enter checkout page and set installemtn ON

image

  • reload page

image
(I would expect an original price in red rectangle)

  • set installment OFF

image

definitely error - an original price should be in red rectangle.

@georgmaisser
Copy link
Contributor Author

the price in the list is not correctly updated. If you reload the page completely, you should always see the correct prices.

We should include the list of items above in our Ajax update routine.

@georgmaisser
Copy link
Contributor Author

Actually, to be more precise:

The reduction of the items price during isntallementpayments on reload is accepted. We know it's not perfect, but that's how it works now.

The second error should be fixed by automatically triggering the list of items when we toggle the installments checkbox. we make a ticket for it. For the moment, ignore these values in your test

@semteacher
Copy link
Collaborator

Additionally - VAT verification reloads page reset "Use installment.. " to OFF

semteacher added a commit that referenced this issue Jun 6, 2024
…stallment to reduce net price of single item ( #71 )
semteacher added a commit that referenced this issue Jun 6, 2024
…stallment to reduce net price of single item ( #71 )
@georgmaisser
Copy link
Contributor Author

@semteacher Can you, from your perspective, make the things that need to be done here? I kind of lost the thread. We just got notice that GB Vat numbers are not accepted anymore by our checker, they should be excluded, as automation does not work otherwise.

@semteacher
Copy link
Collaborator

@georgmaisser the only listed and incompleted thing is
image
should I started altering report to suport VAT column or it is not necessary anymore (if I clearly understand your comment above)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
Development

No branches or pull requests

3 participants