Ajout archivage matériels de stock nul
This commit is contained in:
parent
3e0f3159ae
commit
4a46099275
10 changed files with 214 additions and 60 deletions
|
|
@ -31,10 +31,10 @@
|
|||
<p class="help">Inventaire des matériels propriété de l'association</p>
|
||||
</div>
|
||||
|
||||
{{* Vérifier s'il y a au moins un matériel propriété de l'asso *}}
|
||||
{{* Vérifier s'il y a au moins un matériel non archivé propriété de l'asso *}}
|
||||
{{:assign mat_present=false}}
|
||||
{{#foreach from=$equipments key=key item=eqpmt}}
|
||||
{{if $eqpmt|has_key:"stock"}}
|
||||
{{if $eqpmt|has_key:"stock" && $eqpmt.status != "archived"}}
|
||||
{{:assign mat_present=true}}
|
||||
{{:break}}
|
||||
{{/if}}
|
||||
|
|
@ -51,7 +51,12 @@
|
|||
"
|
||||
type="equipment"
|
||||
order=1
|
||||
}}
|
||||
}}
|
||||
|
||||
{{if $status == "archived"}}
|
||||
{{:continue}}
|
||||
{{/if}}
|
||||
|
||||
{{:assign var=eqpmt_key value=$key}}
|
||||
{{:assign var=cat_key value=$category}}
|
||||
{{:assign var=cat_name from=categories.%s|args:$cat_key}}
|
||||
|
|
@ -63,8 +68,10 @@
|
|||
{{:assign var=stock from="equipments.%s.stock"|args:$eqpmt_key}}
|
||||
{{:assign var=exterieur from="equipments.%s.exterieur"|args:$eqpmt_key}}
|
||||
{{:assign dispo="%d-%d"|math:$stock:$exterieur}}
|
||||
{{:assign var=eqpmt from="equipments.%s"|args:$eqpmt_key}}
|
||||
|
||||
{{if $stock == null}}
|
||||
{{if ! $eqpmt|has_key:"stock"}}
|
||||
{{* aucune unité permanente de ce matériel *}}
|
||||
{{:continue}}
|
||||
{{/if}}
|
||||
|
||||
|
|
@ -100,7 +107,7 @@
|
|||
shape="table"}}
|
||||
{{:linkbutton
|
||||
label="Modifier"
|
||||
href="modifier_materiel.html?key=%s&prop=1"|args:$eqpmt_key
|
||||
href="modifier_materiel.html?key=%s&prop=1&stock=%s"|args:$eqpmt_key:$stock
|
||||
shape="edit"
|
||||
target="_dialog"}}
|
||||
</td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue