|
@@ -230,7 +230,7 @@ namespace PRSDesktop
|
|
|
|
|
|
|
|
var packetIDs = completedstages.Keys.ToArray();
|
|
var packetIDs = completedstages.Keys.ToArray();
|
|
|
|
|
|
|
|
- var totals = new Dictionary<string, double>();
|
|
|
|
|
|
|
+ var totals = new Dictionary<string, decimal>();
|
|
|
var qtytotal = 0;
|
|
var qtytotal = 0;
|
|
|
for(var i = 0; i < packetIDs.Length; ++i)
|
|
for(var i = 0; i < packetIDs.Length; ++i)
|
|
|
{
|
|
{
|
|
@@ -264,11 +264,11 @@ namespace PRSDesktop
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
var prefix = string.Format("{0}:{1}:", section.Factory.Name, NotAlphaNumeric().Replace(section.Name, ""));
|
|
var prefix = string.Format("{0}:{1}:", section.Factory.Name, NotAlphaNumeric().Replace(section.Name, ""));
|
|
|
- var estimated = stage.Time.TotalHours * firstStage.Parent.Quantity;
|
|
|
|
|
|
|
+ var estimated = stage.Time.TotalHoursDecimal() * firstStage.Parent.Quantity;
|
|
|
var histrecords = history.GetValueOrDefault((firstStage.Parent.ID, stage.Section.ID)) ?? [];
|
|
var histrecords = history.GetValueOrDefault((firstStage.Parent.ID, stage.Section.ID)) ?? [];
|
|
|
- var actual = new TimeSpan(histrecords.Sum(x => x.WorkDuration.Ticks + x.QADuration.Ticks)).TotalHours;
|
|
|
|
|
|
|
+ var actual = new TimeSpan(histrecords.Sum(x => x.WorkDuration.Ticks + x.QADuration.Ticks)).TotalHoursDecimal();
|
|
|
|
|
|
|
|
- if (actual > 0.0F)
|
|
|
|
|
|
|
+ if (actual > 0)
|
|
|
{
|
|
{
|
|
|
if (data.Columns.Contains(prefix + "Est"))
|
|
if (data.Columns.Contains(prefix + "Est"))
|
|
|
{
|
|
{
|
|
@@ -360,11 +360,11 @@ namespace PRSDesktop
|
|
|
var sectionName = section.Name;
|
|
var sectionName = section.Name;
|
|
|
var columnname = string.Format("{0}:{1}:{2}", factory, NotAlphaNumeric().Replace(sectionName, ""), subcolumn);
|
|
var columnname = string.Format("{0}:{1}:{2}", factory, NotAlphaNumeric().Replace(sectionName, ""), subcolumn);
|
|
|
columns.Add(columnname);
|
|
columns.Add(columnname);
|
|
|
- data.Columns.Add(columnname, typeof(double));
|
|
|
|
|
|
|
+ data.Columns.Add(columnname, typeof(decimal));
|
|
|
SectionDisplayNames[columnname] = sectionName;
|
|
SectionDisplayNames[columnname] = sectionName;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private static void UpdateColumn(Dictionary<string, double> totals, DataRow row, string fieldname, double value)
|
|
|
|
|
|
|
+ private static void UpdateColumn(Dictionary<string, decimal> totals, DataRow row, string fieldname, decimal value)
|
|
|
{
|
|
{
|
|
|
row[fieldname] = value;
|
|
row[fieldname] = value;
|
|
|
if (!totals.TryGetValue(fieldname, out var total))
|
|
if (!totals.TryGetValue(fieldname, out var total))
|