diff --git a/modules/entry/back/methods/entry/editLatestBuys.js b/modules/entry/back/methods/entry/editLatestBuys.js index a65764d6f..68a9b9bb4 100644 --- a/modules/entry/back/methods/entry/editLatestBuys.js +++ b/modules/entry/back/methods/entry/editLatestBuys.js @@ -9,7 +9,7 @@ module.exports = Self => { description: `the column to edit and it's new value` }, { - arg: 'buys', + arg: 'lines', type: ['Object'], required: true, description: `the buys which will be modified` @@ -24,7 +24,7 @@ module.exports = Self => { } }); - Self.editLatestBuys = async(column, buys) => { + Self.editLatestBuys = async(column, lines) => { let modelName; let identifier; @@ -32,6 +32,7 @@ module.exports = Self => { case 'size': case 'density': case 'minPrice': + case 'description': modelName = 'Item'; identifier = 'itemFk'; break; @@ -59,8 +60,8 @@ module.exports = Self => { let promises = []; let options = {transaction: tx}; - let targets = buys.map(buy => { - return buy[identifier]; + let targets = lines.map(line => { + return line[identifier]; }); let value = {}; diff --git a/modules/entry/back/methods/entry/latestBuysFilter.js b/modules/entry/back/methods/entry/latestBuysFilter.js index efb47e17c..dffe5793d 100644 --- a/modules/entry/back/methods/entry/latestBuysFilter.js +++ b/modules/entry/back/methods/entry/latestBuysFilter.js @@ -27,13 +27,13 @@ module.exports = Self => { description: 'List of tags to filter with', http: {source: 'query'} }, { - arg: 'categoryFk', - type: 'Integer', - description: 'Category id', + arg: 'description', + type: 'String', + description: 'The item description', }, { - arg: 'typeFk', + arg: 'salesPersonFk', type: 'Integer', - description: 'Type id', + description: 'The buyer of the item', }, { arg: 'active', type: 'Boolean', @@ -43,13 +43,13 @@ module.exports = Self => { type: 'Boolean', description: 'Whether the the item is or not visible', }, { - arg: 'salesPersonFk', + arg: 'typeFk', type: 'Integer', - description: 'The buyer of the item', + description: 'Type id', }, { - arg: 'description', - type: 'String', - description: 'The item description', + arg: 'categoryFk', + type: 'Integer', + description: 'Category id', } ], returns: { @@ -107,6 +107,7 @@ module.exports = Self => { i.family, i.isActive, i.minPrice, + i.description, t.name AS type, intr.description AS intrastat, ori.code AS origin, diff --git a/modules/entry/front/latest-buys/index.html b/modules/entry/front/latest-buys/index.html index d06a5fe69..fcdd32f1a 100644 --- a/modules/entry/front/latest-buys/index.html +++ b/modules/entry/front/latest-buys/index.html @@ -33,6 +33,7 @@ Id Packing Grouping + Description Size Type Intrastat @@ -47,8 +48,8 @@ Comission value Package value Is ignored - price2 - price3 + price2 + price3 Min price Ekt Weight @@ -88,6 +89,9 @@ {{::buy.grouping | dashIfEmpty}} + + {{::buy.description | dashIfEmpty}} + {{::buy.size}} {{::buy.type}} diff --git a/modules/entry/front/latest-buys/index.js b/modules/entry/front/latest-buys/index.js index 7fac10ece..e5ce23603 100644 --- a/modules/entry/front/latest-buys/index.js +++ b/modules/entry/front/latest-buys/index.js @@ -24,11 +24,11 @@ export default class Controller extends Section { {field: 'packageValue', displayName: 'packageValue'}, {field: 'price2', displayName: 'price2'}, {field: 'price3', displayName: 'price3'}, - {field: 'minPrice', displayName: 'minPrice'}, {field: 'weight', displayName: 'weight'}, + {field: 'description', displayName: 'description'}, + {field: 'minPrice', displayName: 'minPrice'}, {field: 'size', displayName: 'size'}, - {field: 'density', displayName: 'density'}, - {field: 'description', displayName: 'description'} + {field: 'density', displayName: 'density'} ]; return this._columns; @@ -60,7 +60,7 @@ export default class Controller extends Section { onEditAccept() { let data = { column: this.editedColumn, - buys: this.checked + lines: this.checked }; this.$http.post('Buys/editLatestBuys', data) diff --git a/modules/entry/front/latest-buys/locale/en.yml b/modules/entry/front/latest-buys/locale/en.yml index c8b2263c0..43101bc65 100644 --- a/modules/entry/front/latest-buys/locale/en.yml +++ b/modules/entry/front/latest-buys/locale/en.yml @@ -1,3 +1,3 @@ Minimun amount: Minimun purchase quantity -price2: Package -price3: Box \ No newline at end of file +price2: Grouping price +price3: Packing price \ No newline at end of file diff --git a/modules/entry/front/latest-buys/locale/es.yml b/modules/entry/front/latest-buys/locale/es.yml index 7a59f12e7..5744016b4 100644 --- a/modules/entry/front/latest-buys/locale/es.yml +++ b/modules/entry/front/latest-buys/locale/es.yml @@ -4,8 +4,8 @@ Freight value: Porte Commission value: ComisiĆ³n Package value: Embalaje Is ignored: Ignorado -price2: Paquete -price3: Caja +price2: Precio grouping +price3: Precio packing Min price: Precio min Ekt: Ekt Weight: Peso