-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathCustomJavascriptVariable.cs
More file actions
29 lines (26 loc) · 1.33 KB
/
CustomJavascriptVariable.cs
File metadata and controls
29 lines (26 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System.Collections.Generic;
using System.Threading.Tasks;
using Frapid.Dashboard;
using MixERP.Finance.Cache;
namespace MixERP.Finance
{
public sealed class CustomJavascriptVariable : ICustomJavascriptVariable
{
public async Task<Dictionary<string, string>> GetAsync(string tenant, int officeId)
{
var dictionary = new Dictionary<string, string>();
var model = await Dates.GetFrequencyDatesAsync(tenant, officeId).ConfigureAwait(false);
dictionary.Add("OfficeId", model.OfficeId.ToString());
dictionary.Add("Today", model.Today.ToString("O"));
dictionary.Add("MonthStartDate", model.MonthStartDate.ToString("O"));
dictionary.Add("MonthEndDate", model.MonthEndDate.ToString("O"));
dictionary.Add("QuarterStartDate", model.QuarterStartDate.ToString("O"));
dictionary.Add("QuarterEndDate", model.QuarterEndDate.ToString("O"));
dictionary.Add("FiscalHalfStartDate", model.FiscalHalfStartDate.ToString("O"));
dictionary.Add("FiscalHalfEndDate", model.FiscalHalfEndDate.ToString("O"));
dictionary.Add("FiscalYearStartDate", model.FiscalYearStartDate.ToString("O"));
dictionary.Add("FiscalYearEndDate", model.FiscalYearEndDate.ToString("O"));
return dictionary;
}
}
}