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 68-80 if ( $op eq 'add_form' ) { Link Here
68
          };
71
          };
69
    }
72
    }
70
73
71
    my @additional_fields       = Koha::AdditionalFields->search( { tablename => 'account_debit_types' } )->as_list;
72
    my @additional_field_values = $debit_type ? $debit_type->get_additional_field_values_for_template : ();
74
    my @additional_field_values = $debit_type ? $debit_type->get_additional_field_values_for_template : ();
73
75
74
    $template->param(
76
    $template->param(
75
        debit_type              => $debit_type,
77
        debit_type              => $debit_type,
76
        branches_loop           => \@branches_loop,
78
        branches_loop           => \@branches_loop,
77
        additional_fields       => \@additional_fields,
78
        additional_field_values => @additional_field_values,
79
        additional_field_values => @additional_field_values,
79
    );
80
    );
80
}
81
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt (-1 / +14 lines)
Lines 172-177 Link Here
172
                                    <th>System</th>
172
                                    <th>System</th>
173
                                    <th>Code</th>
173
                                    <th>Code</th>
174
                                    <th>Description</th>
174
                                    <th>Description</th>
175
                                    [% IF additional_fields.size %]
176
                                    <th>Additional fields</th>
177
                                    [% END %]
175
                                    <th>Default amount</th>
178
                                    <th>Default amount</th>
176
                                    <th>Available for</th>
179
                                    <th>Available for</th>
177
                                    <th>Library limitations</th>
180
                                    <th>Library limitations</th>
Lines 185-190 Link Here
185
                                        <td>[% debit_type.is_system | html %]</td>
188
                                        <td>[% debit_type.is_system | html %]</td>
186
                                        <td>[% debit_type.code | html %]</td>
189
                                        <td>[% debit_type.code | html %]</td>
187
                                        <td>[%- PROCESS debit_type_description debit_type = debit_type -%]</td>
190
                                        <td>[%- PROCESS debit_type_description debit_type = debit_type -%]</td>
191
                                        [% IF additional_fields.size %]
192
                                        <td>
193
                                            [% IF debit_type.additional_field_values.count > 0 %]
194
                                                [% FOREACH additional_field IN debit_type.additional_field_values %]
195
                                                <div><span class="label">[% additional_field.field.name | html %]</span>: [% additional_field.value | html %]</div>
196
                                                [% END %]
197
                                            [% ELSE %]
198
                                            <span>No additional fields</span>
199
                                            [% END %]
200
                                        </td>
201
                                        [% END %]
188
                                        <td>[% debit_type.default_amount | $Price %]</td>
202
                                        <td>[% debit_type.default_amount | $Price %]</td>
189
                                        <td>[% IF debit_type.can_be_invoiced && debit_type.can_be_sold %]
203
                                        <td>[% IF debit_type.can_be_invoiced && debit_type.can_be_sold %]
190
                                            <i class="fa fa-id-card"></i> Invoicing, <i class="fa fa-shopping-cart"></i> Sale
204
                                            <i class="fa fa-id-card"></i> Invoicing, <i class="fa fa-shopping-cart"></i> Sale
191
- 

Return to bug 38457