This commit is contained in:
@@ -456,13 +456,29 @@ namespace AyaNova.Biz
|
|||||||
#region Part
|
#region Part
|
||||||
{
|
{
|
||||||
List<AyaFormFieldDefinition> l = new List<AyaFormFieldDefinition>();
|
List<AyaFormFieldDefinition> l = new List<AyaFormFieldDefinition>();
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "Name", FieldKey = "Name", Hideable = false });
|
l.Add(new AyaFormFieldDefinition { TKey = "PartName", FieldKey = "PartName" });
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "PartNotes", FieldKey = "Notes" });
|
l.Add(new AyaFormFieldDefinition { TKey = "PartNotes", FieldKey = "Notes" });
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "Active", FieldKey = "Active", Hideable = false });
|
l.Add(new AyaFormFieldDefinition { TKey = "Active", FieldKey = "Active", Hideable = false });
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "Tags", FieldKey = "Tags" });
|
l.Add(new AyaFormFieldDefinition { TKey = "Tags", FieldKey = "Tags" });
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "Wiki", FieldKey = "Wiki" });
|
l.Add(new AyaFormFieldDefinition { TKey = "Wiki", FieldKey = "Wiki" });
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "Attachments", FieldKey = "Attachments" });
|
l.Add(new AyaFormFieldDefinition { TKey = "Attachments", FieldKey = "Attachments" });
|
||||||
|
|
||||||
|
l.Add(new AyaFormFieldDefinition { TKey = "PartPartNumber", FieldKey = "PartPartNumber", Hideable = false });
|
||||||
|
l.Add(new AyaFormFieldDefinition { TKey = "PartCost", FieldKey = "PartCost", Hideable = false });
|
||||||
|
l.Add(new AyaFormFieldDefinition { TKey = "PartRetail", FieldKey = "PartRetail", Hideable = false });
|
||||||
|
l.Add(new AyaFormFieldDefinition { TKey = "PartTrackSerialNumber", FieldKey = "PartTrackSerialNumber", Hideable = false });
|
||||||
|
|
||||||
|
l.Add(new AyaFormFieldDefinition { TKey = "PartManufacturerID", FieldKey = "PartManufacturerID" });
|
||||||
|
l.Add(new AyaFormFieldDefinition { TKey = "PartManufacturerNumber", FieldKey = "PartManufacturerNumber" });
|
||||||
|
l.Add(new AyaFormFieldDefinition { TKey = "PartWholesalerID", FieldKey = "PartWholesalerID" });
|
||||||
|
l.Add(new AyaFormFieldDefinition { TKey = "PartWholesalerNumber", FieldKey = "PartWholesalerNumber" });
|
||||||
|
l.Add(new AyaFormFieldDefinition { TKey = "PartAlternativeWholesalerID", FieldKey = "PartAlternativeWholesalerID" });
|
||||||
|
l.Add(new AyaFormFieldDefinition { TKey = "PartAlternativeWholesalerNumber", FieldKey = "PartAlternativeWholesalerNumber" });
|
||||||
|
l.Add(new AyaFormFieldDefinition { TKey = "UnitOfMeasure", FieldKey = "UnitOfMeasure" });
|
||||||
|
l.Add(new AyaFormFieldDefinition { TKey = "PartUPC", FieldKey = "PartUPC" });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "PartCustom1", FieldKey = "PartCustom1", IsCustomField = true });
|
l.Add(new AyaFormFieldDefinition { TKey = "PartCustom1", FieldKey = "PartCustom1", IsCustomField = true });
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "PartCustom2", FieldKey = "PartCustom2", IsCustomField = true });
|
l.Add(new AyaFormFieldDefinition { TKey = "PartCustom2", FieldKey = "PartCustom2", IsCustomField = true });
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "PartCustom3", FieldKey = "PartCustom3", IsCustomField = true });
|
l.Add(new AyaFormFieldDefinition { TKey = "PartCustom3", FieldKey = "PartCustom3", IsCustomField = true });
|
||||||
@@ -484,7 +500,7 @@ namespace AyaNova.Biz
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region PartAssembly
|
#region PartAssembly
|
||||||
{
|
{
|
||||||
|
|
||||||
List<AyaFormFieldDefinition> l = new List<AyaFormFieldDefinition>();
|
List<AyaFormFieldDefinition> l = new List<AyaFormFieldDefinition>();
|
||||||
|
|||||||
@@ -208,7 +208,6 @@ namespace AyaNova.Biz
|
|||||||
searchParams.AddText(obj.Notes)
|
searchParams.AddText(obj.Notes)
|
||||||
.AddText(obj.Name)
|
.AddText(obj.Name)
|
||||||
.AddText(obj.PartNumber)
|
.AddText(obj.PartNumber)
|
||||||
.AddText(obj.PopUpNotes)
|
|
||||||
.AddText(obj.ManufacturerNumber)
|
.AddText(obj.ManufacturerNumber)
|
||||||
.AddText(obj.WholeSalerNumber)
|
.AddText(obj.WholeSalerNumber)
|
||||||
.AddText(obj.AlternativeWholeSalerNumber)
|
.AddText(obj.AlternativeWholeSalerNumber)
|
||||||
@@ -248,6 +247,21 @@ namespace AyaNova.Biz
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//MIGRATE_OUTSTANDING awaiting inventory / biz rule to ensure serialized part can't be unserialized if there is any inventory
|
||||||
|
/*
|
||||||
|
BrokenRules.Assert("TrackSerialNumberRequired",
|
||||||
|
"Part.Error.MustTrackSerial",
|
||||||
|
"TrackSerialNumber",
|
||||||
|
!this.IsNew && value==false && PartHasSerialNumbers.GetItem(this.mID));
|
||||||
|
|
||||||
|
//case 1011
|
||||||
|
BrokenRules.Assert("TrackSerialHasInventory",
|
||||||
|
"Part.Error.TrackSerialHasInventory",
|
||||||
|
"TrackSerialNumber",
|
||||||
|
!this.IsNew && value == true && PartInventoryValuesFetcher.GetItem(mID).QuantityOnHand>0);
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
//Any form customizations to validate?
|
//Any form customizations to validate?
|
||||||
var FormCustomization = await ct.FormCustom.AsNoTracking().SingleOrDefaultAsync(x => x.FormKey == AyaType.Part.ToString());
|
var FormCustomization = await ct.FormCustom.AsNoTracking().SingleOrDefaultAsync(x => x.FormKey == AyaType.Part.ToString());
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ namespace AyaNova.Models
|
|||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string PartNumber { get; set; }
|
public string PartNumber { get; set; }
|
||||||
public string PopUpNotes { get; set; }
|
|
||||||
public long? ManufacturerId { get; set; }
|
public long? ManufacturerId { get; set; }
|
||||||
public string ManufacturerNumber { get; set; }
|
public string ManufacturerNumber { get; set; }
|
||||||
public long? WholeSalerId { get; set; }
|
public long? WholeSalerId { get; set; }
|
||||||
|
|||||||
@@ -590,6 +590,7 @@
|
|||||||
"PartNotes": "Anmerkungen",
|
"PartNotes": "Anmerkungen",
|
||||||
"PartPartNumber": "Teilenummer",
|
"PartPartNumber": "Teilenummer",
|
||||||
"PartRetail": "Einzelhandel",
|
"PartRetail": "Einzelhandel",
|
||||||
|
"PartCost":"Kosten",
|
||||||
"PartTrackSerialNumber": "Seriennummer verfolgen",
|
"PartTrackSerialNumber": "Seriennummer verfolgen",
|
||||||
"PartUPC": "EAN",
|
"PartUPC": "EAN",
|
||||||
"PartWholesalerID": "Großhändler",
|
"PartWholesalerID": "Großhändler",
|
||||||
|
|||||||
@@ -590,6 +590,7 @@
|
|||||||
"PartNotes": "Notes",
|
"PartNotes": "Notes",
|
||||||
"PartPartNumber": "Part Number",
|
"PartPartNumber": "Part Number",
|
||||||
"PartRetail": "Retail",
|
"PartRetail": "Retail",
|
||||||
|
"PartCost":"Cost",
|
||||||
"PartTrackSerialNumber": "Track Serial Number",
|
"PartTrackSerialNumber": "Track Serial Number",
|
||||||
"PartUPC": "UPC",
|
"PartUPC": "UPC",
|
||||||
"PartWholesalerID": "Wholesaler",
|
"PartWholesalerID": "Wholesaler",
|
||||||
|
|||||||
@@ -589,6 +589,7 @@
|
|||||||
"PartNotes": "Notas",
|
"PartNotes": "Notas",
|
||||||
"PartPartNumber": "Número de pieza",
|
"PartPartNumber": "Número de pieza",
|
||||||
"PartRetail": "Minorista",
|
"PartRetail": "Minorista",
|
||||||
|
"PartCost":"Coste",
|
||||||
"PartTrackSerialNumber": "Seguimiento número de serie",
|
"PartTrackSerialNumber": "Seguimiento número de serie",
|
||||||
"PartUPC": "UPC",
|
"PartUPC": "UPC",
|
||||||
"PartWholesalerID": "Mayorista",
|
"PartWholesalerID": "Mayorista",
|
||||||
|
|||||||
@@ -590,6 +590,7 @@
|
|||||||
"PartNotes": "Remarques",
|
"PartNotes": "Remarques",
|
||||||
"PartPartNumber": "Numéro de pièce",
|
"PartPartNumber": "Numéro de pièce",
|
||||||
"PartRetail": "Détail",
|
"PartRetail": "Détail",
|
||||||
|
"PartCost":"Coût",
|
||||||
"PartTrackSerialNumber": "Numéro de série de suivi",
|
"PartTrackSerialNumber": "Numéro de série de suivi",
|
||||||
"PartUPC": "CUP",
|
"PartUPC": "CUP",
|
||||||
"PartWholesalerID": "Grossiste",
|
"PartWholesalerID": "Grossiste",
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace AyaNova.Util
|
|||||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||||
private const int DESIRED_SCHEMA_LEVEL = 15;
|
private const int DESIRED_SCHEMA_LEVEL = 15;
|
||||||
|
|
||||||
internal const long EXPECTED_COLUMN_COUNT = 667;
|
internal const long EXPECTED_COLUMN_COUNT = 666;
|
||||||
internal const long EXPECTED_INDEX_COUNT = 115;
|
internal const long EXPECTED_INDEX_COUNT = 115;
|
||||||
|
|
||||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||||
@@ -660,7 +660,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
|||||||
//PART
|
//PART
|
||||||
await ExecQueryAsync("CREATE TABLE apart (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name text, active bool not null, " +
|
await ExecQueryAsync("CREATE TABLE apart (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name text, active bool not null, " +
|
||||||
"notes text, wiki text, customfields text, tags varchar(255) ARRAY, " +
|
"notes text, wiki text, customfields text, tags varchar(255) ARRAY, " +
|
||||||
"partnumber text not null unique, popupnotes text, manufacturerid bigint REFERENCES avendor, manufacturernumber text, " +
|
"partnumber text not null unique, manufacturerid bigint REFERENCES avendor, manufacturernumber text, " +
|
||||||
"wholesalerid bigint REFERENCES avendor, wholesalernumber text, alternativewholesalerid bigint REFERENCES avendor, alternativewholesalernumber text, " +
|
"wholesalerid bigint REFERENCES avendor, wholesalernumber text, alternativewholesalerid bigint REFERENCES avendor, alternativewholesalernumber text, " +
|
||||||
"cost decimal(19,4) not null, retail decimal(19,4) not null, unitofmeasure text, upc text, trackserialnumber bool not null " +
|
"cost decimal(19,4) not null, retail decimal(19,4) not null, unitofmeasure text, upc text, trackserialnumber bool not null " +
|
||||||
" )");
|
" )");
|
||||||
|
|||||||
Reference in New Issue
Block a user