use CGI;
use C4::Members;
use C4::Branch;
+use C4::Accounts;
my $input=new CGI;
query => $input,
type => "intranet",
authnotrequired => 0,
- flagsrequired => {borrowers => 1},
+ flagsrequired => {borrowers => 1, updatecharges => 1},
debug => 1,
});
#get borrower details
my $data=GetMember($borrowernumber,'borrowernumber');
+if ( $input->param('action') eq 'reverse' ) {
+ ReversePayment( $borrowernumber, $input->param('accountno') );
+}
+
if ( $data->{'category_type'} eq 'C') {
my ( $catcodes, $labels ) = GetborCatFromCatType( 'A', 'WHERE category_type = ?' );
my $cnt = scalar(@$catcodes);
'amountoutstandingcredit' => $accts->[$i]{'amountoutstandingcredit'},
'toggle' => $accts->[$i]{'toggle'},
'description' => $accts->[$i]{'description'},
+ 'itemnumber' => $accts->[$i]{'itemnumber'},
+ 'biblionumber' => $accts->[$i]{'biblionumber'},
'amount' => sprintf("%.2f",$accts->[$i]{'amount'}),
- 'amountoutstanding' => sprintf("%.2f",$accts->[$i]{'amountoutstanding'}) );
+ 'amountoutstanding' => sprintf("%.2f",$accts->[$i]{'amountoutstanding'}),
+ 'accountno' => $accts->[$i]{'accountno'},
+ 'payment' => ( $accts->[$i]{'accounttype'} eq 'Pay' ),
+
+ );
if ($accts->[$i]{'accounttype'} ne 'F' && $accts->[$i]{'accounttype'} ne 'FU'){
$row{'printtitle'}=1;