Compare commits
No commits in common. "main" and "bugsortie" have entirely different histories.
@ -7,7 +7,7 @@
|
||||
{{/if}}
|
||||
{{:admin_header title="Modifier une %s"|args:$msg_direction current="module_equipment"}}
|
||||
|
||||
{{:assign direction_mvt=$_GET.direction}}
|
||||
{{:assign direction=$_GET.direction}}
|
||||
{{:assign key_mvt=$_GET.key}}
|
||||
|
||||
{{* récupérer les infos du mouvement à modifier *}}
|
||||
@ -16,7 +16,7 @@
|
||||
{{:error message="Aucune %s avec la clé %s"|args:$msg_direction:$key_mvt}}
|
||||
{{/load}}
|
||||
|
||||
{{if $direction_mvt == "input"}}
|
||||
{{if $direction == "input"}}
|
||||
{{:assign input_init=$mvt_modif.input_nature}}
|
||||
{{:assign url="entrees/index.html"}}
|
||||
{{else}}
|
||||
@ -37,7 +37,7 @@
|
||||
{{* récupérer la config des entrées/sorties *}}
|
||||
{{:include file="../_get_config.html" keep="config"}}
|
||||
|
||||
{{if $direction_mvt == "input"}}
|
||||
{{if $direction == "input"}}
|
||||
{{* types d'entrées *}}
|
||||
{{#foreach from=$config.input_nature key="label" item="type"}}
|
||||
{{:assign var="input_labels.%s"|args:$label value="%s"|args:$label}}
|
||||
@ -60,7 +60,7 @@
|
||||
*}}
|
||||
{{#form on="change"}}
|
||||
{{* préparer le mouvement modifié *}}
|
||||
{{if $direction_mvt == "input"}}
|
||||
{{if $direction == "input"}}
|
||||
{{:assign var="mvt_modif.input_nature" from="input_labels.%s"|args:$_POST.type_operation}}
|
||||
{{else}}
|
||||
{{:assign var="mvt_modif.output_nature" from="output_labels.%s"|args:$_POST.type_operation}}
|
||||
@ -86,10 +86,7 @@
|
||||
assign="movement"
|
||||
}}
|
||||
{{if $key != $key_mvt}}
|
||||
{{if $direction_mvt == "input" && ! $insere && $date >= $mvt_modif.date}}
|
||||
{{:assign var="movements_modif." from=mvt_modif}}
|
||||
{{:assign insere=true}}
|
||||
{{elseif $direction_mvt == "output" && ! $insere && $date > $mvt_modif.date}}
|
||||
{{if $date > $mvt_modif.date && ! $insere}}
|
||||
{{:assign var="movements_modif." from=mvt_modif}}
|
||||
{{:assign insere=true}}
|
||||
{{/if}}
|
||||
@ -122,7 +119,7 @@
|
||||
{{if $erreur}}
|
||||
<p class="block error">
|
||||
Modification demandée impossible :
|
||||
{{if $direction_mvt == "input"}}
|
||||
{{if $direction == "input"}}
|
||||
« {{$input_init}} de {{$eqpmt_init.designation}} (qté : {{$amount_init}}) en date du {{$date_init}} » vers
|
||||
« {{$mvt_modif.input_nature}} de {{$eqpmt.designation}} (qté : {{$mvt_modif.amount}}) à la date du {{$mvt_modif.date|date_short}} »
|
||||
{{else}}
|
||||
@ -136,7 +133,7 @@
|
||||
key=$key_mvt
|
||||
validate_schema="./movement.schema.json"
|
||||
type="movement"
|
||||
direction=$direction_mvt
|
||||
direction=$direction
|
||||
input_nature=$mvt_modif.input_nature
|
||||
output_nature=$mvt_modif.output_nature
|
||||
amount=$mvt_modif.amount|intval
|
||||
@ -165,7 +162,7 @@
|
||||
<form method="post" action="">
|
||||
|
||||
<fieldset class="entree">
|
||||
{{if $direction_mvt == "input"}}
|
||||
{{if $direction == "input"}}
|
||||
<legend>Modifier l'entrée « {{$input_init}} {{$eqpmt_init.designation}} ({{$amount_init}}) en date du {{$date_init}} »</legend>
|
||||
<dl>
|
||||
{{:input type="select" name="type_operation" label="Type" required=true options=$input_labels default=$type_defaut}}
|
||||
|
Loading…
Reference in New Issue
Block a user