This commit is contained in:
2021-01-21 18:53:01 +00:00
parent 920b59fd00
commit e54a7f60d8

View File

@@ -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";