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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt (-13 / +3 lines)
Lines 68-74 Link Here
68
            [% IF accountline %]
68
            [% IF accountline %]
69
69
70
                <div class="page-section">
70
                <div class="page-section">
71
                    [% af_values = accountline.additional_field_values %]
72
                    [% IF accountline.credit_type_code %]
71
                    [% IF accountline.credit_type_code %]
73
                        <h2>Details of credit</h2>
72
                        <h2>Details of credit</h2>
74
                    [% ELSIF accountline.debit_type_code %]
73
                    [% ELSIF accountline.debit_type_code %]
Lines 84-91 Link Here
84
                                <th>Due date</th>
83
                                <th>Due date</th>
85
                                <th>Return date</th>
84
                                <th>Return date</th>
86
                                <th>Note</th>
85
                                <th>Note</th>
87
                                [% FOREACH value IN af_values %]
86
                                [% FOREACH field IN available_additional_fields %]
88
                                    <th>[% value.field.name | html %]</th>
87
                                    <th>[% field.name | html %]</th>
89
                                [% END %]
88
                                [% END %]
90
                                <th>Amount</th>
89
                                <th>Amount</th>
91
                                <th>Outstanding</th>
90
                                <th>Outstanding</th>
Lines 135-150 Link Here
135
                                <td>
134
                                <td>
136
                                    [% accountline.note | html_line_break %]
135
                                    [% accountline.note | html_line_break %]
137
                                </td>
136
                                </td>
138
137
                                [% INCLUDE 'additional-fields-display.inc' available=available_additional_fields values=additional_field_values value_only=1 is_table_cell=1 %]
139
                                [% FOREACH value IN af_values %]
140
                                    <td>
141
                                        [% IF value.field.authorised_value_category %]
142
                                            [% AuthorisedValues.GetByCode( value.field.authorised_value_category, value.value ) | html %]
143
                                        [% ELSE %]
144
                                            [% value.value | html %]
145
                                        [% END %]
146
                                    </td>
147
                                [% END %]
148
138
149
                                <td>
139
                                <td>
150
                                    [% accountline.amount | $Price %]
140
                                    [% accountline.amount | $Price %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt (+1 lines)
Lines 136-141 Link Here
136
[% MACRO jsinclude BLOCK %]
136
[% MACRO jsinclude BLOCK %]
137
    [% INCLUDE 'str/members-menu.inc' %]
137
    [% INCLUDE 'str/members-menu.inc' %]
138
    [% Asset.js("js/members-menu.js") | $raw %]
138
    [% Asset.js("js/members-menu.js") | $raw %]
139
    [% Asset.js("js/additional-fields-entry.js") | $raw %]
139
    <script>
140
    <script>
140
        $(document).ready(function(){
141
        $(document).ready(function(){
141
            $('#mancredit').preventDoubleFormSubmit();
142
            $('#mancredit').preventDoubleFormSubmit();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt (+1 lines)
Lines 130-135 Link Here
130
[% MACRO jsinclude BLOCK %]
130
[% MACRO jsinclude BLOCK %]
131
    [% INCLUDE 'str/members-menu.inc' %]
131
    [% INCLUDE 'str/members-menu.inc' %]
132
    [% Asset.js("js/members-menu.js") | $raw %]
132
    [% Asset.js("js/members-menu.js") | $raw %]
133
    [% Asset.js("js/additional-fields-entry.js") | $raw %]
133
    <script>
134
    <script>
134
        var type_fees = {};
135
        var type_fees = {};
135
        [% FOREACH debit_type IN debit_types %]
136
        [% FOREACH debit_type IN debit_types %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt (+1 lines)
Lines 418-423 Link Here
418
[% MACRO jsinclude BLOCK %]
418
[% MACRO jsinclude BLOCK %]
419
    [% INCLUDE 'str/members-menu.inc' %]
419
    [% INCLUDE 'str/members-menu.inc' %]
420
    [% Asset.js("js/members-menu.js") | $raw %]
420
    [% Asset.js("js/members-menu.js") | $raw %]
421
    [% Asset.js("js/additional-fields-entry.js") | $raw %]
421
    <script>
422
    <script>
422
        $(document).ready(function() {
423
        $(document).ready(function() {
423
            [% IF payment_id && Koha.Preference('FinePaymentAutoPopup') %]
424
            [% IF payment_id && Koha.Preference('FinePaymentAutoPopup') %]
(-)a/members/accountline-details.pl (+3 lines)
Lines 60-65 if ($accountline) { Link Here
60
    $template->param(
60
    $template->param(
61
        accountline     => $accountline,
61
        accountline     => $accountline,
62
        account_offsets => $account_offsets,
62
        account_offsets => $account_offsets,
63
        additional_field_values => $accountline->get_additional_field_values_for_template,
64
        available_additional_fields => Koha::AdditionalFields->search(
65
            { tablename => $accountline->credit_type_code ? 'accountlines:credit' : 'accountlines:debit' } ),
63
    );
66
    );
64
67
65
    my $patron = Koha::Patrons->find( $accountline->borrowernumber );
68
    my $patron = Koha::Patrons->find( $accountline->borrowernumber );
(-)a/members/mancredit.pl (-4 / +4 lines)
Lines 102-113 if ( $op eq 'cud-add' ) { Link Here
102
    my @additional_fields;
102
    my @additional_fields;
103
    my $accountline_fields = Koha::AdditionalFields->search({ tablename => 'accountlines:credit' });
103
    my $accountline_fields = Koha::AdditionalFields->search({ tablename => 'accountlines:credit' });
104
    while ( my $field = $accountline_fields->next ) {
104
    while ( my $field = $accountline_fields->next ) {
105
        my $value = $input->param('additional_field_' . $field->id);
105
        my @field_values = $input->param( 'additional_field_' . $field->id );
106
        if (defined $value) {
106
        foreach my $value (@field_values) {
107
            push @additional_fields, {
107
            push @additional_fields, {
108
                id => $field->id,
108
                id    => $field->id,
109
                value => $value,
109
                value => $value,
110
            };
110
            } if $value;
111
        }
111
        }
112
    }
112
    }
113
    if (@additional_fields) {
113
    if (@additional_fields) {
(-)a/members/maninvoice.pl (-4 / +4 lines)
Lines 164-175 if ( $op eq 'cud-add' ) { Link Here
164
            my @additional_fields;
164
            my @additional_fields;
165
            my $accountline_fields = Koha::AdditionalFields->search({ tablename => 'accountlines:debit' });
165
            my $accountline_fields = Koha::AdditionalFields->search({ tablename => 'accountlines:debit' });
166
            while ( my $field = $accountline_fields->next ) {
166
            while ( my $field = $accountline_fields->next ) {
167
                my $value = $input->param('additional_field_' . $field->id);
167
                my @field_values = $input->param( 'additional_field_' . $field->id );
168
                if (defined $value) {
168
                foreach my $value (@field_values) {
169
                    push @additional_fields, {
169
                    push @additional_fields, {
170
                        id => $field->id,
170
                        id    => $field->id,
171
                        value => $value,
171
                        value => $value,
172
                    };
172
                    } if $value;
173
                }
173
                }
174
            }
174
            }
175
            if (@additional_fields) {
175
            if (@additional_fields) {
(-)a/members/paycollect.pl (-9 / +8 lines)
Lines 173-184 if ( $total_paid and $total_paid ne '0.00' ) { Link Here
173
            my @additional_fields;
173
            my @additional_fields;
174
            my $accountline_fields = Koha::AdditionalFields->search({ tablename => 'accountlines:credit' });
174
            my $accountline_fields = Koha::AdditionalFields->search({ tablename => 'accountlines:credit' });
175
            while ( my $field = $accountline_fields->next ) {
175
            while ( my $field = $accountline_fields->next ) {
176
                my $value = $input->param('additional_field_' . $field->id);
176
                my @field_values = $input->param( 'additional_field_' . $field->id );
177
                if (defined $value) {
177
                foreach my $value (@field_values) {
178
                    push @additional_fields, {
178
                    push @additional_fields, {
179
                        id => $field->id,
179
                        id    => $field->id,
180
                        value => $value,
180
                        value => $value,
181
                    };
181
                    } if $value;
182
                }
182
                }
183
            }
183
            }
184
            if (@additional_fields) {
184
            if (@additional_fields) {
Lines 251-262 if ( $total_paid and $total_paid ne '0.00' ) { Link Here
251
            my @additional_fields;
251
            my @additional_fields;
252
            my $accountline_fields = Koha::AdditionalFields->search({ tablename => 'accountlines:credit' });
252
            my $accountline_fields = Koha::AdditionalFields->search({ tablename => 'accountlines:credit' });
253
            while ( my $field = $accountline_fields->next ) {
253
            while ( my $field = $accountline_fields->next ) {
254
                my $value = $input->param('additional_field_' . $field->id);
254
                my @field_values = $input->param( 'additional_field_' . $field->id );
255
                if (defined $value) {
255
                foreach my $value (@field_values) {
256
                    push @additional_fields, {
256
                    push @additional_fields, {
257
                        id => $field->id,
257
                        id    => $field->id,
258
                        value => $value,
258
                        value => $value,
259
                    };
259
                    } if $value;
260
                }
260
                }
261
            }
261
            }
262
            if (@additional_fields) {
262
            if (@additional_fields) {
263
- 

Return to bug 35044