[Meta] Drupal 7 Commerce VAT modules

Created on 26 September 2017, over 7 years ago
Updated 26 August 2024, 5 months ago

In general, contributed modules that still exist in Drupal 8 should handle their own migrations. However, in the case of Commerce modules that are now functionally in core, Commerce Migrate should handle them.

This issue is to figure out what to do about the Commerce VAT (especially Commerce EU VAT) modules. It somewhat overlaps with tax and tax setting migrations from Commerce (see 🌱 [Meta] Drupal Commerce 1 Active ), but those were handled differently than VAT. We should probably also think about how to migrate configured VAT to products.

πŸ“Œ Task
Status

Needs work

Version

4.0

Component

Drupal Commerce 1.x

Created by

πŸ‡³πŸ‡΄Norway wizonesolutions Norway

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    Probably needs a reroll too.

  • πŸ‡«πŸ‡·France Toki Caen, Normandy

    I need to migrate a Drupal 7 site to Drupal 10 and I have problems with VAT as mentioned on this topic (I haven't tried the patches yet).

    The D7 site has Commerce 1 and the D10 site has Commerce 2.
    The D7 site manages VAT with the commerce_eu_vat and commerce_vat modules (I need to calculate VAT for orders in France).
    The D10 site is managed with Commerce Core which now has autonomous tax management.

    The majority of migrations went well (with Commerce Migrate of course, Migrate Upgrade, Migrate Tools, Migrate Plus via drush) except upgrade_commerce1_order_item_product which ignores almost 20% of the items because of an error linked to the adjustments?
    Here is the message:
    upgrade_commerce1_order_item_product:adjustments: Unknown adjustment type for line item '18082' (for example).

    By checking a few of these lines, I found a VAT for France each time.
    Upstream, I migrated the fields (upgrade_d7_field) and the commerce_fr_vat field (VAT rate reference field type) was not migrated either.
    Here is the Migration error message :
    Attempt to create a field storage commerce_fr_vat with no type. (/public_html/my_website/web/core/modules/field/src/Entity/FieldStorageConfig.php:271).

    How to solve this situation and migrate 100% of order_items from the Drupal 7 site?
    Is it the commerce_fr_vat field from my Product type or do we need to modify something in the migration configuration file (commerce1_order_item.yml)?

    Looking at the patches, it does not seem to create any VAT field or something related to?

    Thanks for any help here, the D7 site is ten years old, you can imagine the amount of orders with VAT rates I need to migrate and I would really appreciate to find an automatic solution.

  • πŸ‡«πŸ‡·France Toki Caen, Normandy

    UPDATE : I have applied the first patch (handle-vat) and launch order_item and order migrations again and I can confirm it's working fine, I have all my order items now even if VAT was applied on D7.
    Now I need to test the shipping_vat patch since calculation is wrong as mentioned in the previous comment from grahl.

  • πŸ‡«πŸ‡·France Toki Caen, Normandy

    UPDATE 2 : I finally managed to migrate all my orders with VAT from Drupal 7 thanks to the 2 patches in this issue. Thank you very much for this work which deserves to be implemented in the module (unless it is too "workaround"). On the other hand, the patch for shipping VAT could not be applied with the patch command (failed), I had to apply it manually.

Production build 0.71.5 2024