|
@@ -5,6 +5,7 @@ using System.Windows;
|
|
|
using System.Windows.Media.Imaging;
|
|
|
using com.sun.org.apache.xpath.@internal;
|
|
|
using Comal.Classes;
|
|
|
+using InABox.Configuration;
|
|
|
using InABox.Core;
|
|
|
using InABox.DynamicGrid;
|
|
|
using InABox.WPF;
|
|
@@ -21,8 +22,13 @@ namespace PRSDesktop
|
|
|
private static readonly BitmapImage? data = PRSDesktop.Resources.pencil.AsBitmapImage();
|
|
|
private static readonly BitmapImage? check = PRSDesktop.Resources.checklist.AsBitmapImage();
|
|
|
|
|
|
+ private SupplierBillPanelProperties _settings = null;
|
|
|
+
|
|
|
public SupplierBills()
|
|
|
{
|
|
|
+
|
|
|
+ _settings = new GlobalConfiguration<SupplierBillPanelProperties>().Load();
|
|
|
+
|
|
|
HiddenColumns.Add(x => x.PostedStatus);
|
|
|
HiddenColumns.Add(x => x.PostedStatus);
|
|
|
HiddenColumns.Add(x => x.PostedNote);
|
|
@@ -133,7 +139,7 @@ namespace PRSDesktop
|
|
|
{
|
|
|
base.DoValidate(items, errors);
|
|
|
|
|
|
- if(items.Any(x => x.Number.IsNullOrWhiteSpace()))
|
|
|
+ if(items.Any(x => x.Number.IsNullOrWhiteSpace()) && !_settings.AllowBlankBillNumbers)
|
|
|
{
|
|
|
errors.Add($"[{nameof(Bill.Number)}] may not be blank!");
|
|
|
}
|