Parcourir la source

Copying PostedReference when splitting POLines

Kenric Nugteren il y a 1 an
Parent
commit
0ac64957f0

+ 7 - 0
prs.desktop/Panels/PurchaseOrders/SupplierPurchaseOrderItemOneToMany.cs

@@ -55,6 +55,8 @@ public class SupplierPurchaseOrderItemOneToMany : DynamicOneToManyGrid<PurchaseO
         HiddenColumns.Add(x => x.TaxCode.Description);
         HiddenColumns.Add(x => x.TaxCode.Rate);
 
+        HiddenColumns.Add(x => x.PostedReference);
+
         foreach (var column in Columns.None<PurchaseOrderItem>()
             .AddDimensionsColumns(x => x.Dimensions, Dimensions.ColumnsType.Local))
         {
@@ -207,6 +209,11 @@ public class SupplierPurchaseOrderItemOneToMany : DynamicOneToManyGrid<PurchaseO
             newLine.Job.Synchronise(poi.Job);
             newLine.Dimensions.CopyFrom(poi.Dimensions);
 
+            // Copying across the posted reference; this would be a problem if we were to try to sync via a Poster two purchase order items with the
+            // original posted single line; however, after discussing with Frank, we can't imagine a place where we would do this; we would generally replace
+            // the posted lines. Hence, we can copy the posted reference.
+            newLine.PostedReference = poi.PostedReference;
+
             newLine.Description = poi.Description;
             newLine.TaxRate = poi.TaxRate;
             newLine.ExTax = poi.ExTax;