From 770fbc64d1ed4a7b2a7b6be9b78f560296cc475c Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 19 Mar 2021 14:23:58 +0000 Subject: [PATCH] --- .../AyaNova/DataList/OutsideUserDataList.cs | 2 +- server/AyaNova/biz/TaxCodeBiz.cs | 23 ++++++++----------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/server/AyaNova/DataList/OutsideUserDataList.cs b/server/AyaNova/DataList/OutsideUserDataList.cs index 798fc506..a932f9cd 100644 --- a/server/AyaNova/DataList/OutsideUserDataList.cs +++ b/server/AyaNova/DataList/OutsideUserDataList.cs @@ -8,7 +8,7 @@ namespace AyaNova.DataList public OutsideUserDataList() { - DefaultListObjectType = AyaType.User; + DefaultListObjectType = AyaType.Customer; SQLFrom = "from auser left join aheadoffice on (auser.headofficeid=aheadoffice.id) left join acustomer on (auser.customerid=acustomer.id)"; var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType); AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change; diff --git a/server/AyaNova/biz/TaxCodeBiz.cs b/server/AyaNova/biz/TaxCodeBiz.cs index 50050dc9..eb7b2dff 100644 --- a/server/AyaNova/biz/TaxCodeBiz.cs +++ b/server/AyaNova/biz/TaxCodeBiz.cs @@ -234,23 +234,20 @@ namespace AyaNova.Biz || ServerGlobalBizSettings.TaxPartSaleId == proposedObj.Id || ServerGlobalBizSettings.TaxRateSaleId == proposedObj.Id); - if (!isNew) - if (proposedObj.Active != currentObj.Active - || proposedObj.Name != currentObj.Name - || proposedObj.TaxAPct != currentObj.TaxAPct + if (!isNew && (proposedObj.TaxAPct != currentObj.TaxAPct || proposedObj.TaxBPct != currentObj.TaxBPct - || proposedObj.TaxOnTax != currentObj.TaxOnTax) - { - //MIGRATE_OUTSTANDING - check workorder records once wo is coded here for this tax code in use - //also any other object that uses tax codes besides global settings and purchase order items + || proposedObj.TaxOnTax != currentObj.TaxOnTax)) + { + //MIGRATE_OUTSTANDING - check workorder records once wo is coded here for this tax code in use + //also any other object that uses tax codes besides global settings and purchase order items - if (await ct.PurchaseOrderItem.AnyAsync(x => x.PurchaseTaxCodeId == proposedObj.Id)) - AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("PurchaseOrder")); + if (await ct.PurchaseOrderItem.AnyAsync(x => x.PurchaseTaxCodeId == proposedObj.Id)) + AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("PurchaseOrder")); - if (isGlobalDefault) - AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("AdministrationGlobalSettings")); + if (isGlobalDefault) + AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("AdministrationGlobalSettings")); - } + } //Active not changeable for global default if (isGlobalDefault && proposedObj.Active == false)