From fcd4f91a1651a2a993ae1333fc8fb3cd18fee2c3 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 12 Dec 2012 15:14:08 +0100 Subject: [PATCH] [SIGNED-OFF] Bug 9236 : Redirect to the parcel page after deleting an item/order Signed-off-by: mathieu saby Signed-off-by: Katrin Fischer 1) Receive shipment for a previously created basket with multiple order lines 2) Verify 'Delete order' links only have 2 parameters and when you delete an order, you are not redirected to the basket. 3) Verify the same is true for 'Delete order and catalog record'. 4) Apply both patches from Bug 9236. 5) Redo tests and verify page redirects correctly now. Links now also show the basket number as third parameter. Also: make sure orders/items and records are deleted correctly. Passes all tests and QA script. --- acqui/addorder.pl | 2 ++ .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/acqui/addorder.pl b/acqui/addorder.pl index 1dfa0b1..3fa7620 100755 --- a/acqui/addorder.pl +++ b/acqui/addorder.pl @@ -261,6 +261,8 @@ my $basketno=$$orderinfo{basketno}; my $booksellerid=$$orderinfo{booksellerid}; if (my $import_batch_id=$$orderinfo{import_batch_id}) { print $input->redirect("/cgi-bin/koha/acqui/addorderiso2709.pl?import_batch_id=$import_batch_id&basketno=$basketno&booksellerid=$booksellerid"); +} elsif ( defined $orderinfo->{invoiceid} ) { + print $input->redirect("/cgi-bin/koha/acqui/parcel.pl?invoiceid=" . $orderinfo->{invoiceid}); } else { print $input->redirect("/cgi-bin/koha/acqui/basket.pl?basketno=$basketno"); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index f867d6c..1fbcc07 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -80,14 +80,14 @@ function confirm_delete_item(ordernumber, basketno, biblionumber) { var is_confirmed = confirm(_('Are you sure you want to delete this order ?')); if (is_confirmed) { - window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno="+basketno+"&quantity=0&biblionumber="+biblionumber; + window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno="+basketno+"&quantity=0&biblionumber="+biblionumber+"&invoiceid=[% invoiceid %]"; } } function confirm_delete_biblio(ordernumber, basketno, biblionumber) { var is_confirmed = confirm(_('Are you sure you want to delete this catalog record and order ?')); if (is_confirmed) { - window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno="+basketno+"&quantity=0&biblionumber="+biblionumber+"&delbiblio=1"; + window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno="+basketno+"&quantity=0&biblionumber="+biblionumber+"&delbiblio=1&invoiceid=[% invoiceid %]"; } } //]]> -- 1.7.9.5