X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=members%2Fmancredit.pl;h=a2c2258ac0b5c8c6ce17c270843acd04fcb1ea58;hb=2249ee1216ed004e61a34bc821d216f3471ef87b;hp=801fcc2868f9799b417c6cebc2a6be8457ca711b;hpb=944831555e89c8fdb4dc865764de51887a98a23b;p=koha_fer diff --git a/members/mancredit.pl b/members/mancredit.pl index 801fcc2868..a2c2258ac0 100755 --- a/members/mancredit.pl +++ b/members/mancredit.pl @@ -36,6 +36,7 @@ use C4::Items; use C4::Members::Attributes qw(GetBorrowerAttributes); my $input=new CGI; +my $flagsrequired = { borrowers => 1, updatecharges => 1 }; my $borrowernumber=$input->param('borrowernumber'); @@ -44,7 +45,7 @@ my $data=GetMember('borrowernumber' => $borrowernumber); my $add=$input->param('add'); if ($add){ - if(checkauth($input)) { + if ( checkauth( $input, 0, $flagsrequired, 'intranet' ) ) { my $barcode = $input->param('barcode'); my $itemnum; if ($barcode) { @@ -64,7 +65,7 @@ if ($add){ query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {borrowers => 1, updatecharges => 1}, + flagsrequired => $flagsrequired, debug => 1, }); @@ -74,11 +75,18 @@ if ($add){ $template->param( 'CATCODE_MULTI' => 1) if $cnt > 1; $template->param( 'catcode' => $catcodes->[0]) if $cnt == 1; } - + $template->param( adultborrower => 1 ) if ( $data->{category_type} eq 'A' ); - my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'}); + my ($picture, $dberror) = GetPatronImage($data->{'borrowernumber'}); $template->param( picture => 1 ) if $picture; + +if (C4::Context->preference('ExtendedPatronAttributes')) { my $attributes = GetBorrowerAttributes($borrowernumber); + $template->param( + ExtendedPatronAttributes => 1, + extendedattributes => $attributes + ); +} $template->param( borrowernumber => $borrowernumber, @@ -99,7 +107,8 @@ if ($add){ branchcode => $data->{'branchcode'}, branchname => GetBranchName($data->{'branchcode'}), is_child => ($data->{'category_type'} eq 'C'), - extendedattributes => $attributes, + activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''), + RoutingSerials => C4::Context->preference('RoutingSerials'), ); output_html_with_http_headers $input, $cookie, $template->output; }