This commit is contained in:
2021-01-22 19:22:16 +00:00
parent 347bc0c86d
commit d6642d2dfb
8 changed files with 94 additions and 90 deletions

2
.vscode/launch.json vendored
View File

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

View File

@@ -1,3 +1,3 @@
# INV-ADJUST Placeholder
# INV-TRANSACTIONS Placeholder
This is a placeholder page for sections that are not written yet

View File

@@ -4,15 +4,15 @@ using AyaNova.Models;
using AyaNova.Biz;
namespace AyaNova.DataList
{
internal class PartInventoryDataList : AyaDataList
internal class PartInventoryOnHandDataList : AyaDataList
{
public PartInventoryDataList()
public PartInventoryOnHandDataList()
{
DefaultListObjectType = AyaType.PartInventory;
SQLFrom = "from apartinventory "
+ "left join apart on (apartinventory.partid=apart.id) "
+ "left join apartwarehouse on (apartinventory.partwarehouseid=apartwarehouse.id) ";
SQLFrom = "from vpartinventorynow "
+ "left join apart on (vpartinventorynow.partid=apart.id) "
+ "left join apartwarehouse on (vpartinventorynow.partwarehouseid=apartwarehouse.id) ";
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
@@ -20,50 +20,39 @@ namespace AyaNova.DataList
//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);
cm = new JObject();
cm.fld = "PartPartNumber";
cm.sort = "+";
dlistView.Add(cm);
cm = new JObject();
cm.fld = "PartWarehouseName";
dlistView.Add(cm);
cm = new JObject();
cm.fld = "PartInventoryTransactionQuantity";
dlistView.Add(cm);
cm = new JObject();
cm.fld = "PartInventoryTransactionDescription";
dlistView.Add(cm);
cm = new JObject();
cm.fld = "PartInventoryTransactionSource";
cm.sort = "+";
dlistView.Add(cm);
cm = new JObject();
cm.fld = "PartInventoryBalance";
dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "PartInventoryTransactionDescription";
// dlistView.Add(cm);
DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
//NOTE: Due to the join, all the sql id and name fields that can conflict with the joined table need to be specified completely
FieldDefinitions = new List<AyaDataListFieldDefinition>();
FieldDefinitions.Add(new AyaDataListFieldDefinition
{
TKey = "PartInventoryTransactionSource",
FieldKey = "PartInventoryTransactionSource",
UiFieldDataType = (int)UiFieldDataType.Text,
SqlIdColumnName = "apartinventory.sourceid",
SqlValueColumnName = "AYGETNAME(apartinventory.sourceid, apartinventory.sourcetype)",
SqlAyTypeColumnName = "apartinventory.sourcetype"
});
// FieldDefinitions.Add(new AyaDataListFieldDefinition
// {
// TKey = "PartInventoryTransactionSource",
// FieldKey = "PartInventoryTransactionSource",
// UiFieldDataType = (int)UiFieldDataType.Text,
// SqlIdColumnName = "vpartinventorynow.sourceid",
// SqlValueColumnName = "AYGETNAME(vpartinventorynow.sourceid, vpartinventorynow.sourcetype)",
// SqlAyTypeColumnName = "vpartinventorynow.sourcetype"
// });
FieldDefinitions.Add(new AyaDataListFieldDefinition
{
@@ -91,33 +80,34 @@ namespace AyaNova.DataList
FieldKey = "PartInventoryTransactionDescription",
AyaObjectType = (int)AyaType.PartInventory,
UiFieldDataType = (int)UiFieldDataType.Text,
SqlIdColumnName = "apartinventory.id",
SqlValueColumnName = "apartinventory.description",
IsRowId = true//should open to eventlog since no edit
SqlIdColumnName = "vpartinventorynow.id",
SqlValueColumnName = "vpartinventorynow.description",
IsMeta=true,//only so it doesn't show in the UI but is required for report
IsRowId = true
});
FieldDefinitions.Add(new AyaDataListFieldDefinition
{
TKey = "PartInventoryTransactionEntryDate",
FieldKey = "PartInventoryTransactionEntryDate",
UiFieldDataType = (int)UiFieldDataType.DateTime,
SqlValueColumnName = "apartinventory.entrydate"
});
// FieldDefinitions.Add(new AyaDataListFieldDefinition
// {
// TKey = "PartInventoryTransactionEntryDate",
// FieldKey = "PartInventoryTransactionEntryDate",
// UiFieldDataType = (int)UiFieldDataType.DateTime,
// SqlValueColumnName = "vpartinventorynow.entrydate"
// });
FieldDefinitions.Add(new AyaDataListFieldDefinition
{
TKey = "PartInventoryTransactionQuantity",
FieldKey = "PartInventoryTransactionQuantity",
UiFieldDataType = (int)UiFieldDataType.Decimal,
SqlValueColumnName = "apartinventory.quantity"
});
// FieldDefinitions.Add(new AyaDataListFieldDefinition
// {
// TKey = "PartInventoryTransactionQuantity",
// FieldKey = "PartInventoryTransactionQuantity",
// UiFieldDataType = (int)UiFieldDataType.Decimal,
// SqlValueColumnName = "vpartinventorynow.quantity"
// });
FieldDefinitions.Add(new AyaDataListFieldDefinition
{
TKey = "PartInventoryBalance",
FieldKey = "PartInventoryBalance",
UiFieldDataType = (int)UiFieldDataType.Decimal,
SqlValueColumnName = "apartinventory.balance"
SqlValueColumnName = "vpartinventorynow.balance"
});
}

View File

@@ -4,15 +4,15 @@ using AyaNova.Models;
using AyaNova.Biz;
namespace AyaNova.DataList
{
internal class PartInventoryOnHandDataList : AyaDataList
internal class PartInventoryDataList : AyaDataList
{
public PartInventoryOnHandDataList()
public PartInventoryDataList()
{
DefaultListObjectType = AyaType.PartInventory;
SQLFrom = "from vpartinventorynow "
+ "left join apart on (vpartinventorynow.partid=apart.id) "
+ "left join apartwarehouse on (vpartinventorynow.partwarehouseid=apartwarehouse.id) ";
SQLFrom = "from apartinventory "
+ "left join apart on (apartinventory.partid=apart.id) "
+ "left join apartwarehouse on (apartinventory.partwarehouseid=apartwarehouse.id) ";
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
@@ -20,39 +20,50 @@ namespace AyaNova.DataList
//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);
cm = new JObject();
cm.fld = "PartPartNumber";
cm.sort = "+";
dlistView.Add(cm);
cm = new JObject();
cm.fld = "PartWarehouseName";
cm.sort = "+";
dlistView.Add(cm);
cm = new JObject();
cm.fld = "PartInventoryTransactionQuantity";
dlistView.Add(cm);
cm = new JObject();
cm.fld = "PartInventoryTransactionDescription";
dlistView.Add(cm);
cm = new JObject();
cm.fld = "PartInventoryTransactionSource";
dlistView.Add(cm);
cm = new JObject();
cm.fld = "PartInventoryBalance";
dlistView.Add(cm);
// cm = new JObject();
// cm.fld = "PartInventoryTransactionDescription";
// dlistView.Add(cm);
DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
//NOTE: Due to the join, all the sql id and name fields that can conflict with the joined table need to be specified completely
FieldDefinitions = new List<AyaDataListFieldDefinition>();
// FieldDefinitions.Add(new AyaDataListFieldDefinition
// {
// TKey = "PartInventoryTransactionSource",
// FieldKey = "PartInventoryTransactionSource",
// UiFieldDataType = (int)UiFieldDataType.Text,
// SqlIdColumnName = "vpartinventorynow.sourceid",
// SqlValueColumnName = "AYGETNAME(vpartinventorynow.sourceid, vpartinventorynow.sourcetype)",
// SqlAyTypeColumnName = "vpartinventorynow.sourcetype"
// });
FieldDefinitions.Add(new AyaDataListFieldDefinition
{
TKey = "PartInventoryTransactionSource",
FieldKey = "PartInventoryTransactionSource",
UiFieldDataType = (int)UiFieldDataType.Text,
SqlIdColumnName = "apartinventory.sourceid",
SqlValueColumnName = "AYGETNAME(apartinventory.sourceid, apartinventory.sourcetype)",
SqlAyTypeColumnName = "apartinventory.sourcetype"
});
FieldDefinitions.Add(new AyaDataListFieldDefinition
{
@@ -80,34 +91,33 @@ namespace AyaNova.DataList
FieldKey = "PartInventoryTransactionDescription",
AyaObjectType = (int)AyaType.PartInventory,
UiFieldDataType = (int)UiFieldDataType.Text,
SqlIdColumnName = "vpartinventorynow.id",
SqlValueColumnName = "vpartinventorynow.description",
IsMeta=true,//only so it doesn't show in the UI but is required for report
IsRowId = true
SqlIdColumnName = "apartinventory.id",
SqlValueColumnName = "apartinventory.description",
IsRowId = true//should open to eventlog since no edit
});
// FieldDefinitions.Add(new AyaDataListFieldDefinition
// {
// TKey = "PartInventoryTransactionEntryDate",
// FieldKey = "PartInventoryTransactionEntryDate",
// UiFieldDataType = (int)UiFieldDataType.DateTime,
// SqlValueColumnName = "vpartinventorynow.entrydate"
// });
FieldDefinitions.Add(new AyaDataListFieldDefinition
{
TKey = "PartInventoryTransactionEntryDate",
FieldKey = "PartInventoryTransactionEntryDate",
UiFieldDataType = (int)UiFieldDataType.DateTime,
SqlValueColumnName = "apartinventory.entrydate"
});
// FieldDefinitions.Add(new AyaDataListFieldDefinition
// {
// TKey = "PartInventoryTransactionQuantity",
// FieldKey = "PartInventoryTransactionQuantity",
// UiFieldDataType = (int)UiFieldDataType.Decimal,
// SqlValueColumnName = "vpartinventorynow.quantity"
// });
FieldDefinitions.Add(new AyaDataListFieldDefinition
{
TKey = "PartInventoryTransactionQuantity",
FieldKey = "PartInventoryTransactionQuantity",
UiFieldDataType = (int)UiFieldDataType.Decimal,
SqlValueColumnName = "apartinventory.quantity"
});
FieldDefinitions.Add(new AyaDataListFieldDefinition
{
TKey = "PartInventoryBalance",
FieldKey = "PartInventoryBalance",
UiFieldDataType = (int)UiFieldDataType.Decimal,
SqlValueColumnName = "vpartinventorynow.balance"
SqlValueColumnName = "apartinventory.balance"
});
}

View File

@@ -2135,6 +2135,7 @@
"TaxCodeCustom15": "Angepasstes Feld 15",
"TaxCodeCustom16": "Angepasstes Feld 16",
"PartInventoryList":"Teileinventar",
"PartInventoryTransactionList":"Inventurtransaktionen",
"PartInventoryTransaction":"Inventartransaktion",
"PartInventoryTransactionDescription":"Beschreibung",
"PartInventoryTransactionEntryDate":"Datum",

View File

@@ -2135,6 +2135,7 @@
"TaxCodeCustom15": "Custom15",
"TaxCodeCustom16": "Custom16",
"PartInventoryList":"Part inventory",
"PartInventoryTransactionList":"Inventory transactions",
"PartInventoryTransaction":"Inventory transaction",
"PartInventoryTransactionDescription":"Description",
"PartInventoryTransactionEntryDate":"Date",

View File

@@ -2135,6 +2135,7 @@
"TaxCodeCustom15": "Campo personalizado 15",
"TaxCodeCustom16": "Campo personalizado 16",
"PartInventoryList":"Inventario de piezas",
"PartInventoryTransactionList":"Transacciones de inventario",
"PartInventoryTransaction":"Transacción de inventario",
"PartInventoryTransactionDescription":"Descripción",
"PartInventoryTransactionEntryDate":"Fecha",

View File

@@ -2135,6 +2135,7 @@
"TaxCodeCustom15": "Champ personnalisé 15",
"TaxCodeCustom16": "Champ personnalisé 16",
"PartInventoryList":"Inventaire des pièces",
"PartInventoryTransactionList":"Opérations d'inventaire",
"PartInventoryTransaction":"Transaction d'inventaire",
"PartInventoryTransactionDescription":"La description",
"PartInventoryTransactionEntryDate":"Date",