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_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles", "AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles", "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_SEEDLEVEL": "small",
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7", "AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\" "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 This is a placeholder page for sections that are not written yet

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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