diff --git a/modules/client/front/credit-insurance/index/index.html b/modules/client/front/credit-insurance/index/index.html index 51e425414..3f5c5f023 100644 --- a/modules/client/front/credit-insurance/index/index.html +++ b/modules/client/front/credit-insurance/index/index.html @@ -51,6 +51,8 @@ { switch (field) { case 'size': case 'density': - case 'minPrice': case 'description': + case 'packingOut': modelName = 'Item'; identifier = 'itemFk'; break; - case 'quantity': - case 'buyingValue': - case 'freightValue': case 'packing': case 'grouping': case 'groupingMode': - case 'comissionValue': case 'packageValue': - case 'price2': - case 'price3': case 'weight': modelName = 'Buy'; identifier = 'id'; diff --git a/modules/entry/back/methods/entry/latestBuysFilter.js b/modules/entry/back/methods/entry/latestBuysFilter.js index 68abc9c03..d59e34e64 100644 --- a/modules/entry/back/methods/entry/latestBuysFilter.js +++ b/modules/entry/back/methods/entry/latestBuysFilter.js @@ -10,54 +10,59 @@ module.exports = Self => { accepts: [ { arg: 'filter', - type: 'Object', + type: 'object', description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string', }, { arg: 'search', - type: 'String', + type: 'string', description: `If it's and integer searchs by id, otherwise it searchs by name`, }, { arg: 'id', - type: 'Integer', + type: 'integer', description: 'Item id', }, { arg: 'tags', - type: ['Object'], + type: ['object'], description: 'List of tags to filter with', http: {source: 'query'} }, { arg: 'description', - type: 'String', + type: 'string', description: 'The item description', }, { arg: 'salesPersonFk', - type: 'Integer', + type: 'integer', description: 'The buyer of the item', }, { arg: 'active', - type: 'Boolean', + type: 'boolean', description: 'Whether the item is or not active', }, { arg: 'visible', - type: 'Boolean', + type: 'boolean', description: 'Whether the item is or not visible', }, { arg: 'typeFk', - type: 'Integer', + type: 'integer', description: 'Type id', }, { arg: 'categoryFk', - type: 'Integer', + type: 'integer', description: 'Category id', + }, + { + arg: 'packingOut', + type: 'integer', + description: 'the packingOut', } ], returns: { @@ -84,7 +89,10 @@ module.exports = Self => { ? {'i.id': value} : {'i.name': {like: `%${value}%`}}; case 'id': - return {'i.id': value}; + case 'packingOut': + case 'typeFk': + param = `i.${param}`; + return {[param]: value}; case 'description': return {'i.description': {like: `%${value}%`}}; case 'categoryFk': @@ -93,8 +101,6 @@ module.exports = Self => { return {'it.workerFk': value}; case 'code': return {'it.code': value}; - case 'typeFk': - return {'i.typeFk': value}; case 'active': return {'i.isActive': value}; case 'visible': @@ -126,6 +132,7 @@ module.exports = Self => { i.description, i.name, i.subName, + i.packingOut, i.tag5, i.value5, i.tag6, diff --git a/modules/entry/front/latest-buys/index.html b/modules/entry/front/latest-buys/index.html index 88799c816..055756876 100644 --- a/modules/entry/front/latest-buys/index.html +++ b/modules/entry/front/latest-buys/index.html @@ -57,6 +57,7 @@ Ekt Weight PackageName + PackingOut @@ -147,6 +148,7 @@ {{::buy.ektFk | dashIfEmpty}} {{::buy.weight}} {{::buy.packageFk}} + {{::buy.packingOut}} diff --git a/modules/entry/front/latest-buys/index.js b/modules/entry/front/latest-buys/index.js index e81b916d1..2e69598be 100644 --- a/modules/entry/front/latest-buys/index.js +++ b/modules/entry/front/latest-buys/index.js @@ -16,20 +16,14 @@ export default class Controller extends Section { if (this._columns) return this._columns; this._columns = [ - {field: 'quantity', displayName: this.$t('Quantity')}, - {field: 'buyingValue', displayName: this.$t('Buying value')}, - {field: 'freightValue', displayName: this.$t('Freight value')}, {field: 'packing', displayName: this.$t('Packing')}, {field: 'grouping', displayName: this.$t('Grouping')}, - {field: 'comissionValue', displayName: this.$t('Commission value')}, {field: 'packageValue', displayName: this.$t('Package value')}, - {field: 'price2', displayName: this.$t('Grouping price')}, - {field: 'price3', displayName: this.$t('Packing price')}, {field: 'weight', displayName: this.$t('Weight')}, {field: 'description', displayName: this.$t('Description')}, - {field: 'minPrice', displayName: this.$t('Min price')}, {field: 'size', displayName: this.$t('Size')}, - {field: 'density', displayName: this.$t('Density')} + {field: 'density', displayName: this.$t('Density')}, + {field: 'packingOut', displayName: this.$t('PackingOut')} ]; return this._columns; diff --git a/modules/entry/front/latest-buys/locale/es.yml b/modules/entry/front/latest-buys/locale/es.yml index 16ed8acfa..cb45724f8 100644 --- a/modules/entry/front/latest-buys/locale/es.yml +++ b/modules/entry/front/latest-buys/locale/es.yml @@ -13,4 +13,5 @@ Minimun amount: Cantidad mínima de compra Field to edit: Campo a editar PackageName: Cubo Edit: Editar -buy(s): compra(s) \ No newline at end of file +buy(s): compra(s) +PackingOut: Packing envíos \ No newline at end of file diff --git a/modules/item/back/models/item.json b/modules/item/back/models/item.json index 0091ac888..ee1f46e64 100644 --- a/modules/item/back/models/item.json +++ b/modules/item/back/models/item.json @@ -137,6 +137,9 @@ "minPrice": { "type": "number" }, + "packingOut": { + "type": "number" + }, "hasMinPrice": { "type": "boolean" },