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

(-)a/admin/debit_types.pl (-2 / +3 lines)
Lines 43-48 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
43
    }
43
    }
44
);
44
);
45
45
46
my @additional_fields = Koha::AdditionalFields->search( { tablename => 'account_debit_types' } )->as_list;
47
$template->param( additional_fields => \@additional_fields, );
48
46
my $debit_type;
49
my $debit_type;
47
if ($code) {
50
if ($code) {
48
    $debit_type = Koha::Account::DebitTypes->find($code);
51
    $debit_type = Koha::Account::DebitTypes->find($code);
Lines 67-79 if ( $op eq 'add_form' ) { Link Here
67
            };
70
            };
68
    }
71
    }
69
72
70
    my @additional_fields       = Koha::AdditionalFields->search( { tablename => 'account_debit_types' } )->as_list;
71
    my @additional_field_values = $debit_type ? $debit_type->get_additional_field_values_for_template : ();
73
    my @additional_field_values = $debit_type ? $debit_type->get_additional_field_values_for_template : ();
72
74
73
    $template->param(
75
    $template->param(
74
        debit_type              => $debit_type,
76
        debit_type              => $debit_type,
75
        branches_loop           => \@branches_loop,
77
        branches_loop           => \@branches_loop,
76
        additional_fields       => \@additional_fields,
77
        additional_field_values => @additional_field_values,
78
        additional_field_values => @additional_field_values,
78
    );
79
    );
79
} elsif ( $op eq 'cud-add_validate' ) {
80
} elsif ( $op eq 'cud-add_validate' ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt (-1 / +14 lines)
Lines 170-175 Link Here
170
                        <th>System</th>
170
                        <th>System</th>
171
                        <th>Code</th>
171
                        <th>Code</th>
172
                        <th>Description</th>
172
                        <th>Description</th>
173
                        [% IF additional_fields.size %]
174
                            <th>Additional fields</th>
175
                        [% END %]
173
                        <th>Default amount</th>
176
                        <th>Default amount</th>
174
                        <th>Available for</th>
177
                        <th>Available for</th>
175
                        <th>Library limitations</th>
178
                        <th>Library limitations</th>
Lines 183-188 Link Here
183
                                <td>[% debit_type.is_system | html %]</td>
186
                                <td>[% debit_type.is_system | html %]</td>
184
                                <td>[% debit_type.code | html %]</td>
187
                                <td>[% debit_type.code | html %]</td>
185
                                <td>[%- PROCESS debit_type_description debit_type = debit_type -%]</td>
188
                                <td>[%- PROCESS debit_type_description debit_type = debit_type -%]</td>
189
                                [% IF additional_fields.size %]
190
                                    <td>
191
                                        [% IF debit_type.additional_field_values.count > 0 %]
192
                                            [% FOREACH additional_field IN debit_type.additional_field_values %]
193
                                                <div><span class="label">[% additional_field.field.name | html %]</span>: [% additional_field.value | html %]</div>
194
                                            [% END %]
195
                                        [% ELSE %]
196
                                            <span>No additional fields</span>
197
                                        [% END %]
198
                                    </td>
199
                                [% END %]
186
                                <td>[% debit_type.default_amount | $Price %]</td>
200
                                <td>[% debit_type.default_amount | $Price %]</td>
187
                                <td
201
                                <td
188
                                    >[% IF debit_type.can_be_invoiced && debit_type.can_be_sold %]
202
                                    >[% IF debit_type.can_be_invoiced && debit_type.can_be_sold %]
189
- 

Return to bug 38457