. ",address=" . $dbh->quote( $data{'address'} )
. ",address2=" . $dbh->quote( $data{'address2'} )
. ",zipcode=" . $dbh->quote( $data{'zipcode'} )
+ . ",country=" . $dbh->quote( $data{'country'} )
. ",city=" . $dbh->quote( $data{'city'} )
. ",phone=" . $dbh->quote( $data{'phone'} )
. ",email=" . $dbh->quote( $data{'email'} )
. ",contactnote=" . $dbh->quote( $data{'contactnote'} )
. ",B_address=" . $dbh->quote( $data{'B_address'} )
. ",B_zipcode=" . $dbh->quote( $data{'B_zipcode'} )
+ . ",B_country=" . $dbh->quote( $data{'B_country'} )
. ",B_city=" . $dbh->quote( $data{'B_city'} )
. ",B_phone=" . $dbh->quote( $data{'B_phone'} )
. ",B_email=" . $dbh->quote( $data{'B_email'} )
borrowernotes => $borrower->{'borrowernotes'},
city => $borrower->{'city'},
zipcode => $borrower->{'zipcode'},
+ country => $borrower->{'country'},
phone => $borrower->{'phone'} || $borrower->{'mobile'},
cardnumber => $borrower->{'cardnumber'},
amountold => $amountold,
}
my $dbh = C4::Context->dbh;
-my $sql = qq(SELECT surname, firstname, cardnumber, address, city, zipcode
+my $sql = qq(SELECT surname, firstname, cardnumber, address, city, zipcode, country
FROM borrowers
WHERE surname LIKE ?
OR firstname LIKE ?
$rec->{cardnumber} . "\t" .
$rec->{address} . "\t" .
$rec->{city} . "\t" .
- $rec->{zip} .
+ $rec->{zip} . "\t" .
+ $rec->{country} .
"\n";
}
<!-- TMPL_IF NAME="city" -->
<!-- TMPL_VAR NAME="city" -->
<!-- TMPL_VAR NAME="zipcode" -->
+ <!-- TMPL_IF NAME="country" -->, <!-- TMPL_VAR NAME="country" --><!-- /TMPL_IF -->
<!-- TMPL_ELSE -->
<span class="empty">No city stored.</span>
<!-- /TMPL_IF --></li>
<ul>
<li>Format your file with the following fields
<ul>
- <li>'cardnumber', 'surname', 'firstname', 'title', 'othernames', 'initials', 'streetnumber', 'streettype', 'address', 'address2', 'city', 'zipcode', 'email', 'phone', 'mobile', 'fax', 'emailpro', 'phonepro', 'B_streetnumber', 'B_streettype', 'B_address', 'B_city', 'B_zipcode', 'B_email', 'B_phone', 'dateofbirth', 'branchcode', 'categorycode', 'dateenrolled', 'dateexpiry', 'gonenoaddress', 'lost', 'debarred', 'contactname', 'contactfirstname', 'contacttitle', 'borrowernotes', 'relationship', 'ethnicity', 'ethnotes', 'sex', 'userid', 'opacnote', 'contactnote', 'password', 'sort1', 'sort2'
+ <li>'cardnumber', 'surname', 'firstname', 'title', 'othernames', 'initials', 'streetnumber', 'streettype', 'address', 'address2', 'city', 'zipcode', 'country', 'email', 'phone', 'mobile', 'fax', 'emailpro', 'phonepro', 'B_streetnumber', 'B_streettype', 'B_address', 'B_city', 'B_zipcode', 'B_country', 'B_email', 'B_phone', 'dateofbirth', 'branchcode', 'categorycode', 'dateenrolled', 'dateexpiry', 'gonenoaddress', 'lost', 'debarred', 'contactname', 'contactfirstname', 'contacttitle', 'borrowernotes', 'relationship', 'ethnicity', 'ethnotes', 'sex', 'userid', 'opacnote', 'contactnote', 'password', 'sort1', 'sort2'
<ul>
<li>
<span style="background-color: #ffe599">
<!-- /TMPL_UNLESS -->
<!-- /TMPL_IF -->
<td><!-- TMPL_VAR NAME="cardnumber" --></td>
- <td style="white-space: nowrap;"><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --></a> <br /> <!-- TMPL_VAR NAME="address" --><!-- TMPL_IF NAME="address2" --><br /><!-- TMPL_VAR NAME="address2" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="city" --><br /><!-- TMPL_VAR NAME=city --><!-- /TMPL_IF --><!-- TMPL_IF NAME="zipcode" --> <!-- TMPL_VAR NAME="zipcode" --><!-- /TMPL_IF --></td>
+ <td style="white-space: nowrap;"><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --></a> <br /> <!-- TMPL_VAR NAME="address" --><!-- TMPL_IF NAME="address2" --><br /><!-- TMPL_VAR NAME="address2" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="city" --><br /><!-- TMPL_VAR NAME=city --><!-- /TMPL_IF --><!-- TMPL_IF NAME="zipcode" --> <!-- TMPL_VAR NAME="zipcode" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="country" -->, <!-- TMPL_VAR NAME="country" --><!-- /TMPL_IF --></td>
<td><!-- TMPL_VAR NAME="category_description" --> (<!-- TMPL_VAR name="category_type" -->)</td>
<td><!-- TMPL_VAR NAME="branchcode" --></td>
<td><!-- TMPL_VAR NAME="dateexpiry" --></td>
<input type="text" name="zipcode" id="zipcode" size="10" value="<!-- TMPL_VAR NAME="zipcode" -->" />
<!-- TMPL_IF NAME="mandatoryzipcode" --><span class="required">Required</span><!-- /TMPL_IF -->
</li>
+ <li>
+ <label for="country">Country: </label>
+ <input type="text" name="country" id="country" value="<!-- TMPL_VAR NAME="country" -->" />
+ </li>
</ol>
</fieldset>
<input type="text" id="B_zipcode" name="B_zipcode" maxlength="10" size="10" value="<!-- TMPL_VAR NAME="B_zipcode" -->" />
<!-- TMPL_IF NAME="mandatoryB_zipcode" --><span class="required">Required</span><!-- /TMPL_IF -->
</li>
+ <li>
+ <label for="B_country">Country: </label>
+ <input type="text" name="B_country" id="B_country" value="<!-- TMPL_VAR NAME="B_country" -->" />
+ </li>
<li>
<!-- TMPL_IF NAME="mandatoryB_phone" -->
<label for="B_phone" class="required">
address2 => $results->[$i]{'address2'},
city => $results->[$i]{'city'},
zipcode => $results->[$i]{'zipcode'},
+ country => $results->[$i]{'country'},
branchcode => $results->[$i]{'branchcode'},
overdues => $od,
issues => $issue,
address2 => $data->{'address2'},
city => $data->{'city'},
zipcode => $data->{'zipcode'},
+ country => $data->{'country'},
phone => $data->{'phone'},
email => $data->{'email'},
branchcode => $data->{'branchcode'},
address => $results->[$i]{'address'},
city => $results->[$i]{'city'},
zipcode => $results->[$i]{'zipcode'},
+ country => $results->[$i]{'country'},
branchcode => $results->[$i]{'branchcode'},
guarantorinfo =>$guarantorinfo,
#op
address2 => $data->{'address2'},
city => $data->{'city'},
zipcode => $data->{'zipcode'},
+ country => $data->{'country'},
phone => $data->{'phone'},
email => $data->{'email'},
branchcode => $data->{'branchcode'},
address2 => $data->{'address2'},
city => $data->{'city'},
zipcode => $data->{'zipcode'},
+ country => $data->{'country'},
phone => $data->{'phone'},
email => $data->{'email'},
branchcode => $data->{'branchcode'},
address2 => $bor->{'address2'},
city => $bor->{'city'},
zipcode => $bor->{'zipcode'},
+ country => $bor->{'country'},
phone => $bor->{'phone'},
email => $bor->{'email'},
branchcode => $bor->{'branchcode'},
address2 => $bor->{'address2'},
city => $bor->{'city'},
zipcode => $bor->{'zipcode'},
+ country => $bor->{'country'},
phone => $bor->{'phone'},
email => $bor->{'email'},
branchcode => $bor->{'branchcode'},
address2 => $results->[$i]{'address2'},
city => $results->[$i]{'city'},
zipcode => $results->[$i]{'zipcode'},
+ country => $results->[$i]{'country'},
branchcode => $results->[$i]{'branchcode'},
overdues => $od,
issues => $issue,
$newdata{'contactname'} = $guarantordata->{'surname'};
$newdata{'contacttitle'} = $guarantordata->{'title'};
foreach (qw(streetnumber address streettype address2
- zipcode city phone phonepro mobile fax email emailpro branchcode)) {
+ zipcode country city phone phonepro mobile fax email emailpro branchcode)) {
$newdata{$_} = $guarantordata->{$_};
}
}
}
}
-###############test to take the right zipcode and city name ##############
+###############test to take the right zipcode, country and city name ##############
if (!defined($guarantorid) or $guarantorid eq '' or $guarantorid eq '0') {
# set only if parameter was passed from the form
$newdata{'city'} = $input->param('city') if defined($input->param('city'));
$newdata{'zipcode'} = $input->param('zipcode') if defined($input->param('zipcode'));
+ $newdata{'country'} = $input->param('counry') if defined($input->param('country'));
}
#builds default userid
if ( $category_type eq 'C') {
if ($data->{'guarantorid'} ne '0' ) {
my $data2 = GetMember( $data->{'guarantorid'} ,'borrowernumber');
- foreach (qw(address city B_address B_city phone mobile zipcode)) {
+ foreach (qw(address city B_address B_city phone mobile zipcode country B_country)) {
$data->{$_} = $data2->{$_};
}
}
address2 => $data->{'address2'},
city => $data->{'city'},
zipcode => $data->{'zipcode'},
+ country => $data->{'country'},
phone => $data->{'phone'},
email => $data->{'email'},
branchcode => $data->{'branchcode'},
address2 => $data->{'address2'},
city => $data->{'city'},
zipcode => $data->{'zipcode'},
+ country => $data->{'country'},
phone => $data->{'phone'},
email => $data->{'email'},
branchcode => $data->{'branchcode'},
} else {
open $csv_fh, ">", $csvfilename or die "unable to open $csvfilename: $!";
}
- if ( $csv->combine(qw(name surname address1 address2 zipcode city email itemcount itemsinfo)) ) {
+ if ( $csv->combine(qw(name surname address1 address2 zipcode city country email itemcount itemsinfo)) ) {
print $csv_fh $csv->string, "\n";
} else {
$verbose and warn 'combine failed on argument: ' . $csv->error_input;
# <date> <itemcount> <firstname> <lastname> <address1> <address2> <address3> <city> <postcode>
my $borrower_sql = <<'END_SQL';
-SELECT COUNT(*), issues.borrowernumber, firstname, surname, address, address2, city, zipcode, email, MIN(date_due) as longest_issue
+SELECT COUNT(*), issues.borrowernumber, firstname, surname, address, address2, city, zipcode, country, email, MIN(date_due) as longest_issue
FROM issues,borrowers,categories
WHERE issues.borrowernumber=borrowers.borrowernumber
AND borrowers.categorycode=categories.categorycode
# File format
#
# cardnumber,surname,firstname,title,othernames,initials,streetnumber,streettype,
-# address line , address line 2, city, zipcode, email, phone, mobile, fax, work email, work phone,
+# address line , address line 2, city, zipcode, contry, email, phone, mobile, fax, work email, work phone,
# alternate streetnumber, alternate streettype, alternate address line 1, alternate city,
-# alternate zipcode, alternate email, alternate phone, date of birth, branchcode,
+# alternate zipcode, alternate country, alternate email, alternate phone, date of birth, branchcode,
# categorycode, enrollment date, expiry date, noaddress, lost, debarred, contact surname,
# contact firstname, contact title, borrower notes, contact relationship, ethnicity, ethnicity notes
# gender, username, opac note, contact note, password, sort one, sort two