suppression référence à la table du module dans mouvements/modifier_mouvement.html
This commit is contained in:
parent
db497af1f3
commit
d19c4ce3fd
@ -69,26 +69,15 @@
|
|||||||
en l'insérant à sa place par date croissante
|
en l'insérant à sa place par date croissante
|
||||||
*}}
|
*}}
|
||||||
{{:assign insere=false}}
|
{{:assign insere=false}}
|
||||||
{{#select
|
|
||||||
id, key,
|
{{#load
|
||||||
json_extract(document, '$.type') as 'type',
|
where="
|
||||||
json_extract(document, '$.direction') as 'direction',
|
$$.type = 'movement'
|
||||||
json_extract(document, '$.input_nature') as 'input_nature',
|
|
||||||
json_extract(document, '$.output_nature') as 'output_nature',
|
|
||||||
json_extract(document, '$.amount') as 'amount',
|
|
||||||
json_extract(document, '$.equipment') as 'equipment',
|
|
||||||
json_extract(document, '$.date') as 'date',
|
|
||||||
json_extract(document, '$.comment') as 'comment'
|
|
||||||
FROM module_data_equipment
|
|
||||||
WHERE
|
|
||||||
json_extract(document, '$.type') = 'movement'
|
|
||||||
AND
|
AND
|
||||||
(json_extract(document, '$.equipment') = :old_eqpmt_key
|
($$.equipment = :old_eqpmt_key OR $$.equipment = :new_eqpmt_key)"
|
||||||
OR
|
|
||||||
json_extract(document, '$.equipment') = :new_eqpmt_key)
|
|
||||||
ORDER BY json_extract(document, '$.date');
|
|
||||||
:old_eqpmt_key=$key_eqpmt_init
|
:old_eqpmt_key=$key_eqpmt_init
|
||||||
:new_eqpmt_key=$_POST.equipment
|
:new_eqpmt_key=$_POST.equipment
|
||||||
|
order="$$.date"
|
||||||
assign="movement"
|
assign="movement"
|
||||||
}}
|
}}
|
||||||
{{if $key != $key_mvt}}
|
{{if $key != $key_mvt}}
|
||||||
@ -98,7 +87,7 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
{{:assign var=movements_modif." from=movement}}
|
{{:assign var=movements_modif." from=movement}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/select}}
|
{{/load}}
|
||||||
{{if ! $insere}}
|
{{if ! $insere}}
|
||||||
{{:assign var=movements_modif." from=mvt_modif}}
|
{{:assign var=movements_modif." from=mvt_modif}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
Loading…
Reference in New Issue
Block a user