Bug 11549: make it possible to receive and cancel the receipt of a transferred order

To reproduce the issue:
- transfer an order from a basket to another. Note the previous
ordernumber (X) and the new one (Y).
- receive the order
- cancel the receipt
- verify the order has been deleted:
select count(*) from aqorders where ordernumber=Y;
select * from aqorders_transfers where ordernumber_from = X;
The value for ordernumber_to is null.

To test this patch:
- apply this patch
- transfer an order from a basket to another
- receive the order
- cancel the receipt
- verify the order still exist in the basket where the transfer has been
  done.

Signed-off-by: Sonia BOUIS <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6d63881e04)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2014-01-14 12:06:34 +01:00 committed by Fridolin Somers
parent aaf0483650
commit facb734e4a
1 changed files with 6 additions and 0 deletions

View File

@ -1818,6 +1818,12 @@ sub TransferOrder {
my $newordernumber;
(undef, $newordernumber) = NewOrder($order);
$dbh->do( q{
UPDATE aqorders
SET parent_ordernumber = ordernumber
WHERE ordernumber = ?
}, {}, $newordernumber );
$query = qq{
UPDATE aqorders_items
SET ordernumber = ?