From d0edf609e6330601e7a02cd27d05dd9935fd8d15 Mon Sep 17 00:00:00 2001 From: rangi Date: Wed, 2 May 2001 21:08:56 +0000 Subject: [PATCH] Scripts to add manual invoices, or credits to a borrower/member/patron's account. Called from boraccount.pl (ie the view account screen) --- mancredit.pl | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ maninvoice.pl | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100755 mancredit.pl create mode 100755 maninvoice.pl diff --git a/mancredit.pl b/mancredit.pl new file mode 100755 index 0000000000..4b6c50f419 --- /dev/null +++ b/mancredit.pl @@ -0,0 +1,54 @@ +#!/usr/bin/perl + +#wrriten 11/1/2000 by chris@katipo.oc.nz +#script to display borrowers account details + +use strict; +use C4::Output; +use CGI; +use C4::Search; +use C4::Accounts2; +my $input=new CGI; + + +my $bornum=$input->param('bornum'); +#get borrower details +my $data=borrdata('',$bornum); +my $add=$input->param('add'); +if ($add){ + my $itemnum=$input->param('itemnum'); + my $desc=$input->param('desc'); + my $amount=$input->param('amount'); + $amount=$amount*-1; + my $type=$input->param('type'); + manualinvoice($bornum,$itemnum,$desc,$type,$amount); + print $input->redirect("/cgi-bin/koha/moremember.pl?bornum=$bornum"); +} else { + print $input->header; + print startpage(); + print startmenu('member'); +print <

Manual Credit

+
+ + + + + + + + + +
Borrowernumber$bornum
Type + +
Itemnumber
Description
Amount
+
+printend +; +print endmenu('member'); +print endpage(); + +} diff --git a/maninvoice.pl b/maninvoice.pl new file mode 100755 index 0000000000..62a68cfbb9 --- /dev/null +++ b/maninvoice.pl @@ -0,0 +1,56 @@ +#!/usr/bin/perl + +#wrriten 11/1/2000 by chris@katipo.oc.nz +#script to display borrowers account details + +use strict; +use C4::Output; +use CGI; +use C4::Search; +use C4::Accounts2; +my $input=new CGI; + + +my $bornum=$input->param('bornum'); +#get borrower details +my $data=borrdata('',$bornum); +my $add=$input->param('add'); +if ($add){ + my $itemnum=$input->param('itemnum'); + my $desc=$input->param('desc'); + my $amount=$input->param('amount'); + my $type=$input->param('type'); + manualinvoice($bornum,$itemnum,$desc,$type,$amount); + print $input->redirect("/cgi-bin/koha/moremember.pl?bornum=$bornum"); +} else { + print $input->header; + print startpage(); + print startmenu('member'); +print <

Manual Invoice

+
+ + + + + + + + + +
Borrowernumber$bornum
Type + +
Itemnumber
Description
Amount
+
+printend +; +print endmenu('member'); +print endpage(); + +} -- 2.39.2