ok for historic for an equipment
This commit is contained in:
parent
8f3caadde1
commit
0af93066a3
|
@ -1,6 +1,6 @@
|
|||
# Plugin Materiels pour Garradin
|
||||
|
||||
Cette extension permet de gérer les matériels de l'association: stock, entrées, sorties, valorisation.
|
||||
Cette extension permet de gérer les matériels de l'association: stock, entrées, sorties.
|
||||
|
||||
## Installation
|
||||
|
||||
|
|
BIN
materiels.tar.gz
BIN
materiels.tar.gz
Binary file not shown.
|
@ -0,0 +1,3 @@
|
|||
DROP TABLE plugin_materiels_movement;
|
||||
DROP TABLE plugin_materiels_equipment;
|
||||
DROP TABLE plugin_materiels_category;
|
|
@ -1,5 +1,5 @@
|
|||
nom="Gestion des matériels"
|
||||
description="Gestion des matériels: stock, entrées, sorties, valorisation."
|
||||
description="Gestion des matériels: stock, entrées, sorties."
|
||||
auteur="JBthePenguin"
|
||||
url="https://gitlab.com/JBthePenguin"
|
||||
version="1.0"
|
||||
|
|
|
@ -2,4 +2,6 @@
|
|||
|
||||
namespace Garradin;
|
||||
|
||||
$db->import(__DIR__ . '/schema.sql');
|
||||
$db = DB::getInstance();
|
||||
|
||||
$db->import(__DIR__ . '/data/schema.sql');
|
||||
|
|
|
@ -172,8 +172,9 @@ class Movement
|
|||
public function AllEqmtMovements($eqmt_id)
|
||||
// return list of all movements for a specific equipments
|
||||
// ordered by date and side
|
||||
// if same date order by rent output and after put entry for return
|
||||
{
|
||||
return DB::getInstance()->get(
|
||||
"SELECT * FROM plugin_materiels_movement WHERE equipment_id = '{$eqmt_id}' ORDER BY mvt_date DESC, side DESC;");
|
||||
"SELECT * FROM plugin_materiels_movement WHERE equipment_id = '{$eqmt_id}' ORDER BY mvt_date DESC, CASE WHEN (side = '1' AND kind = 'Location / Prêt') THEN 1 WHEN (side = '0' AND kind != 'Retour de location / prêt') THEN 2 ELSE 0 END, side DESC;");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
|
||||
namespace Garradin;
|
||||
|
||||
$db = DB::getInstance();
|
||||
|
||||
$db->import(__DIR__ . '/data/schema_remove.sql');
|
Loading…
Reference in New Issue