diff --git a/docs/8.0/ayanova/docs/api-request-format.md b/docs/8.0/ayanova/docs/api-request-format.md index 947d2f15..a9f9a59f 100644 --- a/docs/8.0/ayanova/docs/api-request-format.md +++ b/docs/8.0/ayanova/docs/api-request-format.md @@ -46,8 +46,8 @@ Notes: CustomerNoteDataList - ClientCriteria MUST be provided with CustomerId value -PartInventoryDataList - ClientCriteria is optional for this list, Format for this list is "PARTID,WAREHOUSEID" where the id is 0 if not filtered or the id to filter -PartInventoryTransactionsDataList - ClientCriteria is optional for this list, Format for this list is "PARTID,WAREHOUSEID" where the id is 0 if not filtered or the id to filter +PartInventoryDataList - ClientCriteria is optional, Format is "PARTID,WAREHOUSENAME" where the partid is 0 if not filtered or the id to filter and warehousename is the name or empty. +PartInventoryTransactionsDataList - ClientCriteria is optional, Format is "PARTID,WAREHOUSENAME" where the partid is 0 if not filtered or the id to filter and warehousename is the name or empty. TODO: Replace this section with updated sort / filter and column selection diff --git a/server/AyaNova/DataList/DataListFetcher.cs b/server/AyaNova/DataList/DataListFetcher.cs index c3d92f50..e34c04c3 100644 --- a/server/AyaNova/DataList/DataListFetcher.cs +++ b/server/AyaNova/DataList/DataListFetcher.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Linq; using AyaNova.Biz; using Newtonsoft.Json.Linq; -using AyaNova.Api.ControllerHelpers; using Microsoft.Extensions.Logging; using AyaNova.Models; using System.Threading.Tasks; diff --git a/server/AyaNova/DataList/PartInventoryDataList.cs b/server/AyaNova/DataList/PartInventoryDataList.cs index 37b3b428..bafee41a 100644 --- a/server/AyaNova/DataList/PartInventoryDataList.cs +++ b/server/AyaNova/DataList/PartInventoryDataList.cs @@ -121,7 +121,8 @@ namespace AyaNova.DataList List ret = new List(); //ClientCriteria is optional for this list - //Format for this list is "PARTID,WAREHOUSEID" where the id is 0 if not filtered or the id to filter + //Format for this list is "PARTID,WAREHOUSENAME" where the id is 0 if not filtered or the id to filter + //and bizarrely the warehousename is text or empty if not filtered var crit = (dataListBase.ClientCriteria ?? "").Split(',').Select(z => z.Trim()).ToArray(); if (crit.Length > 1) { @@ -134,7 +135,7 @@ namespace AyaNova.DataList } //Warehouse criteria - if (crit[1]!="0") + if (!string.IsNullOrWhiteSpace(crit[1])) { DataListFilterOption FilterOption = new DataListFilterOption() { Column = "PartWarehouseName" }; FilterOption.Items.Add(new DataListColumnFilter() { value = crit[1], op = DataListFilterComparisonOperator.Equality }); diff --git a/server/AyaNova/DataList/PartInventoryTransactionsDataList.cs b/server/AyaNova/DataList/PartInventoryTransactionsDataList.cs index c7c44668..071fbb87 100644 --- a/server/AyaNova/DataList/PartInventoryTransactionsDataList.cs +++ b/server/AyaNova/DataList/PartInventoryTransactionsDataList.cs @@ -135,7 +135,8 @@ namespace AyaNova.DataList List ret = new List(); //ClientCriteria is optional for this list - //Format for this list is "PARTID,WAREHOUSEID" where the id is 0 if not filtered or the id to filter + //Format for this list is "PARTID,WAREHOUSENAME" where the id is 0 if not filtered or the id to filter + //and bizarrely the warehousename is text or empty if not filtered var crit = (dataListBase.ClientCriteria ?? "").Split(',').Select(z => z.Trim()).ToArray(); if (crit.Length > 1) { @@ -148,7 +149,7 @@ namespace AyaNova.DataList } //Warehouse criteria - if (crit[1] != "0") + if (!string.IsNullOrWhiteSpace(crit[1])) { DataListFilterOption FilterOption = new DataListFilterOption() { Column = "PartWarehouseName" }; FilterOption.Items.Add(new DataListColumnFilter() { value = crit[1], op = DataListFilterComparisonOperator.Equality });