This commit is contained in:
@@ -11,44 +11,30 @@ namespace AyaNova.DataList
|
|||||||
|
|
||||||
DefaultListObjectType = AyaType.PartInventory;
|
DefaultListObjectType = AyaType.PartInventory;
|
||||||
SQLFrom = "from apartinventory "
|
SQLFrom = "from apartinventory "
|
||||||
+ "left join apart on (apartinventory.apartid=apart.id) "
|
+ "left join apart on (apartinventory.apartid=apart.id) "
|
||||||
+ "left join apartwarehouse on (apartinventory.apartwarehouseid=apartwarehouse.id) ";
|
+ "left join apartwarehouse on (apartinventory.apartwarehouseid=apartwarehouse.id) ";
|
||||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
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 VIEW WHEN NO VIEW CHOSEN ############
|
||||||
//Default ListView
|
//Default ListView - show all transactions in order
|
||||||
dynamic dlistView = new JArray();
|
dynamic dlistView = new JArray();
|
||||||
dynamic cm = null;
|
dynamic cm = null;
|
||||||
|
|
||||||
cm = new JObject();
|
cm = new JObject();
|
||||||
|
|
||||||
cm.fld = "PartInventoryTransactionEntryDate";
|
cm.fld = "PartInventoryTransactionEntryDate";
|
||||||
cm.sort = "-";
|
cm.sort = "-";
|
||||||
dlistView.Add(cm);
|
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 = new JObject();
|
||||||
cm.fld = "PartInventoryTransactionQuantity";
|
cm.fld = "PartInventoryTransactionQuantity";
|
||||||
|
|||||||
Reference in New Issue
Block a user