This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -53,7 +53,7 @@
|
||||
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
||||
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
||||
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
|
||||
"AYANOVA_SERVER_TEST_MODE": "false",
|
||||
"AYANOVA_SERVER_TEST_MODE": "true",
|
||||
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
|
||||
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
|
||||
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\"
|
||||
|
||||
95
server/AyaNova/DataList/PartRestockDataList.cs
Normal file
95
server/AyaNova/DataList/PartRestockDataList.cs
Normal file
@@ -0,0 +1,95 @@
|
||||
using System.Collections.Generic;
|
||||
using AyaNova.Biz;
|
||||
namespace AyaNova.DataList
|
||||
{
|
||||
internal class PartRestockDataList : DataListProcessingBase
|
||||
{
|
||||
//NOTE: this object has NO rowid as it's a synthetic list not primarily based on any particular db table
|
||||
public PartRestockDataList()
|
||||
{
|
||||
DefaultListObjectType = AyaType.PartInventoryRestock;
|
||||
SQLFrom = "FROM vrestockrequired";
|
||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||
DefaultColumns = new List<string>() { "PartRestockname", "PartRestockPartRestockOverseerID", "PartRestockDateStarted", "PartRestockDateCompleted",
|
||||
"PartRestockAccountNumber", "PartRestockactive", "PartRestocktags" };
|
||||
DefaultSortBy = new Dictionary<string, string>() { { "PartRestockname", "+" } };
|
||||
FieldDefinitions = new List<DataListFieldDefinition>();
|
||||
|
||||
// SELECT apart.id AS partid, apartwarehouse.id AS partwarehouseid, apart.partnumber, apartwarehouse.name AS displaywarehouse, "
|
||||
// + "amanufacturer.id AS manufactureid, amanufacturer.name AS displaymanufacturer, awholesaler.id AS wholesalerid, awholesaler.name AS displaywholesaler, "
|
||||
// + "aalternativewholesaler.id AS ayalternativewholesalerid, aalternativewholesaler.name AS displayalternativewholesaler,"
|
||||
// + "apartstocklevel.minimumquantity, vpartinventorynow.balance, COALESCE(vpartsonorder.quantityonorder,0) AS onorderquantity, "
|
||||
// + "apartstocklevel.minimumquantity - (COALESCE(vpartinventorynow.balance, 0) + COALESCE(vpartsonorder.quantityonorder, 0)) AS requiredquantity "
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
TKey = "PartRestockName",
|
||||
FieldKey = "PartRestockname",
|
||||
AyaObjectType = (int)AyaType.PartRestock,
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlIdColumnName = "aPartRestock.id",
|
||||
SqlValueColumnName = "aPartRestock.name"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
TKey = "PartRestockNotes",
|
||||
FieldKey = "PartRestocknotes",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlValueColumnName = "aPartRestock.notes"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
TKey = "Active",
|
||||
FieldKey = "PartRestockactive",
|
||||
UiFieldDataType = (int)UiFieldDataType.Bool,
|
||||
SqlValueColumnName = "aPartRestock.active"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
TKey = "Tags",
|
||||
FieldKey = "PartRestocktags",
|
||||
UiFieldDataType = (int)UiFieldDataType.Tags,
|
||||
SqlValueColumnName = "aPartRestock.tags"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
TKey = "PartRestockAccountNumber",
|
||||
FieldKey = "PartRestockAccountNumber",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlValueColumnName = "aPartRestock.accountnumber"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
FieldKey = "PartRestockPartRestockOverseerID",
|
||||
TKey = "PartRestockPartRestockOverseerID",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
AyaObjectType = (int)AyaType.User,
|
||||
SqlIdColumnName = "auser.id",
|
||||
SqlValueColumnName = "auser.name"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
TKey = "PartRestockDateStarted",
|
||||
FieldKey = "PartRestockDateStarted",
|
||||
UiFieldDataType = (int)UiFieldDataType.DateTime,
|
||||
SqlValueColumnName = "aPartRestock.datestarted"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new DataListFieldDefinition
|
||||
{
|
||||
TKey = "PartRestockDateCompleted",
|
||||
FieldKey = "PartRestockDateCompleted",
|
||||
UiFieldDataType = (int)UiFieldDataType.DateTime,
|
||||
SqlValueColumnName = "aPartRestock.datecompleted"
|
||||
});
|
||||
|
||||
}
|
||||
}//eoc
|
||||
}//eons
|
||||
@@ -134,7 +134,10 @@ namespace AyaNova.Biz
|
||||
[CoreBizObject]
|
||||
PartWarehouse = 66,
|
||||
PartInventory = 67,
|
||||
DataListColumnView = 68
|
||||
DataListColumnView = 68,
|
||||
PartInventoryRestock = 69,//for list only, synthetic object
|
||||
PartInventoryRequest = 70//for list only not, synthetic object
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -209,6 +209,39 @@ namespace AyaNova.Biz
|
||||
Select = AuthorizationRoles.All
|
||||
});
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
//PartInventoryRequest
|
||||
// same as PO
|
||||
//
|
||||
roles.Add(AyaType.PartInventoryRequest, new BizRoleSet()
|
||||
{
|
||||
Change = AuthorizationRoles.InventoryFull
|
||||
| AuthorizationRoles.BizAdminFull
|
||||
| AuthorizationRoles.AccountingFull,
|
||||
ReadFullRecord = AuthorizationRoles.DispatchFull
|
||||
| AuthorizationRoles.InventoryLimited
|
||||
| AuthorizationRoles.BizAdminLimited
|
||||
| AuthorizationRoles.DispatchLimited,
|
||||
Select = AuthorizationRoles.All
|
||||
});
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
//PartInventoryRestock
|
||||
// same as PO
|
||||
//
|
||||
roles.Add(AyaType.PartInventoryRestock, new BizRoleSet()
|
||||
{
|
||||
Change = AuthorizationRoles.InventoryFull
|
||||
| AuthorizationRoles.BizAdminFull
|
||||
| AuthorizationRoles.AccountingFull,
|
||||
ReadFullRecord = AuthorizationRoles.DispatchFull
|
||||
| AuthorizationRoles.InventoryLimited
|
||||
| AuthorizationRoles.BizAdminLimited
|
||||
| AuthorizationRoles.DispatchLimited,
|
||||
Select = AuthorizationRoles.All
|
||||
});
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
//PM
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user