Ajout tri inventaire sur quantité disponible
This commit is contained in:
parent
39bd89234a
commit
849dcf00c9
@ -70,46 +70,85 @@
|
||||
WHERE cat.key = @TABLE.$$.category) AS 'Catégorie' ;
|
||||
(SELECT
|
||||
SUM($$.amount)
|
||||
FROM module_data_equipment AS mvt
|
||||
FROM @TABLE AS mvt
|
||||
WHERE
|
||||
$$.type = 'movement'
|
||||
AND
|
||||
$$.operation IN %s
|
||||
AND
|
||||
$$.equipment = module_data_equipment.key
|
||||
$$.equipment = @TABLE.key
|
||||
) -
|
||||
(SELECT
|
||||
COALESCE(SUM($$.amount), 0)
|
||||
FROM module_data_equipment AS mvt
|
||||
FROM @TABLE AS mvt
|
||||
WHERE
|
||||
$$.type = 'movement'
|
||||
AND
|
||||
$$.operation IN %s
|
||||
AND
|
||||
$$.equipment = module_data_equipment.key
|
||||
$$.equipment = @TABLE.key
|
||||
) AS 'Stock' ;
|
||||
(SELECT
|
||||
COALESCE(SUM($$.amount), 0)
|
||||
FROM module_data_equipment AS mvt
|
||||
FROM @TABLE AS mvt
|
||||
WHERE
|
||||
$$.type = 'movement'
|
||||
AND
|
||||
$$.operation IN %s
|
||||
AND
|
||||
$$.equipment = module_data_equipment.key
|
||||
$$.equipment = @TABLE.key
|
||||
) -
|
||||
(SELECT
|
||||
COALESCE(SUM($$.amount), 0)
|
||||
FROM module_data_equipment AS mvt
|
||||
FROM @TABLE AS mvt
|
||||
WHERE
|
||||
$$.type = 'movement'
|
||||
AND
|
||||
$$.operation IN %s
|
||||
AND
|
||||
$$.equipment = module_data_equipment.key
|
||||
$$.equipment = @TABLE.key
|
||||
) AS 'Sorti' ;
|
||||
'' AS 'Disponible'
|
||||
"|args:$input_types.définitif:$output_types.définitif:$output_types.temporaire:$input_types.retour
|
||||
|
||||
(SELECT
|
||||
SUM($$.amount)
|
||||
FROM @TABLE AS mvt
|
||||
WHERE
|
||||
$$.type = 'movement'
|
||||
AND
|
||||
$$.operation IN %s
|
||||
AND
|
||||
$$.equipment = @TABLE.key
|
||||
) -
|
||||
(SELECT
|
||||
COALESCE(SUM($$.amount), 0)
|
||||
FROM @TABLE AS mvt
|
||||
WHERE
|
||||
$$.type = 'movement'
|
||||
AND
|
||||
$$.operation IN %s
|
||||
AND
|
||||
$$.equipment = @TABLE.key
|
||||
) -
|
||||
(SELECT
|
||||
COALESCE(SUM($$.amount), 0)
|
||||
FROM @TABLE AS mvt
|
||||
WHERE
|
||||
$$.type = 'movement'
|
||||
AND
|
||||
$$.operation IN %s
|
||||
AND
|
||||
$$.equipment = @TABLE.key
|
||||
) + (SELECT
|
||||
COALESCE(SUM($$.amount), 0)
|
||||
FROM @TABLE AS mvt
|
||||
WHERE
|
||||
$$.type = 'movement'
|
||||
AND
|
||||
$$.operation IN %s
|
||||
AND
|
||||
$$.equipment = @TABLE.key
|
||||
) AS 'Disponible'
|
||||
"|args:$input_types.définitif:$output_types.définitif:$output_types.temporaire:$input_types.retour:$input_types.définitif:$output_types.définitif:$output_types.temporaire:$input_types.retour
|
||||
type="equipment"
|
||||
where="$$.status <> 'archived' AND %s"|args:$condition
|
||||
group="col1 HAVING col3 NOT NULL"
|
||||
@ -117,14 +156,13 @@
|
||||
}}
|
||||
|
||||
{{:assign var=cat_name from=categories.%s|args:$category}}
|
||||
{{:assign dispo="%d-%d"|math:$col3:$col4}}
|
||||
|
||||
<tr>
|
||||
<td>{{$name}}</td>
|
||||
<td>{{$cat_name}}</td>
|
||||
<td class="num">{{$col3}}</td>
|
||||
<td class="num">{{$col4}}</td>
|
||||
<td class="num nosort">{{$dispo}}</td>
|
||||
<td class="num">{{$col5}}</td>
|
||||
<td class="actions">
|
||||
{{if $col4 > 0}}
|
||||
{{:linkbutton
|
||||
@ -133,7 +171,7 @@
|
||||
shape="history"
|
||||
target="_dialog"}}
|
||||
{{/if}}
|
||||
{{if $dispo > 0}}
|
||||
{{if $col5 > 0}}
|
||||
{{:linkbutton
|
||||
label="Sortie"
|
||||
shape="minus"
|
||||
|
Loading…
Reference in New Issue
Block a user