});
my $dbh = C4::Context->dbh;
-my $total;
+my $total = 0;
# checks itemnum field
my $sth = $dbh->prepare("select tab from marc_subfield_structure where kohafield=\"items.itemnumber\"");
$sth->execute;
$sth = $dbh->prepare("select count(*) from itemtypes");
$sth->execute;
($res) = $sth->fetchrow;
-unless ($res) {
+if ($res) {
+ $template->param(itemtypes_empty =>0);
+} else {
$template->param(itemtypes_empty =>1);
$total++;
}
+
$sth = $dbh->prepare("select count(*) from branches");
$sth->execute;
($res) = $sth->fetchrow;
-unless ($res) {
+if ($res) {
+ $template->param(branches_empty =>0);
+} else {
$template->param(branches_empty =>1);
$total++;
}
-$sth = $dbh->prepare("select count(*) from marc_biblio where frameworkcode is NULL");
-$sth->execute;
-($res) = $sth->fetchrow;
-if ($res) {
- $template->param(frameworknull =>1);
- $total++;
-}
$sth = $dbh->prepare("select count(*) from marc_subfield_structure where frameworkcode is NULL");
$sth->execute;
($res) = $sth->fetchrow;
</tr>
<!-- /TMPL_IF -->
<!-- -->
+<!-- TMPL_IF name="itemtypes_empty" -->
+ <tr>
+ <td>item type not defined</td>
+ <td>at least 1 item type must be defined</td>
+ </tr>
+<!-- TMPL_ELSE -->
+ <tr>
+ <td>OK</td>
+ <td>at least 1 item type defined</td>
+ </tr>
+<!-- /TMPL_IF -->
+<!-- -->
+<!-- TMPL_IF name="branches_empty" -->
+ <tr>
+ <td>branch not defined</td>
+ <td>at least 1 branch must be defined</td>
+ </tr>
+<!-- TMPL_ELSE -->
+ <tr>
+ <td>OK</td>
+ <td>at least 1 branch defined</td>
+ </tr>
+<!-- /TMPL_IF -->
+<!-- -->
<!-- TMPL_IF name="biblionumber" -->
<tr>
<td>biblio and biblionumber</td>
<td>there is a null value in a frameworkcode. Check the following tables<br />
<li>select * from marc_subfield_structure where frameworkcode is NULL</li>
<li>select * from marc_tag_structure where frameworkcode is NULL</li>
- <li>select * from marc_biblio where frameworkcode is NULL</li></td>
+ </td>
</tr>
<!-- TMPL_ELSE -->
<tr>