View | Details | Raw Unified | Return to bug 12446
Collapse All | Expand All

(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 6-11 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
6
('AcquisitionDetails', '1', '', 'Hide/Show acquisition details on the biblio detail page.', 'YesNo'),
6
('AcquisitionDetails', '1', '', 'Hide/Show acquisition details on the biblio detail page.', 'YesNo'),
7
('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: his own only, any within his branch or all','Choice'),
7
('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: his own only, any within his branch or all','Choice'),
8
('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'),
8
('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'),
9
('AdditionalGuarantorField','',NULL,'Additional fields name to be transfer from guarantor to guarantee.','free'),
9
('AddPatronLists','categorycode','categorycode|category_type','Allow user to choose what list to pick up from when adding patrons','Choice'),
10
('AddPatronLists','categorycode','categorycode|category_type','Allow user to choose what list to pick up from when adding patrons','Choice'),
10
('advancedMARCeditor','0','','If ON, the MARC editor won\'t display field/subfield descriptions','YesNo'),
11
('advancedMARCeditor','0','','If ON, the MARC editor won\'t display field/subfield descriptions','YesNo'),
11
('AdvancedSearchLanguages','','','ISO 639-2 codes of languages you wish to see appear as an Advanced search option.  Example: eng|fre|ita','Textarea'),
12
('AdvancedSearchLanguages','','','ISO 639-2 codes of languages you wish to see appear as an Advanced search option.  Example: eng|fre|ita','Textarea'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc (-1 / +1 lines)
Lines 148-154 function searchToHold(){ Link Here
148
148
149
    [% IF ( CAN_user_borrowers ) %]
149
    [% IF ( CAN_user_borrowers ) %]
150
        [% IF ( adultborrower AND activeBorrowerRelationship ) %]
150
        [% IF ( adultborrower AND activeBorrowerRelationship ) %]
151
            <a id="addchild" class="btn btn-small" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=[% borrowernumber %]&amp;category_type=C"><i class="icon-plus"></i> Add child</a>
151
            <a id="addchild" class="btn btn-small" href="/cgi-bin/koha/members/memberentry.pl?op=add&amp;guarantorid=[% borrowernumber %]&amp;category_type=C"><i class="icon-plus"></i> Add guarantiee</a>
152
        [% END %]
152
        [% END %]
153
        [% IF ( CAN_user_borrowers ) %]
153
        [% IF ( CAN_user_borrowers ) %]
154
            <a id="changepassword" class="btn btn-small" href="/cgi-bin/koha/members/member-password.pl?member=[% borrowernumber %]"><i class="icon-lock"></i> Change password</a>
154
            <a id="changepassword" class="btn btn-small" href="/cgi-bin/koha/members/member-password.pl?member=[% borrowernumber %]"><i class="icon-lock"></i> Change password</a>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (+5 lines)
Lines 139-144 Patrons: Link Here
139
         - pref: CardnumberLength
139
         - pref: CardnumberLength
140
         - "characters long. The length can be a single number to specify an exact length, a range separated by a comma (i.e., 'Min,Max'), or a maximum with no minimum (i.e., ',Max')."
140
         - "characters long. The length can be a single number to specify an exact length, a range separated by a comma (i.e., 'Min,Max'), or a maximum with no minimum (i.e., ',Max')."
141
         - "If 'cardnumber' is included in the BorrowerMandatoryField list, the minimum length, if not specified here, defaults to one."
141
         - "If 'cardnumber' is included in the BorrowerMandatoryField list, the minimum length, if not specified here, defaults to one."
142
     -
143
         - "These additional following <a href='http://schema.koha-community.org/tables/borrowers.html' target='blank'>database columns</a> will be transferred from guarantor to guarantee:"
144
         - pref: AdditionalGuarantorField
145
           class: multi
146
         - (separate columns with |)
142
    "Norwegian patron database":
147
    "Norwegian patron database":
143
     -
148
     -
144
         - pref: NorwegianPatronDBEnable
149
         - pref: NorwegianPatronDBEnable
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/guarantor_search.tt (-1 / +32 lines)
Lines 18-23 Link Here
18
            var zipcode       = $('#' + id + 'zipcode').text();
18
            var zipcode       = $('#' + id + 'zipcode').text();
19
            var country       = $('#' + id + 'country').text();
19
            var country       = $('#' + id + 'country').text();
20
            var branchcode    = $('#' + id + 'branchcode').text();
20
            var branchcode    = $('#' + id + 'branchcode').text();
21
            var phone         = $('#' + id + 'phone').text();
22
            var phonepro      = $('#' + id + 'phonepro').text();
23
            var mobile        = $('#' + id + 'mobile').text();
24
            var email         = $('#' + id + 'email').text();
25
            var emailpro      = $('#' + id + 'emailpro').text();
26
            var fax           = $('#' + id + 'fax').text();
27
28
            $('.' + id + 'extra_field').each(function() {
29
                var spanId = $(this).attr('id');
30
                spanId = spanId.replace(id,'');
31
                var spanElement = window.opener.document.getElementById(spanId);
32
                if (spanElement)
33
                window.opener.document.getElementById(spanId).value = $(this).text();
34
            });
21
35
22
            var $ = window.opener.$;
36
            var $ = window.opener.$;
23
            var form = $('#entryform').get(0);
37
            var form = $('#entryform').get(0);
Lines 48-53 Link Here
48
            form.zipcode.value = zipcode;
62
            form.zipcode.value = zipcode;
49
            form.country.value = country;
63
            form.country.value = country;
50
            form.branchcode.value = branchcode;
64
            form.branchcode.value = branchcode;
65
            form.phone.value = phone;
66
            form.phonepro.value = phonepro;
67
            form.mobile.value = mobile;
68
            form.email.value = email;
69
            form.emailpro.value = emailpro;
70
            form.fax.value = fax;
51
71
52
            form.guarantorsearch.value = 'Change';
72
            form.guarantorsearch.value = 'Change';
53
            self.close();
73
            self.close();
Lines 103-109 Link Here
103
                   <span id="[% borrowernumber %]zipcode">[% zipcode %]</span>
123
                   <span id="[% borrowernumber %]zipcode">[% zipcode %]</span>
104
                   <span id="[% borrowernumber %]country">[% country %]</span>
124
                   <span id="[% borrowernumber %]country">[% country %]</span>
105
                   <span id="[% borrowernumber %]branchcode">[% branchcode %]</span>
125
                   <span id="[% borrowernumber %]branchcode">[% branchcode %]</span>
106
                  </span>
126
                   <span id="[% borrowernumber %]phone">[% phone %]</span>
127
                   <span id="[% borrowernumber %]phonepro">[% phonepro %]</span>
128
                   <span id="[% borrowernumber %]mobile">[% mobile %]</span>
129
                   <span id="[% borrowernumber %]email">[% email %]</span>
130
                   <span id="[% borrowernumber %]emailpro">[% emailpro %]</span>
131
                   <span id="[% borrowernumber %]fax">[% fax %]</span>
132
133
                   [% FOREACH extrafield IN extrafields %]
134
                        <span class="[% borrowernumber %]extra_field" id="[% borrowernumber %][% extrafield.field %]">[% extrafield.value %]</span>
135
                   [% END %]
136
137
                   </span>
107
138
108
                    <form action="">
139
                    <form action="">
109
                        <input type="button" onclick="fillguarantor('[% borrowernumber %]'); return false;" value="Select"/>
140
                        <input type="button" onclick="fillguarantor('[% borrowernumber %]'); return false;" value="Select"/>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-4 / +3 lines)
Lines 373-379 Link Here
373
	            [% END %]
373
	            [% END %]
374
	        </li>
374
	        </li>
375
[% ELSE %]
375
[% ELSE %]
376
 [% IF ( C ) %]
377
 [% IF ( guarantorid ) %]
376
 [% IF ( guarantorid ) %]
378
 <li id="contact-details">
377
 <li id="contact-details">
379
 [% ELSE %]
378
 [% ELSE %]
Lines 391-399 Link Here
391
        <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
390
        <input name="contactname" id="contactname" type="text" size="20" value="[% contactname %]" />
392
     [% END %]
391
     [% END %]
393
 </li>
392
 </li>
394
        [% END %]
393
     [% UNLESS nocontactfirstname %]
395
        [% UNLESS nocontactfirstname %]
394
<li>
396
 <li>
397
     <label for="contactfirstname">First name: </label>
395
     <label for="contactfirstname">First name: </label>
398
     [% IF ( guarantorid ) %]
396
     [% IF ( guarantorid ) %]
399
     <span>[% contactfirstname %]</span>
397
     <span>[% contactfirstname %]</span>
Lines 1277-1282 Link Here
1277
                <li data-category_code="[% patron_attribute.category_code %]">
1275
                <li data-category_code="[% patron_attribute.category_code %]">
1278
                    <label for="[% patron_attribute.form_id %]">[% patron_attribute.description %]: </label>
1276
                    <label for="[% patron_attribute.form_id %]">[% patron_attribute.description %]: </label>
1279
                        <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" />
1277
                        <input type="hidden" id="[% patron_attribute.form_id %]_code" name="[% patron_attribute.form_id %]_code" value="[% patron_attribute.code |html %]" />
1278
                        <input type="hidden" id="[% patron_attribute.form_id %]_desc" name="[% patron_attribute.form_id %]_desc" value="[% patron_attribute.description |html %]" />
1280
                        [% IF ( patron_attribute.use_dropdown ) %]
1279
                        [% IF ( patron_attribute.use_dropdown ) %]
1281
                            <select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">
1280
                            <select id="[% patron_attribute.form_id %]" name="[% patron_attribute.form_id %]">
1282
                                <option value=""></option>
1281
                                <option value=""></option>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-3 / +14 lines)
Lines 224-236 function validate1(date) { Link Here
224
    [% END %]
224
    [% END %]
225
    [% IF ( isguarantee ) %]
225
    [% IF ( isguarantee ) %]
226
        [% IF ( guaranteeloop ) %]
226
        [% IF ( guaranteeloop ) %]
227
            <li><span class="label">Guarantees:</span><ul>[% FOREACH guaranteeloo IN guaranteeloop %]<li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guaranteeloo.borrowernumber %]">[% guaranteeloo.name %]  </a></li>[% END %]</ul></li>
227
            <li><span class="label">Guarantees:</span>
228
                <table>[% FOREACH guaranteeloo IN guaranteeloop %]
229
                <tr>
230
                    <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guaranteeloo.borrowernumber %]">[% guaranteeloo.name %]</a></td>
231
                    <td style='text-align:right'>[% guaranteeloo.finesguarantee %] $</td>
232
                </tr>[% END %]
233
                <tr>
234
                    <td>Total</td>
235
                    <td style='text-align:right'>[% amounttot %] $</td>
236
                </tr>
237
                </table>
238
            </li>
228
        [% END %]
239
        [% END %]
229
    [% ELSE %]
240
    [% END %]
230
        [% IF ( guarantorborrowernumber ) %]
241
        [% IF ( guarantorborrowernumber ) %]
231
            <li><span class="label">Guarantor:</span><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorborrowernumber %]">[% guarantorsurname %], [% guarantorfirstname %]</a></li>
242
            <li><span class="label">Guarantor:</span><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantorborrowernumber %]">[% guarantorsurname %], [% guarantorfirstname %]</a></li>
232
        [% END %]
243
        [% END %]
233
    [% END %]
244
234
</ol>
245
</ol>
235
</div>
246
</div>
236
      <div class="action">
247
      <div class="action">
(-)a/members/guarantor_search.pl (-2 / +21 lines)
Lines 67-72 if ( $member ne '' ) { Link Here
67
    $count = $results ? @$results : 0;
67
    $count = $results ? @$results : 0;
68
68
69
    for ( my $i = 0 ; $i < $count ; $i++ ) {
69
    for ( my $i = 0 ; $i < $count ; $i++ ) {
70
        my @rowextrafields = ();
70
        my %row = (
71
        my %row = (
71
            count          => $i + 1,
72
            count          => $i + 1,
72
            borrowernumber => $results->[$i]{'borrowernumber'},
73
            borrowernumber => $results->[$i]{'borrowernumber'},
Lines 83-91 if ( $member ne '' ) { Link Here
83
            country        => $results->[$i]{'country'},
84
            country        => $results->[$i]{'country'},
84
            branchcode     => $results->[$i]{'branchcode'},
85
            branchcode     => $results->[$i]{'branchcode'},
85
            dateofbirth    => format_date( $results->[$i]{'dateofbirth'} ),
86
            dateofbirth    => format_date( $results->[$i]{'dateofbirth'} ),
86
            borrowernotes  => $results->[$i]{'borrowernotes'}
87
            borrowernotes  => $results->[$i]{'borrowernotes'},
88
            phone          => $results->[$i]{'phone'},
89
            phonepro       => $results->[$i]{'phonepro'},
90
            mobile         => $results->[$i]{'mobile'},
91
            email          => $results->[$i]{'email'},
92
            emailpro       => $results->[$i]{'emailpro'},
93
            fax            => $results->[$i]{'fax'}
87
        );
94
        );
88
95
96
97
        my $additionalGuarantorField=C4::Context->preference("AdditionalGuarantorField");
98
        my @field_add=split(/\|/,$additionalGuarantorField);
99
        foreach (@field_add) {
100
            my $fieldrow_ref = {};
101
            $fieldrow_ref -> {'field'} = $_;
102
            $fieldrow_ref -> {'value'} = $results->[$i]{$_};
103
            push( @rowextrafields, $fieldrow_ref );
104
        }
105
106
        $row{extrafields} = \@rowextrafields;
107
89
        push( @resultsdata, \%row );
108
        push( @resultsdata, \%row );
90
    }
109
    }
91
}
110
}
Lines 94-100 $template->param( Link Here
94
    member        => $member,
113
    member        => $member,
95
    numresults    => $count,
114
    numresults    => $count,
96
    category_type => $category_type,
115
    category_type => $category_type,
97
    resultsloop   => \@resultsdata
116
    resultsloop   => \@resultsdata,
98
);
117
);
99
118
100
output_html_with_http_headers $input, $cookie, $template->output;
119
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/members/memberentry.pl (-5 / +9 lines)
Lines 252-258 if ( ( $op eq 'insert' ) and !$nodouble ) { Link Here
252
}
252
}
253
253
254
  #recover all data from guarantor address phone ,fax... 
254
  #recover all data from guarantor address phone ,fax... 
255
if ( $guarantorid and ( $category_type eq 'C' || $category_type eq 'P' )) {
255
if ( $guarantorid and ( $category_type eq 'C' || $category_type eq 'P')) {
256
    if (my $guarantordata=GetMember(borrowernumber => $guarantorid)) {
256
    if (my $guarantordata=GetMember(borrowernumber => $guarantorid)) {
257
        $guarantorinfo=$guarantordata->{'surname'}." , ".$guarantordata->{'firstname'};
257
        $guarantorinfo=$guarantordata->{'surname'}." , ".$guarantordata->{'firstname'};
258
        $newdata{'contactfirstname'}= $guarantordata->{'firstname'};
258
        $newdata{'contactfirstname'}= $guarantordata->{'firstname'};
Lines 260-270 if ( $guarantorid and ( $category_type eq 'C' || $category_type eq 'P' )) { Link Here
260
        $newdata{'contacttitle'}    = $guarantordata->{'title'};
260
        $newdata{'contacttitle'}    = $guarantordata->{'title'};
261
        if ( $op eq 'add' ) {
261
        if ( $op eq 'add' ) {
262
	        foreach (qw(streetnumber address streettype address2
262
	        foreach (qw(streetnumber address streettype address2
263
                        zipcode country city state phone phonepro mobile fax email emailpro branchcode
263
                        zipcode country city state phone phonepro mobile fax email emailpro branchcode)) {
264
                        B_streetnumber B_streettype B_address B_address2
265
                        B_city B_state B_zipcode B_country B_email B_phone)) {
266
		        $newdata{$_} = $guarantordata->{$_};
264
		        $newdata{$_} = $guarantordata->{$_};
267
	        }
265
	        }
266
            my $additionalGuarantorField=C4::Context->preference("AdditionalGuarantorField");
267
            my @field_add=split(/\|/,$additionalGuarantorField);
268
            my $guarantordata=GetMember(borrowernumber => $guarantorid);
269
            foreach (@field_add) {
270
                $newdata{$_} = $guarantordata->{$_};
271
            }
268
        }
272
        }
269
    }
273
    }
270
}
274
}
Lines 691-697 if (C4::Context->preference('EnhancedMessagingPreferences')) { Link Here
691
    $template->param(TalkingTechItivaPhone => C4::Context->preference("TalkingTechItivaPhoneNotification"));
695
    $template->param(TalkingTechItivaPhone => C4::Context->preference("TalkingTechItivaPhoneNotification"));
692
}
696
}
693
697
694
$template->param( "showguarantor"  => ($category_type=~/A|I|S|X/) ? 0 : 1); # associate with step to know where you are
698
$template->param( "showguarantor"  => ($category_type=~/I|S|X/) ? 0 : 1); # associate with step to know where you are
695
$debug and warn "memberentry step: $step";
699
$debug and warn "memberentry step: $step";
696
$template->param(%data);
700
$template->param(%data);
697
$template->param( "step_$step"  => 1) if $step;	# associate with step to know where u are
701
$template->param( "step_$step"  => 1) if $step;	# associate with step to know where u are
(-)a/members/moremember.pl (-9 / +14 lines)
Lines 178-209 if ( $count ) { Link Here
178
    # the array, which is probably better done as a foreach loop.
178
    # the array, which is probably better done as a foreach loop.
179
    #
179
    #
180
    my @guaranteedata;
180
    my @guaranteedata;
181
    my $amount;
182
    my $totalmount = 0;
183
181
    for ( my $i = 0 ; $i < $count ; $i++ ) {
184
    for ( my $i = 0 ; $i < $count ; $i++ ) {
185
        my ($amount,$accts,undef) = GetMemberAccountRecords($guarantees->[$i]->{'borrowernumber'});
182
        push(@guaranteedata,
186
        push(@guaranteedata,
183
            {
187
            {
184
                borrowernumber => $guarantees->[$i]->{'borrowernumber'},
188
                borrowernumber => $guarantees->[$i]->{'borrowernumber'},
185
                cardnumber     => $guarantees->[$i]->{'cardnumber'},
189
                cardnumber     => $guarantees->[$i]->{'cardnumber'},
190
                finesguarantee => sprintf("%.2f",$amount),
186
                name           => $guarantees->[$i]->{'firstname'} . " "
191
                name           => $guarantees->[$i]->{'firstname'} . " "
187
                                . $guarantees->[$i]->{'surname'}
192
                                . $guarantees->[$i]->{'surname'}
188
            }
193
            }
189
        );
194
        );
195
        $totalmount += $amount;
190
    }
196
    }
191
    $template->param( guaranteeloop => \@guaranteedata );
197
    $template->param( guaranteeloop => \@guaranteedata );
198
    $template->param( amounttot => sprintf("%.2f",$totalmount));
192
    ( $template->param( adultborrower => 1 ) ) if ( $category_type eq 'A' || $category_type eq 'I' );
199
    ( $template->param( adultborrower => 1 ) ) if ( $category_type eq 'A' || $category_type eq 'I' );
193
}
200
}
194
else {
201
else {
195
    if ($data->{'guarantorid'}){
196
	    my ($guarantor) = GetMember( 'borrowernumber' =>$data->{'guarantorid'});
197
		$template->param(guarantor => 1);
198
		foreach (qw(borrowernumber cardnumber firstname surname)) {        
199
			  $template->param("guarantor$_" => $guarantor->{$_});
200
        }
201
    }
202
	if ($category_type eq 'C'){
202
	if ($category_type eq 'C'){
203
		$template->param('C' => 1);
203
		$template->param('C' => 1);
204
	}
204
	}
205
}
205
}
206
206
if ($data->{'guarantorid'}){
207
    my ($guarantor) = GetMember( 'borrowernumber' =>$data->{'guarantorid'});
208
    $template->param(guarantor => 1);
209
    foreach (qw(borrowernumber cardnumber firstname surname)) {
210
          $template->param("guarantor$_" => $guarantor->{$_});
211
    }
212
}
207
my %bor;
213
my %bor;
208
$bor{'borrowernumber'} = $borrowernumber;
214
$bor{'borrowernumber'} = $borrowernumber;
209
215
210
- 

Return to bug 12446