Fiche membre : ajout total et amélioration présentation
This commit is contained in:
parent
d3b48c677e
commit
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>
|
||||
|
Loading…
Reference in New Issue
Block a user