This commit is contained in:
2021-09-09 15:29:19 +00:00
parent 23ffa04ce1
commit a13ed7c096
2 changed files with 11 additions and 10 deletions

View File

@@ -58,8 +58,6 @@ namespace AyaNova.PickList
{
//Currently the only variant is a object type and id to indicate headoffice
//ClientCriteria format for this list is "OBJECTID,AYATYPE"
var crit = (variant ?? "").Split(',').Select(z => z.Trim()).ToArray();
if (crit.Length > 1)
@@ -78,7 +76,7 @@ namespace AyaNova.PickList
{
case AyaType.HeadOffice:
{
return $"aunit.customerid = {lId}";
return $"acustomer.headofficeid = {lId}";
}
}
}

View File

@@ -283,12 +283,15 @@ namespace AyaNova.PickList
else
{
//we might have a trailing and to remove
//jesus this stuff sucks, there must be a better way, it seems so fragile
if (!IncludeInactive || HasTagSpecificQuery || preIds.Length > 0)
{
//trailing " and " to remove
//{select acustomer.id as plId, acustomer.active as plActive, concat_ws(' ', acustomer.name) as plname from acustomer where (acustomer.headofficeid = 2) and }
if(sb.ToString().EndsWith(" and "))
sb.Length-=5;
}
//
// if (!IncludeInactive || HasTagSpecificQuery || preIds.Length > 0)
// {
// //trailing " and " to remove
// sb.Length -= 5;
// }
}
}