modification schéma entrées/sorties temporaires liées
This commit is contained in:
parent
16d6ac752a
commit
3ba67d0c65
5 changed files with 18 additions and 16 deletions
|
|
@ -132,7 +132,7 @@
|
|||
mvt.key AS mvt_key,
|
||||
json_extract(mvt.document, '$.amount') - IFNULL(SUM(json_extract(mvt2.document, '$.amount')), 0) AS reste
|
||||
FROM module_data_equipment AS mvt
|
||||
LEFT JOIN module_data_equipment AS link ON mvt.key = json_extract(link.document, '$.output')
|
||||
LEFT JOIN module_data_equipment AS link ON mvt.key = json_extract(link.document, '$.temp_key')
|
||||
LEFT JOIN module_data_equipment AS mvt2 ON mvt2.key = json_extract(link.document, '$.return')
|
||||
WHERE
|
||||
json_extract(mvt.document, '$.operation') IN !op
|
||||
|
|
@ -223,7 +223,7 @@
|
|||
mvt.key AS mvt_key,
|
||||
json_extract(mvt.document, '$.amount') - IFNULL(SUM(json_extract(mvt2.document, '$.amount')), 0) AS present
|
||||
FROM module_data_equipment AS mvt
|
||||
LEFT JOIN module_data_equipment AS link ON mvt.key = json_extract(link.document, '$.input')
|
||||
LEFT JOIN module_data_equipment AS link ON mvt.key = json_extract(link.document, '$.temp_key')
|
||||
LEFT JOIN module_data_equipment AS mvt2 ON mvt2.key = json_extract(link.document, '$.return')
|
||||
WHERE
|
||||
json_extract(mvt.document, '$.operation') IN !op
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue