Compare commits
No commits in common. "11d4946b9268bc0aeeb975afad29e274717f038c" and "d3b48c677ec6fcbec5aad3cea6e9c325da96f066" have entirely different histories.
11d4946b92
...
d3b48c677e
@ -20,7 +20,6 @@
|
||||
{{/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,
|
||||
@ -48,11 +47,10 @@
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Date</td>
|
||||
<td>Opération</td>
|
||||
<td>Matériel</td>
|
||||
<td>Date</td>
|
||||
<td>Quantité</td>
|
||||
<td>Total</td>
|
||||
<td>Opération</td>
|
||||
<td class="actions"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -60,22 +58,11 @@
|
||||
{{#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>{{$date|date_short}}</td>
|
||||
<td>{{$op_label}}</td>
|
||||
<td>{{$eqpmt_name}}</td>
|
||||
<td>{{$date|date_short}}</td>
|
||||
<td>{{$amount}}</td>
|
||||
<td>{{$total}}</td>
|
||||
<td>{{$op_label}}</td>
|
||||
<td class="actions">
|
||||
{{if $direction == "output" && $type_mvt == "temporaire"}}
|
||||
{{:linkbutton
|
||||
@ -92,7 +79,6 @@
|
||||
{{/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,
|
||||
@ -117,31 +103,20 @@
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Date</td>
|
||||
<td>Opération</td>
|
||||
<td>Matériel</td>
|
||||
<td>Date</td>
|
||||
<td>Quantité</td>
|
||||
<td>Total</td>
|
||||
<td>Opération</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>{{$date|date_short}}</td>
|
||||
<td>{{$op_label}}</td>
|
||||
<td>{{$eqpmt_name}}</td>
|
||||
<td>{{$date|date_short}}</td>
|
||||
<td>{{$amount}}</td>
|
||||
<td>{{$total}}</td>
|
||||
<td>{{$op_label}}</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
|
@ -6,12 +6,6 @@
|
||||
*}}
|
||||
|
||||
{{#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,11 +15,7 @@
|
||||
<p class="block confirm">Suppression effectuée</p>
|
||||
{{/if}}
|
||||
{{elseif $_GET.err}}
|
||||
{{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}}
|
||||
<p class="block error">Opération refusée</p>
|
||||
{{/if}}
|
||||
|
||||
{{#list
|
||||
|
Loading…
Reference in New Issue
Block a user