Problem/Motivation

When I tried to make multiple shipments, "Add Shipment" allow you to put information including what item will be shipped. When, I did "Send Shipment", that item should not show in "Add Shipment" screen since it is shipped. But what I got is the list of all items in that order shows.

Steps to reproduce

- Do a clean install of Commerce and setup.
- Make a test order
- "Add Shipment" to ship the item.
- "Finalize Shipment" and then "Send Shipment"
- Try to "Add Shipment" again, the list of item already been shipped still there.

Proposed resolution

When, items is shipped or packed, the list of item should not show in "Shipment items" to prevent a chance to make a mistake by send the same item twice or more.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

abx created an issue. See original summary.

abx’s picture

Status: Active » Needs review

I just have time to test this problem again and found that in "ShipmentForm.php", this line:

in_array($order_item->id(), $already_on_shipment, TRUE)) {

cause the problem in this issue. I can either remove "TRUE" or convert a value to be the same type. I decided to convert it. So, the code will change to

in_array(intval($order_item->id()), $already_on_shipment, TRUE)) {

Tested and work but since I don't know how to program, patch, etc. So, I hope, I did this correctly.

Thanks,

abx’s picture

Version: 8.x-2.x-dev » 3.x-dev
abx’s picture

Version: 3.x-dev » 8.x-2.x-dev
jsacksick’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • jsacksick committed 80248753 on 3.x
    [#3334750] fix: "Shipment items" always show all items even that item is...

  • jsacksick committed 48f5cfdc on 8.x-2.x authored by abx
    Issue #3334750: "Shipment items" always show all items even that item is...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.