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

(-)a/C4/Utils/DataTables/Members.pm (-2 lines)
Lines 2-8 package C4::Utils::DataTables::Members; Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use C4::Context;
4
use C4::Context;
5
use C4::Members;
6
use C4::Utils::DataTables;
5
use C4::Utils::DataTables;
7
use Koha::DateUtils;
6
use Koha::DateUtils;
8
7
Lines 78-84 sub search { Link Here
78
        }
77
        }
79
    }
78
    }
80
79
81
    $dbh = C4::Context->dbh;
82
    my @columns = qw( borrowernumber surname firstname othernames flags streetnumber streettype address address2 city state zipcode country cardnumber dateexpiry borrowernotes branchcode email userid dateofbirth categorycode phone phonepro mobile fax email emailpro);
80
    my @columns = qw( borrowernumber surname firstname othernames flags streetnumber streettype address address2 city state zipcode country cardnumber dateexpiry borrowernotes branchcode email userid dateofbirth categorycode phone phonepro mobile fax email emailpro);
83
    my @guarantor_attributes = split(/\|/, C4::Context->preference("GuarantorFields"));
81
    my @guarantor_attributes = split(/\|/, C4::Context->preference("GuarantorFields"));
84
    if( @guarantor_attributes ){
82
    if( @guarantor_attributes ){
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 323-331 CREATE TABLE `categories` ( -- this table shows information related to Koha patr Link Here
323
  `BlockExpiredPatronOpacActions` tinyint(1) NOT NULL default '-1', -- wheither or not a patron of this category can renew books or place holds once their card has expired. 0 means they can, 1 means they cannot, -1 means use syspref BlockExpiredPatronOpacActions
323
  `BlockExpiredPatronOpacActions` tinyint(1) NOT NULL default '-1', -- wheither or not a patron of this category can renew books or place holds once their card has expired. 0 means they can, 1 means they cannot, -1 means use syspref BlockExpiredPatronOpacActions
324
  `default_privacy` ENUM( 'default', 'never', 'forever' ) NOT NULL DEFAULT 'default', -- Default privacy setting for this patron category
324
  `default_privacy` ENUM( 'default', 'never', 'forever' ) NOT NULL DEFAULT 'default', -- Default privacy setting for this patron category
325
  `checkprevcheckout` varchar(7) NOT NULL default 'inherit', -- produce a warning for this patron category if this item has previously been checked out to this patron if 'yes', not if 'no', defer to syspref setting if 'inherit'.
325
  `checkprevcheckout` varchar(7) NOT NULL default 'inherit', -- produce a warning for this patron category if this item has previously been checked out to this patron if 'yes', not if 'no', defer to syspref setting if 'inherit'.
326
  `canbeguarantee` tinyint(1) NOT NULL default '0',
326
  `reset_password` TINYINT(1) NULL DEFAULT NULL, -- if patrons of this category can do the password reset flow,
327
  `reset_password` TINYINT(1) NULL DEFAULT NULL, -- if patrons of this category can do the password reset flow,
327
  `change_password` TINYINT(1) NULL DEFAULT NULL, -- if patrons of this category can change their passwords in the OAPC
328
  `change_password` TINYINT(1) NULL DEFAULT NULL, -- if patrons of this category can change their passwords in the OAPC
328
  `canbeguarantee` tinyint(1) NOT NULL default '0'
329
  PRIMARY KEY  (`categorycode`),
329
  PRIMARY KEY  (`categorycode`),
330
  UNIQUE KEY `categorycode` (`categorycode`)
330
  UNIQUE KEY `categorycode` (`categorycode`)
331
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
331
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt (-1 / +1 lines)
Lines 225-231 Link Here
225
                e.preventDefault();
225
                e.preventDefault();
226
                var borrowernumber = $(this).data("borrowernumber");
226
                var borrowernumber = $(this).data("borrowernumber");
227
                var borrower_data = $("#borrower_data"+borrowernumber).val();
227
                var borrower_data = $("#borrower_data"+borrowernumber).val();
228
                var guarantor_attributes = $("#guarantor_attributes").val();
228
                var guarantor_attributes = $("#guarantor_attributes"+borrowernumber).val();
229
                if ( !guarantor_attributes )
229
                if ( !guarantor_attributes )
230
                    guarantor_attributes = "{}";
230
                    guarantor_attributes = "{}";
231
                select_user( borrowernumber, JSON.parse(borrower_data), JSON.parse(guarantor_attributes) );
231
                select_user( borrowernumber, JSON.parse(borrower_data), JSON.parse(guarantor_attributes) );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-2 / +2 lines)
Lines 267-273 Link Here
267
                                                    <tr>
267
                                                    <tr>
268
                                                        [% IF logged_in_user.can_see_patron_infos( guarantee ) %]
268
                                                        [% IF logged_in_user.can_see_patron_infos( guarantee ) %]
269
                                                            <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantee.borrowernumber | uri %]">[% guarantee.firstname | html %] [% guarantee.surname | html %]</a></td>
269
                                                            <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantee.borrowernumber | uri %]">[% guarantee.firstname | html %] [% guarantee.surname | html %]</a></td>
270
                                                            <td style='text-align:right'>[% guarantee.account.balance | html %]</td>
270
                                                            <td style='text-align:right'>[% guarantee.account.balance | $Price %]</td>
271
                                                        [% ELSE %]
271
                                                        [% ELSE %]
272
                                                            <td>[% guarantee.firstname | html %] [% guarantee.surname | html %]</td>
272
                                                            <td>[% guarantee.firstname | html %] [% guarantee.surname | html %]</td>
273
                                                        [% END %]
273
                                                        [% END %]
Lines 275-281 Link Here
275
                                                    [% END %]
275
                                                    [% END %]
276
                                                    [% IF logged_in_user.can_see_patron_infos( guarantee ) %]
276
                                                    [% IF logged_in_user.can_see_patron_infos( guarantee ) %]
277
                                                       <td>Total</td>
277
                                                       <td>Total</td>
278
                                                       <td style='text-align:right'>[% amounttot | html %]</td>
278
                                                       <td style='text-align:right'>[% amount_total | $Price %]</td>
279
                                                    [% END %]
279
                                                    [% END %]
280
                                                </table>
280
                                                </table>
281
                                            </li>
281
                                            </li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/guarantor_search.tt (-1 / +1 lines)
Lines 18-24 Link Here
18
                "dt_address":
18
                "dt_address":
19
                    "[% INCLUDE escape_address data=data %]",
19
                    "[% INCLUDE escape_address data=data %]",
20
                "dt_action":
20
                "dt_action":
21
                    "<a href=\"#\" class=\"btn btn-default btn-xs select_user\" data-borrowernumber=\"[% data.borrowernumber | html %]\">Select</a><input type=\"hidden\" id=\"borrower_data[% data.borrowernumber | html %]\" name=\"borrower_data[% data.borrowernumber | html %]\" value=\"[% To.json(data) | html %]\" /><input type=\"hidden\" id=\"guarantor_attributes\" name=\"guarantor_attributes\" value=\"[% To.json(attributes) | html %]\" />"
21
                    "<a href=\"#\" class=\"btn btn-default btn-xs select_user\" data-borrowernumber=\"[% data.borrowernumber | html %]\">Select</a><input type=\"hidden\" id=\"borrower_data[% data.borrowernumber | html %]\" name=\"borrower_data[% data.borrowernumber | html %]\" value=\"[% To.json(data) | html %]\" /><input type=\"hidden\" id=\"guarantor_attributes[% data.borrowernumber | html %]\" name=\"guarantor_attributes[% data.borrowernumber | html %]\" value=\"[% To.json(attributes) | html %]\" />"
22
            }[% UNLESS loop.last %],[% END %]
22
            }[% UNLESS loop.last %],[% END %]
23
        [% END %]
23
        [% END %]
24
    ]
24
    ]
(-)a/members/moremember.pl (-9 / +4 lines)
Lines 115-132 $template->param( Link Here
115
115
116
my $relatives_issues_count =
116
my $relatives_issues_count =
117
    Koha::Checkouts->count({ borrowernumber => \@relatives });
117
    Koha::Checkouts->count({ borrowernumber => \@relatives });
118
my $count = scalar @guarantees;
119
if ( $count ) {
120
    $template->param( isguarantee => 1 );
121
118
122
    my $totalmount = 0;
119
if ( @guarantees ) {
120
    my $total_amount = 0;
123
121
124
    foreach my $guarantee (@guarantees){
122
    foreach my $guarantee (@guarantees){
125
        $totalmount += $guarantee->account->balance;
123
        $total_amount += $guarantee->account->balance;
126
127
    }
124
    }
128
    $template->param( guarantees => \@guarantees);
125
    $template->param( amount_total => $total_amount );
129
    $template->param( amounttot => sprintf("%.2f",$totalmount));
130
}
126
}
131
127
132
# Calculate and display patron's age
128
# Calculate and display patron's age
133
- 

Return to bug 12446