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

(-)a/tools/letter.pl (-8 / +10 lines)
Lines 46-52 use C4::Auth; Link Here
46
use C4::Context;
46
use C4::Context;
47
use C4::Output;
47
use C4::Output;
48
use C4::Letters;
48
use C4::Letters;
49
use C4::Members::Attributes;
49
50
use Koha::Patron::Attribute::Types;
50
51
51
# $protected_letters = protected_letters()
52
# $protected_letters = protected_letters()
52
# - return a hashref of letter_codes representing letters that should never be deleted
53
# - return a hashref of letter_codes representing letters that should never be deleted
Lines 466-477 sub get_columns_for { Link Here
466
        }
467
        }
467
    }
468
    }
468
    if ($table eq 'borrowers') {
469
    if ($table eq 'borrowers') {
469
        if ( my $attributes = C4::Members::Attributes::GetAttributes() ) {
470
        my $attribute_types = Koha::Patron::Attribute::Types->search(
470
            foreach (@$attributes) {
471
            {},
471
                push @fields, {
472
            { order_by => 'code' },
472
                    value => "borrower-attribute:$_",
473
        );
473
                    text  => "attribute:$_",
474
        while ( my $at = $attribute_types->next ) {
474
                }
475
            push @fields, {
476
                value => "borrower-attribute:" . $at->code,
477
                text  => "attribute:" . $at->code,
475
            }
478
            }
476
        }
479
        }
477
    }
480
    }
478
- 

Return to bug 20444