From cad2aaf121a0a5c84bc453696fd886f8dd4d221b Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 29 Aug 2017 12:21:00 +0200 Subject: [PATCH] campo isManaged para que no muestre todos los almacenes en los combobox --- services/production/common/methods/agency/list.js | 2 +- services/production/common/methods/warehouse/list.js | 2 +- services/production/common/models/warehouse.json | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/services/production/common/methods/agency/list.js b/services/production/common/methods/agency/list.js index 9ef206d6f..5a5e067b8 100644 --- a/services/production/common/methods/agency/list.js +++ b/services/production/common/methods/agency/list.js @@ -1,6 +1,6 @@ module.exports = function(Agency) { - var serverFilter = {"where": {"tpv": {"neq": 0}}}; + var serverFilter = {"where": {"isManaged": {"neq": 0}}}; Agency.defineScope(serverFilter); diff --git a/services/production/common/methods/warehouse/list.js b/services/production/common/methods/warehouse/list.js index 1f3dc06bb..1a3a98609 100644 --- a/services/production/common/methods/warehouse/list.js +++ b/services/production/common/methods/warehouse/list.js @@ -1,6 +1,6 @@ module.exports = function(Warehouse) { - var serverFilter = {"where": {"tpv": {"neq": 0}}}; + var serverFilter = {"where": {"isManaged": {"neq": 0}}}; Warehouse.defineScope(serverFilter); diff --git a/services/production/common/models/warehouse.json b/services/production/common/models/warehouse.json index 8a6d85636..ce29fa124 100644 --- a/services/production/common/models/warehouse.json +++ b/services/production/common/models/warehouse.json @@ -11,11 +11,11 @@ "name": { "type": "String" }, - "tpv": { - "type": "Number" - }, "inventory": { "type": "Number" + }, + "isManaged":{ + "type":"boolean" } }, "acls": [ @@ -33,6 +33,6 @@ } ], "scopes" : { - "production" : {"where": {"tpv": {"neq": 0}}} + "production" : {"where": {"isManaged": {"neq": 0}}} } }