This commit is contained in:
2021-07-21 19:56:53 +00:00
parent e703413c73
commit 16443202cc
3 changed files with 5 additions and 5 deletions

View File

@@ -16,7 +16,7 @@ namespace AyaNova.DataList
//todo: look at loanitemlist in v7 it surfaces due date, out date etc in the list and should here too once those fields are coded for //todo: look at loanitemlist in v7 it surfaces due date, out date etc in the list and should here too once those fields are coded for
var RoleSet = BizRoles.GetRoleSet(DefaultListAType); var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change; AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
DefaultColumns = new List<string>() { "LoanUnitName", "LoanUnitSerial", "Tags" }; DefaultColumns = new List<string>() { "LoanUnitName", "LoanUnitSerial", "LoanUnitShadowUnit" };
DefaultSortBy = new Dictionary<string, string>() { { "LoanUnitName", "+" } }; DefaultSortBy = new Dictionary<string, string>() { { "LoanUnitName", "+" } };
FieldDefinitions = new List<DataListFieldDefinition>(); FieldDefinitions = new List<DataListFieldDefinition>();

View File

@@ -383,7 +383,7 @@
"LoanUnitCustom14": "Custom14", "LoanUnitCustom14": "Custom14",
"LoanUnitCustom15": "Custom15", "LoanUnitCustom15": "Custom15",
"LoanUnitCustom16": "Custom16", "LoanUnitCustom16": "Custom16",
"LoanUnitList": "Loan Items", "LoanUnitList": "Loaner Items",
"LoanUnitName": "Name", "LoanUnitName": "Name",
"LoanUnitNotes": "Notes", "LoanUnitNotes": "Notes",
"LoanUnitRateDay": "Daily charge", "LoanUnitRateDay": "Daily charge",

View File

@@ -2240,7 +2240,7 @@ namespace AyaNova.Util
u.Serial = NewObject.Serial; u.Serial = NewObject.Serial;
u.Description = NewObject.Name + " - Loaner shadow unit"; u.Description = NewObject.Name + " - Loaner shadow unit";
u.Active = true; u.Active = true;
u.Notes = "Shadow unit to track internal service for Loaner Unit"; u.Notes = "Shadow unit to track internal service for Loaner item";
u.CustomerId = KnownCustomerForShadownUnitsId; u.CustomerId = KnownCustomerForShadownUnitsId;
u.BoughtHere = true; u.BoughtHere = true;
UnitBiz unitBiz = UnitBiz.GetBiz(ct); UnitBiz unitBiz = UnitBiz.GetBiz(ct);
@@ -3078,7 +3078,7 @@ namespace AyaNova.Util
{ {
var l = CustomerUnits.Where(x => x.Key == customerId).FirstOrDefault();//Fake.Random.Long(1, TotalSeededUnits); var l = CustomerUnits.Where(x => x.Key == customerId).FirstOrDefault();//Fake.Random.Long(1, TotalSeededUnits);
var numUnits = l.Value.Count(); var numUnits = l.Value.Count();
var i = Fake.Random.Int(0, numUnits - 1); var i = Fake.Random.Int(1, numUnits);
return l.Value[i]; return l.Value[i];
} }
@@ -3087,7 +3087,7 @@ namespace AyaNova.Util
//return any random customer except for the shadow unit one //return any random customer except for the shadow unit one
long ret = KnownCustomerForShadownUnitsId; long ret = KnownCustomerForShadownUnitsId;
while (ret == KnownCustomerForShadownUnitsId) while (ret == KnownCustomerForShadownUnitsId)
ret = Fake.Random.Long(0, TotalSeededCustomers); ret = Fake.Random.Long(1, TotalSeededCustomers);
return ret; return ret;
} }