@@ -, +, @@
---
installer/data/mysql/updatedatabase.pl | 7 +++++
.../prog/en/modules/members/memberentrygen.tt | 26 ++++++++++++++++++++
members/memberentry.pl | 12 +++++++++
3 files changed, 45 insertions(+), 0 deletions(-)
--- a/installer/data/mysql/updatedatabase.pl
+++ a/installer/data/mysql/updatedatabase.pl
@@ -7824,6 +7824,13 @@ if ( CheckVersion($DBversion) ) {
SetVersion($DBversion);
}
+$DBversion = "XXX";
+if ( CheckVersion($DBversion) ) {
+ $dbh->do("ALTER TABLE `borrowers` ADD COLUMN `contactprincipal` VARCHAR(45) NULL DEFAULT NULL;");
+ print "Upgrade to $DBversion done (Add the contactprincipal column to the borrowers table)\n";
+ SetVersion($DBversion);
+}
+
=head1 FUNCTIONS
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
@@ -634,6 +634,32 @@
[% IF ( mandatoryfax ) %]Required[% END %]
+
+
+
+
[% END %]
--- a/members/memberentry.pl
+++ a/members/memberentry.pl
@@ -526,6 +526,18 @@ foreach (qw(C A S P I X)) {
$template->param('typeloop' => \@typeloop,
no_categories => $no_categories);
if($no_categories){ $no_add = 1; }
+
+my @contactprincipalloop;
+foreach (qw(phone phonepro mobile email emailpro fax)) {
+ push @contactprincipalloop,{
+ 'code' => $_,
+ 'selected' => (defined($borrower_data->{'contactprincipal'}) &&
+ $_ eq $borrower_data->{'contactprincipal'}),
+ 'currentis_' . $_ => 1
+ };
+}
+$template->param('contactprincipalloop' => \@contactprincipalloop);
+
# test in city
if ( $guarantorid ) {
$select_city = getidcity($data{city});
--