From d19c4ce3fd76737d846dcbd598974e8f1d3eb9e0 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Wed, 6 Dec 2023 10:46:00 +0100 Subject: [PATCH] =?UTF-8?q?suppression=20r=C3=A9f=C3=A9rence=20=C3=A0=20la?= =?UTF-8?q?=20table=20du=20module=20dans=20mouvements/modifier=5Fmouvement?= =?UTF-8?q?.html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mouvements/modifier_mouvement.html | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/mouvements/modifier_mouvement.html b/mouvements/modifier_mouvement.html index 58b52d2..f48bc4a 100644 --- a/mouvements/modifier_mouvement.html +++ b/mouvements/modifier_mouvement.html @@ -69,26 +69,15 @@ en l'insérant à sa place par date croissante *}} {{:assign insere=false}} - {{#select - id, key, - json_extract(document, '$.type') as 'type', - json_extract(document, '$.direction') as 'direction', - 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' + + {{#load + where=" + $$.type = 'movement' AND - (json_extract(document, '$.equipment') = :old_eqpmt_key - OR - json_extract(document, '$.equipment') = :new_eqpmt_key) - ORDER BY json_extract(document, '$.date'); + ($$.equipment = :old_eqpmt_key OR $$.equipment = :new_eqpmt_key)" :old_eqpmt_key=$key_eqpmt_init :new_eqpmt_key=$_POST.equipment + order="$$.date" assign="movement" }} {{if $key != $key_mvt}} @@ -98,7 +87,7 @@ {{/if}} {{:assign var=movements_modif." from=movement}} {{/if}} - {{/select}} + {{/load}} {{if ! $insere}} {{:assign var=movements_modif." from=mvt_modif}} {{/if}}