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

(-)a/admin/checkmarc.pl (+15 lines)
Lines 244-249 if (scalar(@$invalid_authtypecodes) > 0) { Link Here
244
    $template->param(authtypecode_info => $invalid_authtypecodes);
244
    $template->param(authtypecode_info => $invalid_authtypecodes);
245
}
245
}
246
246
247
# checks items.permanent_location is not mapped
248
$sth = $dbh->prepare("SELECT frameworkcode, frameworktext, tagfield, tagsubfield
249
                      FROM marc_subfield_structure
250
                      LEFT JOIN biblio_framework USING (frameworkcode)
251
                      WHERE kohafield='permanent_location' OR
252
                            kohafield='items.permanent_location'");
253
$sth->execute;
254
my $permanent_location_mapped = $sth->fetchall_arrayref({});
255
if (scalar(@$permanent_location_mapped) > 0) {
256
    $total++;
257
    $template->param(permanent_location_mapped => 1);
258
    $template->param(mapped_permanent_location => $permanent_location_mapped);
259
}
260
261
247
$template->param(total => $total,
262
$template->param(total => $total,
248
		);
263
		);
249
264
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/checkmarc.tt (-1 / +34 lines)
Lines 222-227 Link Here
222
            <td>all authority types used in the frameworks are defined</td>
222
            <td>all authority types used in the frameworks are defined</td>
223
        </tr>
223
        </tr>
224
    [% END %]
224
    [% END %]
225
226
    [% IF ( permanent_location_mapped ) %]
227
        <tr>
228
            <td style="vertical-align:top;">items.permanent_location mapped</td>
229
            <td>The following mappings exist for items.permanent_location, and they shouldn't.
230
                <table>
231
                    <tr>
232
                        <th>Framework code</th>
233
                        <th>Framework description</th>
234
                        <th>Tag</th>
235
                        <th>Subfield</th>
236
                    </tr>
237
                    [% FOREACH mapped_perm_loc IN mapped_permanent_location %]
238
                        <tr>
239
                            <td>[% mapped_perm_loc.frameworkcode %]</td>
240
                            [% IF ( mapped_perm_loc.frameworkcode ) %]
241
                                <td>[% mapped_perm_loc.frameworktext %]</td>
242
                            [% ELSE %]
243
                                <td>Default framework</td>
244
                            [% END %]
245
                            <td>[% mapped_perm_loc.tagfield %]</td>
246
                            <td>[% mapped_perm_loc.tagsubfield %]</td>
247
                        </tr>
248
                    [% END %]
249
                </table>
250
            </td>
251
        </tr>
252
    [% ELSE %]
253
        <tr>
254
            <td>OK</td>
255
            <td>items.permanent_location is not mapped on the frameworks</td>
256
        </tr>
257
    [% END %]
258
225
<!-- -->
259
<!-- -->
226
[% IF ( total ) %]
260
[% IF ( total ) %]
227
    <tr>
261
    <tr>
228
- 

Return to bug 7817