acq: option to receive lineitems is disabled when the lineitems has been cancelled

Bug #1115599 reported by Kathy Lussier
42
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
2.4
Fix Released
Medium
Unassigned
2.5
Fix Released
Medium
Unassigned

Bug Description

Evergreen version: master, 2.3

This is similar to an issue that came up with https://bugs.launchpad.net/evergreen/+bug/1058321.

If I mark a lineitem as cancelled in master or 2.3, the option to receive the item in the lineitem action menu is disabled. However, if I mark the copy as cancelled, I am able to receive the lineitem. Since bug 1058321 was never backported to 2.3, this was either pre-existing behavior or was added in a backported branch after 1058321 was tested and merged.

It's important to be able to receive cancelled lineitems because backordered items usually are shipped at some point in time.

Ben Shum (bshum)
Changed in evergreen:
milestone: none → 2.4.0-alpha
status: New → Triaged
Ben Shum (bshum)
Changed in evergreen:
milestone: 2.4.0-alpha1 → 2.4.0-beta
Ben Shum (bshum)
Changed in evergreen:
milestone: 2.4.0-beta → 2.4.0-rc
Ben Shum (bshum)
Changed in evergreen:
milestone: 2.4.0-rc → none
Revision history for this message
Kathy Lussier (klussier) wrote :

I tested this workflow again with a master build from 11/15/13.

The behavior is a bit different, but I am still unable to receive canceled lineitems. I activated an order and then marked a lineitem as canceled with the cancel reason being backorder.

The action to receive the lineitem is not disabled in the menu as was previously the case. However, if I select the backordered lineitem and then select "Mark Selected Items As Received," I receive a message that says "You have not selected any (suitable) line items."

Prior to 2.3, staff was able to receive canceled line items. This regression is very problematic because there is no way staff can handle backordered items from within the staff client once those items are shipped. There is no way to change that line item from within the staff client back to a receivable status, like on-order. If I try to add the selected line item to an invoice, I receive the same message that I received when trying to receive it.

The only workaround I have found is to create an invoice using the button at the top of the PO, detach all of the irrelevant lineitems from the invoice (our staff really do not want to return to this workflow that requires detaching line items from invoices), and then receiving the line item from the invoice.

Revision history for this message
Kathy Lussier (klussier) wrote :

I did further testing on a 2.4.2 system where we are indeed able to receive line items that have been canceled. I tracked the return of this problem down to https://bugs.launchpad.net/evergreen/+bug/1115599. I should have read that bug report more closely when it was submitted since it clearly states that you will only be able to mark pending-order and on-order items as received.

After looking at the code from that branch, I thought that I could possibly address this issue by adding "cancelled" to the list of li_post_po_states, thereby allowing it to be one of the states that that are receivable. However, since the li_post_po_states also are part of the li_active_states, I would also be allowing selected canceled line items to be added to an invoice.

Is it problem allowing canceled line items to be added to an invoice? On the surface, the one potential problem I saw with allowing this action is that, when I did so through the PO "create invoice" option, the invoice defaults to receiving just 0 copies. If staff do not notice this default, I could see potential problems with the invoice.

Alternatively, I could create a totally new variable to identify the states that are receivable. However, I didn't know if there was a more elegant way to handle this.

Revision history for this message
Tim Spindler (tspindler-cwmars) wrote :

Kathy, this was not a horrible issue for our libraries. As far as I know, not many have had problems with invoicing cancelled items.

Revision history for this message
Christine Morgan (cmorgan-z) wrote :

Kathy, I don't think that allowing canceled line items to be added to an invoice would be a huge problem. Since we have libraries that are doing EDI ordering with Baker & Taylor, but not EDI invoicing, they will need to be able to add "Cancelled - Backordered" line items to invoices.

Revision history for this message
Kathy Lussier (klussier) wrote :

In comment 2 above, I should have linked to https://bugs.launchpad.net/evergreen/+bug/1193095. This issue has come up in discussion again, so I'm going to take a look at it this afternoon to see if I can create the fix that I described above.

Revision history for this message
Kathy Lussier (klussier) wrote :

Working branch is at http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/kmlussier/restore-ability-to-receive-cancelled-lineitems.

I tested receiving and invoicing both types of cancelled lineitems, and it seemed to work well. I'm hoping this patch will improve workflow for our acq staff, who have been required to create complicated workarounds since they lost the ability to receive cancelled lineitems.

tags: added: pullrequest
Revision history for this message
Bill Erickson (berick) wrote :

Kathy, your patch looks good and solves the problem. There's one small nit that I've pushed a follow up fix for.

Adding "cancelled" to li_post_po_states causes the li_active_states variable to pick up the value (which was intended, for invoicing), but it means that canceled lineitems are now considered valid choices for batch cancellation, which could create minor usability problems (and useless double cancellation attempts).

Sign off and secondary patch pushed to:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/berick/lp1115599-acq-recv-canceled-li

no longer affects: evergreen/2.3
Revision history for this message
Kathy Lussier (klussier) wrote :

Hi Bill,

This looks good to me. I've added a sign-off to your commit at

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/kmlussier/lp1115599-acq-recv-canceled-li

Just a note that, in the future, we may want to provide some capability for canceling lineitems that are simply delayed and not truly canceled for those cases when a backordered lineitem becomes permanently canceled. But I think that's beyond the scope of this bug.

tags: added: signedoff
Revision history for this message
Galen Charlton (gmc) wrote :

Pushed to master, rel_2_5, and rel_2_4. Thanks, Kathy and Bill!

no longer affects: evergreen/master
Changed in evergreen:
milestone: 2.next → 2.6.0
no longer affects: evergreen/2.6
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.