|
@@ -266,13 +266,22 @@ public class Module
|
|
|
Progress.Show("Approving Setouts..");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
if(selectedSetouts.Any(x => x.UnapprovedDocuments > 0))
|
|
|
{
|
|
|
MessageBox.Show("Cannot process setouts with unapproved documents.");
|
|
|
Progress.Close();
|
|
|
return;
|
|
|
}
|
|
|
- else if(selectedSetouts.Any(x => x.Packets == 0))
|
|
|
+
|
|
|
+ if (ManufacturingPacketList.Packets.Any(x => x.Template.ID == Guid.Empty))
|
|
|
+ {
|
|
|
+ MessageBox.Show("Cannot process manufacturing packets without templates.");
|
|
|
+ Progress.Close();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(selectedSetouts.Any(x => x.Packets == 0))
|
|
|
{
|
|
|
if(MessageBox.Show("Warning: some setouts do not have any manufacturing packets: are you sure you wish to proceed?", "Warning", MessageBoxButton.YesNoCancel) != MessageBoxResult.Yes)
|
|
|
{
|
|
@@ -281,6 +290,8 @@ public class Module
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
string message = "Result: " + Environment.NewLine;
|
|
|
|
|
|
foreach (var item in selectedSetouts)
|