Compare commits
2 Commits
d3b48c677e
...
11d4946b92
Author | SHA1 | Date | |
---|---|---|---|
11d4946b92 | |||
ef69c76e7c |
@ -20,6 +20,7 @@
|
||||
{{/foreach}}
|
||||
|
||||
{{#select
|
||||
eqpmt.key as eqpmt_key,
|
||||
json_extract(eqpmt.document, '$.name') as eqpmt_name,
|
||||
mvt.key AS mvt_key,
|
||||
json_extract(mvt.document, '$.direction') as direction,
|
||||
@ -47,10 +48,11 @@
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Matériel</td>
|
||||
<td>Date</td>
|
||||
<td>Quantité</td>
|
||||
<td>Opération</td>
|
||||
<td>Matériel</td>
|
||||
<td>Quantité</td>
|
||||
<td>Total</td>
|
||||
<td class="actions"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -58,11 +60,22 @@
|
||||
{{#foreach from=$temp_mat}}
|
||||
{{:assign var="type_mvt" from="config.%s_nature.%s.type"|args:$direction:$operation}}
|
||||
{{:assign var="op_label" from="config.%s_nature.%s.label"|args:$direction:$operation}}
|
||||
{{:assign var="total" from="reste.%s"|args:$eqpmt_key}}
|
||||
{{if $total == null}}
|
||||
{{:assign total=0}}
|
||||
{{/if}}
|
||||
{{if $direction == 'input' && $type_mvt == 'retour'}}
|
||||
{{:assign var="reste.%s"|args:$eqpmt_key value="%d-%d"|math:$total:$amount}}
|
||||
{{elseif $direction == 'output' && $type_mvt == 'temporaire'}}
|
||||
{{:assign var="reste.%s"|args:$eqpmt_key value="%d+%d"|math:$total:$amount}}
|
||||
{{/if}}
|
||||
{{:assign var="total" from="reste.%s"|args:$eqpmt_key}}
|
||||
<tr>
|
||||
<td>{{$eqpmt_name}}</td>
|
||||
<td>{{$date|date_short}}</td>
|
||||
<td>{{$amount}}</td>
|
||||
<td>{{$op_label}}</td>
|
||||
<td>{{$eqpmt_name}}</td>
|
||||
<td>{{$amount}}</td>
|
||||
<td>{{$total}}</td>
|
||||
<td class="actions">
|
||||
{{if $direction == "output" && $type_mvt == "temporaire"}}
|
||||
{{:linkbutton
|
||||
@ -79,6 +92,7 @@
|
||||
{{/if}}
|
||||
|
||||
{{#select
|
||||
eqpmt.key as eqpmt_key,
|
||||
json_extract(eqpmt.document, '$.name') as eqpmt_name,
|
||||
json_extract(mvt.document, '$.direction') as direction,
|
||||
json_extract(mvt.document, '$.operation') as operation,
|
||||
@ -103,20 +117,31 @@
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Matériel</td>
|
||||
<td>Date</td>
|
||||
<td>Quantité</td>
|
||||
<td>Opération</td>
|
||||
<td>Matériel</td>
|
||||
<td>Quantité</td>
|
||||
<td>Total</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#foreach from=$def_mat}}
|
||||
{{:assign var="type_mvt" from="config.%s_nature.%s.type"|args:$direction:$operation}}
|
||||
{{:assign var="op_label" from="config.%s_nature.%s.label"|args:$direction:$operation}}
|
||||
{{:assign var="total" from="reste.%s"|args:$eqpmt_key}}
|
||||
{{if $total == null}}
|
||||
{{:assign total=0}}
|
||||
{{/if}}
|
||||
{{if $direction == 'output' && $type_mvt == 'définitif'}}
|
||||
{{:assign var="reste.%s"|args:$eqpmt_key value="%d+%d"|math:$total:$amount}}
|
||||
{{/if}}
|
||||
{{:assign var="total" from="reste.%s"|args:$eqpmt_key}}
|
||||
<tr>
|
||||
<td>{{$eqpmt_name}}</td>
|
||||
<td>{{$date|date_short}}</td>
|
||||
<td>{{$amount}}</td>
|
||||
<td>{{$op_label}}</td>
|
||||
<td>{{$eqpmt_name}}</td>
|
||||
<td>{{$amount}}</td>
|
||||
<td>{{$total}}</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
|
@ -6,6 +6,12 @@
|
||||
*}}
|
||||
|
||||
{{#form on="delete"}}
|
||||
|
||||
{{* vérifier s'il est possible de supprimer le lieu de stockage *}}
|
||||
{{#load type="movement" where="$$.storage = :storage_key" :storage_key=$_GET.key limit=1}}
|
||||
{{:redirect force="index.html?err=1&msg=suppression"}}
|
||||
{{/load}}
|
||||
|
||||
{{:delete where="key = :key" :key=$_GET.key}}
|
||||
{{:redirect force="index.html?ok=1&msg=suppression"}}
|
||||
{{/form}}
|
||||
|
@ -15,7 +15,11 @@
|
||||
<p class="block confirm">Suppression effectuée</p>
|
||||
{{/if}}
|
||||
{{elseif $_GET.err}}
|
||||
<p class="block error">Opération refusée</p>
|
||||
{{if $_GET.msg == "suppression"}}
|
||||
<p class="block error">Impossible de supprimer ce lieu de stockage car il est utilisé !</p>
|
||||
{{else}}
|
||||
<p class="block error">Opération refusée</p>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#list
|
||||
|
Loading…
Reference in New Issue
Block a user