|
|
@@ -7,9 +7,12 @@ using PRSDimensionUtils;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Collections.ObjectModel;
|
|
|
+using System.ComponentModel;
|
|
|
using System.Linq;
|
|
|
+using System.Runtime.CompilerServices;
|
|
|
using System.Windows;
|
|
|
using System.Windows.Controls;
|
|
|
+using System.Windows.Data;
|
|
|
|
|
|
namespace PRSDesktop;
|
|
|
|
|
|
@@ -17,8 +20,10 @@ public delegate void HoldingsReviewRefresh();
|
|
|
/// <summary>
|
|
|
/// Interaction logic for JobRequisitionHoldingsReview.xaml
|
|
|
/// </summary>
|
|
|
-public partial class ReservationManagementHoldingsGrid
|
|
|
+public partial class ReservationManagementHoldingsGrid : INotifyPropertyChanged
|
|
|
{
|
|
|
+ public static readonly IValueConverter QuantityConverter = new FuncConverter<double, string>(x => x != 0 && Math.Abs(x) < 1 ? "<1" : x.ToString("N0"));
|
|
|
+
|
|
|
private ProductStyleLink companyDefaultStyle = new ProductStyleLink();
|
|
|
public ProductStyleLink CompanyDefaultStyle
|
|
|
{
|
|
|
@@ -115,9 +120,9 @@ public partial class ReservationManagementHoldingsGrid
|
|
|
model.StockOfOtherStyles.AddRange(styleItems);
|
|
|
}
|
|
|
}
|
|
|
- model.UnitsOfCurrentStyle = Math.Round(model.StockOfCurrentStyle.Sum(units));
|
|
|
- model.UnitsOfNoStyle = Math.Round(model.StockOfNoStyle.Sum(units));
|
|
|
- model.UnitsOfOtherStyles = Math.Round(model.StockOfOtherStyles.Sum(units));
|
|
|
+ model.UnitsOfCurrentStyle = model.StockOfCurrentStyle.Sum(units);
|
|
|
+ model.UnitsOfNoStyle = model.StockOfNoStyle.Sum(units);
|
|
|
+ model.UnitsOfOtherStyles = model.StockOfOtherStyles.Sum(units);
|
|
|
}
|
|
|
|
|
|
private void CalculateHoldings()
|