Modification condition archivage matériel
This commit is contained in:
parent
8d5ea202fe
commit
ec249b78ee
@ -77,7 +77,7 @@
|
||||
shape="table"}}
|
||||
{{:linkbutton
|
||||
label="Modifier"
|
||||
href="modify_equipment.html?key=%s&prop=1&stock=%s"|args:$key:$col3
|
||||
href="modify_equipment.html?key=%s&prop=1"|args:$key
|
||||
shape="edit"
|
||||
target="_dialog"}}
|
||||
</td>
|
||||
|
@ -3,7 +3,7 @@
|
||||
{{*
|
||||
Paramètres :
|
||||
- key : clé du matériel à modifier
|
||||
- prop : =1 si matériel propriété de l'association
|
||||
- prop : =1 si matériel propriété de l'association, 0 sinon
|
||||
*}}
|
||||
|
||||
{{:assign equipment_key=$_GET.key|trim}}
|
||||
@ -17,9 +17,11 @@
|
||||
{{#form on="save"}}
|
||||
|
||||
{{if $_POST.archive == 1}}
|
||||
{{* vérifier si le stock est nul *}}
|
||||
{{if $_GET.stock != 0}}
|
||||
{{* vérifier les qunatités *}}
|
||||
{{if $_GET.prop == 1 && $equipment.stock != 0}}
|
||||
{{:error message="L'archivage n'est possible que si le stock est nul !"}}
|
||||
{{elseif $_GET.prop == 0 && $equipment.notowned != 0}}
|
||||
{{:error message="L'archivage n'est possible que s'il n'y a plus de matériel présent temporairement"}}
|
||||
{{/if}}
|
||||
{{* archiver le matériel *}}
|
||||
{{:save
|
||||
|
Loading…
Reference in New Issue
Block a user