Amélioration présentation inventaire
This commit is contained in:
parent
2285c44a32
commit
18d9ad9699
1 changed files with 23 additions and 11 deletions
|
|
@ -113,20 +113,20 @@
|
||||||
{{:assign nonproprio="%d-%d"|math:$nonproprio:$amount}}
|
{{:assign nonproprio="%d-%d"|math:$nonproprio:$amount}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:assign dispo="%d-%d"|math:$stock:$exterieur}}
|
{{:assign dispo_final="%d-%d"|math:$stock:$exterieur}}
|
||||||
{{:assign var="quantites.%s.stock"|args:$id value=$stock}}
|
{{:assign var="quantites.%s.stock"|args:$id value=$stock}}
|
||||||
{{:assign var="quantites.%s.exterieur"|args:$id value=$exterieur}}
|
{{:assign var="quantites.%s.exterieur"|args:$id value=$exterieur}}
|
||||||
{{:assign var="quantites.%s.dispo"|args:$id value=$dispo}}
|
{{:assign var="quantites.%s.dispo"|args:$id value=$dispo_final}}
|
||||||
{{:assign var="quantites.%s.nonproprio"|args:$id value=$nonproprio}}
|
{{:assign var="quantites.%s.nonproprio"|args:$id value=$nonproprio}}
|
||||||
{{/load}}
|
{{/load}}
|
||||||
|
|
||||||
{{if $current != "archives"}}
|
{{if $current != "archives"}}
|
||||||
<nav class="tabs">
|
<nav class="tabs">
|
||||||
<aside>
|
<aside>
|
||||||
{{if $_GET.prop && $equipment.stock > 0}}
|
{{if $_GET.prop && $dispo_final > 0}}
|
||||||
{{:linkbutton label="Sortie" title="Enregistrer une sortie de ce matériel" shape="minus" href="movements/output_equipment.html?key=%s"|args:$_GET.key target="_dialog"}}
|
{{:linkbutton label="Sortie" shape="minus" href="movements/output_equipment.html?key=%s"|args:$_GET.key target="_dialog"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:linkbutton label="Entrée" title="Enregistrer une entrée de ce matériel" shape="plus" href="movements/input_equipment.html?key=%s"|args:$_GET.key target="_dialog"}}
|
{{:linkbutton label="Entrée" shape="plus" href="movements/input_equipment.html?key=%s"|args:$_GET.key target="_dialog"}}
|
||||||
</aside>
|
</aside>
|
||||||
</nav>
|
</nav>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
@ -177,7 +177,8 @@
|
||||||
THEN (SELECT $$.name FROM @TABLE as storage WHERE storage.key = @TABLE.$$.storage)
|
THEN (SELECT $$.name FROM @TABLE as storage WHERE storage.key = @TABLE.$$.storage)
|
||||||
ELSE ''
|
ELSE ''
|
||||||
END AS 'Stockage';
|
END AS 'Stockage';
|
||||||
'' AS 'Doc'
|
'' AS 'Documents';
|
||||||
|
$$.transactions AS 'Écritures'
|
||||||
"|args:$config.user_fields.name_sql
|
"|args:$config.user_fields.name_sql
|
||||||
equipment=$equipment_key
|
equipment=$equipment_key
|
||||||
order=1
|
order=1
|
||||||
|
|
@ -207,7 +208,8 @@
|
||||||
<td class="num nosort">{{$dispo}}</td>
|
<td class="num nosort">{{$dispo}}</td>
|
||||||
<td>{{:link href="/admin/users/details.php?id=%s"|args:$user label="%s"|args:$col8}}</td>
|
<td>{{:link href="/admin/users/details.php?id=%s"|args:$user label="%s"|args:$col8}}</td>
|
||||||
<td>{{$col9}}</td>
|
<td>{{$col9}}</td>
|
||||||
<td class="num nosort">{{if $nb_files > 0}}{{:tag label="%s"|args:$nb_files}}{{:icon shape="attach"}}{{/if}}</td>
|
<td class="num nosort">{{if $nb_files > 0}}{{:icon shape="attach"}}{{/if}}</td>
|
||||||
|
<td class="num">{{if $transactions|count > 0}}{{:icon shape="money"}}{{/if}}</td>
|
||||||
<td class="actions">
|
<td class="actions">
|
||||||
{{if $current != "archives"}}
|
{{if $current != "archives"}}
|
||||||
{{if $direction == "output" && $type_mvt == "temporaire"}}
|
{{if $direction == "output" && $type_mvt == "temporaire"}}
|
||||||
|
|
@ -215,7 +217,6 @@
|
||||||
{{if $temp_ext != null && $temp_ext > 0}}
|
{{if $temp_ext != null && $temp_ext > 0}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Retour"
|
label="Retour"
|
||||||
title="Enregistrer un retour de sortie temporaire"
|
|
||||||
href="movements/output_return.html?key=%s&prop=%s"|args:$key:$_GET.prop
|
href="movements/output_return.html?key=%s&prop=%s"|args:$key:$_GET.prop
|
||||||
shape="reset"
|
shape="reset"
|
||||||
target="_dialog"}}
|
target="_dialog"}}
|
||||||
|
|
@ -231,7 +232,9 @@
|
||||||
</tr>
|
</tr>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/list}}
|
{{/list}}
|
||||||
|
{{if $dispo_final === 0}}
|
||||||
|
<span class="help">Il n'y a aucun matériel disponible, il n'est donc pas possible d'effectuer une sortie</span>
|
||||||
|
{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{* calculer la quantité présente temporairement de chaque matériel *}}
|
{{* calculer la quantité présente temporairement de chaque matériel *}}
|
||||||
{{#foreach from=$config.input_nature key=key}}
|
{{#foreach from=$config.input_nature key=key}}
|
||||||
|
|
@ -269,7 +272,9 @@
|
||||||
CASE WHEN $$.storage NOT NULL
|
CASE WHEN $$.storage NOT NULL
|
||||||
THEN (SELECT $$.name FROM @TABLE as storage WHERE storage.key = @TABLE.$$.storage)
|
THEN (SELECT $$.name FROM @TABLE as storage WHERE storage.key = @TABLE.$$.storage)
|
||||||
ELSE ''
|
ELSE ''
|
||||||
END as 'Stockage'
|
END as 'Stockage';
|
||||||
|
'' AS 'Documents';
|
||||||
|
$$.transactions AS 'Écritures'
|
||||||
"
|
"
|
||||||
equipment=$equipment_key
|
equipment=$equipment_key
|
||||||
order=1
|
order=1
|
||||||
|
|
@ -281,6 +286,12 @@
|
||||||
$direction === "output"&& $op_label|in:$output_types
|
$direction === "output"&& $op_label|in:$output_types
|
||||||
}}
|
}}
|
||||||
{{:assign var="stock" from="quantites.%s.nonproprio"|args:$id}}
|
{{:assign var="stock" from="quantites.%s.nonproprio"|args:$id}}
|
||||||
|
|
||||||
|
{{:assign file_path="%s/%s/"|args:$module.storage_root:$key}}
|
||||||
|
{{:assign file_path=$file_path|cat:"%"}}
|
||||||
|
{{#select count(*) AS nb FROM files WHERE path LIKE :file_path ; :file_path=$file_path}}
|
||||||
|
{{:assign nb_files=$nb}}
|
||||||
|
{{/select}}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{$date|date_short}}</td>
|
<td>{{$date|date_short}}</td>
|
||||||
<td>{{$col2}}</td>
|
<td>{{$col2}}</td>
|
||||||
|
|
@ -288,13 +299,14 @@
|
||||||
<td class="num">{{$amount}}</td>
|
<td class="num">{{$amount}}</td>
|
||||||
<td class="num nosort">{{$stock}}</td>
|
<td class="num nosort">{{$stock}}</td>
|
||||||
<td>{{$col6}}</td>
|
<td>{{$col6}}</td>
|
||||||
|
<td class="num nosort">{{if $nb_files > 0}}{{:icon shape="attach"}}{{/if}}</td>
|
||||||
|
<td class="num">{{if $transactions|count > 0}}{{:icon shape="money"}}{{/if}}</td>
|
||||||
<td class="actions">
|
<td class="actions">
|
||||||
{{if $direction == "input" && $type_mvt == "temporaire"}}
|
{{if $direction == "input" && $type_mvt == "temporaire"}}
|
||||||
{{:assign var="temp_in" from="present.%s"|args:$key}}
|
{{:assign var="temp_in" from="present.%s"|args:$key}}
|
||||||
{{if $temp_in != null && $temp_in > 0}}
|
{{if $temp_in != null && $temp_in > 0}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Retour"
|
label="Retour"
|
||||||
title="Enregistrer un retour d'entrée temporaire"
|
|
||||||
href="movements/input_return.html?key=%s&prop=%s"|args:$key:$_GET.prop
|
href="movements/input_return.html?key=%s&prop=%s"|args:$key:$_GET.prop
|
||||||
shape="reset"
|
shape="reset"
|
||||||
target="_dialog"}}
|
target="_dialog"}}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue