Corriger les dossiers animaux et le suivi médical
This commit is contained in:
parent
a55d27935f
commit
7b89fd5dfa
34 changed files with 440 additions and 39 deletions
|
|
@ -518,7 +518,7 @@ trait AnimalBrowseActions
|
|||
|
||||
// Adoptions
|
||||
$stmt = $db->prepare('
|
||||
SELECT adopter_name, adopter_address, adopter_postal_code, adopter_city, adopter_country, adopter_phone, adopter_email, adoption_date
|
||||
SELECT adopter_name, adopter_address, adopter_postal_code, adopter_city, adopter_country, adopter_phone, adopter_email, adoption_date, adopter_contact_id
|
||||
FROM adoptions
|
||||
WHERE animal_id = :id
|
||||
ORDER BY id DESC
|
||||
|
|
@ -650,7 +650,10 @@ trait AnimalBrowseActions
|
|||
$ref_med_administration = $db
|
||||
->query('SELECT id, name, accro FROM ref_med_administration ORDER BY id')
|
||||
->fetchAll();
|
||||
$vaccines = $db->query('SELECT id, name FROM ref_vaccines ORDER BY id')->fetchAll();
|
||||
$vaccines = $db->query('SELECT id, name FROM ref_vaccines ORDER BY name COLLATE NOCASE,id')->fetchAll();
|
||||
$vaccineManufacturers = $db
|
||||
->query('SELECT id,name FROM ref_vaccine_manufacturers WHERE active=1 ORDER BY name COLLATE NOCASE,id')
|
||||
->fetchAll(PDO::FETCH_ASSOC);
|
||||
$inventoryBatches = $db
|
||||
->query(
|
||||
'SELECT b.id,b.batch_number,b.expires_on,b.quantity,p.name,p.unit,p.category,p.reference_id FROM inventory_batches b JOIN inventory_products p ON p.id=b.product_id WHERE b.quantity>0 AND p.active=1 ORDER BY p.category,p.name COLLATE NOCASE,date(b.expires_on)',
|
||||
|
|
@ -958,6 +961,7 @@ trait AnimalBrowseActions
|
|||
'surgeries' => $surgeries,
|
||||
'ref_med_administration' => $ref_med_administration,
|
||||
'vaccines' => $vaccines,
|
||||
'vaccineManufacturers' => $vaccineManufacturers,
|
||||
'inventoryBatches' => $inventoryBatches,
|
||||
'activeUsers' => $activeUsers,
|
||||
'clinics' => $clinics,
|
||||
|
|
|
|||
Loading…
Reference in a new issue