correction erreur suppression mouvement
This commit is contained in:
parent
72d1ed010f
commit
c0ed6d4401
@ -24,9 +24,8 @@
|
||||
{{* vérifier s'il est possible de supprimer le mouvement *}}
|
||||
{{if $mvt_suppr.direction == 'input'}}
|
||||
{{:assign var="type_operation" from="config.input_nature.%s.type"|args:$mvt_suppr.operation}}
|
||||
|
||||
{{if $type_operation == 'temporaire'}}
|
||||
{{#load type="link" where="$$.temp_key = :key OR $$.return = :key" :key=$_GET.key}}
|
||||
{{#load type="link" where="$$.temp_key = :key" :key=$_GET.key}}
|
||||
{{:assign link_key=$key}}
|
||||
{{/load}}
|
||||
{{if $link_key != null}}
|
||||
@ -65,11 +64,15 @@
|
||||
{{if $dispo < 0 || $nonprop < 0}}
|
||||
{{:redirect force="../historique.html?key=%s&prop=%s&err=1&msg=suppression"|args:$mvt_suppr.equipment:$_GET.prop}}
|
||||
{{/if}}
|
||||
|
||||
{{/if}}
|
||||
{{/load}}
|
||||
{{* suppression possible *}}
|
||||
{{if $type_operation == 'retour'}}
|
||||
{{#load type="link" where="$$.return = :key" :key=$_GET.key}}
|
||||
{{:assign link_key=$key}}
|
||||
{{/load}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{else}}
|
||||
{{* sortie *}}
|
||||
{{:assign var="type_operation" from="config.output_nature.%s.type"|args:$mvt_suppr.operation}}
|
||||
@ -81,6 +84,10 @@
|
||||
{{if $link_key != null}}
|
||||
{{:redirect force="../historique.html?key=%s&prop=%s&err=1&msg=suppression"|args:$mvt_suppr.equipment:$_GET.prop}}
|
||||
{{/if}}
|
||||
{{elseif $type_operation == 'retour'}}
|
||||
{{#load type="link" where="$$.return = :key" :key=$_GET.key}}
|
||||
{{:assign link_key=$key}}
|
||||
{{/load}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
@ -132,7 +139,6 @@
|
||||
{{:delete key=$equipment.key}}
|
||||
{{:redirect force="../index.html?ok=1&msg=supprmvtmat"}}
|
||||
{{/if}}
|
||||
|
||||
{{/form}}
|
||||
|
||||
{{:admin_header title="Supprimer un mouvement" current="module_equipment"}}
|
||||
|
Loading…
Reference in New Issue
Block a user