From eef3070b2e56842c4b3976c57ffee31f6bc0e8f5 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Wed, 5 Feb 2020 15:07:23 +0100 Subject: [PATCH] Bug 14898: Add button at manual invoice to redirect to pay tab Test plan: 1. Create manual invoice for any patron and click on "Save", you should be redirected to Account tab 2. Create manual invoice for any patron and click on "Save and pay", you should be redirected to Account tab --- .../prog/en/modules/members/maninvoice.tt | 4 +++- members/maninvoice.pl | 13 ++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt index 9713cfc27f..864429e425 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt @@ -61,7 +61,9 @@
- Cancel + + + Cancel
diff --git a/members/maninvoice.pl b/members/maninvoice.pl index f271d1f791..c39a323cae 100755 --- a/members/maninvoice.pl +++ b/members/maninvoice.pl @@ -105,9 +105,16 @@ if ($add) { $patron->account->reconcile_balance; } - print $input->redirect( - "/cgi-bin/koha/members/boraccount.pl?borrowernumber=$borrowernumber" - ); + if ($add eq 'save and pay') { + print $input->redirect( + "/cgi-bin/koha/members/pay.pl?borrowernumber=$borrowernumber" + ); + } else { + print $input->redirect( + "/cgi-bin/koha/members/boraccount.pl?borrowernumber=$borrowernumber" + ); + } + exit; } } -- 2.20.1