);
}
}
+
+# Circ rule warnings
+{
+ my $dbh = C4::Context->dbh;
+ my $units = $dbh->selectall_arrayref(
+ q|SELECT branchcode, categorycode, itemtype, lengthunit FROM issuingrules WHERE lengthunit NOT IN ( 'days', 'hours' ); |,
+ { Slice => {} }
+ );
+
+ if (@$units) {
+ $template->param(
+ warnIssuingRules => 1,
+ ir_units => $units,
+ );
+ }
+}
my %versions = C4::Context::get_versions();
$template->param(
<br/>
[% END %]
- [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron || warnPrefAnonymousPatron_PatronDoesNotExist || warnNoActiveCurrency || QueryParserError || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || oauth2_missing_deps || bad_yaml_prefs %]
+ [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron || warnPrefAnonymousPatron_PatronDoesNotExist || warnNoActiveCurrency || QueryParserError || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || oauth2_missing_deps || bad_yaml_prefs || warnIssuingRules %]
<h2>Warnings regarding the system configuration</h2>
<table>
<caption>Preferences and parameters</caption>
</table>
[% END %]
+ [% IF warnIssuingRules %]
+ <table>
+ <caption>Issuing rules</caption>
+ [% FOREACH unit IN ir_units %]
+ <tr>
+ <th scope="row"><b>Warning</b></th>
+ <td>The [% unit.branchcode | html %], [% unit.categorycode | html %], [% unit.itemtype %]
+ issuingrule will fallback to 'days' for 'lengthunit' as it is incorrectly defined as
+ [% unit.lengthunit | html %].
+ </td>
+ </tr>
+ [% END %]
+ </table>
+ [% END %]
+
[% ELSE %]
<p>No warnings.</p>
[% END %]