Bug 9236 : Redirect to the parcel page after deleting an item/order
authorJonathan Druart <jonathan.druart@biblibre.com>
Wed, 12 Dec 2012 14:14:08 +0000 (15:14 +0100)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Mon, 21 Jan 2013 13:40:44 +0000 (08:40 -0500)
Signed-off-by: mathieu saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
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 <jcamins@cpbibliography.com>
acqui/addorder.pl
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt

index 1dfa0b1..3fa7620 100755 (executable)
@@ -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");
 }
index f867d6c..1fbcc07 100644 (file)
             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 %]";
                     }
             }
 //]]>