Dissocier dans l'inventaire les matériels propriété de l'asso ou non
This commit is contained in:
parent
5e5c470a24
commit
7575cc8a71
4 changed files with 57 additions and 20 deletions
|
|
@ -15,6 +15,7 @@
|
|||
{{else}}
|
||||
{{:error message="Aucune %s avec la clé %s"|args:$msg_direction:$key_mvt}}
|
||||
{{/load}}
|
||||
|
||||
{{if $direction == "input"}}
|
||||
{{:assign input_init=$mvt_modif.input_nature}}
|
||||
{{:assign url="entrees/index.html"}}
|
||||
|
|
@ -22,10 +23,17 @@
|
|||
{{:assign output_init=$mvt_modif.output_nature}}
|
||||
{{:assign url="sorties/index.html"}}
|
||||
{{/if}}
|
||||
|
||||
{{:assign amount_init=$mvt_modif.amount}}
|
||||
{{:assign date_init=$mvt_modif.date|date_short}}
|
||||
{{:assign key_eqpmt_init=$mvt_modif.equipment}}
|
||||
|
||||
{{* récupérer les infos du matériel associé *}}
|
||||
{{#load key=$key_eqpmt_init assign="eqpmt_init"}}
|
||||
{{else}}
|
||||
{{:error message="Aucun matériel avec la clé « %s »"|args:$key_eqpmt_init}}
|
||||
{{/load}}
|
||||
|
||||
{{* récupérer la config des entrées/sorties *}}
|
||||
{{:include file="../_get_config.html" keep="config"}}
|
||||
|
||||
|
|
@ -47,12 +55,6 @@
|
|||
{{/foreach}}
|
||||
{{/if}}
|
||||
|
||||
{{* récupérer les infos du matériel associé *}}
|
||||
{{#load key=$key_eqpmt_init assign="eqpmt_init"}}
|
||||
{{else}}
|
||||
{{:error message="Aucun matériel avec la clé « %s »"|args:$key_eqpmt_init}}
|
||||
{{/load}}
|
||||
|
||||
{{*
|
||||
-------------------- Traiter la saisie --------------------
|
||||
*}}
|
||||
|
|
@ -73,7 +75,6 @@
|
|||
en l'insérant à sa place par date croissante
|
||||
*}}
|
||||
{{:assign insere=false}}
|
||||
|
||||
{{#load
|
||||
where="
|
||||
$$.type = 'movement'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{{*
|
||||
{{* -*- brindille -*-
|
||||
|
||||
Vérifier la cohérence des E/S d'un matériel
|
||||
- paramètres :
|
||||
- movements : liste de mouvements
|
||||
|
|
@ -8,7 +9,7 @@
|
|||
{{* récupérer la config des entrées/sorties *}}
|
||||
{{:include file="../_get_config.html" keep="config"}}
|
||||
|
||||
{{:assign erreur = false}}
|
||||
{{:assign erreur=false}}
|
||||
{{:assign stock=0}}
|
||||
{{:assign exterieur=0}}
|
||||
{{:assign nonprop=0}}
|
||||
|
|
@ -35,7 +36,7 @@
|
|||
{{:assign nonprop="%d-%d"|math:$nonprop:$mvt.amount}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{:assign dispo="%d-%d"|math:$stock:$exterieur}}
|
||||
{{:assign dispo="%d-%d"|math:$stock:$exterieur}}
|
||||
{{if $dispo < 0 || $stock < 0 || $exterieur < 0 || $nonprop < 0}}
|
||||
{{:assign erreur=true}}
|
||||
{{:break}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue