diff --git a/config/misc.html b/config/misc.html new file mode 100644 index 0000000..6c36be2 --- /dev/null +++ b/config/misc.html @@ -0,0 +1,34 @@ +{{* -*- brindille -*- *}} + +{{:admin_header title="Configuration" current="module_equipment"}} + +{{#form on="save"}} + {{:save + key="config" + loan_duration=$_POST.loan_duration + }} +{{/form}} + +{{* barre de navigation *}} +{{:include file="../_nav.html" current="config" subcurrent="divers"}} + +{{if $_GET.ok}} +
Configuration enregistrée.
+{{/if}} + +{{* lecture config (défaut ou enregistrée) *}} +{{:include file="../_get_config.html" keep="loan_duration"}} + + +{{:admin_footer}} diff --git a/loan_history.html b/loan_history.html index 42006aa..7b446f8 100644 --- a/loan_history.html +++ b/loan_history.html @@ -40,7 +40,7 @@ json_extract(mvt.document, '$.return_date') AS return_date, json_extract(mvt.document, '$.amount') - IFNULL(SUM(json_extract(retour.document, '$.amount')), 0) AS remain FROM {!$module.table} AS mvt - INNER JOIN users ON json_extract(mvt.document, '$.user') = users.id + LEFT JOIN users ON json_extract(mvt.document, '$.user') = users.id LEFT JOIN {!$module.table} AS links ON mvt.key = json_extract(links.document, '$.temp_key') LEFT JOIN {!$module.table} AS retour ON retour.key = json_extract(links.document, '$.return') INNER JOIN {!$module.table} AS mat ON mat.key = json_extract(mvt.document, '$.equipment') diff --git a/movements/modify_movement.html b/movements/modify_movement.html index 4f32141..67e9601 100644 --- a/movements/modify_movement.html +++ b/movements/modify_movement.html @@ -202,7 +202,7 @@ {{* enregistrer le mouvement modifié *}} {{if $user == null}} - {{:assign user_id=$mvt_new.user}} + {{:assign user_id=null}} {{else}} {{:assign user_id=$user.id}} {{/if}}