diff --git a/source/Plugins/AyaNova.Plugin.V8/V8.cs b/source/Plugins/AyaNova.Plugin.V8/V8.cs
index 67bdb08..83176d8 100644
--- a/source/Plugins/AyaNova.Plugin.V8/V8.cs
+++ b/source/Plugins/AyaNova.Plugin.V8/V8.cs
@@ -2299,14 +2299,14 @@ namespace AyaNova.PlugIn.V8
{
if (!progress.KeepGoing) return;
-
+
progress.Op("Start inventory adjustments");
progress.SubOp("");
//Step 2: export the objects
PartInventoryAdjustmentList pil = PartInventoryAdjustmentList.GetList(
" ");
- progress.Append("Exporting " + pil.Count.ToString()+" inventory adjustments");
+ progress.Append("Exporting " + pil.Count.ToString() + " inventory adjustments");
foreach (PartInventoryAdjustmentList.PartInventoryAdjustmentListInfo i in pil)
{
if (!progress.KeepGoing) return;
@@ -2335,7 +2335,7 @@ namespace AyaNova.PlugIn.V8
List v8Serials = new List();
foreach (JValue j in v)
v8Serials.Add(j.Value());
-
+
if (pi.QuantityAdjustment < 0)
{
//remove serials
@@ -2348,7 +2348,7 @@ namespace AyaNova.PlugIn.V8
foreach (PartSerial ps in pi.SerialNumbers)
v8Serials.Add(ps.SerialNumber);
}
-
+
foreach (PartSerial ps in pi.SerialNumbers)
{
dynamic dItem = new JObject();
@@ -3535,7 +3535,16 @@ namespace AyaNova.PlugIn.V8
dynamic dwip = new JObject();
dwip.workOrderId = RavenId;
dwip.workOrderItemId = ravenwoitemid;
- dwip.quantity = wip.Quantity;
+ if (wip.Used)
+ {
+ dwip.quantity = wip.Quantity;
+ dwip.suggestedQuantity = 0;
+ }
+ else
+ {
+ dwip.quantity = 0;
+ dwip.suggestedQuantity = wip.Quantity;
+ }
var tryPartId = await Getv7v8IdMapNullOk(wip.PartID, RootObjectTypes.Part);
if (tryPartId == null)
{
@@ -5007,8 +5016,6 @@ namespace AyaNova.PlugIn.V8
-
-
#region Global / Regional WIKIPAGES
private async System.Threading.Tasks.Task ExportGlobalRegionalWiki(ProgressForm progress)
{