This commit is contained in:
@@ -320,11 +320,11 @@ namespace AyaNova.Biz
|
||||
l.Add(new AyaFormFieldDefinition { TKey = "Tags", FieldKey = "Tags" });
|
||||
l.Add(new AyaFormFieldDefinition { TKey = "Wiki", FieldKey = "Wiki" });
|
||||
l.Add(new AyaFormFieldDefinition { TKey = "Attachments", FieldKey = "Attachments" });
|
||||
|
||||
|
||||
l.Add(new AyaFormFieldDefinition { TKey = "LoanUnitSerial", FieldKey = "LoanUnitSerial" });
|
||||
//Not a user editable field on form so no need to add it here
|
||||
//l.Add(new AyaFormFieldDefinition { TKey = "LoanUnitCurrentWorkOrderItemLoan", FieldKey = "LoanUnitCurrentWorkOrderItemLoan" });
|
||||
|
||||
|
||||
//Note, rates are required but I'm allowing them to be hidden and will ensure client properly sets even if not visible, this is because many shops probably don't need all rates
|
||||
l.Add(new AyaFormFieldDefinition { TKey = "LoanUnitRateDay", FieldKey = "LoanUnitRateDay" });
|
||||
l.Add(new AyaFormFieldDefinition { TKey = "LoanUnitRateHalfDay", FieldKey = "LoanUnitRateHalfDay" });
|
||||
@@ -456,13 +456,29 @@ namespace AyaNova.Biz
|
||||
#region Part
|
||||
{
|
||||
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 = "Active", FieldKey = "Active", Hideable = false });
|
||||
l.Add(new AyaFormFieldDefinition { TKey = "Tags", FieldKey = "Tags" });
|
||||
l.Add(new AyaFormFieldDefinition { TKey = "Wiki", FieldKey = "Wiki" });
|
||||
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 = "PartCustom2", FieldKey = "PartCustom2", IsCustomField = true });
|
||||
l.Add(new AyaFormFieldDefinition { TKey = "PartCustom3", FieldKey = "PartCustom3", IsCustomField = true });
|
||||
@@ -484,7 +500,7 @@ namespace AyaNova.Biz
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region PartAssembly
|
||||
#region PartAssembly
|
||||
{
|
||||
|
||||
List<AyaFormFieldDefinition> l = new List<AyaFormFieldDefinition>();
|
||||
@@ -939,7 +955,7 @@ namespace AyaNova.Biz
|
||||
l.Add(new AyaFormFieldDefinition { TKey = "CustomerServiceRequestRequestedBy", FieldKey = "CustomerServiceRequestRequestedBy" });
|
||||
l.Add(new AyaFormFieldDefinition { TKey = "CustomerServiceRequestCustomerReferenceNumber", FieldKey = "CustomerServiceRequestCustomerReferenceNumber" });
|
||||
l.Add(new AyaFormFieldDefinition { TKey = "CustomerServiceRequestStatus", FieldKey = "CustomerServiceRequestStatus" });
|
||||
l.Add(new AyaFormFieldDefinition { TKey = "CustomerServiceRequestPriority", FieldKey = "CustomerServiceRequestPriority" });
|
||||
l.Add(new AyaFormFieldDefinition { TKey = "CustomerServiceRequestPriority", FieldKey = "CustomerServiceRequestPriority" });
|
||||
|
||||
|
||||
l.Add(new AyaFormFieldDefinition { TKey = "CustomerServiceRequestCustom1", FieldKey = "CustomerServiceRequestCustom1", IsCustomField = true });
|
||||
|
||||
@@ -208,7 +208,6 @@ namespace AyaNova.Biz
|
||||
searchParams.AddText(obj.Notes)
|
||||
.AddText(obj.Name)
|
||||
.AddText(obj.PartNumber)
|
||||
.AddText(obj.PopUpNotes)
|
||||
.AddText(obj.ManufacturerNumber)
|
||||
.AddText(obj.WholeSalerNumber)
|
||||
.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?
|
||||
var FormCustomization = await ct.FormCustom.AsNoTracking().SingleOrDefaultAsync(x => x.FormKey == AyaType.Part.ToString());
|
||||
|
||||
@@ -25,7 +25,6 @@ namespace AyaNova.Models
|
||||
|
||||
[Required]
|
||||
public string PartNumber { get; set; }
|
||||
public string PopUpNotes { get; set; }
|
||||
public long? ManufacturerId { get; set; }
|
||||
public string ManufacturerNumber { get; set; }
|
||||
public long? WholeSalerId { get; set; }
|
||||
|
||||
@@ -590,6 +590,7 @@
|
||||
"PartNotes": "Anmerkungen",
|
||||
"PartPartNumber": "Teilenummer",
|
||||
"PartRetail": "Einzelhandel",
|
||||
"PartCost":"Kosten",
|
||||
"PartTrackSerialNumber": "Seriennummer verfolgen",
|
||||
"PartUPC": "EAN",
|
||||
"PartWholesalerID": "Großhändler",
|
||||
|
||||
@@ -590,6 +590,7 @@
|
||||
"PartNotes": "Notes",
|
||||
"PartPartNumber": "Part Number",
|
||||
"PartRetail": "Retail",
|
||||
"PartCost":"Cost",
|
||||
"PartTrackSerialNumber": "Track Serial Number",
|
||||
"PartUPC": "UPC",
|
||||
"PartWholesalerID": "Wholesaler",
|
||||
|
||||
@@ -589,6 +589,7 @@
|
||||
"PartNotes": "Notas",
|
||||
"PartPartNumber": "Número de pieza",
|
||||
"PartRetail": "Minorista",
|
||||
"PartCost":"Coste",
|
||||
"PartTrackSerialNumber": "Seguimiento número de serie",
|
||||
"PartUPC": "UPC",
|
||||
"PartWholesalerID": "Mayorista",
|
||||
|
||||
@@ -590,6 +590,7 @@
|
||||
"PartNotes": "Remarques",
|
||||
"PartPartNumber": "Numéro de pièce",
|
||||
"PartRetail": "Détail",
|
||||
"PartCost":"Coût",
|
||||
"PartTrackSerialNumber": "Numéro de série de suivi",
|
||||
"PartUPC": "CUP",
|
||||
"PartWholesalerID": "Grossiste",
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace AyaNova.Util
|
||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||
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;
|
||||
|
||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||
@@ -660,7 +660,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
//PART
|
||||
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, " +
|
||||
"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, " +
|
||||
"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