This commit is contained in:
2020-11-25 19:28:17 +00:00
parent c85d84a458
commit 748ddaba1b

View File

@@ -446,27 +446,34 @@ namespace AyaNova.PlugIn.V8
progress.Op("User " + d.name);
//throw new System.Exception("TODO: UserTypes sb done differently now to align");
//TODO: User type
d.userType = (int)c.UserType;
//d.userType = (int)c.UserType;
//todo: this needs to be adjusted later
//in order to allow import set the client and ho and sub users to regular non sched and
//they can be fixed up after their target objects are imported
//after vendor, customer and headoffice objects are all exported
//then loop through all users again here and set them accordingly if required
//RAVEN user types are different numbers so even the regular ones need to be set alternatively
switch (c.UserType)
{
case UserTypes.Administrator:
d.userType = 2;
break;
case UserTypes.NonSchedulable:
d.userType = 2;
break;
case UserTypes.Schedulable:
d.userType = 1;
break;
case UserTypes.Client:
// d.customerId = -1;
d.userType = (int)UserTypes.NonSchedulable;
d.userType = 2;//raven not service type
break;
case UserTypes.HeadOffice:
d.userType = (int)UserTypes.NonSchedulable;
// d.headOfficeId = -1;
d.userType = 2;
break;
}
if (c.VendorID != Guid.Empty)
{
d.userType = (int)UserTypes.NonSchedulable;
// d.userType = 7;//7 is the RAVEN user type for subcontractor
// d.subVendorId = -1;
d.userType = 2;
}