Compare commits
No commits in common. "0d48d9999c776e3af2237a39b5bbfdbcf2fdc254" and "39bd89234ad38c095723a1eb8746d07ad1c6ad95" have entirely different histories.
0d48d9999c
...
39bd89234a
@ -12,10 +12,6 @@
|
||||
{{* 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"
|
||||
@ -23,8 +19,8 @@
|
||||
CASE $$.direction WHEN 'input' THEN 'Entrée' WHEN 'output' THEN 'Sortie' END AS 'Mouvement';
|
||||
$$.operation AS 'Opération';
|
||||
(SELECT $$.name
|
||||
FROM @TABLE AS mat
|
||||
WHERE mat.key = @TABLE.$$.equipment) AS 'Matériel' ;
|
||||
FROM @TABLE AS b
|
||||
WHERE b.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" custom_css="./style.css" current="module_equipment"}}
|
||||
{{:admin_header title="Gestion des matériels" current="module_equipment"}}
|
||||
|
||||
{{if $_GET.current != null}}
|
||||
{{:assign current=$_GET.current}}
|
||||
|
@ -70,85 +70,46 @@
|
||||
WHERE cat.key = @TABLE.$$.category) AS 'Catégorie' ;
|
||||
(SELECT
|
||||
SUM($$.amount)
|
||||
FROM @TABLE AS mvt
|
||||
FROM module_data_equipment AS mvt
|
||||
WHERE
|
||||
$$.type = 'movement'
|
||||
AND
|
||||
$$.operation IN %s
|
||||
AND
|
||||
$$.equipment = @TABLE.key
|
||||
$$.equipment = module_data_equipment.key
|
||||
) -
|
||||
(SELECT
|
||||
COALESCE(SUM($$.amount), 0)
|
||||
FROM @TABLE AS mvt
|
||||
FROM module_data_equipment AS mvt
|
||||
WHERE
|
||||
$$.type = 'movement'
|
||||
AND
|
||||
$$.operation IN %s
|
||||
AND
|
||||
$$.equipment = @TABLE.key
|
||||
$$.equipment = module_data_equipment.key
|
||||
) AS 'Stock' ;
|
||||
(SELECT
|
||||
COALESCE(SUM($$.amount), 0)
|
||||
FROM @TABLE AS mvt
|
||||
FROM module_data_equipment AS mvt
|
||||
WHERE
|
||||
$$.type = 'movement'
|
||||
AND
|
||||
$$.operation IN %s
|
||||
AND
|
||||
$$.equipment = @TABLE.key
|
||||
$$.equipment = module_data_equipment.key
|
||||
) -
|
||||
(SELECT
|
||||
COALESCE(SUM($$.amount), 0)
|
||||
FROM @TABLE AS mvt
|
||||
FROM module_data_equipment AS mvt
|
||||
WHERE
|
||||
$$.type = 'movement'
|
||||
AND
|
||||
$$.operation IN %s
|
||||
AND
|
||||
$$.equipment = @TABLE.key
|
||||
$$.equipment = module_data_equipment.key
|
||||
) AS 'Sorti' ;
|
||||
|
||||
(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
|
||||
'' AS 'Disponible'
|
||||
"|args:$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"
|
||||
@ -156,13 +117,14 @@
|
||||
}}
|
||||
|
||||
{{: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">{{$col5}}</td>
|
||||
<td class="num nosort">{{$dispo}}</td>
|
||||
<td class="actions">
|
||||
{{if $col4 > 0}}
|
||||
{{:linkbutton
|
||||
@ -171,7 +133,7 @@
|
||||
shape="history"
|
||||
target="_dialog"}}
|
||||
{{/if}}
|
||||
{{if $col5 > 0}}
|
||||
{{if $dispo > 0}}
|
||||
{{:linkbutton
|
||||
label="Sortie"
|
||||
shape="minus"
|
||||
|
@ -18,10 +18,6 @@ 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