From e54a7f60d82661eddaf2fecab510731079321057 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 21 Jan 2021 18:53:01 +0000 Subject: [PATCH] --- .../AyaNova/DataList/PartInventoryDataList.cs | 36 ++++++------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/server/AyaNova/DataList/PartInventoryDataList.cs b/server/AyaNova/DataList/PartInventoryDataList.cs index d00dee81..32e31596 100644 --- a/server/AyaNova/DataList/PartInventoryDataList.cs +++ b/server/AyaNova/DataList/PartInventoryDataList.cs @@ -11,44 +11,30 @@ namespace AyaNova.DataList DefaultListObjectType = AyaType.PartInventory; SQLFrom = "from apartinventory " - + "left join apart on (apartinventory.apartid=apart.id) " - + "left join apartwarehouse on (apartinventory.apartwarehouseid=apartwarehouse.id) "; + + "left join apart on (apartinventory.apartid=apart.id) " + + "left join apartwarehouse on (apartinventory.apartwarehouseid=apartwarehouse.id) "; var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType); AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change; - /* - "PartInventoryList":"Part inventory", - "PartInventoryTransaction":"Inventory transaction", - "PartInventoryTransactionDescription":"Description", - "PartInventoryTransactionEntryDate":"Date", - "PartInventoryTransactionSource":"Transaction source", - "PartInventoryTransactionQuantity":"Quantity", - "PartInventoryBalance":"On hand quantity" - - await ExecQueryAsync("CREATE TABLE apartinventory (id BIGINT GENERATED ALWAYS AS - IDENTITY PRIMARY KEY, - description text null, " + - "entrydate timestamp not null, lastentrydate timestamp null, - partid bigint not null references apart, - partwarehouseid bigint not null references apartwarehouse, " + - "sourcetype integer not null, sourceid bigint not null, " + - "quantity decimal(19,4) not null, balance decimal(19,4) not null, - lastbalance decimal(19,4) null, " + - */ //######## DEFAULT VIEW WHEN NO VIEW CHOSEN ############ - //Default ListView + //Default ListView - show all transactions in order dynamic dlistView = new JArray(); dynamic cm = null; - cm = new JObject(); + cm.fld = "PartInventoryTransactionEntryDate"; cm.sort = "-"; dlistView.Add(cm); - //part - //warehouse + cm = new JObject(); + cm.fld = "PartPartNumber"; + dlistView.Add(cm); + + cm = new JObject(); + cm.fld = "PartWarehouseName"; + dlistView.Add(cm); cm = new JObject(); cm.fld = "PartInventoryTransactionQuantity";