This commit is contained in:
@@ -328,6 +328,9 @@ namespace AyaNova.Biz
|
||||
//the translation key is to indicate what the linked object is that is causing the error
|
||||
AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("NotifySubscription"));
|
||||
}
|
||||
|
||||
if (await ct.GlobalBizSettings.AnyAsync(z => z.CustomerDefaultWorkOrderReportId == inObj.Id) == true)
|
||||
AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("GlobalSettings"));
|
||||
}
|
||||
|
||||
|
||||
@@ -383,8 +386,9 @@ namespace AyaNova.Biz
|
||||
}
|
||||
|
||||
//If we get here via the /viewreport url in the client then there is no object type set so we need to set it here from the report
|
||||
if(reportRequest.AType==AyaType.NoType){
|
||||
reportRequest.AType=report.AType;
|
||||
if (reportRequest.AType == AyaType.NoType)
|
||||
{
|
||||
reportRequest.AType = report.AType;
|
||||
}
|
||||
|
||||
|
||||
@@ -410,9 +414,10 @@ namespace AyaNova.Biz
|
||||
|
||||
|
||||
//Get data
|
||||
var ReportData = await GetReportData(reportRequest);
|
||||
var ReportData = await GetReportData(reportRequest);
|
||||
//if GetReportData errored then will return null so need to return that as well here
|
||||
if(ReportData==null){
|
||||
if (ReportData == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -453,9 +458,9 @@ namespace AyaNova.Biz
|
||||
|
||||
//WINDOWS ONLY
|
||||
log.LogDebug($"Windows: Calling browserFetcher download async now:");
|
||||
|
||||
await new BrowserFetcher().DownloadAsync(BrowserFetcher.DefaultChromiumRevision);
|
||||
|
||||
|
||||
await new BrowserFetcher().DownloadAsync(BrowserFetcher.DefaultChromiumRevision);
|
||||
|
||||
}
|
||||
|
||||
System.Text.StringBuilder PageLog = new System.Text.StringBuilder();
|
||||
|
||||
@@ -230,9 +230,9 @@ namespace AyaNova.Biz
|
||||
|
||||
bool isNew = currentObj == null;
|
||||
bool isGlobalDefault = (!isNew
|
||||
&& ServerGlobalBizSettings.TaxPartPurchaseId == proposedObj.Id
|
||||
|| ServerGlobalBizSettings.TaxPartSaleId == proposedObj.Id
|
||||
|| ServerGlobalBizSettings.TaxRateSaleId == proposedObj.Id);
|
||||
&& ServerGlobalBizSettings.Cache.TaxPartPurchaseId == proposedObj.Id
|
||||
|| ServerGlobalBizSettings.Cache.TaxPartSaleId == proposedObj.Id
|
||||
|| ServerGlobalBizSettings.Cache.TaxRateSaleId == proposedObj.Id);
|
||||
|
||||
if (!isNew && (proposedObj.TaxAPct != currentObj.TaxAPct
|
||||
|| proposedObj.TaxBPct != currentObj.TaxBPct
|
||||
@@ -302,9 +302,9 @@ namespace AyaNova.Biz
|
||||
//Referential integrity
|
||||
//FOREIGN KEY CHECKS
|
||||
|
||||
if (ServerGlobalBizSettings.TaxPartPurchaseId == inObj.Id
|
||||
|| ServerGlobalBizSettings.TaxPartSaleId == inObj.Id
|
||||
|| ServerGlobalBizSettings.TaxRateSaleId == inObj.Id)
|
||||
if (ServerGlobalBizSettings.Cache.TaxPartPurchaseId == inObj.Id
|
||||
|| ServerGlobalBizSettings.Cache.TaxPartSaleId == inObj.Id
|
||||
|| ServerGlobalBizSettings.Cache.TaxRateSaleId == inObj.Id)
|
||||
AddError(ApiErrorCode.INVALID_OPERATION, "generalerror", await Translate("TaxCodeDefault"));
|
||||
|
||||
if (await ct.PurchaseOrderItem.AnyAsync(x => x.PurchaseTaxCodeId == inObj.Id))
|
||||
|
||||
@@ -457,8 +457,8 @@ namespace AyaNova.Biz
|
||||
}
|
||||
|
||||
//not set yet, maybe the global default is the way...
|
||||
if (AyaNova.Util.ServerGlobalBizSettings.WorkOrderCompleteByAge != TimeSpan.Zero)
|
||||
newObj.CompleteByDate = DateTime.UtcNow.Add(AyaNova.Util.ServerGlobalBizSettings.WorkOrderCompleteByAge);
|
||||
if (AyaNova.Util.ServerGlobalBizSettings.Cache.WorkOrderCompleteByAge != TimeSpan.Zero)
|
||||
newObj.CompleteByDate = DateTime.UtcNow.Add(AyaNova.Util.ServerGlobalBizSettings.Cache.WorkOrderCompleteByAge);
|
||||
|
||||
}
|
||||
|
||||
@@ -3895,7 +3895,7 @@ namespace AyaNova.Biz
|
||||
{
|
||||
|
||||
|
||||
if (AyaNova.Util.ServerGlobalBizSettings.UseInventory)
|
||||
if (AyaNova.Util.ServerGlobalBizSettings.Cache.UseInventory)
|
||||
{
|
||||
PartInventoryBiz pib = new PartInventoryBiz(ct, UserId, UserTranslationId, CurrentUserRoles);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user