This commit is contained in:
2021-03-19 14:23:58 +00:00
parent 3bdaa38c4a
commit 770fbc64d1
2 changed files with 11 additions and 14 deletions

View File

@@ -8,7 +8,7 @@ namespace AyaNova.DataList
public OutsideUserDataList() 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)"; SQLFrom = "from auser left join aheadoffice on (auser.headofficeid=aheadoffice.id) left join acustomer on (auser.customerid=acustomer.id)";
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType); var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change; AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;

View File

@@ -234,23 +234,20 @@ namespace AyaNova.Biz
|| ServerGlobalBizSettings.TaxPartSaleId == proposedObj.Id || ServerGlobalBizSettings.TaxPartSaleId == proposedObj.Id
|| ServerGlobalBizSettings.TaxRateSaleId == proposedObj.Id); || ServerGlobalBizSettings.TaxRateSaleId == proposedObj.Id);
if (!isNew) if (!isNew && (proposedObj.TaxAPct != currentObj.TaxAPct
if (proposedObj.Active != currentObj.Active
|| proposedObj.Name != currentObj.Name
|| proposedObj.TaxAPct != currentObj.TaxAPct
|| proposedObj.TaxBPct != currentObj.TaxBPct || proposedObj.TaxBPct != currentObj.TaxBPct
|| proposedObj.TaxOnTax != currentObj.TaxOnTax) || proposedObj.TaxOnTax != currentObj.TaxOnTax))
{ {
//MIGRATE_OUTSTANDING - check workorder records once wo is coded here for this tax code in use //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 //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)) if (await ct.PurchaseOrderItem.AnyAsync(x => x.PurchaseTaxCodeId == proposedObj.Id))
AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("PurchaseOrder")); AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("PurchaseOrder"));
if (isGlobalDefault) if (isGlobalDefault)
AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("AdministrationGlobalSettings")); AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("AdministrationGlobalSettings"));
} }
//Active not changeable for global default //Active not changeable for global default
if (isGlobalDefault && proposedObj.Active == false) if (isGlobalDefault && proposedObj.Active == false)