Closed (fixed)
Project:
Commerce Shipping
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
30 Mar 2017 at 23:21 UTC
Updated:
18 Dec 2020 at 15:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
vasikehere is patch for this.
Are there other changes (related) needed for this issue?
p.s.: btw, isn't a similar issue for Commerce core Order item entity?
Comment #3
bojanz commentedWe're missing an update hook (hook_update) that will remove the adjustments field on existing sites.
Comment #4
vasikeofcourse
here is a new patch with the update hook
Comment #6
bojanz commentedImproved the update function and committed. Thanks!
Comment #8
finneHa! I have a use case where invoices are sent per shipment, and therefor taxes and promotions need to be calculated per shipment. I think I need shipment adjustments :-)
I might want to use the removed code here.
Comment #9
bojanz commentedYou probably don't.
All you need to do is ensure your taxes and promotions are calculated per order item, and you're good to go. A shipment just bundles order items.
Comment #10
a.dmitriiev commentedI had really old installation and updating now caused the error because update 8200 doesn't state the name of the field to update. The original patch from #2 and #4 was doing it properly, but commit https://www.drupal.org/commitlog/commit/18412/5d6860ede48a225bf1400882fb... has lost the name.
Attaching the patch here and not in a new issue, because I think nobody else will need such an "old" update.