From f9ee893e0edd61f2024804f51e9774f186bafb35 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 12 Dec 2012 15:14:08 +0100 Subject: [PATCH] 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. Signed-off-by: Jared Camins-Esakov Signed-off-by: Chris Cormack --- acqui/addorder.pl | 2 ++ koha-tmpl/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 1dfa0b1e1c..3fa7620e70 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 c8e4162495..862d85f0de 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -115,14 +115,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 %]"; } } //]]> -- 2.39.5