]> git.koha-community.org Git - koha.git/commit
Bug 34469: Block editing for received order lines
authorKatrin Fischer <katrin.fischer@bsz-bw.de>
Fri, 4 Aug 2023 15:13:36 +0000 (15:13 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 17 Aug 2023 19:38:27 +0000 (09:38 -1000)
commit93e91843276beb48c69576b540f304d2ddec8a32
tree87dffa0ef28ca06088b6e7e808ad4baae0ba7b7c
parentc13258ad6f7973138e4a8aef87a8c8c0fe1e183f
Bug 34469: Block editing for received order lines

When an already received order line is modified/edited,
we experience data loss. Most prominently, we will lose the
linked invoiceid. Therefore we should not allow editing an
order line that was already received. If something needs to be
changed, the receipt should be cancelled first.

To test:
* Create basket as standing order with items added in cataloguing
* Add an order line
* Receive shipment
* Go to the basket summary page, click on 'Modify'
* Change the actual cost
* Save
* Verify that the invoice is now empty
* In the database aqorders.invoiceid will be NULL
* Apply patch
* Receive another shipment for the standing order
* Go back to basket summary page
* Verify the 'Modify' link is no longer present
* Click 'Modify' on the unreceived order line
* Edit the URL parameter odernumber to have the number of an
  already received order line
* Verify you see a nice error message:
  This order cannot be edited, the basket is closed or the order was already received.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a4b7490633d2e8bc9ca9a0f60ebec1200ed0b07a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
acqui/neworderempty.pl
koha-tmpl/intranet-tmpl/prog/en/includes/blocking_errors.inc
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt