This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user