diff --git a/db/changes/233001/00-itemRecycle.sql b/db/changes/233001/00-itemRecycle.sql new file mode 100644 index 000000000..c191e5d1c --- /dev/null +++ b/db/changes/233001/00-itemRecycle.sql @@ -0,0 +1,2 @@ +ALTER TABLE `vn`.`item` ADD recycledPlastic INT NULL; +ALTER TABLE `vn`.`item` ADD nonRecycledPlastic INT NULL; diff --git a/modules/item/back/methods/item/filter.js b/modules/item/back/methods/item/filter.js index c0b1cc0d9..d5de6a954 100644 --- a/modules/item/back/methods/item/filter.js +++ b/modules/item/back/methods/item/filter.js @@ -145,7 +145,7 @@ module.exports = Self => { const stmts = []; const stmt = new ParameterizedSQL( - `SELECT + `SELECT i.id, i.image, i.name, @@ -164,6 +164,8 @@ module.exports = Self => { i.stemMultiplier, i.typeFk, i.isFloramondo, + i.recycledPlastic, + i.nonRecycledPlastic, pr.name AS producer, it.name AS typeName, it.workerFk AS buyerFk, diff --git a/modules/item/back/models/item.json b/modules/item/back/models/item.json index 4a7e04002..e99dcd996 100644 --- a/modules/item/back/models/item.json +++ b/modules/item/back/models/item.json @@ -125,6 +125,12 @@ "minPrice": { "type": "number" }, + "recycledPlastic": { + "type": "number" + }, + "nonRecycledPlastic": { + "type": "number" + }, "packingOut": { "type": "number" }, diff --git a/modules/item/front/basic-data/index.html b/modules/item/front/basic-data/index.html index a7e603bd1..61456f154 100644 --- a/modules/item/front/basic-data/index.html +++ b/modules/item/front/basic-data/index.html @@ -82,6 +82,8 @@ vn-name="expence" initial-data="$ctrl.item.expense"> + + - - - - - - + + + + + + - - - - - - + + + + + + + + + + + + + + + + + +