Compare commits
3 Commits
39bd89234a
...
0d48d9999c
Author | SHA1 | Date | |
---|---|---|---|
0d48d9999c | |||
cd4220546e | |||
849dcf00c9 |
@ -12,6 +12,10 @@
|
||||
{{* récupérer la config des entrées/sorties *}}
|
||||
{{:include file="./_get_config.html" keep="config"}}
|
||||
|
||||
<div class="shortFormLeft">
|
||||
<p class="help">Historique des mouvements</p>
|
||||
</div>
|
||||
|
||||
{{* lister tous les mouvements *}}
|
||||
{{#list
|
||||
type="movement"
|
||||
@ -19,8 +23,8 @@
|
||||
CASE $$.direction WHEN 'input' THEN 'Entrée' WHEN 'output' THEN 'Sortie' END AS 'Mouvement';
|
||||
$$.operation AS 'Opération';
|
||||
(SELECT $$.name
|
||||
FROM @TABLE AS b
|
||||
WHERE b.key = @TABLE.$$.equipment) AS 'Matériel' ;
|
||||
FROM @TABLE AS mat
|
||||
WHERE mat.key = @TABLE.$$.equipment) AS 'Matériel' ;
|
||||
$$.amount AS 'Quantité';
|
||||
$$.comment AS 'Commentaire'"
|
||||
order=1
|
||||
|
@ -28,7 +28,7 @@
|
||||
{{else}}
|
||||
{{:error message="Le matériel %s n'appartient à aucune catégorie"|args:$equipment.name}}
|
||||
{{/load}}
|
||||
{{:admin_header title="Gestion des matériels" current="module_equipment"}}
|
||||
{{:admin_header title="Gestion des matériels" custom_css="./style.css" current="module_equipment"}}
|
||||
|
||||
{{if $_GET.current != null}}
|
||||
{{:assign current=$_GET.current}}
|
||||
|
@ -70,46 +70,85 @@
|
||||
WHERE cat.key = @TABLE.$$.category) AS 'Catégorie' ;
|
||||
(SELECT
|
||||
SUM($$.amount)
|
||||
FROM module_data_equipment AS mvt
|
||||
FROM @TABLE AS mvt
|
||||
WHERE
|
||||
$$.type = 'movement'
|
||||
AND
|
||||
$$.operation IN %s
|
||||
AND
|
||||
$$.equipment = module_data_equipment.key
|
||||
$$.equipment = @TABLE.key
|
||||
) -
|
||||
(SELECT
|
||||
COALESCE(SUM($$.amount), 0)
|
||||
FROM module_data_equipment AS mvt
|
||||
FROM @TABLE AS mvt
|
||||
WHERE
|
||||
$$.type = 'movement'
|
||||
AND
|
||||
$$.operation IN %s
|
||||
AND
|
||||
$$.equipment = module_data_equipment.key
|
||||
$$.equipment = @TABLE.key
|
||||
) AS 'Stock' ;
|
||||
(SELECT
|
||||
COALESCE(SUM($$.amount), 0)
|
||||
FROM module_data_equipment AS mvt
|
||||
FROM @TABLE AS mvt
|
||||
WHERE
|
||||
$$.type = 'movement'
|
||||
AND
|
||||
$$.operation IN %s
|
||||
AND
|
||||
$$.equipment = module_data_equipment.key
|
||||
$$.equipment = @TABLE.key
|
||||
) -
|
||||
(SELECT
|
||||
COALESCE(SUM($$.amount), 0)
|
||||
FROM module_data_equipment AS mvt
|
||||
FROM @TABLE AS mvt
|
||||
WHERE
|
||||
$$.type = 'movement'
|
||||
AND
|
||||
$$.operation IN %s
|
||||
AND
|
||||
$$.equipment = module_data_equipment.key
|
||||
$$.equipment = @TABLE.key
|
||||
) AS 'Sorti' ;
|
||||
'' AS 'Disponible'
|
||||
"|args:$input_types.définitif:$output_types.définitif:$output_types.temporaire:$input_types.retour
|
||||
|
||||
(SELECT
|
||||
SUM($$.amount)
|
||||
FROM @TABLE AS mvt
|
||||
WHERE
|
||||
$$.type = 'movement'
|
||||
AND
|
||||
$$.operation IN %s
|
||||
AND
|
||||
$$.equipment = @TABLE.key
|
||||
) -
|
||||
(SELECT
|
||||
COALESCE(SUM($$.amount), 0)
|
||||
FROM @TABLE AS mvt
|
||||
WHERE
|
||||
$$.type = 'movement'
|
||||
AND
|
||||
$$.operation IN %s
|
||||
AND
|
||||
$$.equipment = @TABLE.key
|
||||
) -
|
||||
(SELECT
|
||||
COALESCE(SUM($$.amount), 0)
|
||||
FROM @TABLE AS mvt
|
||||
WHERE
|
||||
$$.type = 'movement'
|
||||
AND
|
||||
$$.operation IN %s
|
||||
AND
|
||||
$$.equipment = @TABLE.key
|
||||
) + (SELECT
|
||||
COALESCE(SUM($$.amount), 0)
|
||||
FROM @TABLE AS mvt
|
||||
WHERE
|
||||
$$.type = 'movement'
|
||||
AND
|
||||
$$.operation IN %s
|
||||
AND
|
||||
$$.equipment = @TABLE.key
|
||||
) AS 'Disponible'
|
||||
"|args:$input_types.définitif:$output_types.définitif:$output_types.temporaire:$input_types.retour:$input_types.définitif:$output_types.définitif:$output_types.temporaire:$input_types.retour
|
||||
type="equipment"
|
||||
where="$$.status <> 'archived' AND %s"|args:$condition
|
||||
group="col1 HAVING col3 NOT NULL"
|
||||
@ -117,14 +156,13 @@
|
||||
}}
|
||||
|
||||
{{:assign var=cat_name from=categories.%s|args:$category}}
|
||||
{{:assign dispo="%d-%d"|math:$col3:$col4}}
|
||||
|
||||
<tr>
|
||||
<td>{{$name}}</td>
|
||||
<td>{{$cat_name}}</td>
|
||||
<td class="num">{{$col3}}</td>
|
||||
<td class="num">{{$col4}}</td>
|
||||
<td class="num nosort">{{$dispo}}</td>
|
||||
<td class="num">{{$col5}}</td>
|
||||
<td class="actions">
|
||||
{{if $col4 > 0}}
|
||||
{{:linkbutton
|
||||
@ -133,7 +171,7 @@
|
||||
shape="history"
|
||||
target="_dialog"}}
|
||||
{{/if}}
|
||||
{{if $dispo > 0}}
|
||||
{{if $col5 > 0}}
|
||||
{{:linkbutton
|
||||
label="Sortie"
|
||||
shape="minus"
|
||||
|
@ -18,6 +18,10 @@ function disableColumSort(liste) {
|
||||
anchor.removeAttribute("href");
|
||||
anchor.removeAttribute("title");
|
||||
anchor.removeChild(anchor.firstElementChild);
|
||||
let headerClass = titles[i].getAttribute("class");
|
||||
if (headerClass == null) { headerClass = ""; }
|
||||
headerClass += "nosort";
|
||||
titles[i].setAttribute("class", headerClass);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user