[Koha-bugs] [Bug 22669] Cannot edit received item in acquisitions with acqcreateitem set to "when placing an order"

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Apr 24 05:58:24 CEST 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22669

--- Comment #5 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 88586
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88586&action=edit
Bug 22669: Fix item editing on receiving an order

Since
  commit 1253975389975a8ff11a9bb2ef84582aeb6bd08b
  Bug 21091: Move add item template JavaScript to a separate file

items cannot longer be edited when receiving an order.
When moving the code to the JS file, the JS variable "opisadd" was
always set to "true":
  var opisadd = '[% opisadd | html %]';
Even if the TT variable is 0, opisadd will be "0", which is evaluated to
true in Javascript

To clean the situation it is easier to remove this variable and use "op"
instead.

Test plan:
- Make sure acqcreateitem is set to "when placing an order"
- Create a basket with some orders
- Close the basket
- Go to your vendor and receive an order
- On the receive page, try to edit your item
=> Without the patch, the pop up page will open and then close, not allowing
the item to be edited.
=> With this patch applied you will see the item edit form. Save and
confirm that the parent window is updated with the new value (actually
it's refreshed)

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list