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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-1 / +1 lines)
Lines 325-331 Link Here
325
        <legend>Guarantor information</legend>
325
        <legend>Guarantor information</legend>
326
326
327
        <span id="guarantor_relationships">
327
        <span id="guarantor_relationships">
328
        [% IF Koha.Preference('RevertToAutoPopulatingGuarantorInfo') && (!relationships) %]
328
        [% IF (!relationships) %]
329
            <li id="contact-details">
329
            <li id="contact-details">
330
                <span class="label">Patron #:</span>
330
                <span class="label">Patron #:</span>
331
                [% IF guarantorid %]
331
                [% IF guarantorid %]
(-)a/members/memberentry.pl (-9 / +9 lines)
Lines 238-244 if ( $op eq 'insert' || $op eq 'modify' || $op eq 'save' || $op eq 'duplicate' ) Link Here
238
238
239
# Use default 19.11 behaviour (Introduced by bug 14570) if RevertAutoPopulatingGuarantorInfo local use syspref is disabled, otherwise pre-populate guarantor info
239
# Use default 19.11 behaviour (Introduced by bug 14570) if RevertAutoPopulatingGuarantorInfo local use syspref is disabled, otherwise pre-populate guarantor info
240
# when creating a guarantee/child from a guarantor/adult
240
# when creating a guarantee/child from a guarantor/adult
241
if (C4::Context->preference('RevertToAutoPopulatingGuarantorInfo')) {
241
242
## Deal with guarantor stuff
243
$template->param( relationships => scalar $patron->guarantor_relationships ) if $patron;
244
my $guarantor_id = $input->param('guarantor_id');
245
my $guarantor = undef;
246
$guarantor = Koha::Patrons->find( $guarantor_id ) if $guarantor_id;
247
$template->param( guarantor => $guarantor );
248
249
if (!$patron) {
242
    #recover all data from guarantor address phone ,fax... 
250
    #recover all data from guarantor address phone ,fax... 
243
    if ( $guarantorid ) {
251
    if ( $guarantorid ) {
244
       if (my $guarantor = Koha::Patrons->find( $guarantorid )) {
252
       if (my $guarantor = Koha::Patrons->find( $guarantorid )) {
Lines 260-272 if (C4::Context->preference('RevertToAutoPopulatingGuarantorInfo')) { Link Here
260
    }
268
    }
261
}
269
}
262
270
263
## Deal with guarantor stuff
264
$template->param( relationships => scalar $patron->guarantor_relationships ) if $patron;
265
my $guarantor_id = $input->param('guarantor_id');
266
my $guarantor = undef;
267
$guarantor = Koha::Patrons->find( $guarantor_id ) if $guarantor_id;
268
$template->param( guarantor => $guarantor );
269
270
my @delete_guarantor = $input->multi_param('delete_guarantor');
271
my @delete_guarantor = $input->multi_param('delete_guarantor');
271
foreach my $id ( @delete_guarantor ) {
272
foreach my $id ( @delete_guarantor ) {
272
    my $r = Koha::Patron::Relationships->find( $id );
273
    my $r = Koha::Patron::Relationships->find( $id );
273
- 

Return to bug 23808