Receiving canceled lineitem / copy not fully implemented

Bug #1206649 reported by Bill Erickson
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Undecided
Unassigned

Bug Description

Evergreen 2.4+
Evergreen 2.3 experiences the same issue, but the code has diverged some and this is as much a new feature as a bug. Debatable..

1. Cancel a lineitem from the PO interface.
2. Receive the lineitem
3. The lineitem is now in the 'received' state, but the cancel_reason is still attached to the lineitem. Ditto the linked, canceled copies.

This was discovered as a result of testing bug #1029591, which surfaces the cancel_reason to the UI.

If the lineitem/copies are received, the cancel_reason value should be cleared (set to NULL).

Question: What should we do about cancel_reason's that have keep_debits=false ? These items will have no debits attached. Should the receive action be prevented? Should the system attempt to recover the debits (using the estimated_price from the lineitem)? Org settings?

Note that even if no debits exist, they will be created during invoicing as needed, so it may not be a problem at all.

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

I would say, receiving should be possible for lineitems with cancel_reasons that have keep_debits=false and that the debits should be recovered using the estimated price. If a line item is mistakenly canceled using a cancel_reason that does not retain debits, there is a need to be able to correct the error. If the line item was canceled in error, invoicing may not take place immediately, so reinstating the debit is important. Further, once the lineitem/copies are marked received, it should be possible to un-receive them to set them back to a state of on-order.

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

Thanks for the feedback, Christine.

I've pushed a branch:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/berick/lp1206649-receive-canceled-lineitems

From the commit:

Clear the cancel reason when a canceled lineitem is marked as received. With items, clear the cancel reason and re-generate fund debits if they were removed during cancelation (because the keep_debits flag in the cancel reason was set to false).

Changed in evergreen:
milestone: none → 2.5.0-alpha2
status: New → Confirmed
tags: added: pullrequest
Dan Wells (dbw2)
Changed in evergreen:
milestone: 2.5.0-alpha2 → 2.5.0-beta1
Revision history for this message
Tim Spindler (tspindler-cwmars) wrote :

I know I am a late comer on this but I agree with Christine.

Dan Wells (dbw2)
tags: added: 2.5-beta-blocker
Revision history for this message
Mike Rylander (mrylander) wrote :

Thanks, Bill, Christine and Tim!

Changed in evergreen:
status: Confirmed → Fix Committed
no longer affects: evergreen/2.4
Dan Wells (dbw2)
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.

Other bug subscribers

Remote bug watches

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