This commit is contained in:
2021-12-24 22:57:45 +00:00
parent e703b440b2
commit 71fa9e5ef5
47 changed files with 145 additions and 109 deletions

6
.vscode/launch.json vendored
View File

@@ -40,15 +40,15 @@
"env": {
// "ASPNETCORE_ENVIRONMENT": "Development",
"AYANOVA_JWT_SECRET": "1111111MyRandom32CharacterSecret",
"AYANOVA_LOG_LEVEL": "Info",
// //"AYANOVA_LOG_LEVEL": "Debug",
//"AYANOVA_LOG_LEVEL": "Info",
"AYANOVA_LOG_LEVEL": "Debug",
// // "AYANOVA_LOG_LEVEL": "Trace",
"AYANOVA_DEFAULT_TRANSLATION": "en",
"AYANOVA_DB_CONNECTION": "Server=localhost;Username=postgres;Password=raven;Database=AyaNova;CommandTimeout=120;",
"AYANOVA_DATA_PATH": "c:\\temp\\ravendata",
"AYANOVA_USE_URLS": "http://*:7575;",
"AYANOVA_SERVER_TEST_MODE": "false",
"AYANOVA_REPORT_RENDERING_TIMEOUT":"5",
//"AYANOVA_REPORT_RENDERING_TIMEOUT":"5",
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "large",
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_14\\bin\\"
},

View File

@@ -112,7 +112,7 @@ rm -r ./wwwroot
unzip -o ayanova-linux-x64-server.zip -x "config.json"
sudo systemctl start ayanova.service
Single liner (untested):
Single liner (tested, works, so fast it's surprising):
sudo systemctl stop ayanova.service && rm *.dll && rm -r ./resource && rm -r ./wwwroot && unzip -o ayanova-linux-x64-server.zip -x "config.json" && sudo systemctl start ayanova.service

View File

@@ -51,12 +51,12 @@ namespace AyaNova
//
public void ConfigureServices(IServiceCollection services)
{
_newLog.LogTrace("Initializing services...");
_newLog.LogDebug("Initializing services...");
_newLog.LogTrace("Health");
_newLog.LogDebug("Health");
services.AddHealthChecks().AddDbContextCheck<AyContext>(); ;
_newLog.LogTrace("Profiler");
_newLog.LogDebug("Profiler");
//https://dotnetthoughts.net/using-miniprofiler-in-aspnetcore-webapi/
services.AddMemoryCache();
services.AddMiniProfiler(options =>
@@ -75,15 +75,15 @@ namespace AyaNova
//Server state service for shutting people out of api
_newLog.LogTrace("ServerState service");
_newLog.LogDebug("ServerState service");
services.AddSingleton(new AyaNova.Api.ControllerHelpers.ApiServerState());
_newLog.LogTrace("Mail service");
_newLog.LogDebug("Mail service");
services.AddSingleton<IMailer, Mailer>();
//Init controllers
_newLog.LogTrace("Controllers");
_newLog.LogDebug("Controllers");
var MvcBuilder = services.AddControllers(config =>
{
// config.Filters.Add(new AyaNova.Api.ControllerHelpers.ApiCustomExceptionFilter(AyaNova.Util.ApplicationLogging.LoggerFactory));
@@ -100,7 +100,7 @@ namespace AyaNova
options.SuppressModelStateInvalidFilter = true;
});
_newLog.LogTrace("JSON");
_newLog.LogDebug("JSON");
MvcBuilder.AddNewtonsoftJson(options =>
{
@@ -112,7 +112,7 @@ namespace AyaNova
//HTTP CLIENT FACTORY USED BY LICENSE.CS
//https://docs.microsoft.com/en-us/aspnet/core/fundamentals/http-requests?view=aspnetcore-3.1
_newLog.LogTrace("HTTPClientFactory");
_newLog.LogDebug("HTTPClientFactory");
services.AddHttpClient();
@@ -157,7 +157,7 @@ namespace AyaNova
#endif
_newLog.LogTrace("EF Core");
_newLog.LogDebug("EF Core");
//change to resolve error:
@@ -180,7 +180,7 @@ namespace AyaNova
// Add service and create Policy with options
_newLog.LogTrace("CORS");
_newLog.LogDebug("CORS");
services.AddCors(options =>
{
options.AddPolicy("CorsPolicy",
@@ -271,7 +271,7 @@ namespace AyaNova
ServerBootConfig.AYANOVA_JWT_SECRET = secretKey;
var signingKey = new SymmetricSecurityKey(System.Text.Encoding.ASCII.GetBytes(ServerBootConfig.AYANOVA_JWT_SECRET));
_newLog.LogTrace("Authorization");
_newLog.LogDebug("Authorization");
services.AddAuthentication(options =>
{
options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
@@ -305,7 +305,7 @@ namespace AyaNova
_newLog.LogTrace("Generator");
_newLog.LogDebug("Generator");
services.AddSingleton<IHostedService, GeneratorService>();
}
@@ -319,7 +319,7 @@ namespace AyaNova
AyContext dbContext, IApiVersionDescriptionProvider provider, AyaNova.Api.ControllerHelpers.ApiServerState apiServerState,
IServiceProvider serviceProvider)
{
_newLog.LogTrace("Configuring request pipeline...");
_newLog.LogDebug("Configuring request pipeline...");
//this *may* be useful in the event of an issue so uncomment if necessary but errors during dev are handled equally by the logging, I think
// if (env.IsDevelopment())
@@ -346,7 +346,7 @@ namespace AyaNova
#region STATIC FILES
_newLog.LogTrace("Static files");
_newLog.LogDebug("Static files");
app.UseDefaultFiles();
app.UseStaticFiles();
//Might need the following if the page doesn't update in the client properly
@@ -364,19 +364,19 @@ namespace AyaNova
// });
#endregion
_newLog.LogTrace("Routing pipeline");
_newLog.LogDebug("Routing pipeline");
app.UseRouting();//this wasn't here for 2.2 but added for 3.0, needs to come before the stuff after
_newLog.LogTrace("CORS pipeline");
_newLog.LogDebug("CORS pipeline");
app.UseCors("CorsPolicy");
#region AUTH / ROLES CUSTOM MIDDLEWARE
_newLog.LogTrace("Authentication pipeline");
_newLog.LogDebug("Authentication pipeline");
//Use authentication middleware
app.UseAuthentication();
_newLog.LogTrace("Authorization pipeline");
_newLog.LogDebug("Authorization pipeline");
app.UseAuthorization();
@@ -496,12 +496,12 @@ namespace AyaNova
#endregion
_newLog.LogTrace("Profiler");
_newLog.LogDebug("Profiler");
app.UseMiniProfiler();
_newLog.LogTrace("Endpoints pipeline");
_newLog.LogDebug("Endpoints pipeline");
app.UseEndpoints(endpoints =>
{
endpoints.MapHealthChecks("/health");
@@ -510,7 +510,7 @@ namespace AyaNova
#region SWAGGER
_newLog.LogTrace("API explorer pipeline");
_newLog.LogDebug("API explorer pipeline");
// Enable middleware to serve generated Swagger as a JSON endpoint.
app.UseSwagger();
app.UseSwaggerUI(
@@ -570,13 +570,13 @@ namespace AyaNova
//Check schema
_newLog.LogTrace("DB schema check");
_newLog.LogDebug("DB schema check");
AySchema.CheckAndUpdateAsync(dbContext, _newLog).Wait();
//Check database integrity
_newLog.LogTrace("DB integrity check");
_newLog.LogDebug("DB integrity check");
DbUtil.CheckFingerPrintAsync(AySchema.EXPECTED_COLUMN_COUNT,
AySchema.EXPECTED_INDEX_COUNT,
AySchema.EXPECTED_CHECK_CONSTRAINTS,
@@ -589,10 +589,10 @@ namespace AyaNova
AyaNova.Core.License.InitializeAsync(apiServerState, dbContext, _newLog).Wait();
//Set static global biz settings
_newLog.LogTrace("Global settings");
_newLog.LogDebug("Global settings");
ServerGlobalBizSettings.Initialize(null, dbContext);
_newLog.LogTrace("Ops settings");
_newLog.LogDebug("Ops settings");
ServerGlobalOpsSettingsCache.Initialize(dbContext);
//Ensure translations are present, not missing any keys and that there is a server default translation that exists
@@ -650,7 +650,7 @@ namespace AyaNova
ServerGlobalOpsSettingsCache.BOOTING = false;
//Open up the server for visitors
_newLog.LogTrace("Setting server state open");
_newLog.LogDebug("Setting server state open");
apiServerState.SetOpen();
//final startup log

View File

@@ -182,7 +182,7 @@ namespace AyaNova.Biz
if (ActivelyProcessing)
{
//System.Diagnostics.Debug.WriteLine("ProcessJobs called but actively processing other jobs so returning");
log.LogTrace("ProcessJobs called but actively processing other jobs so returning");
log.LogDebug("ProcessJobs called but actively processing other jobs so returning");
return;
}
if (!KeepOnWorking()) return;
@@ -190,7 +190,7 @@ namespace AyaNova.Biz
log.LogDebug("Processing internal jobs");
try
{
log.LogTrace("Processing level 1 internal jobs");
log.LogDebug("Processing level 1 internal jobs");
//### Critical internal jobs, these run even if there is a license related serverlock
//LICENSE FETCH
await CoreJobLicense.DoWorkAsync();
@@ -202,7 +202,7 @@ namespace AyaNova.Biz
ApiServerState serverState = ServiceProviderProvider.ServerState;
if (!KeepOnWorking()) return;
log.LogTrace("Processing level 2 internal jobs");
log.LogDebug("Processing level 2 internal jobs");
// #if (DEBUG)
// log.LogInformation("Processing semi-critical internal jobs (backup, pm, notification etc)");
@@ -239,7 +239,7 @@ namespace AyaNova.Biz
if (!KeepOnWorking()) return;
log.LogTrace("Processing exclusive dynamic jobs");
log.LogDebug("Processing exclusive dynamic jobs");
//BIZOBJECT DYNAMIC JOBS
//get a list of exclusive jobs that are due to happen
@@ -264,14 +264,14 @@ namespace AyaNova.Biz
//### API Open only jobs
if (!serverState.IsOpen)
{
log.LogTrace("Server state is NOT open, skipping processing non-exclusive dynamic jobs");
log.LogDebug("Server state is NOT open, skipping processing non-exclusive dynamic jobs");
return;
}
///////////////////////////////////////
//NON-EXCLUSIVE JOBS
//
log.LogTrace("Processing non-exclusive dynamic jobs");
log.LogDebug("Processing non-exclusive dynamic jobs");
if (!KeepOnWorking()) return;
//These fire and forget but use a technique to bubble up exceptions anyway
List<OpsJob> sharedJobs = await GetReadyJobsNotExlusiveOnlyAsync();

View File

@@ -5099,7 +5099,7 @@ namespace AyaNova.Biz
//confirm customer is active before proceeding
if (!await ct.Customer.AsNoTracking().Where(x => x.Id == p.CustomerId).Select(x => x.Active).FirstOrDefaultAsync())
{
log.LogTrace($"PM {p.Serial} has an Inactive customer selected so it will be skipped for generation");
log.LogDebug($"PM {p.Serial} has an Inactive customer selected so it will be skipped for generation");
continue;
}
@@ -5138,7 +5138,7 @@ namespace AyaNova.Biz
{
p.Active = false;
await ct.SaveChangesAsync();
log.LogTrace($"PM {p.Serial} has reached it's stop generating date and has been automatically deactivated");
log.LogDebug($"PM {p.Serial} has reached it's stop generating date and has been automatically deactivated");
continue;
}

View File

@@ -58,7 +58,7 @@ namespace AyaNova.Biz
}
}
////////////////////////////////////////////////////////////////////////////////////////////////
//IMPORT
//
@@ -82,7 +82,7 @@ namespace AyaNova.Biz
} while (NotUnique);
newObject.Name = newUniqueName;
await ValidateAsync(newObject, null);
if (HasErrors) return false;
await ct.Report.AddAsync(newObject);
@@ -332,7 +332,7 @@ namespace AyaNova.Biz
bool RequestIsCustomerWorkOrderReport = false;
if (reportRequest.ReportId == -100)
{
log.LogTrace("customer user report requested");
log.LogDebug("customer user report requested");
//get the user and workorder data and set the actual report id or return null if not found
var woTags = await ct.WorkOrder.AsNoTracking().Where(x => x.Id == reportRequest.SelectedRowIds[0]).Select(x => x.Tags).FirstOrDefaultAsync();
if (woTags == null) return null;
@@ -346,7 +346,7 @@ namespace AyaNova.Biz
throw new ReportRenderTimeOutException();
//get report, vet security, see what we need before init in case of issue
log.LogTrace($"get report from db");
log.LogDebug($"get report from db");
var report = await ct.Report.FirstOrDefaultAsync(z => z.Id == reportRequest.ReportId);
if (report == null)
{
@@ -366,7 +366,7 @@ namespace AyaNova.Biz
if (!RequestIsCustomerWorkOrderReport && !AyaNova.Api.ControllerHelpers.Authorized.HasReadFullRole(effectiveRoles, report.AType))
{
log.LogTrace($"bail: user unauthorized");
log.LogDebug($"bail: user unauthorized");
AddError(ApiErrorCode.NOT_AUTHORIZED, null, $"User not authorized for {report.AType} type object");
return null;
}
@@ -374,7 +374,7 @@ namespace AyaNova.Biz
//Client meta data is required
if (reportRequest.ClientMeta == null)
{
log.LogTrace($"bail: ClientMeta parameter is missing");
log.LogDebug($"bail: ClientMeta parameter is missing");
AddError(ApiErrorCode.VALIDATION_MISSING_PROPERTY, null, "ClientMeta parameter is missing and required to render report");
return null;
}
@@ -393,7 +393,7 @@ namespace AyaNova.Biz
//if GetReportData errored then will return null so need to return that as well here
if (ReportData == null)
{
log.LogTrace($"bail: ReportData == null");
log.LogDebug($"bail: ReportData == null");
return null;
}
// #if (DEBUG)
@@ -406,11 +406,11 @@ namespace AyaNova.Biz
bool AutoDownloadChromium = true;
if (string.IsNullOrWhiteSpace(ServerBootConfig.AYANOVA_REPORT_RENDER_BROWSER_PATH))
{
log.LogTrace($"Using default Chromium browser (downloaded)");
log.LogDebug($"Using default Chromium browser (downloaded)");
}
else
{
log.LogTrace($"Using user specified Chromium browser at {ServerBootConfig.AYANOVA_REPORT_RENDER_BROWSER_PATH}");
log.LogDebug($"Using user specified Chromium browser at {ServerBootConfig.AYANOVA_REPORT_RENDER_BROWSER_PATH}");
AutoDownloadChromium = false;
}
@@ -441,7 +441,7 @@ namespace AyaNova.Biz
// #if (DEBUG)
// log.LogInformation($"DBG: ReportBiz::calling browserfetcher");
// #endif
log.LogTrace($"Windows: Calling browserFetcher download async now:");
log.LogDebug($"Windows: Calling browserFetcher download async now:");
await new BrowserFetcher().DownloadAsync(BrowserFetcher.DefaultChromiumRevision);
}
@@ -463,9 +463,10 @@ namespace AyaNova.Biz
throw new ReportRenderTimeOutException();
//API DOCS http://www.puppeteersharp.com/api/index.html
log.LogTrace($"Launching headless Browser now:");
log.LogDebug($"Launching headless Browser and new page now:");
using (var browser = await Puppeteer.LaunchAsync(lo))
using (var page = (await browser.PagesAsync())[0])
// using (var page = await browser.NewPageAsync())
{
//track this process for timeout purposes
ReportRenderManager.AddProcess(browser.Process.Id, renderTimeOutExpiry, log);
@@ -496,7 +497,7 @@ namespace AyaNova.Biz
}
};
log.LogTrace($"Preparing page: adding base reporting scripts to page");
log.LogDebug($"Preparing page: adding base reporting scripts to page");
if (DateTime.UtcNow > renderTimeOutExpiry)
throw new ReportRenderTimeOutException();
@@ -524,7 +525,7 @@ namespace AyaNova.Biz
await page.EvaluateExpressionAsync("ayRegisterHelpers();");
if (DateTime.UtcNow > renderTimeOutExpiry)
throw new ReportRenderTimeOutException();
log.LogTrace($"Preparing page: adding this report's scripts, style and templates to page");
log.LogDebug($"Preparing page: adding this report's scripts, style and templates to page");
//add report pre-render, helpers and style
if (string.IsNullOrWhiteSpace(report.JsPrerender))
@@ -539,12 +540,12 @@ namespace AyaNova.Biz
if (!string.IsNullOrWhiteSpace(report.Style))
await page.AddStyleTagAsync(new AddTagOptions() { Content = report.Style });
log.LogTrace($"Preparing page: adding Client meta data");
log.LogDebug($"Preparing page: adding Client meta data");
//Client meta data to JSON string
var clientMeta = reportRequest.ClientMeta.ToString();
log.LogTrace($"Preparing page: adding Server meta data");
log.LogDebug($"Preparing page: adding Server meta data");
//Server meta data
var logo = await ct.Logo.AsNoTracking().SingleOrDefaultAsync();
@@ -561,7 +562,7 @@ namespace AyaNova.Biz
var HasStreetAddress = !string.IsNullOrWhiteSpace(ServerGlobalBizSettings.Cache.Address) ? "true" : "false";
var serverMeta = $"{{ayApiUrl:`{apiUrl}`, HasSmallLogo:{HasSmallLogo}, HasMediumLogo:{HasMediumLogo}, HasLargeLogo:{HasLargeLogo},CompanyName: `{AyaNova.Core.License.ActiveKey.RegisteredTo}`,CompanyWebAddress:`{ServerGlobalBizSettings.Cache.WebAddress}`,CompanyEmailAddress:`{ServerGlobalBizSettings.Cache.EmailAddress}`,CompanyPhone1:`{ServerGlobalBizSettings.Cache.Phone1}`,CompanyPhone2:`{ServerGlobalBizSettings.Cache.Phone2}`,HasPostalAddress:{HasPostalAddress},CompanyPostAddress:`{ServerGlobalBizSettings.Cache.PostAddress}`,CompanyPostCity:`{ServerGlobalBizSettings.Cache.PostCity}`,CompanyPostRegion:`{ServerGlobalBizSettings.Cache.PostRegion}`,CompanyPostCountry:`{ServerGlobalBizSettings.Cache.PostCountry}`,CompanyPostCode:`{ServerGlobalBizSettings.Cache.PostCode}`,HasStreetAddress:{HasStreetAddress},CompanyAddress:`{ServerGlobalBizSettings.Cache.Address}`,CompanyCity:`{ServerGlobalBizSettings.Cache.City}`,CompanyRegion:`{ServerGlobalBizSettings.Cache.Region}`,CompanyCountry:`{ServerGlobalBizSettings.Cache.Country}`,CompanyLatitude:{ServerGlobalBizSettings.Cache.Latitude},CompanyLongitude:{ServerGlobalBizSettings.Cache.Longitude}}}";
log.LogTrace($"Preparing page: adding Report meta data");
log.LogDebug($"Preparing page: adding Report meta data");
//Custom fields definition for report usage
string CustomFieldsTemplate = "null";
@@ -587,13 +588,16 @@ namespace AyaNova.Biz
//prePareData / preRender
var ReportDataObject = $"{{ ayReportData:{ReportData}, ayReportMetaData:{reportMeta}, ayClientMetaData:{clientMeta}, ayServerMetaData:{serverMeta} }}";
log.LogTrace($"Calling ayPreRender...");
log.LogDebug($"PageLog before render:{PageLog.ToString()}");
log.LogDebug($"Calling ayPreRender...");
await page.WaitForExpressionAsync($"ayPreRender({ReportDataObject})");
log.LogDebug($"ayPreRender completed");
if (DateTime.UtcNow > renderTimeOutExpiry)
throw new ReportRenderTimeOutException();
//compile the template
log.LogTrace($"Calling Handlebars.compile...");
log.LogDebug($"Calling Handlebars.compile...");
var compileScript = $"Handlebars.compile(`{report.Template}`)(PreParedReportDataObject);";
if (DateTime.UtcNow > renderTimeOutExpiry)
@@ -602,14 +606,14 @@ namespace AyaNova.Biz
if (DateTime.UtcNow > renderTimeOutExpiry)
throw new ReportRenderTimeOutException();
//render report as HTML
log.LogTrace($"Setting page content to compiled HTML");
log.LogDebug($"Setting page content to compiled HTML");
await page.SetContentAsync(compiledHTML);
//add style (after page or it won't work)
if (!string.IsNullOrWhiteSpace(report.Style))
{
log.LogTrace($"Adding report template Style CSS");
log.LogDebug($"Adding report template Style CSS");
await page.AddStyleTagAsync(new AddTagOptions { Content = report.Style });
}
@@ -619,7 +623,7 @@ namespace AyaNova.Biz
//Set PDF options
//https://pptr.dev/#?product=Puppeteer&version=v5.3.0&show=api-pagepdfoptions
log.LogTrace($"Resolving PDF Options from report settings");
log.LogDebug($"Resolving PDF Options from report settings");
var PdfOptions = new PdfOptions() { };
@@ -697,22 +701,25 @@ namespace AyaNova.Biz
if (DateTime.UtcNow > renderTimeOutExpiry)
throw new ReportRenderTimeOutException();
//render to pdf and return
log.LogTrace($"Calling render page contents to PDF");
log.LogDebug($"Calling render page contents to PDF");
await page.PdfAsync(outputFullPath, PdfOptions);//###### TODO: SLOW NEEDS TIMEOUT HERE ONCE SUPPORTED, open bug: https://github.com/hardkoded/puppeteer-sharp/issues/1710
log.LogTrace($"Closing Page and Browser");
log.LogDebug($"Closing Page");
await page.CloseAsync();
log.LogDebug($"Closing Browser");
await browser.CloseAsync();
log.LogTrace($"Completed, returning results");
log.LogDebug($"Render completed, returning results");
return outputFileName;
}
catch (ReportRenderTimeOutException)
{
log.LogDebug("Caught ReportRendertimeOutException, re-throwing");
throw;
}
catch (PuppeteerSharp.TargetClosedException)
{
log.LogDebug("Caught PuppeteerSharp.TargetClosedException throwing as ReportRendertimeOutException (timed out and closed from process sweeper)");
//we closed it because the timeout hit and the CoreJobReportRenderEngineProcessCleanup job cleaned it out
//so return the error the client expects in this scenario
throw new ReportRenderTimeOutException();
@@ -734,15 +741,18 @@ namespace AyaNova.Biz
}
finally
{
// #if (DEBUG)
// log.LogInformation($"DBG: ReportBiz::RenderReport - closing browser");
// #endif
log.LogTrace($"Closing Page and Browser");
log.LogDebug($"reached finally block");
if (!page.IsClosed)
{
log.LogDebug($"Page not closed in finally block, closing now");
await page.CloseAsync();
}
if (!browser.IsClosed)
{
log.LogDebug($"Browser not closed in finally block, closing now");
await browser.CloseAsync();
log.LogTrace($"Calling ReportRenderManager.RemoveProcess to stop tracking this process");
}
log.LogDebug($"Calling ReportRenderManager.RemoveProcess to stop tracking this process");
ReportRenderManager.RemoveProcess(browser.Process.Id, log);
}
}

View File

@@ -29,7 +29,7 @@ namespace AyaNova.Biz
if (BackupIsRunning) return;
if (!OnDemand)
{
log.LogTrace("Checking if backup should run");
log.LogDebug("Checking if backup should run");
if (!ServerGlobalOpsSettingsCache.Backup.Active)
{
log.LogDebug("Automatic backup is set to INACTIVE - not backing up");
@@ -38,7 +38,7 @@ namespace AyaNova.Biz
if (DateTime.UtcNow < ServerGlobalOpsSettingsCache.NextBackup)
{
log.LogTrace("Not past backup time yet");
log.LogDebug("Not past backup time yet");
return;
}
}

View File

@@ -33,7 +33,7 @@ namespace AyaNova.Biz
//
public static async Task DoWorkAsync()
{
log.LogTrace("Job starting");
log.LogDebug("Job starting");
var tsSinceLastCheck = DateTime.UtcNow - _lastCheck;
//which track are we on?
/*
@@ -56,10 +56,10 @@ namespace AyaNova.Biz
tsCheckFrequency = SLOW_TRACK;
break;
}
log.LogTrace($"Check frequency{tsCheckFrequency}");
log.LogDebug($"Check frequency{tsCheckFrequency}");
if (tsSinceLastCheck < tsCheckFrequency)
{
log.LogTrace($"Not yet");
log.LogDebug($"Not yet");
return;
}

View File

@@ -44,7 +44,7 @@ namespace AyaNova.Biz
/////////////////////////////////////////////
//ONE MINUTE SNAPS
//
log.LogTrace("MM metrics snapshot");
log.LogDebug("MM metrics snapshot");
var now = DateTime.UtcNow;
_process.Refresh();
@@ -97,7 +97,7 @@ namespace AyaNova.Biz
//
if (DateUtil.IsAfterDuration(_lastDDSnapshot, ts24Hours))
{
log.LogTrace("DD metrics snapshot");
log.LogDebug("DD metrics snapshot");
var now = DateTime.UtcNow;
//FILES ON DISK
var UtilFilesInfo = FileUtil.GetBackupFolderSizeInfo();

View File

@@ -34,22 +34,22 @@ namespace AyaNova.Biz
//
public static async Task DoWorkAsync()
{
log.LogTrace("Checking if Notify should run");
log.LogDebug("Checking if Notify should run");
if (NotifyIsRunning)
{
log.LogTrace("Notify is running already exiting this cycle");
log.LogDebug("Notify is running already exiting this cycle");
return;
}
//This will get triggered roughly every minute, but we don't want to deliver that frequently
if (DateTime.UtcNow - lastRun < RUN_EVERY_INTERVAL)
{
log.LogTrace($"Notify ran less than {RUN_EVERY_INTERVAL} ago, exiting this cycle");
log.LogDebug($"Notify ran less than {RUN_EVERY_INTERVAL} ago, exiting this cycle");
return;
}
try
{
NotifyIsRunning = true;
log.LogTrace("Notify set to RUNNING state and starting now");
log.LogDebug("Notify set to RUNNING state and starting now");
//NotifyHealthCheck processing
//Note this deliberately uses LOCAL time in effort to deliver the health check first thing in the morning for workers
@@ -60,7 +60,7 @@ namespace AyaNova.Biz
//are we in the 7th to 9th hour?
if (dtNowLocal.Hour > 6 && dtNowLocal.Hour < 10)
{
log.LogTrace("Notify health check submitted to subscribers");
log.LogDebug("Notify health check submitted to subscribers");
await NotifyEventHelper.AddGeneralNotifyEvent(NotifyEventType.NotifyHealthCheck, "OK", "");
lastNotifyHealthCheckSentLocal = dtNowLocal;
}
@@ -69,7 +69,7 @@ namespace AyaNova.Biz
using (AyContext ct = AyaNova.Util.ServiceProviderProvider.DBContext)
{
var events = await ct.NotifyEvent.AsNoTracking().ToListAsync();
log.LogTrace($"Found {events.Count} NotifyEvents to examine for potential delivery");
log.LogDebug($"Found {events.Count} NotifyEvents to examine for potential delivery");
//iterate and deliver
foreach (var notifyevent in events)
@@ -78,7 +78,7 @@ namespace AyaNova.Biz
var UserInfo = await ct.User.AsNoTracking().Where(x => x.Id == notifyevent.UserId).Select(x => new { Active = x.Active, Name = x.Name }).FirstOrDefaultAsync();
if (!UserInfo.Active)
{
log.LogTrace($"Inactive user {UserInfo.Name}, removing notify rather than delivering it: {notifyevent}");
log.LogDebug($"Inactive user {UserInfo.Name}, removing notify rather than delivering it: {notifyevent}");
ct.NotifyEvent.Remove(notifyevent);
await ct.SaveChangesAsync();
continue;
@@ -115,7 +115,7 @@ namespace AyaNova.Biz
//look for same delivery less than last12hours ago
if (await ct.NotifyDeliveryLog.AnyAsync(z => z.Processed > twelvehoursago && z.NotifySubscriptionId == notifyevent.NotifySubscriptionId && z.ObjectId == notifyevent.ObjectId))
{
log.LogTrace($"Notification event will not be delivered: repetitive (server system event type and delivered at least once in the last 12 hours to this subscriber: {notifyevent})");
log.LogDebug($"Notification event will not be delivered: repetitive (server system event type and delivered at least once in the last 12 hours to this subscriber: {notifyevent})");
ct.NotifyEvent.Remove(notifyevent);
await ct.SaveChangesAsync();
#if (DEBUG)
@@ -142,7 +142,7 @@ namespace AyaNova.Biz
}
finally
{
log.LogTrace("Notify is done setting to not running state and tagging lastRun timestamp");
log.LogDebug("Notify is done setting to not running state and tagging lastRun timestamp");
lastRun = DateTime.UtcNow;
NotifyIsRunning = false;
@@ -152,7 +152,7 @@ namespace AyaNova.Biz
private static async Task DeliverInApp(NotifyEvent ne, TimeSpan ageValue, AyContext ct)
{
log.LogTrace($"DeliverInApp notify event: {ne}");
log.LogDebug($"DeliverInApp notify event: {ne}");
//Place in the In-app notification table for user to view
await ct.InAppNotification.AddAsync(
@@ -195,7 +195,7 @@ namespace AyaNova.Biz
try
{
log.LogTrace($"DeliverSMTP delivering notify event: {ne}");
log.LogDebug($"DeliverSMTP delivering notify event: {ne}");
if (string.IsNullOrWhiteSpace(deliveryAddress))
{
await NotifyEventHelper.AddGeneralNotifyEvent(NotifyEventType.GeneralNotification, $"No email address is set in subscription to deliver email notification. This event will be removed from the delivery queue as undeliverable: {ne}", "Error", null, ne.UserId);
@@ -314,7 +314,7 @@ namespace AyaNova.Biz
await NotifyEventHelper.AddGeneralNotifyEvent(NotifyEventType.GeneralNotification, $"An error prevented delivering the following notification via email. System operator users have been notified:{ne}", "Error", null, ne.UserId);
DeliveryLogItem.Fail = true;
DeliveryLogItem.Error = $"SMTP Notification failed to deliver for this event: {ne}, message: {ex.Message}";
log.LogTrace(ex, $"DeliverSMTP Failure delivering notify event: {ne}");
log.LogDebug(ex, $"DeliverSMTP Failure delivering notify event: {ne}");
}
finally
{

View File

@@ -31,22 +31,22 @@ namespace AyaNova.Biz
public static async Task DoWorkAsync()
{
log.LogTrace("Checking if PMGenerate should run");
log.LogDebug("Checking if PMGenerate should run");
if (IsRunning)
{
log.LogTrace("PMGenerate is running already exiting this cycle");
log.LogDebug("PMGenerate is running already exiting this cycle");
return;
}
//This will get triggered roughly every minute, but we don't want to deliver that frequently
if (DateTime.UtcNow - lastRun < RUN_EVERY_INTERVAL)
{
log.LogTrace($"PMGenerate ran less than {RUN_EVERY_INTERVAL} ago, exiting this cycle");
log.LogDebug($"PMGenerate ran less than {RUN_EVERY_INTERVAL} ago, exiting this cycle");
return;
}
try
{
IsRunning = true;
log.LogTrace("PMGenerate set to RUNNING state and starting now");
log.LogDebug("PMGenerate set to RUNNING state and starting now");
using (AyContext ct = AyaNova.Util.ServiceProviderProvider.DBContext)
{
@@ -60,7 +60,7 @@ namespace AyaNova.Biz
}
finally
{
log.LogTrace("PMGenerate has completed; setting to not running state and tagging lastRun timestamp");
log.LogDebug("PMGenerate has completed; setting to not running state and tagging lastRun timestamp");
lastRun = DateTime.UtcNow;
IsRunning = false;

View File

@@ -31,16 +31,16 @@ namespace AyaNova.Biz
public static async Task DoWorkAsync()
{
log.LogTrace("Checking if CoreJobPMInventoryCheck should run");
log.LogDebug("Checking if CoreJobPMInventoryCheck should run");
if (IsRunning)
{
log.LogTrace("CoreJobPMInventoryCheck is running already exiting this cycle");
log.LogDebug("CoreJobPMInventoryCheck is running already exiting this cycle");
return;
}
//This will get triggered roughly every minute, but we don't want to deliver that frequently
if (DateTime.UtcNow - lastRun < RUN_EVERY_INTERVAL)
{
log.LogTrace($"CoreJobPMInventoryCheck ran less than {RUN_EVERY_INTERVAL} ago, exiting this cycle");
log.LogDebug($"CoreJobPMInventoryCheck ran less than {RUN_EVERY_INTERVAL} ago, exiting this cycle");
return;
}
@@ -48,7 +48,7 @@ namespace AyaNova.Biz
try
{
IsRunning = true;
log.LogTrace("CoreJobPMInventoryCheck set to RUNNING state and starting now");
log.LogDebug("CoreJobPMInventoryCheck set to RUNNING state and starting now");
using (AyContext ct = AyaNova.Util.ServiceProviderProvider.DBContext)
{
@@ -62,7 +62,7 @@ namespace AyaNova.Biz
}
finally
{
log.LogTrace("CoreJobPMInventoryCheck has completed; setting to not running state and tagging lastRun timestamp");
log.LogDebug("CoreJobPMInventoryCheck has completed; setting to not running state and tagging lastRun timestamp");
lastRun = DateTime.UtcNow;
IsRunning = false;
}

View File

@@ -23,7 +23,7 @@ namespace AyaNova.Biz
{
if (DateUtil.IsAfterDuration(_lastRun, tsRunEvery))
{
log.LogTrace("Checking for expired processes");
log.LogDebug("Checking for expired processes");
Util.ReportRenderManager.KillExpiredRenders(log);
//FileUtil.CleanTemporaryFilesFolder(new TimeSpan(0,5,0));//erase any files found to be older than 5 minutes
var now = DateTime.UtcNow;

View File

@@ -33,7 +33,7 @@ namespace AyaNova.Biz
if (DateTime.UtcNow - lastSweep < SWEEP_EVERY_INTERVAL)
return;
log.LogTrace("Sweep starting");
log.LogDebug("Sweep starting");
using (AyContext ct = AyaNova.Util.ServiceProviderProvider.DBContext)
{
//SWEEP SUCCESSFUL JOBS
@@ -82,7 +82,7 @@ namespace AyaNova.Biz
.OrderBy(z => z.Created)
.ToListAsync();
log.LogTrace($"SweepAsync processing: cutoff={dtDeleteCutoff.ToString()}, for {jobs.Count.ToString()} jobs of status {jobStatus.ToString()}");
log.LogDebug($"SweepAsync processing: cutoff={dtDeleteCutoff.ToString()}, for {jobs.Count.ToString()} jobs of status {jobStatus.ToString()}");
foreach (OpsJob j in jobs)
{
@@ -113,7 +113,7 @@ namespace AyaNova.Biz
.OrderBy(z => z.Created)
.ToListAsync();
log.LogTrace($"killStuckJobsAsync processing: cutoff={dtRunningDeadline.ToString()}, for {jobs.Count.ToString()} jobs of status {JobStatus.Running.ToString()}");
log.LogDebug($"killStuckJobsAsync processing: cutoff={dtRunningDeadline.ToString()}, for {jobs.Count.ToString()} jobs of status {JobStatus.Running.ToString()}");
foreach (OpsJob j in jobs)
{
@@ -134,7 +134,7 @@ namespace AyaNova.Biz
.OrderBy(z => z.Created)
.ToListAsync();
log.LogTrace($"SweepInternalJobsLogsAsync processing: cutoff={dtDeleteCutoff.ToString()}, for {logs.Count.ToString()} log entries");
log.LogDebug($"SweepInternalJobsLogsAsync processing: cutoff={dtDeleteCutoff.ToString()}, for {logs.Count.ToString()} log entries");
foreach (OpsJobLog l in logs)
{

View File

@@ -22,7 +22,7 @@ namespace AyaNova.Biz
{
if (DateUtil.IsAfterDuration(_lastRun, tsRunEvery))
{
log.LogTrace("Temp cleanup now");
log.LogDebug("Temp cleanup now");
FileUtil.CleanTemporaryFilesFolder(new TimeSpan(0,15,0));//erase any files found to be older than 15 minutes (which coincides with max report rendering timeout)
var now = DateTime.UtcNow;
_lastRun = now;

View File

@@ -28,7 +28,7 @@ namespace AyaNova.Biz
DateTime dtDeleteCutoff = DateTime.UtcNow - DELETE_AFTER_AGE;
DateTime dtPastEventCutoff = DateTime.UtcNow - SWEEP_EVERY_INTERVAL;
log.LogTrace("Sweep starting");
log.LogDebug("Sweep starting");
using (AyContext ct = AyaNova.Util.ServiceProviderProvider.DBContext)
{
//Notification (in-App notifications table) - deletes all APP notifications older than 90 days (if they want to keep it then can turn it into a reminder or SAVE it somehow)

View File

@@ -48,7 +48,7 @@ namespace AyaNova.Generator
{
if (!ServerGlobalOpsSettingsCache.BOOTING)
{
log.LogTrace($"GeneratorService running jobs");
log.LogDebug($"GeneratorService running jobs");
//=================================================================
try

View File

@@ -0,0 +1 @@
{"Name":"Clients list","Active":true,"Notes":"","Roles":50538,"AType":8,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n <div class=\"reporttitle\">\n <p>{{ayT 'CustomerList'}} List</p>\n </div>\n\n <table>\n\n <thead>\n </thead>\n\n <tbody>\n {{#each ayReportData}}\n <tr>\n <th colspan=\"1\" class=\"leftlean\">{{ayT 'Customer'}}:</th>\n <td colspan=\"5\" class=\"lrgtext\">{{Name}}</td>\n <td colspan=\"1\">&nbsp;</td>\n </tr>\n <tr>\n <th colspan=\"2\">{{ayT 'CustomerAccountNumber'}}:</th>\n <td colspan=\"1\">{{AccountNumber}}</td>\n <th colspan=\"2\">{{ayT 'LastServiceWorkOrder'}}:</th>\n {{#if LastServiceDateViz}}<td colspan=\"2\">&#35;{{LastWorkOrderViz}} on {{ayDateTime LastServiceDateViz}}</td>{{else}}<td colspan=\"2\"></td>{{/if}}\n </tr>\n <tr>\n <th colspan=\"2\">{{ayT 'CustomerPhone1'}}:</th>\n <td colspan=\"2\">{{Phone1}}</td>\n <th colspan=\"1\">{{ayT 'CustomerEmail'}}:</th>\n <td colspan=\"2\">{{EmailAddress}}</td>\n </tr>\n <tr>\n <th colspan=\"2\">{{ayT 'AddressTypePhysical'}}:</th>\n <td colspan=\"5\">{{Address}} {{City}}, {{Region}}</td>\n </tr>\n {{#if BillHeadOffice}}\n <tr>\n <th colspan=\"2\">{{ayT 'CustomerBillHeadOffice'}}:</th>\n <td colspan=\"5\">{{HeadOfficeViz}}</td>\n </tr>\n {{else}}{{/if}}\n {{#if ContractViz}}\n <tr>\n <th colspan=\"2\">{{ayT 'Contract'}}:</th>\n <td colspan=\"5\">{{ContractViz}} Expires: {{ContractExpires}}</td>\n </tr>\n {{else}}{{/if}}\n {{#if AlertNotes}}\n <tr>\n <th colspan=\"2\">{{ayT 'CustomerAlertNotes'}}:</th>\n <td colspan=\"5\">{{AlertNotes}} Expires: {{ContractExpires}}</td>\n </tr>\n {{else}}{{/if}}\n {{#if TechNotes}}\n <tr>\n <th colspan=\"2\">{{ayT 'CustomerTechNotes'}}:</th>\n <td colspan=\"5\">{{TechNotes}}</td>\n </tr>\n {{else}}{{/if}}\n\n <tr>\n <th colspan=\"6\">&nbsp;</th>\n </tr>\n\n {{/each}}\n </tbody>\n\n <tfoot>\n </tfoot>\n\n </table>\n\n\n </div>\n</body>\n\n</html>","Style":"body {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n color: #9e9e9e;\r\n} \r\n\r\ntable { \r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%;\r\n table-layout: fixed;\r\n }\r\n\r\nth {\r\n height: 20px;\r\n font-size: 10pt; \r\n color: #9e9e9e;\r\n text-align: right;\r\n}\r\n\r\n.lrgtext {\r\n height: 20px;\r\n font-size: 10pt; \r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 8pt;\r\n}\r\n\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}\r\n\r\n","JsPrerender":" \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"Name\", \"CustomerList\", \"Customer\", \"CustomerAccountNumber\", \"CustomerBillHeadOffice\", \"AddressTypePhysical\", \"CustomerPhone1\", \"CustomerEmail\", \"ContractExpires\", \"Contract\", \"LastServiceWorkOrder\", \"CustomerAlertNotes\", \"CustomerTechNotes\" ]);\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers","RenderType":0,"HeaderTemplate":"<span>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":0,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -0,0 +1 @@
{"Name":"Contacts list","Active":true,"Notes":"HTML example of using multiple nested #if else statements for display of value","Roles":50538,"AType":3,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n <div class=\"reporttitle\">\n <p>{{ayT 'UserList'}} &amp; {{ayT 'Contacts'}} List</p>\n </div>\n\n <table>\n \n <thead>\n <tr>\n <th colspan=\"5\" class=\"leftlean\">{{ayT 'Name'}} &amp; {{ayT 'UserType'}} </th>\n <th colspan=\"2\">{{ayT 'LastLogin'}}</th>\n <th colspan=\"2\">{{ayT 'UserPhone1'}}</th>\n <th colspan=\"2\">{{ayT 'UserEmailAddress'}}</th>\n </tr>\n </thead>\n\n <tbody>\n {{#each ayReportData}}\n <tr>\n <td colspan=\"2\">{{Name}}</td>\n <!-- below line is example of nested #if / else / #if / else statements - note the TWO /if's at the end to close the two #ifs -->\n {{#if CustomerViz}}<td colspan=\"3\">Customer: {{CustomerViz}}</td>{{else}} {{#if HeadOfficeViz}}<td colspan=\"3\">Headoffice: {{HeadOfficeViz}}</td>{{else}}<td colspan=\"3\">Employee: {{UserTypeViz}}</td>{{/if}}{{/if}}\n <td colspan=\"2\">{{ayDateTime LastLogin}}</td>\n <td colspan=\"2\">{{UserOptions.Phone1}}</td>\n <td colspan=\"2\">{{UserOptions.EmailAddress}}</td>\n </tr>\n {{/each}}\n </tbody>\n\n <tfoot>\n </tfoot>\n\n </table>\n\n<!-- uncomment below if you want to see output of all data\n <table>\n {{#each ayReportData}}\n <tbody>\n <tr>\n <td colspan=\"5\">This is a printout of the data returned from the Custom Prepare that this report now uses. Compare against the data that shows in the \"Sample Data\" when editing this report template.</td>\n </tr>\n <tr>\n\t\t\t <td colspan=\"5\" class=\"leftlean\">{{ayJSON this}}</td>\n </tr>\n </tbody>\n {{/each}}\n </table>\n-->\n\n </div>\n</body>\n\n</html>","Style":"body {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n color: #9e9e9e;\r\n} \r\n\r\ntable { \r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%;\r\n table-layout: fixed;\r\n }\r\n\r\nth {\r\n height: 20px;\r\n font-size: 10pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 8pt;\r\n}\r\n\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}\r\n\r\n","JsPrerender":" \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"UserList\", \"Contacts\", \"UserType\", \"User\", \"Contact\", \"Name\", \"Customer\", \"HeadOffice\", \"User\", \"LastLogin\", \"UserPhone1\", \"UserEmailAddress\" ]);\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers","RenderType":0,"HeaderTemplate":"<span>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":0,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"Name":"Customer Notes","Active":true,"Notes":"","Roles":50538,"AType":59,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n <table>\n {{#each ayReportData}}\n <thead>\n\n <tr>\n <th colspan=\"5\" class=\"leftlean\">{{ayT 'CustomerNoteList'}} for {{ayT 'Customer'}}:</th>\n <td colspan=\"10\">{{group}}</td>\n </tr>\n <tr>\n <th colspan=\"15\">&nbsp;</th>\n </tr>\n <tr>\n <th colspan=\"3\">Who entered:</th>\n <th colspan=\"3\">{{ayT 'CustomerNoteNoteDate'}}</th>\n <th colspan=\"3\">{{ayT 'Tags'}}</th>\n <th colspan=\"6\">{{ayT 'CustomerNoteList'}}</th>\n </tr>\n <tr>\n <th colspan=\"15\">&nbsp;</th>\n <tr>\n </thead>\n\n <tbody>\n\n {{#each items}}\n\n <tr>\n <td colspan=\"3\">{{UserViz}}</td>\n <td colspan=\"3\">{{ayDateTime NoteDate}}</td>\n <td colspan=\"3\">{{Tags}}</td>\n <td colspan=\"6\">{{Notes}}</td>\n </tr>\n {{/each}}\n\n </tbody>\n\n <tfoot>\n </tfoot>\n {{/each}}\n </table>\n\n <!-- <p> uncomment to see the raw data returned from the custom Prepare </p>\n <div>\n <p>{{ayJSON ayReportData}} </p>\n</div> -->\n\n\n </div>\n</body>\n\n</html>","Style":"body {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n color: #9e9e9e;\r\n} \r\n\r\ntable { \r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%;\r\n table-layout: fixed;\r\n }\r\n\r\nth {\r\n height: 20px;\r\n font-size: 10pt; \r\n color: #9e9e9e;\r\n\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 8pt;\r\n}\r\n\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}\r\n\r\n","JsPrerender":" \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"CustomerNoteNotes\", \"CustomerNoteList\", \"Customer\", \"CustomerNoteNoteDate\", \"Tags\" ]);\n\n ayData.ayReportData = ayGroupByKey(ayData.ayReportData, 'CustomerViz')\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers","RenderType":0,"HeaderTemplate":"<span>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":0,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -0,0 +1 @@
{"Name":"Customer Service Requests grouped by Customer","Active":true,"Notes":"","Roles":50666,"AType":54,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n\t<div>\n\t\t<div class=\"reporttitle\">\n\t\t\t<p>{{ayT 'CustomerServiceRequestList'}} grouped by {{ayT 'Customer'}}</p>\n\t\t</div>\n\t\t<table>\n\t\t\t<thead>\n\t\t\t</thead>\n\n\t\t\t<tbody>\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan=\"3\" class=\"bigfont leftlean\">{{ayT 'Customer'}}: </th>\n\t\t\t\t\t<td colspan=\"14\" class=\"bigfont leftlean\"> {{group}}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan=\"2\">&nbsp;</th>\n\t\t\t\t\t<th colspan=\"3\">Date Requested</th>\n\t\t\t\t\t<th colspan=\"3\">{{ayT 'CustomerServiceRequestStatus'}}</th>\n\t\t\t\t\t<th colspan=\"3\">{{ayT 'CustomerServiceRequestPriority'}}</th>\n\t\t\t\t\t<th colspan=\"3\">{{ayT 'WorkOrder'}}</th>\n\t\t\t\t\t<th colspan=\"3\">{{ayT 'CustomerServiceRequestRequestedBy'}}</th>\n\t\t\t\t</tr>\n\t\t\t\t{{#each items}}\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"2\">&nbsp;</td>\n\t\t\t\t\t<td colspan=\"3\">{{ayDateTime DateRequested}}</td>\n\t\t\t\t\t{{#if_eq Status \"0\"}}<td colspan=\"3\" class=\"fontred\">{{StatusViz}}</td>{{else}}<td colspan=\"3\">{{StatusViz}}</td>{{/if_eq}}\n\t\t\t\t\t<td colspan=\"3\">{{PriorityViz}}</td>\n\t\t\t\t\t{{#if WorkOrderSerialViz}}<td colspan=\"3\">{{WorkOrderSerialViz}}</td>{{else}}<td colspan=\"3\" class=\"fontred\">Not yet assigned</td>{{/if}}\n\t\t\t\t\t<td colspan=\"3\">{{RequestedByUserViz}}</td>\n\t\t\t\t</tr>\n\t\t\t\t{{/each}}\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan=\"17\" class=\"rightlean\">{{count}} {{ayT 'CustomerServiceRequestList'}} for {{ayT 'Customer'}} {{group}}</th>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"17\">&nbsp;</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t</tbody>\n\t\t</table>\n\t</div>\n</body>\n</html>","Style":".singlePage\r\n{\r\npage-break-after: always;\r\n\r\n}\r\nbody {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.bigfont {\r\n font-size: 13pt;\r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n color: #9e9e9e;\r\n} \r\n\r\ntable { \r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%;\r\n table-layout: fixed; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\r\n }\r\n\r\nth {\r\n height: 10px;\r\n font-size: 11pt; \r\n color: #9e9e9e;\r\n \r\n}\r\n\r\ntbody td {\r\n padding: 5px;\r\n word-wrap: break-word;\r\n font-size: 10pt;\r\n text-align: center;\r\n}\r\n\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}\r\n\r\n","JsPrerender":"async function ayPrepareData(ayData) {\n\n //send the raw report data to the groupByKey function which will return a new array grouped by the key name provided\n ayData.ayReportData = ayGroupByKey(ayData.ayReportData, 'CustomerViz')\n\n await ayGetTranslations([\"CustomerServiceRequestList\", \"Customer\", \"CustomerServiceRequestRequestedBy\", \"WorkOrder\", \"CustomerServiceRequestPriority\", \"CustomerServiceRequestStatus\" ]);\n\n\n //return the data into the pipeline to send to the report template\n return ayData;\n}","JsHelpers":"//custom helper so can do a direct comparison - i.e. if value equals xxxx, then show, else show yyyyy\r\n//note that this HAS to be added here in Helpers, is NOT built in\r\nHandlebars.registerHelper('if_eq', function(a, b, opts) {\r\n if(a == b) // Or === depending on your needs\r\n return opts.fn(this);\r\n else\r\n return opts.inverse(this);\r\n});\r\n","RenderType":0,"HeaderTemplate":"<span>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"20mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -1 +0,0 @@
{"Name":"z_replace carriage return with space","Active":true,"Notes":"Example custom Prepare to replace carriage return with space for a specific key of this object ","Roles":124927,"AType":8,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n\t<div>\n\t\t<div class=\"reporttitle\">\n\t\t\t<p>Custom Prepare to remove carriage returns</p>\n\t\t</div>\n\t\t<table>\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan=\"7\" class=\"leftlean\">{{ayT 'Customer'}}</th>\n\t\t\t\t\t<th colspan=\"1\">&nbsp;</th>\n\t\t\t\t\t<th colspan=\"7\">{{ayT 'CustomerNotes'}}</th>\n\t\t\t\t\t<th colspan=\"1\">&nbsp;</th>\n\t\t\t\t\t<th colspan=\"8\">Customized {{ayT 'CustomerNotes'}}</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\n\t\t\t<tbody>\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"7\">{{Name}}</td>\n\t\t\t\t\t<td colspan=\"1\">&nbsp;</td>\n\t\t\t\t\t<td colspan=\"7\">{{Notes}}</td>\n\t\t\t\t\t<td colspan=\"1\">&nbsp;</td>\n\t\t\t\t\t<td colspan=\"8\">{{NotesNoCarriage}}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"24\">&nbsp;</td>\n\t\t\t\t</tr>\n\t\t\t\t{{/each}}\n\t\t\t</tbody>\n\t\t</table>\n\n\t\t<table>\n {{#each ayReportData}}\n <tbody>\n\t\t\t \t<tr>\n\t\t\t\t\t<td colspan=\"24\">&nbsp;</td>\n\t\t\t\t</tr>\n <tr>\n <td colspan=\"24\">This is a printout of the data returned from the Custom Prepare that this report now uses, each \"group\" is an object. Compare against the data that shows in the \"Sample Data\" when editing this report template.</td>\n </tr>\n <tr>\n\t\t\t <td colspan=\"24\">{{ayJSON this}}</td>\n </tr>\n </tbody>\n {{/each}}\n </table>\n\t</div>\n</body>\n</html>","Style":"\r\n.singlePage\r\n{\r\npage-break-after: always;\r\n}\r\n\r\nbody {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n text-align: center;\r\n color: #9e9e9e;\r\n} \r\n\r\n\r\ntable { \r\n table-layout: fixed; //setting this to fixed causes columns to be evenly spaced for the entire table regardless of cell content, and then colspan then \"works\" as expected\r\n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n font-size: 8pt;\r\n width: 100%;\r\n }\r\n\r\n\r\nth {\r\n height: 30px;\r\n text-align: left;\r\n color: #9e9e9e;\r\n}\r\n\r\n\r\ntbody tr {\r\n height: 10px;\r\n word-wrap: break-word;\r\n}\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}","JsPrerender":"async function ayPrepareData(ayData){ \n\n await ayGetTranslations([ \"Customer\", \"CustomerNotes\" ]);\n\n //for each Customer, if the General Notes field is NOT null, creates a new key NotesNoCarriage and puts into it the text from Notes replacing ANY carriage returns with a space, so all text is on same line(s)\n for (EachCU of ayData.ayReportData) {\n if (EachCU.Notes != null) {\n n = EachCU.Notes;\n EachCU.NotesNoCarriage = n.replace(/[\\n\\r]+/g, ' ');\n }\n }\n\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","FooterTemplate":"<span>&nbsp; </span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"20mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"15mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -0,0 +1 @@
{"Name":"Head Offices list","Active":true,"Notes":"","Roles":50538,"AType":15,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n <div class=\"reporttitle\">\n <p>{{ayT 'HeadOfficeList'}} List</p>\n </div>\n\n <table>\n \n <thead>\n <tr>\n <th colspan=\"3\" class=\"leftlean\">{{ayT 'Name'}}</th>\n <th colspan=\"2\" class=\"leftlean\">{{ayT 'HeadOfficeAccountNumber'}}</th>\n <th colspan=\"2\">{{ayT 'AddressTypePostal'}}</th>\n <th colspan=\"2\">{{ayT 'HeadOfficePhone1'}}</th>\n <th colspan=\"2\">{{ayT 'HeadOfficeEmail'}}</th>\n </tr>\n </thead>\n\n <tbody>\n {{#each ayReportData}}\n <tr>\n <td colspan=\"3\">{{Name}}</td>\n <td colspan=\"2\">{{AccountNumber}}</td>\n <td colspan=\"2\">{{PostAddress}}</td>\n <td colspan=\"2\">{{Phone1}}</td>\n <td colspan=\"2\">{{EmailAddress}}</td>\n </tr>\n {{/each}}\n </tbody>\n\n <tfoot>\n </tfoot>\n\n </table>\n\n\n </div>\n</body>\n\n</html>","Style":"body {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n color: #9e9e9e;\r\n} \r\n\r\ntable { \r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%;\r\n table-layout: fixed;\r\n }\r\n\r\nth {\r\n height: 20px;\r\n font-size: 10pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 8pt;\r\n}\r\n\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}\r\n\r\n","JsPrerender":" \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"Contact\", \"Name\", \"HeadOfficeList\", \"HeadOffice\", \"HeadOfficeAccountNumber\", \"AddressTypePostal\", \"HeadOfficePhone1\", \"HeadOfficeEmail\" ]);\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers","RenderType":0,"HeaderTemplate":"<span>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":0,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -0,0 +1 @@
{"Name":"Inventory transactions grouped by Part","Active":true,"Notes":"","Roles":50538,"AType":67,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n\t<div>\n\t\t<div class=\"reporttitle\">\n\t\t\t<p>{{ayT 'PartInventoryTransactionList'}} grouped by {{ayT 'Part'}}</p>\n\t\t</div>\n\n\t\t<table>\n\t\t\t<thead>\n\t\t\t</thead>\n\n\t\t\t<tbody>\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t<!-- the #each for the Sample Data MUST encompass the section where its gonna show - in this case the tbody, so needs to be placed within -->\n\t\t\t\t<!-- to get alternating coloured rows when one PO per line, need CSS statements PLUS this # each MUST be placed BEFORE the tr /tr -->\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan=\"2\">{{ayT 'Part'}}:</th>\n\t\t\t\t\t<td colspan=\"12\"> {{group}}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan=\"2\">&nbsp;</th>\n\t\t\t\t\t<th colspan=\"2\">{{ayT 'PartInventoryTransactionEntryDate'}}</th>\n\t\t\t\t\t<th colspan=\"4\">{{ayT 'PartInventoryTransactionDescription'}}</th>\n\t\t\t\t\t<th colspan=\"2\">{{ayT 'PartWarehouse'}}</th>\n\t\t\t\t\t<th colspan=\"2\">{{ayT 'PartInventoryTransactionQuantity'}}</th>\n\t\t\t\t\t<th colspan=\"2\">{{ayT 'PartInventoryBalance'}}</th>\n\t\t\t\t</tr>\n\t\t\t\t{{#each items}}\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"2\">&nbsp;</td>\n\t\t\t\t\t<td colspan=\"2\">{{ayDateTime EntryDate}}</td>\n\t\t\t\t\t<td colspan=\"4\">{{Description}}</td>\n\t\t\t\t\t<td colspan=\"2\">{{PartWarehouseViz}}</td>\n\t\t\t\t\t<td colspan=\"2\">{{Quantity}}</td>\n\t\t\t\t\t<td colspan=\"2\">{{Balance}}</td>\n\t\t\t\t</tr>\n\t\t\t\t{{/each}}\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"14\">&nbsp;</td>\n\t\t\t\t</tr>\n\n\t\t\t\t{{/each}}\n\t\t\t</tbody>\n\n\t\t\t<tfoot>\n\t\t\t</tfoot>\n\n\t\t</table>\n\n\n\t</div>\n</body>\n\n</html>","Style":"body {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n color: #9e9e9e;\r\n} \r\n\r\ntable { \r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%;\r\n table-layout: fixed;\r\n }\r\n\r\nth {\r\n padding: 5px;\r\n font-size: 11pt; \r\n color: #9e9e9e;\r\n text-align: left;\r\n}\r\n\r\ntbody td {\r\n padding: 5px;\r\n word-wrap: break-word;\r\n font-size: 9pt;\r\n}\r\n\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}","JsPrerender":"async function ayPrepareData(ayData){ \n\n ayData.ayReportData = ayGroupByKey(ayData.ayReportData, 'PartNameViz')\n\n await ayGetTranslations([\"PartInventoryTransactionList\", \"PartInventoryTransactionDescription\", \"PartInventoryTransactionEntryDate\", \"PartInventoryTransactionQuantity\", \"PartInventoryBalance\", \"PartWarehouse\", \"Part\" ]);\n\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"<span>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"15mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -0,0 +1 @@
{"Name":"Memos","Active":true,"Notes":"","Roles":50538,"AType":60,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n <div class=\"reporttitle\">\n <p>{{ayT 'MemoList'}} List</p>\n </div>\n\n <table>\n \n <thead>\n <tr>\n <th colspan=\"1\">{{ayT 'MemoViewed'}}</th>\n <th colspan=\"2\">{{ayT 'MemoSent'}}</th>\n <th colspan=\"2\">{{ayT 'MemoFromID'}}</th>\n <th colspan=\"3\">{{ayT 'MemoSubject'}}</th> \n <th colspan=\"5\">{{ayT 'MemoMessage'}}</th>\n \n </tr>\n </thead>\n\n <tbody>\n {{#each ayReportData}}\n <tr>\n <!-- if Viewed is true, will show checkmarked checkbox -->\n\t\t\t\t\t{{#if Viewed}}<td colspan=\"1\" class=\"centerlean\"><input type=\"checkbox\" id=\"manual1\" checked><label for=\"manual1\"> </label></td>\n\t\t\t\t\t{{else}}<td colspan=\"1\" class=\"centerlean\"><input type=\"checkbox\" id=\"manual1\" ><label for=\"manual1\"> </label></td>{{/if}}\n\n <td colspan=\"2\">{{ayDateTime Sent}}</td>\n <td colspan=\"2\">{{FromViz}}</td>\n <td colspan=\"3\">{{Name}}</td>\n <td colspan=\"5\">{{Notes}}</td>\n \n </tr>\n {{/each}}\n </tbody>\n\n <tfoot>\n </tfoot>\n\n </table>\n\n\n </div>\n</body>\n\n</html>","Style":"body {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n color: #9e9e9e;\r\n} \r\n\r\ntable { \r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%;\r\n table-layout: fixed;\r\n }\r\n\r\nth {\r\n height: 20px;\r\n font-size: 10pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 8pt;\r\n}\r\n\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}\r\n\r\n","JsPrerender":" \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"MemoFromID\", \"MemoSent\", \"MemoList\", \"MemoSubject\", \"MemoViewed\", \"MemoMessage\" ]);\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers\r\n","RenderType":0,"HeaderTemplate":"<span>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":0,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -0,0 +1 @@
{"Name":"PM Item Tasks ","Active":true,"Notes":"","Roles":50538,"AType":86,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n <div class=\"reporttitle\">\n <p>{{ayT 'PreventiveMaintenance'}} {{ayT 'WorkOrderItemList'}} {{ayT 'WorkOrderItemTasks'}} List</p>\n </div>\n\n <table>\n \n <thead>\n <tr>\n <th colspan=\"1\">{{ayT 'PreventiveMaintenance'}}</th>\n <th colspan=\"2\">{{ayT 'PMNextServiceDate'}}</th>\n <th colspan=\"4\">{{ayT 'WorkOrderItemSummary'}}</th> \n\n\n\t\t\t\t\t<th colspan=\"2\" class=\"centerlean\" >{{ayT 'WorkOrderItemTaskWorkOrderItemTaskCompletionType'}}</th> \n\t\t\t\t\t<th colspan=\"6\">{{ayT 'WorkOrderItemTasks'}}</th>\n </tr>\n </thead>\n\n <tbody>\n {{#each ayReportData}}\n {{#each Items}}\n {{#each Tasks}}\n <tr>\n <td colspan=\"1\">{{../../Serial}}</td>\n <td colspan=\"2\">{{ayDateTime ../../NextServiceDate}}</td>\n <td colspan=\"4\">{{../Notes}}</td>\n\n\t\t\t\t\t<!-- note that this if_eq is from a custom Helper --><!-- IF status equals Completed (value is 2) then displays with a checkmark -->\n\t\t\t\t\t{{#if_eq Status 2}}<td colspan=\"2\" class=\"centerlean\">{{StatusViz}} <input type=\"checkbox\" id=\"manual1\" checked><label for=\"manual1\"> </label></td>\n\t\t\t\t\t{{else}}<td colspan=\"2\" class=\"centerlean\">{{StatusViz}} <input type=\"checkbox\" id=\"manual1\" ><label for=\"manual1\"> </label></td>{{/if_eq}}\n\t\t\t\t\t<td colspan=\"6\">{{Task}}</td>\n \n </tr>\n {{/each}}\n {{/each}}\n {{/each}}\n </tbody>\n\n <tfoot>\n </tfoot>\n\n </table>\n\n\n </div>\n</body>\n\n</html>","Style":"body {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n color: #9e9e9e;\r\n} \r\n\r\ntable { \r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%;\r\n table-layout: fixed;\r\n }\r\n\r\nth {\r\n height: 20px;\r\n font-size: 10pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 8pt;\r\n}\r\n\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}\r\n\r\n","JsPrerender":" \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"WorkOrderItemTasks\", \"PreventiveMaintenance\", \"WorkOrderItemList\", \"PMNextServiceDate\", \"WorkOrderItemSummary\", \"WorkOrderItemTaskWorkOrderItemTask\", \"WorkOrderItemTaskWorkOrderItemTaskCompletionType\" ]);\n\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers\r\n\r\n//custom helper so can do a direct comparison - i.e. if value equals xxxx, then show, else show yyyyy\r\n//note that this HAS to be added here in Helpers, is NOT built in\r\nHandlebars.registerHelper('if_eq', function(a, b, opts) {\r\n if(a == b) // Or === depending on your needs\r\n return opts.fn(this);\r\n else\r\n return opts.inverse(this);\r\n});","RenderType":0,"HeaderTemplate":"<span>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":0,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -0,0 +1 @@
{"Name":"PM Scheduled Users","Active":true,"Notes":"","Roles":50538,"AType":85,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n <div class=\"reporttitle\">\n <p>{{ayT 'PreventiveMaintenance'}} {{ayT 'WorkOrderItemScheduledUserList'}} List</p>\n </div>\n\n <table>\n \n <thead>\n <tr>\n <th colspan=\"1\">{{ayT 'PreventiveMaintenance'}}</th>\n <th colspan=\"2\">{{ayT 'Customer'}}</th>\n <th colspan=\"2\">{{ayT 'WorkOrderItemWorkOrderStatusID'}}</th>\n <th colspan=\"4\">{{ayT 'WorkOrderItemSummary'}}</th> \n <th colspan=\"2\">{{ayT 'WorkOrderItemScheduledUsers'}}</th> \n <th colspan=\"2\">{{ayT 'WorkOrderItemScheduledUserStartDate'}}</th>\n <th colspan=\"1\">{{ayT 'WorkOrderItemScheduledUserEstimatedQuantity'}}</th>\n </tr>\n </thead>\n\n <tbody>\n {{#each ayReportData}}\n {{#each Items}}\n {{#each ScheduledUsers}}\n <tr>\n <td colspan=\"1\">{{../../Serial}}</td>\n <td colspan=\"2\">{{../../CustomerViz}}</td>\n <td colspan=\"2\">{{../WorkOrderItemStatusNameViz}}</td>\n <td colspan=\"4\">{{../Notes}}</td>\n <td colspan=\"2\">{{UserViz}}</td>\n <td colspan=\"2\">{{ayDateTime StartDate}}</td>\n <td colspan=\"1\">{{EstimatedQuantity}}</td>\n \n </tr>\n {{/each}}\n {{/each}}\n {{/each}}\n </tbody>\n\n <tfoot>\n </tfoot>\n\n </table>\n\n\n </div>\n</body>\n\n</html>","Style":"body {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n color: #9e9e9e;\r\n} \r\n\r\ntable { \r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%;\r\n table-layout: fixed;\r\n }\r\n\r\nth {\r\n height: 20px;\r\n font-size: 10pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 8pt;\r\n}\r\n\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}\r\n\r\n","JsPrerender":" \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"PreventiveMaintenance\", \"WorkOrderItemScheduledUsers\", \"WorkOrderItemScheduledUserList\", \"WorkOrder\", \"Customer\", \"WorkOrderItemWorkOrderStatusID\", \"WorkOrderItemSummary\", \"WorkOrderItemScheduledUserStartDate\", \"WorkOrderItemScheduledUserEstimatedQuantity\" ]);\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers\r\n","RenderType":0,"HeaderTemplate":"<span>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":0,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -0,0 +1 @@
{"Name":"PM Units grouped by Customer","Active":true,"Notes":"","Roles":50538,"AType":88,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n <div class=\"reporttitle\">\n\t\t\t<p>{{ayT 'PMList'}} {{ayT 'WorkOrderItemUnitList'}} grouped by {{ayT 'Customer'}}</p>\n\t\t</div>\n <table>\n <thead>\n <tr>\n <th colspan=\"2\" class=\"leftlean\" >{{ayT 'Customer'}}</th>\n <th colspan=\"1\">{{ayT 'PreventiveMaintenance'}}</th>\n <th colspan=\"1\">{{ayT 'PMNextServiceDate'}}</th>\n <th colspan=\"2\">{{ayT 'WorkOrderItemUnit'}}</th>\n <th colspan=\"1\">{{ayT 'WorkOrderItemWorkOrderStatusID'}}</th>\n <th colspan=\"3\">{{ayT 'WorkOrderItemSummary'}}</th>\n </tr>\n </thead>\n <tbody>\n {{#each ayReportData}}\n <tr>\n <td colspan=\"10\">{{group}}</td>\n </tr>\n {{#each items}}\n {{#each Items}}\n {{#each Units}}\n <tr> \n <td colspan=\"2\">&nbsp;</td>\n <td colspan=\"1\" class=\"centerlean\">{{../../Serial}}</td> <!--note the two ../ to go up levels to get this data -->\n <td colspan=\"1\" class=\"centerlean\">{{ayDate ../../NextServiceDate}}</td><!--note the two ../ to go up levels to get this data -->\n <td colspan=\"2\" >{{UnitViz}} - {{UnitModelNameViz}}</td>\n <td colspan=\"1\" >{{../WorkOrderItemStatusNameViz}}</td><!--note the ../ to go up level to get this data -->\n <td colspan=\"3\" >{{../Notes}}</td><!--note the ../ to go up level to get this data --> \n </tr>\n {{/each}}\n {{/each}}\n {{/each}}\n <tr>\n <td colspan=\"10\">&nbsp;</td>\n </tr>\n\n <tr>\n <td colspan=\"10\">&nbsp;</td>\n </tr>\n {{/each}}\n </tbody>\n </table> \n </div>\n\n <!-- uncomment to see the raw data returned from the custom Prepare \n<div>\n <p>{{ayJSON ayReportData}} </p>\n</div> \n-->\n\n</body>\n</html>","Style":".minimum {\n font-size: 6pt;\n}\n\ntfoot {\n border-top: 2px solid #9e9e9e;\n font-size: 7pt;\n text-align: center;\n}\n\n.singlePage\n{\npage-break-after: always;\n}\n\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n.reporttitle { \n margin-bottom: 20pt; \n font-weight: bold; \n font-size: 13pt; \n color: #9e9e9e;\n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\n }\n\nth {\n height: 30px;\n font-size: 9pt; \n color: #9e9e9e;\n}\n\ntbody td {\n padding: 10px;\n word-wrap: break-word;\n font-size: 7pt;\n}\n\n\ntbody tr:nth-child(even) {\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}\n\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\treportData.ayReportData = ayGroupByKey(reportData.ayReportData, 'CustomerViz')\n\t\n\tawait ayGetTranslations([\"PreventiveMaintenance\", \"PMList\", \"Customer\", \"PMNextServiceDate\", \"WorkOrderItemUnit\", \"WorkOrderItemUnitList\", \"WorkOrderStatus\", \"WorkOrderItemWorkOrderStatusID\", \"WorkOrderItemSummary\", \"WorkOrderSummary\" ]);\n\n\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"<span>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -0,0 +1 @@
{"Name":"Part Assemblies list","Active":true,"Notes":"","Roles":50554,"AType":65,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n <div class=\"reporttitle\">\n <p>{{ayT 'PartAssemblyList'}} list</p>\n </div>\n\n <table>\n <thead>\n </thead>\n\n <tbody>\n {{#each ayReportData}}\n <tr>\n\n </tr>\n <tr>\n <th colspan=\"6\">{{ayT 'PartAssemblyName'}}: {{Name}}</th>\n </tr>\n <tr>\n <th colspan=\"6\">&nbsp;</th>\n </tr>\n <tr>\n <td colspan=\"1\">&nbsp;</td>\n <th colspan=\"1\">{{ayT 'WorkOrderItemPartQuantity'}}</th>\n <th colspan=\"4\">{{ayT 'PartList'}}</th>\n </tr>\n {{#each Items}}\n <tr>\n <td colspan=\"1\">&nbsp;</td>\n <td colspan=\"1\">{{Quantity}}</td>\n <td colspan=\"4\">{{PartNameViz}}</td>\n </tr>\n {{/each}}\n\n <tr>\n <td colspan=\"1\">&nbsp;</td>\n <th colspan=\"1\">{{ayT 'Tags'}}</th>\n <td colspan=\"4\">{{Tags}}</td>\n </tr>\n <tr>\n <td colspan=\"1\">&nbsp;</td>\n <th colspan=\"1\">{{ayT 'PartAssemblyNotes'}}</th>\n <td colspan=\"4\">{{Notes}}</td>\n </tr>\n <tr>\n <th colspan=\"6\">&nbsp;</th>\n </tr>\n {{/each}}\n </tbody>\n\n <tfoot>\n </tfoot>\n\n </table>\n\n\n </div>\n</body>\n\n</html>","Style":"body {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n color: #9e9e9e;\r\n text-align: center;\r\n} \r\n\r\ntable { \r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%;\r\n table-layout: fixed;\r\n }\r\n\r\nth {\r\n height: 20px;\r\n font-size: 11pt; \r\n color: #9e9e9e;\r\n text-align: left;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 9pt;\r\n}\r\n\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}","JsPrerender":"async function ayPrepareData(ayData){ \n\n await ayGetTranslations([\"PartAssemblyName\", \"PartAssemblyList\", \"Tags\", \"PartAssemblyNotes\", \"PartList\", \"WorkOrderItemPartQuantity\" ]);\n\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"<span>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -0,0 +1 @@
{"Name":"Projects list","Active":true,"Notes":"","Roles":50538,"AType":25,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n <div class=\"reporttitle\">\n <p>{{ayT 'ProjectList'}} List</p>\n </div>\n\n <table>\n <thead>\n <tr>\n <!-- to repeat column headers on every page, include in the thead -->\n <th colspan=\"6\" class=\"leftlean\">{{ayT 'Project'}}</th>\n <th colspan=\"2\">{{ayT 'ProjectDateStarted'}}</th>\n <th colspan=\"2\">{{ayT 'ProjectDateCompleted'}}</th>\n <th colspan=\"2\">{{ayT 'ProjectAccountNumber'}}</th>\n <th colspan=\"3\">{{ayT 'ProjectProjectOverseerID'}}</th>\n <th colspan=\"6\">{{ayT 'ProjectNotes'}}</th>\n </tr>\n </thead>\n\n <tbody>\n {{#each ayReportData}}\n <tr>\n <td colspan=\"6\">{{Name}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{ayDate DateStarted}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{ayDate DateCompleted}}</td>\n <td colspan=\"2\">{{AccountNumber}}</td>\n <td colspan=\"3\">{{ProjectOverseerViz}}</td>\n <td colspan=\"6\">{{Notes}}</td>\n </tr>\n {{/each}}\n </tbody>\n\n <tfoot>\n </tfoot>\n\n </table>\n\n\n </div>\n</body>\n\n</html>","Style":"body {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n color: #9e9e9e;\r\n} \r\n\r\ntable { \r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%;\r\n table-layout: fixed;\r\n }\r\n\r\nth {\r\n border-bottom: solid 1pt #9e9e9e;\r\n height: 50px;\r\n font-size: 11pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 9pt;\r\n}\r\n\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}\r\n\r\n","JsPrerender":" \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"ProjectList\", \"Project\", \"ProjectProjectOverseerID\", \"ProjectDateStarted\", \"ProjectDateCompleted\", \"ProjectAccountNumber\", \"ProjectNotes\" ]);\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers","RenderType":0,"HeaderTemplate":"<span>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -0,0 +1 @@
{"Name":"Quote Item Tasks","Active":true,"Notes":"","Roles":50538,"AType":46,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n <div class=\"reporttitle\">\n <p>{{ayT 'Quote'}} {{ayT 'WorkOrderItemList'}} {{ayT 'WorkOrderItemTasks'}} List</p>\n </div>\n\n <table>\n \n <thead>\n <tr>\n <th colspan=\"1\">{{ayT 'Quote'}}</th>\n <th colspan=\"2\">{{ayT 'QuoteQuoteRequestDate'}}</th>\n <th colspan=\"4\">{{ayT 'WorkOrderItemSummary'}}</th> \n\n\n\t\t\t\t\t<th colspan=\"2\" class=\"centerlean\" >{{ayT 'WorkOrderItemTaskWorkOrderItemTaskCompletionType'}}</th> \n\t\t\t\t\t<th colspan=\"6\">{{ayT 'WorkOrderItemTasks'}}</th>\n </tr>\n </thead>\n\n <tbody>\n {{#each ayReportData}}\n {{#each Items}}\n {{#each Tasks}}\n <tr>\n <td colspan=\"1\">{{../../Serial}}</td>\n <td colspan=\"2\">{{ayDateTime ../../Requested}}</td>\n <td colspan=\"4\">{{../Notes}}</td>\n\n\t\t\t\t\t<!-- note that this if_eq is from a custom Helper --><!-- IF status equals Completed (value is 2) then displays with a checkmark -->\n\t\t\t\t\t{{#if_eq Status 2}}<td colspan=\"2\" class=\"centerlean\">{{StatusViz}} <input type=\"checkbox\" id=\"manual1\" checked><label for=\"manual1\"> </label></td>\n\t\t\t\t\t{{else}}<td colspan=\"2\" class=\"centerlean\">{{StatusViz}} <input type=\"checkbox\" id=\"manual1\" ><label for=\"manual1\"> </label></td>{{/if_eq}}\n\t\t\t\t\t<td colspan=\"6\">{{Task}}</td>\n \n </tr>\n {{/each}}\n {{/each}}\n {{/each}}\n </tbody>\n\n <tfoot>\n </tfoot>\n\n </table>\n\n\n </div>\n</body>\n\n</html>","Style":"body {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n color: #9e9e9e;\r\n} \r\n\r\ntable { \r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%;\r\n table-layout: fixed;\r\n }\r\n\r\nth {\r\n height: 20px;\r\n font-size: 10pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 8pt;\r\n}\r\n\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}\r\n\r\n","JsPrerender":" \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"WorkOrderItemTasks\", \"Quote\", \"WorkOrderItemList\", \"QuoteQuoteRequestDate\", \"WorkOrderItemSummary\", \"WorkOrderItemTaskWorkOrderItemTask\", \"WorkOrderItemTaskWorkOrderItemTaskCompletionType\" ]);\n\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers\r\n\r\n//custom helper so can do a direct comparison - i.e. if value equals xxxx, then show, else show yyyyy\r\n//note that this HAS to be added here in Helpers, is NOT built in\r\nHandlebars.registerHelper('if_eq', function(a, b, opts) {\r\n if(a == b) // Or === depending on your needs\r\n return opts.fn(this);\r\n else\r\n return opts.inverse(this);\r\n});","RenderType":0,"HeaderTemplate":"<span>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":0,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -0,0 +1 @@
{"Name":"Quote Scheduled Users","Active":true,"Notes":"","Roles":50538,"AType":45,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n <div class=\"reporttitle\">\n <p>{{ayT 'Quote'}} {{ayT 'WorkOrderItemScheduledUserList'}} List</p>\n </div>\n\n <table>\n \n <thead>\n <tr>\n <th colspan=\"1\">{{ayT 'Quote'}}</th>\n <th colspan=\"2\">{{ayT 'Customer'}}</th>\n <th colspan=\"2\">{{ayT 'WorkOrderItemWorkOrderStatusID'}}</th>\n <th colspan=\"4\">{{ayT 'WorkOrderItemSummary'}}</th> \n <th colspan=\"2\">{{ayT 'WorkOrderItemScheduledUsers'}}</th> \n <th colspan=\"2\">{{ayT 'WorkOrderItemScheduledUserStartDate'}}</th>\n <th colspan=\"1\">{{ayT 'WorkOrderItemScheduledUserEstimatedQuantity'}}</th>\n </tr>\n </thead>\n\n <tbody>\n {{#each ayReportData}}\n {{#each Items}}\n {{#each ScheduledUsers}}\n <tr>\n <td colspan=\"1\">{{../../Serial}}</td>\n <td colspan=\"2\">{{../../CustomerViz}}</td>\n <td colspan=\"2\">{{../WorkOrderItemStatusNameViz}}</td>\n <td colspan=\"4\">{{../Notes}}</td>\n <td colspan=\"2\">{{UserViz}}</td>\n <td colspan=\"2\">{{ayDateTime StartDate}}</td>\n <td colspan=\"1\">{{EstimatedQuantity}}</td>\n \n </tr>\n {{/each}}\n {{/each}}\n {{/each}}\n </tbody>\n\n <tfoot>\n </tfoot>\n\n </table>\n\n\n </div>\n</body>\n\n</html>","Style":"body {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n color: #9e9e9e;\r\n} \r\n\r\ntable { \r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%;\r\n table-layout: fixed;\r\n }\r\n\r\nth {\r\n height: 20px;\r\n font-size: 10pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 8pt;\r\n}\r\n\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}\r\n\r\n","JsPrerender":" \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"Quote\", \"WorkOrderItemScheduledUsers\", \"WorkOrderItemScheduledUserList\", \"WorkOrder\", \"Customer\", \"WorkOrderItemWorkOrderStatusID\", \"WorkOrderItemSummary\", \"WorkOrderItemScheduledUserStartDate\", \"WorkOrderItemScheduledUserEstimatedQuantity\" ]);\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers\r\n","RenderType":0,"HeaderTemplate":"<span>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":0,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -0,0 +1 @@
{"Name":"Quote Units grouped by Customer","Active":true,"Notes":"","Roles":50538,"AType":77,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n <div class=\"reporttitle\">\n\t\t\t<p>{{ayT 'WorkOrderItemUnitList'}} grouped by {{ayT 'Customer'}}</p>\n\t\t</div>\n <table>\n <thead>\n <tr>\n <th colspan=\"2\" class=\"leftlean\" >{{ayT 'Customer'}}</th>\n <th colspan=\"1\">{{ayT 'Quote'}}</th>\n <th colspan=\"1\">{{ayT 'QuoteQuoteRequestDate'}}</th>\n <th colspan=\"2\">{{ayT 'WorkOrderItemUnit'}}</th>\n <th colspan=\"1\">{{ayT 'WorkOrderItemWorkOrderStatusID'}}</th>\n <th colspan=\"3\">{{ayT 'WorkOrderItemSummary'}}</th>\n </tr>\n </thead>\n <tbody>\n {{#each ayReportData}}\n <tr>\n <td colspan=\"10\">{{group}}</td>\n </tr>\n {{#each items}}\n {{#each Items}}\n {{#each Units}}\n <tr> \n <td colspan=\"2\">&nbsp;</td>\n <td colspan=\"1\" class=\"centerlean\">{{../../Serial}}</td> <!--note the two ../ to go up levels to get this data -->\n <td colspan=\"1\" class=\"centerlean\">{{ayDate ../../Requested}}</td><!--note the two ../ to go up levels to get this data -->\n <td colspan=\"2\" >{{UnitViz}} - {{UnitModelNameViz}}</td>\n <td colspan=\"1\" >{{../WorkOrderItemStatusNameViz}}</td><!--note the ../ to go up level to get this data -->\n <td colspan=\"3\" >{{../Notes}}</td><!--note the ../ to go up level to get this data --> \n </tr>\n {{/each}}\n {{/each}}\n {{/each}}\n <tr>\n <td colspan=\"10\">&nbsp;</td>\n </tr>\n\n <tr>\n <td colspan=\"10\">&nbsp;</td>\n </tr>\n {{/each}}\n </tbody>\n </table> \n </div>\n\n <!-- uncomment to see the raw data returned from the custom Prepare \n<div>\n <p>{{ayJSON ayReportData}} </p>\n</div> \n-->\n\n</body>\n</html>","Style":".minimum {\n font-size: 6pt;\n}\n\ntfoot {\n border-top: 2px solid #9e9e9e;\n font-size: 7pt;\n text-align: center;\n}\n\n.singlePage\n{\npage-break-after: always;\n}\n\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n.reporttitle { \n margin-bottom: 20pt; \n font-weight: bold; \n font-size: 13pt; \n color: #9e9e9e;\n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\n }\n\nth {\n height: 30px;\n font-size: 9pt; \n color: #9e9e9e;\n}\n\ntbody td {\n padding: 10px;\n word-wrap: break-word;\n font-size: 7pt;\n}\n\n\ntbody tr:nth-child(even) {\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}\n\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\treportData.ayReportData = ayGroupByKey(reportData.ayReportData, 'CustomerViz')\n\t\n\tawait ayGetTranslations([\"Quote\", \"Customer\", \"QuoteQuoteRequestDate\", \"WorkOrderItemUnit\", \"WorkOrderItemUnitList\", \"WorkOrderItemWorkOrderStatusID\", \"WorkOrderItemSummary\", \"WorkOrderSummary\" ]);\n\n\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"<span>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -0,0 +1 @@
{"Name":"Reminders","Active":true,"Notes":"","Roles":50538,"AType":52,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n <div class=\"reporttitle\">\n <p>{{ayT 'ReminderList'}} List</p>\n </div>\n\n <table>\n \n <thead>\n <tr>\n <th colspan=\"3\">{{ayT 'ReminderName'}}</th>\n <th colspan=\"2\">{{ayT 'ReminderStartDate'}}</th>\n <th colspan=\"2\">{{ayT 'ReminderStopDate'}}</th> \n <th colspan=\"2\">{{ayT 'Tags'}}</th>\n <th colspan=\"3\">{{ayT 'ReminderNotes'}}</th>\n </tr>\n </thead>\n\n <tbody>\n {{#each ayReportData}}\n <tr>\n <td colspan=\"3\">{{Name}}</td>\n <td colspan=\"2\">{{ayDateTime StartDate}}</td>\n <td colspan=\"2\">{{ayDateTime StopDate}}</td>\n <td colspan=\"2\">{{Tags}}</td>\n <td colspan=\"3\">{{Notes}}</td>\n </tr>\n {{/each}}\n </tbody>\n\n <tfoot>\n </tfoot>\n\n </table>\n\n\n </div>\n</body>\n\n</html>","Style":"body {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n color: #9e9e9e;\r\n} \r\n\r\ntable { \r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%;\r\n table-layout: fixed;\r\n }\r\n\r\nth {\r\n height: 20px;\r\n font-size: 10pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 8pt;\r\n}\r\n\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}\r\n\r\n","JsPrerender":" \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"Reminder\", \"ReminderName\", \"ReminderList\", \"Tags\", \"Reminder\", \"ReminderStartDate\", \"ReminderStopDate\", \"ReminderRecurrence\", \"ReminderNotes\", \"ReminderSourceType\", \"ReminderSourceID\", \"ReminderColor\" ]);\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers","RenderType":0,"HeaderTemplate":"<span>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":0,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -0,0 +1 @@
{"Name":"Reviews grouped by user","Active":true,"Notes":"","Roles":50538,"AType":61,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n <table>\n {{#each ayReportData}}\n <thead> \n </thead>\n\n <tbody>\n <tr>\n <th colspan=\"16\" class=\"leftlean reporttitle\">{{count}} {{ayT 'ReviewList'}} {{ayT 'ReviewUserId'}} {{group}}</th>\n </tr>\n <tr>\n <th colspan=\"16\">&nbsp;</th>\n </tr>\n\n {{#each items}}\n <tr>\n <th colspan=\"1\">&nbsp;</th>\n <th colspan=\"3\">{{ayT 'ReviewDate'}}:</th>\n <td colspan=\"4\">{{ReviewDate}}</td>\n <th colspan=\"3\">{{ayT 'ReviewAssignedByUserId'}}:</th>\n <td colspan=\"5\">{{AssignedByUserViz}}</td>\n </tr>\n <tr>\n <th colspan=\"1\">&nbsp;</th>\n <th colspan=\"3\">{{ayT 'ReviewName'}}:</th>\n <td colspan=\"12\">{{Name}}</td>\n </tr>\n <tr>\n <th colspan=\"1\">&nbsp;</th>\n <th colspan=\"3\">{{ayT 'ReviewNotes'}}:</th>\n <td colspan=\"12\">{{Notes}}</td>\n </tr>\n <tr>\n <th colspan=\"1\">&nbsp;</th>\n <th colspan=\"3\">{{ayT 'ReviewCompletedDate'}}:</th>\n <td colspan=\"12\">{{ayDateTime CompletedDate}}</td>\n </tr>\n <tr>\n <th colspan=\"1\">&nbsp;</th>\n <th colspan=\"3\">{{ayT 'ReviewCompletionNotes'}}:</th>\n <td colspan=\"12\">{{CompletionNotes}}</td>\n </tr>\n <tr>\n <th colspan=\"1\">&nbsp;</th>\n <th colspan=\"3\">{{ayT 'Tags'}}:</th>\n <td colspan=\"12\">{{Tags}}</td>\n </tr>\n <tr>\n <th colspan=\"1\">&nbsp;</th>\n <th colspan=\"3\">Wiki:</th>\n <td colspan=\"12\">{{ayWiki Wiki}}</td>\n </tr>\n <tr>\n <th colspan=\"16\">&nbsp;</th>\n </tr>\n <tr>\n <th colspan=\"16\">&nbsp;</th>\n </tr>\n {{/each}}\n\n </tbody>\n\n <tfoot>\n </tfoot>\n {{/each}}\n </table>\n\n <!-- <p> uncomment to see the raw data returned from the custom Prepare </p>\n <div>\n <p>{{ayJSON ayReportData}} </p>\n</div> -->\n\n\n </div>\n</body>\n\n</html>","Style":"body {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n color: #9e9e9e;\r\n} \r\n\r\ntable { \r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%;\r\n table-layout: fixed;\r\n }\r\n\r\nth {\r\n height: 20px;\r\n font-size: 10pt; \r\n color: #9e9e9e;\r\n text-align: right;\r\n\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 8pt;\r\n}\r\n\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}\r\n\r\n","JsPrerender":" \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"ReviewList\", \"User\", \"ReviewUserId\", \"ReviewName\",\"ReviewDate\", \"ReviewNotes\", \"Tags\", \"ReviewAssignedByUserId\", \"ReviewCompletedDate\", \"ReviewCompletionNotes\" ]);\n\n ayData.ayReportData = ayGroupByKey(ayData.ayReportData, 'UserViz')\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers","RenderType":0,"HeaderTemplate":"<span>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":0,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -0,0 +1 @@
{"Name":"Service Rates list","Active":true,"Notes":"","Roles":50554,"AType":62,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n <div class=\"reporttitle\">\n <p>{{ayT 'ServiceRateList'}} list</p>\n </div>\n\n <table>\n <thead>\n <tr>\n <!-- to repeat column headers on every page, include in the thead -->\n <th colspan=\"3\">{{ayT 'ServiceRate'}}</th>\n <th colspan=\"3\">{{ayT 'Tags'}}</th>\n <th colspan=\"2\">{{ayT 'RateAccountNumber'}}</th>\n <th colspan=\"2\">{{ayT 'Cost'}}</th>\n <th colspan=\"2\">{{ayT 'RateCharge'}}</th>\n <th colspan=\"2\">{{ayT 'RateUnitChargeDescriptionID'}}</th>\n <th colspan=\"2\">{{ayT 'ContractRate'}}</th>\n </tr>\n </thead>\n\n <tbody>\n {{#each ayReportData}}\n <tr>\n <td colspan=\"3\">{{Name}}</td>\n <td colspan=\"3\">{{Tags}}</td>\n <td colspan=\"2\">{{AccountNumber}}</td>\n <td colspan=\"2\">{{ayCurrency Cost}}</td>\n <td colspan=\"2\">{{ayCurrency Charge}}</td>\n <td colspan=\"2\">{{Unit}}</td>\n <!-- note that this if checks to see if ContractOnly is true - if true, shows checkmark, else shows not checked -->\n\t\t {{#if ContractOnly }}<td colspan=\"2\" class=\"centerlean\"><input type=\"checkbox\" id=\"manual1\" checked><label for=\"manual1\"> </label></td>{{else}}<td colspan=\"2\" class=\"centerlean\"><input type=\"checkbox\" id=\"manual1\" ><label for=\"manual1\"> </label></td>{{/if}}\n\t\t <!-- note that this if checks to see if ContractOnly is true - if true, shows checkmark, else shows not checked -->\n\n </tr>\n {{/each}}\n </tbody>\n\n <tfoot>\n </tfoot>\n\n </table>\n\n\n </div>\n</body>\n\n</html>","Style":"body {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n color: #9e9e9e;\r\n} \r\n\r\ntable { \r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%;\r\n table-layout: fixed;\r\n }\r\n\r\nth {\r\n border-bottom: solid 1pt #9e9e9e;\r\n height: 50px;\r\n font-size: 11pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 9pt;\r\n text-align: center;\r\n}\r\n\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}","JsPrerender":"async function ayPrepareData(ayData){ \n\n await ayGetTranslations([\"ServiceRateList\", \"ServiceRate\", \"Tags\", \"RateAccountNumber\", \"Cost\", \"RateCharge\", \"RateUnitChargeDescriptionID\", \"ContractRate\" ]);\n\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"<span>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -0,0 +1 @@
{"Name":"Tax Codes List","Active":true,"Notes":"","Roles":124927,"AType":64,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n <div class=\"reporttitle\">\n <p>{{ayT 'TaxCodeList'}} List</p>\n </div>\n\n <table>\n <thead>\n <tr>\n <!-- to repeat column headers on every page, include in the thead -->\n <th colspan=\"6\" class=\"leftlean\" >{{ayT 'TaxCodeName'}}</th>\n <th colspan=\"6\">{{ayT 'Tags'}}</th>\n <th colspan=\"2\">{{ayT 'TaxCodeTaxA'}}</th>\n <th colspan=\"2\">{{ayT 'TaxCodeTaxB'}}</th>\n <th colspan=\"2\">{{ayT 'TaxCodeTaxOnTax'}}</th>\n <th colspan=\"6\">{{ayT 'TaxCodeNotes'}}</th>\n </tr>\n </thead>\n\n <tbody>\n {{#each ayReportData}}\n <tr>\n <td colspan=\"6\">{{Name}}</td>\n <td colspan=\"6\">{{Tags}}</td>\n <td colspan=\"2\">{{TaxAPct}} &#37;</td>\n <td colspan=\"2\">{{TaxBPct}} &#37;</td>\n <!-- note that this if checks to see if TaxOnTax is true - if true, shows checkmark, else shows not checked -->\n\t\t {{#if TaxOnTax }}<td colspan=\"2\" class=\"centerlean\"><input type=\"checkbox\" id=\"manual1\" checked><label for=\"manual1\"> </label></td>{{else}}<td colspan=\"2\" class=\"centerlean\"><input type=\"checkbox\" id=\"manual1\" ><label for=\"manual1\"> </label></td>{{/if}}\n\t\t <!-- note that this if checks to see if TaxOnTax is true - if true, shows checkmark, else shows not checked -->\n <td colspan=\"6\">{{Notes}}</td>\n </tr>\n {{/each}}\n </tbody>\n\n <tfoot>\n </tfoot>\n\n </table>\n\n\n </div>\n</body>\n\n</html>","Style":"body {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n color: #9e9e9e;\r\n} \r\n\r\ntable { \r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%;\r\n table-layout: fixed; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\r\n }\r\n\r\nth {\r\n border-bottom: solid 1pt #9e9e9e;\r\n height: 50px;\r\n font-size: 11pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 9pt;\r\n}\r\n\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}\r\n\r\n","JsPrerender":" \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"TaxCodeList\", \"TaxCodeName\", \"Tags\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"TaxCodeTaxOnTax\", \"TaxCodeNotes\" ]);\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers","RenderType":0,"HeaderTemplate":"<span>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -0,0 +1 @@
{"Name":"Travel Rates list","Active":true,"Notes":"","Roles":50554,"AType":63,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n <div class=\"reporttitle\">\n <p>{{ayT 'TravelRateList'}} list</p>\n </div>\n\n <table>\n <thead>\n <tr>\n <!-- to repeat column headers on every page, include in the thead -->\n <th colspan=\"3\">{{ayT 'TravelRate'}}</th>\n <th colspan=\"3\">{{ayT 'Tags'}}</th>\n <th colspan=\"2\">{{ayT 'RateAccountNumber'}}</th>\n <th colspan=\"2\">{{ayT 'Cost'}}</th>\n <th colspan=\"2\">{{ayT 'RateCharge'}}</th>\n <th colspan=\"2\">{{ayT 'RateUnitChargeDescriptionID'}}</th>\n <th colspan=\"2\">{{ayT 'ContractRate'}}</th>\n </tr>\n </thead>\n\n <tbody>\n {{#each ayReportData}}\n <tr>\n <td colspan=\"3\">{{Name}}</td>\n <td colspan=\"3\">{{Tags}}</td>\n <td colspan=\"2\">{{AccountNumber}}</td>\n <td colspan=\"2\">{{ayCurrency Cost}}</td>\n <td colspan=\"2\">{{ayCurrency Charge}}</td>\n <td colspan=\"2\">{{Unit}}</td>\n <!-- note that this if checks to see if ContractOnly is true - if true, shows checkmark, else shows not checked -->\n\t\t {{#if ContractOnly }}<td colspan=\"2\" class=\"centerlean\"><input type=\"checkbox\" id=\"manual1\" checked><label for=\"manual1\"> </label></td>{{else}}<td colspan=\"2\" class=\"centerlean\"><input type=\"checkbox\" id=\"manual1\" ><label for=\"manual1\"> </label></td>{{/if}}\n\t\t <!-- note that this if checks to see if ContractOnly is true - if true, shows checkmark, else shows not checked -->\n\n </tr>\n {{/each}}\n </tbody>\n\n <tfoot>\n </tfoot>\n\n </table>\n\n\n </div>\n</body>\n\n</html>","Style":"body {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n color: #9e9e9e;\r\n} \r\n\r\ntable { \r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%;\r\n table-layout: fixed;\r\n }\r\n\r\nth {\r\n border-bottom: solid 1pt #9e9e9e;\r\n height: 50px;\r\n font-size: 11pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 9pt;\r\n text-align: center;\r\n}\r\n\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}","JsPrerender":"async function ayPrepareData(ayData){ \n\n await ayGetTranslations([\"TravelRateList\", \"TravelRate\", \"Tags\", \"RateAccountNumber\", \"Cost\", \"RateCharge\", \"RateUnitChargeDescriptionID\", \"ContractRate\" ]);\n\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"<span>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -0,0 +1 @@
{"Name":"Users Grouped By User Type","Active":true,"Notes":"","Roles":124927,"AType":3,"IncludeWoItemDescendants":false,"Template":"<html>\n<body>\t\n\t<h2>{{ayT 'UserList'}} grouped by {{ayT 'UserType'}}</h2>\n\t<table>\n\t<thead>\n\t\t<tr>\n\t\t\t<th colspan=\"3\">&nbsp;</th>\n <th colspan=\"3\">{{ayT 'Name'}}</th>\n <th colspan=\"2\">{{ayT 'UserEmployeeNumber'}}</th>\n <th colspan=\"3\">{{ayT 'UserTypeService'}}</th>\n <th colspan=\"4\">{{ayT 'UserEmailAddress'}}</th>\n <th colspan=\"3\">{{ayT 'UserPhone1'}}</th>\n <th colspan=\"3\">{{ayT 'UserVendorID'}}</th>\n\t\t</tr>\n\t</thead>\n\n\t\n\t<tbody>\n {{#each ayReportData}}\n <tr>\n <td colspan=\"21\" class=\"leftlean\">{{count}} {{ayT 'UserList'}} assigned to {{ayT 'UserType'}} {{group}}</td> \n </tr>\n {{#each items}}\n <tr>\n <td colspan=\"3\">&nbsp;</td>\n <td colspan=\"3\">{{Name}}</td>\n <td colspan=\"2\">{{EmployeeNumber}}</td>\n {{#if IsTech}}<td colspan=\"3\"><input type=\"checkbox\" id=\"manual1\" checked><label for=\"manual1\"> </label></td>\n\t\t\t\t\t{{else}}<td colspan=\"3\"><input type=\"checkbox\" id=\"manual1\" ><label for=\"manual1\"> </label></td>{{/if}} \n <td colspan=\"4\">{{UserOptions.EmailAddress}}</td>\n <td colspan=\"3\">{{UserOptions.Phone1}}</td>\n <td colspan=\"3\">{{VendorViz}}</td>\n </tr>\t\n {{/each}}\n <tr>\n <td colspan=\"21\">&nbsp;</td>\n </tr>\n {{/each}}\n\t</tbody>\n\t\n <tfoot>\n </tfoot>\n\t</table>\n</body>\n</html>","Style":"h2 {\r\n color: #9e9e9e;\r\n}\r\n\r\ntfoot {\r\n border-top: 2px solid #9e9e9e;\r\n font-size: 7pt;\r\n text-align: center;\r\n}\r\n\r\n.singlePage\r\n{\r\npage-break-after: always;\r\n}\r\n\r\nbody {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n color: #9e9e9e;\r\n} \r\n\r\ntable { \r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%;\r\n table-layout: fixed; \r\n }\r\n\r\nth {\r\n height: 30px;\r\n font-size: 9pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 7pt;\r\n text-align: center;\r\n}\r\n\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}\r\n\r\n","JsPrerender":"async function ayPrepareData(ayData){ \n\n await ayGetTranslations([ \"UserList\", \"Name\", \"UserType\", \"UserEmployeeNumber\", \"UserPhone1\", \"UserEmailAddress\", \"UserTypeService\", \"UserVendorID\" ]);\n\n ayData.ayReportData = ayGroupByKey(ayData.ayReportData, 'UserTypeViz')\n\n\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"<span>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"15mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -0,0 +1 @@
{"Name":"Warehouses list","Active":true,"Notes":"","Roles":50554,"AType":66,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n <div class=\"reporttitle\">\n <p>{{ayT 'PartWarehouseList'}} list</p>\n </div>\n\n <table>\n <thead>\n <tr>\n <!-- to repeat column headers on every page, include in the thead -->\n <th colspan=\"2\">{{ayT 'PartWarehouse'}}</th>\n <th colspan=\"2\">{{ayT 'Tags'}}</th>\n <th colspan=\"4\">{{ayT 'PartWarehouseNotes'}}</th>\n </tr>\n </thead>\n\n <tbody>\n {{#each ayReportData}}\n <tr>\n <td colspan=\"2\">{{Name}}</td>\n <td colspan=\"2\">{{Tags}}</td>\n <td colspan=\"4\">{{Notes}}</td>\n </tr>\n {{/each}}\n </tbody>\n\n <tfoot>\n </tfoot>\n\n </table>\n\n\n </div>\n</body>\n\n</html>","Style":"body {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n color: #9e9e9e;\r\n} \r\n\r\ntable { \r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%;\r\n table-layout: fixed;\r\n }\r\n\r\nth {\r\n border-bottom: solid 1pt #9e9e9e;\r\n height: 50px;\r\n font-size: 11pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 9pt;\r\n text-align: center;\r\n}\r\n\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}","JsPrerender":"async function ayPrepareData(ayData){ \n\n await ayGetTranslations([\"PartWarehouseList\", \"PartWarehouse\", \"Tags\", \"PartWarehouseNotes\" ]);\n\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"<span>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -0,0 +1 @@
{"Name":"Work Order Item Tasks","Active":true,"Notes":"","Roles":50538,"AType":42,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n <div class=\"reporttitle\">\n <p>{{ayT 'WorkOrder'}} {{ayT 'WorkOrderItemList'}} {{ayT 'WorkOrderItemTasks'}} List</p>\n </div>\n\n <table>\n \n <thead>\n <tr>\n <th colspan=\"1\">{{ayT 'WorkOrder'}}</th>\n <th colspan=\"2\">{{ayT 'WorkOrderServiceDate'}}</th>\n <th colspan=\"4\">{{ayT 'WorkOrderItemSummary'}}</th> \n\n\n\t\t\t\t\t<th colspan=\"2\" class=\"centerlean\" >{{ayT 'WorkOrderItemTaskWorkOrderItemTaskCompletionType'}}</th> \n\t\t\t\t\t<th colspan=\"6\">{{ayT 'WorkOrderItemTasks'}}</th>\n </tr>\n </thead>\n\n <tbody>\n {{#each ayReportData}}\n {{#each Items}}\n {{#each Tasks}}\n <tr>\n <td colspan=\"1\">{{../../Serial}}</td>\n <td colspan=\"2\">{{ayDateTime ../../ServiceDate}}</td>\n <td colspan=\"4\">{{../Notes}}</td>\n\n\t\t\t\t\t<!-- note that this if_eq is from a custom Helper --><!-- IF status equals Completed (value is 2) then displays with a checkmark -->\n\t\t\t\t\t{{#if_eq Status 2}}<td colspan=\"2\" class=\"centerlean\">{{StatusViz}} <input type=\"checkbox\" id=\"manual1\" checked><label for=\"manual1\"> </label></td>\n\t\t\t\t\t{{else}}<td colspan=\"2\" class=\"centerlean\">{{StatusViz}} <input type=\"checkbox\" id=\"manual1\" ><label for=\"manual1\"> </label></td>{{/if_eq}}\n\t\t\t\t\t<td colspan=\"6\">{{Task}}</td>\n \n </tr>\n {{/each}}\n {{/each}}\n {{/each}}\n </tbody>\n\n <tfoot>\n </tfoot>\n\n </table>\n\n\n </div>\n</body>\n\n</html>","Style":"body {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n color: #9e9e9e;\r\n} \r\n\r\ntable { \r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%;\r\n table-layout: fixed;\r\n }\r\n\r\nth {\r\n height: 20px;\r\n font-size: 10pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 8pt;\r\n}\r\n\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}\r\n\r\n","JsPrerender":" \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"WorkOrderItemTasks\", \"WorkOrder\", \"WorkOrderItemList\", \"WorkOrderServiceDate\", \"WorkOrderItemSummary\", \"WorkOrderItemTaskWorkOrderItemTask\", \"WorkOrderItemTaskWorkOrderItemTaskCompletionType\" ]);\n\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers\r\n\r\n//custom helper so can do a direct comparison - i.e. if value equals xxxx, then show, else show yyyyy\r\n//note that this HAS to be added here in Helpers, is NOT built in\r\nHandlebars.registerHelper('if_eq', function(a, b, opts) {\r\n if(a == b) // Or === depending on your needs\r\n return opts.fn(this);\r\n else\r\n return opts.inverse(this);\r\n});","RenderType":0,"HeaderTemplate":"<span>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":0,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -0,0 +1 @@
{"Name":"Work Order Scheduled Users","Active":true,"Notes":"","Roles":50538,"AType":41,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n <div class=\"reporttitle\">\n <p>{{ayT 'WorkOrderItemScheduledUserList'}} List</p>\n </div>\n\n <table>\n \n <thead>\n <tr>\n <th colspan=\"1\">{{ayT 'WorkOrder'}}</th>\n <th colspan=\"2\">{{ayT 'Customer'}}</th>\n <th colspan=\"2\">{{ayT 'WorkOrderItemWorkOrderStatusID'}}</th>\n <th colspan=\"4\">{{ayT 'WorkOrderItemSummary'}}</th> \n <th colspan=\"2\">{{ayT 'WorkOrderItemScheduledUsers'}}</th> \n <th colspan=\"2\">{{ayT 'WorkOrderItemScheduledUserStartDate'}}</th>\n <th colspan=\"1\">{{ayT 'WorkOrderItemScheduledUserEstimatedQuantity'}}</th>\n </tr>\n </thead>\n\n <tbody>\n {{#each ayReportData}}\n {{#each Items}}\n {{#each ScheduledUsers}}\n <tr>\n <td colspan=\"1\">{{../../Serial}}</td>\n <td colspan=\"2\">{{../../CustomerViz}}</td>\n <td colspan=\"2\">{{../WorkOrderItemStatusNameViz}}</td>\n <td colspan=\"4\">{{../Notes}}</td>\n <td colspan=\"2\">{{UserViz}}</td>\n <td colspan=\"2\">{{ayDateTime StartDate}}</td>\n <td colspan=\"1\">{{EstimatedQuantity}}</td>\n \n </tr>\n {{/each}}\n {{/each}}\n {{/each}}\n </tbody>\n\n <tfoot>\n </tfoot>\n\n </table>\n\n\n </div>\n</body>\n\n</html>","Style":"body {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n color: #9e9e9e;\r\n} \r\n\r\ntable { \r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%;\r\n table-layout: fixed;\r\n }\r\n\r\nth {\r\n height: 20px;\r\n font-size: 10pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 8pt;\r\n}\r\n\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}\r\n\r\n","JsPrerender":" \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"WorkOrderItemScheduledUsers\", \"WorkOrderItemScheduledUserList\", \"WorkOrder\", \"Customer\", \"WorkOrderItemWorkOrderStatusID\", \"WorkOrderItemSummary\", \"WorkOrderItemScheduledUserStartDate\", \"WorkOrderItemScheduledUserEstimatedQuantity\" ]);\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers\r\n","RenderType":0,"HeaderTemplate":"<span>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":0,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -0,0 +1 @@
{"Name":"Workorder Units grouped by Customer","Active":true,"Notes":"","Roles":50538,"AType":44,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n <div class=\"reporttitle\">\n\t\t\t<p>{{ayT 'WorkOrder'}} {{ayT 'WorkOrderItemUnitList'}} grouped by {{ayT 'Customer'}}</p>\n\t\t</div>\n <table>\n <thead>\n <tr>\n <th colspan=\"2\" class=\"leftlean\" >{{ayT 'Customer'}}</th>\n <th colspan=\"1\">{{ayT 'WorkOrder'}}</th>\n <th colspan=\"1\">{{ayT 'WorkOrderServiceDate'}}</th>\n <th colspan=\"2\">{{ayT 'WorkOrderItemUnit'}}</th>\n <th colspan=\"1\">{{ayT 'WorkOrderItemWorkOrderStatusID'}}</th>\n <th colspan=\"3\">{{ayT 'WorkOrderItemSummary'}}</th>\n </tr>\n </thead>\n <tbody>\n {{#each ayReportData}}\n <tr>\n <td colspan=\"10\">{{group}}</td>\n </tr>\n {{#each items}}\n {{#each Items}}\n {{#each Units}}\n <tr> \n <td colspan=\"2\">&nbsp;</td>\n <td colspan=\"1\" class=\"centerlean\">{{../../Serial}}</td> <!--note the two ../ to go up levels to get this data -->\n <td colspan=\"1\" class=\"centerlean\">{{ayDate ../../ServiceDate}}</td><!--note the two ../ to go up levels to get this data -->\n <td colspan=\"2\" >{{UnitViz}} - {{UnitModelNameViz}}</td>\n <td colspan=\"1\" >{{../WorkOrderItemStatusNameViz}}</td><!--note the ../ to go up level to get this data -->\n <td colspan=\"3\" >{{../Notes}}</td><!--note the ../ to go up level to get this data --> \n </tr>\n {{/each}}\n {{/each}}\n {{/each}}\n <tr>\n <td colspan=\"10\">&nbsp;</td>\n </tr>\n\n <tr>\n <td colspan=\"10\">&nbsp;</td>\n </tr>\n {{/each}}\n </tbody>\n </table> \n </div>\n\n <!-- uncomment to see the raw data returned from the custom Prepare \n<div>\n <p>{{ayJSON ayReportData}} </p>\n</div> \n-->\n\n</body>\n</html>","Style":".minimum {\n font-size: 6pt;\n}\n\ntfoot {\n border-top: 2px solid #9e9e9e;\n font-size: 7pt;\n text-align: center;\n}\n\n.singlePage\n{\npage-break-after: always;\n}\n\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n.reporttitle { \n margin-bottom: 20pt; \n font-weight: bold; \n font-size: 13pt; \n color: #9e9e9e;\n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\n }\n\nth {\n height: 30px;\n font-size: 9pt; \n color: #9e9e9e;\n}\n\ntbody td {\n padding: 10px;\n word-wrap: break-word;\n font-size: 7pt;\n}\n\n\ntbody tr:nth-child(even) {\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}\n\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\treportData.ayReportData = ayGroupByKey(reportData.ayReportData, 'CustomerViz')\n\t\n\tawait ayGetTranslations([\"WorkOrder\", \"Customer\", \"WorkOrderServiceDate\", \"WorkOrderItemUnit\", \"WorkOrderItemUnitList\", \"WorkOrderStatus\", \"WorkOrderItemWorkOrderStatusID\", \"WorkOrderItemSummary\", \"WorkOrderSummary\" ]);\n\n\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"<span>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -0,0 +1 @@
{"Name":"z_replace carriage return with space","Active":true,"Notes":"Example custom Prepare to replace carriage return with space for a specific key of this object ","Roles":124927,"AType":8,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n\t<div>\n\t\t<div class=\"reporttitle\">\n\t\t\t<p>Custom Prepare to remove carriage returns in {{ayT 'CustomerNotes'}}</p>\n\t\t</div>\n\t\t<table>\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan=\"7\" class=\"leftlean\">{{ayT 'Customer'}}</th>\n\t\t\t\t\t<th colspan=\"1\">&nbsp;</th>\n\t\t\t\t\t<th colspan=\"7\">{{ayT 'CustomerNotes'}}</th>\n\t\t\t\t\t<th colspan=\"1\">&nbsp;</th>\n\t\t\t\t\t<th colspan=\"8\">Carriage returns removed in {{ayT 'CustomerNotes'}}</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\n\t\t\t<tbody>\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"7\">{{Name}}</td>\n\t\t\t\t\t<td colspan=\"1\">&nbsp;</td>\n\t\t\t\t\t<td colspan=\"7\">{{Notes}}</td>\n\t\t\t\t\t<td colspan=\"1\">&nbsp;</td>\n\t\t\t\t\t<td colspan=\"8\">{{NotesNoCarriage}}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"24\">&nbsp;</td>\n\t\t\t\t</tr>\n\t\t\t\t{{/each}}\n\t\t\t</tbody>\n\t\t</table>\n\n\t\t<table>\n {{#each ayReportData}}\n <tbody>\n\t\t\t \t<tr>\n\t\t\t\t\t<td colspan=\"24\">&nbsp;</td>\n\t\t\t\t</tr>\n <tr>\n <td colspan=\"24\">This is a printout of the data returned from the Custom Prepare that this report now uses, each \"group\" is an object. Compare against the data that shows in the \"Sample Data\" when editing this report template.</td>\n </tr>\n <tr>\n\t\t\t <td colspan=\"24\">{{ayJSON this}}</td>\n </tr>\n </tbody>\n {{/each}}\n </table>\n\t</div>\n</body>\n</html>","Style":"\r\n.singlePage\r\n{\r\npage-break-after: always;\r\n}\r\n\r\nbody {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n text-align: center;\r\n color: #9e9e9e;\r\n} \r\n\r\n\r\ntable { \r\n table-layout: fixed; //setting this to fixed causes columns to be evenly spaced for the entire table regardless of cell content, and then colspan then \"works\" as expected\r\n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n font-size: 8pt;\r\n width: 100%;\r\n }\r\n\r\n\r\nth {\r\n height: 30px;\r\n text-align: left;\r\n color: #9e9e9e;\r\n}\r\n\r\n\r\ntbody tr {\r\n height: 10px;\r\n word-wrap: break-word;\r\n}\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}","JsPrerender":"async function ayPrepareData(ayData){ \n\n await ayGetTranslations([ \"Customer\", \"CustomerNotes\" ]);\n\n //for each Customer, if the General Notes field is NOT null, creates a new key NotesNoCarriage and puts into it the text from Notes replacing ANY carriage returns with a space, so all text is on same line(s)\n for (EachCU of ayData.ayReportData) {\n if (EachCU.Notes != null) {\n n = EachCU.Notes;\n EachCU.NotesNoCarriage = n.replace(/[\\n\\r]+/g, ' ');\n }\n }\n\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","FooterTemplate":"<span>&nbsp; </span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"20mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"15mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}

View File

@@ -502,7 +502,7 @@ namespace AyaNova.Core
#endif
{
if (calledFromInternalJob)
log.LogTrace($"Fetching license for DBID {LicenseDbId} (called by job)");
log.LogDebug($"Fetching license for DBID {LicenseDbId} (called by job)");
else
log.LogInformation($"Fetching license for DBID {LicenseDbId}");

View File

@@ -32,7 +32,7 @@ namespace AyaNova.Util
internal static void KillExpiredRenders(ILogger log)
{
log.LogTrace("Clear potential expired render jobs check");
log.LogDebug("Clear potential expired render jobs check");
//check for expired and remove
var Instances = _baginstances.ToArray();
var dtNow = DateTime.UtcNow;
@@ -85,7 +85,7 @@ namespace AyaNova.Util
internal static void AddProcess(int processId, DateTime expires, ILogger log)
{
log.LogTrace($"AddProcess - {processId} to the collection");
log.LogDebug($"AddProcess - {processId} to the collection");
_baginstances.Add(new ReportRenderInstanceInfo(processId, expires));
log.LogInformation($"AddProcess - there are currently {_baginstances.Count} instances in the collection");