Animals with an estimated date of birth (off shelter)
###
Auditing
###
3300/Any rev03
###
Displays animals off shelter with an estimated date of birth by date brought in
###
en
###
$VAR from DATE Enter from date$
$VAR to DATE Enter to date$

SELECT animal.animalname, animal.ID AS AID, animal.dateofbirth, animal. displaylocation AS location, species. speciesname, breed. breedname 
FROM animal
INNER JOIN breed
ON animal. breedid=breed. id 
INNER JOIN species
ON animal. speciesid=species. id
WHERE estimateddob=1 AND archived=1 AND DateBroughtIn >= '$@from$' AND DateBroughtIn <= '$@to$' 
ORDER BY speciesname, animalname
###
$$HEADER
HEADER$$

$$GROUP_SpeciesName
$$HEAD
<h2>$SpeciesName</h2>
<table border=1>
<thead>
<tr>
<th>ANIMALNAME</th>
<th>SPECIESNAME</th>
<th>BREEDNAME</th>
<th>LOCATION</th>
<th>DATEOFBIRTH</th>
</tr>
</thead>
<tbody>
$$FOOT
</tbody>
</table>
<p>Total: {COUNT.ShelterCode}</p>
GROUP$$


$$BODY
<tr>
<td><a target="_blank" href="animal?id=$AID">$ANIMALNAME</a></td>
<td>$SPECIESNAME</td>
<td>$BREEDNAME</td>
<td>$LOCATION</td>
<td>$DATEOFBIRTH</td>
</tr>
BODY$$

$$FOOTER
FOOTER$$