Bug 12068: (rm followup) remove useless newline introduced on merging
[srvgit] / members / mancredit.pl
index 5179c34..c8eb619 100755 (executable)
@@ -60,7 +60,7 @@ if ($add){
         print $input->redirect("/cgi-bin/koha/members/boraccount.pl?borrowernumber=$borrowernumber");
     }
 } else {
-       my ($template, $loggedinuser, $cookie) = get_template_and_user(
+    my ($template, $loggedinuser, $cookie) = get_template_and_user(
         {
             template_name   => "members/mancredit.tt",
             query           => $input,
@@ -90,24 +90,32 @@ if (C4::Context->preference('ExtendedPatronAttributes')) {
         extendedattributes => $attributes
     );
 }
-    
+
+# Computes full borrower address
+my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $data->{streettype} );
+my $address = $data->{'streetnumber'} . " $roadtype " . $data->{'address'};
+
     $template->param(
         finesview => 1,
         borrowernumber => $borrowernumber,
         firstname => $data->{'firstname'},
         surname  => $data->{'surname'},
+        othernames => $data->{'othernames'},
                    cardnumber => $data->{'cardnumber'},
                    categorycode => $data->{'categorycode'},
                    category_type => $data->{'category_type'},
                    categoryname  => $data->{'description'},
-                   address => $data->{'address'},
+            address => $address,
                    address2 => $data->{'address2'},
                    city => $data->{'city'},
                    state => $data->{'state'},
                    zipcode => $data->{'zipcode'},
                    country => $data->{'country'},
                    phone => $data->{'phone'},
+            phonepro => $data->{'phonepro'},
+            mobile => $data->{'mobile'},
                    email => $data->{'email'},
+            emailpro => $data->{'emailpro'},
                    branchcode => $data->{'branchcode'},
                    branchname => GetBranchName($data->{'branchcode'}),
                    is_child        => ($data->{'category_type'} eq 'C'),