diff --git a/IRP/src/CommonModules/DocInventoryTransferServer/Module.bsl b/IRP/src/CommonModules/DocInventoryTransferServer/Module.bsl index 3137f3d720..97a191f970 100644 --- a/IRP/src/CommonModules/DocInventoryTransferServer/Module.bsl +++ b/IRP/src/CommonModules/DocInventoryTransferServer/Module.bsl @@ -110,7 +110,8 @@ Function GetDataFromPI(BasisArray) Export | PurchaseInvoiceItemList.ItemKey AS ItemKey, | PurchaseInvoiceItemList.Unit AS Unit, | ISNULL(PurchaseInvoiceSerialLotNumbers.Quantity, PurchaseInvoiceItemList.Quantity) AS Quantity, - | ISNULL(PurchaseInvoiceSerialLotNumbers.SerialLotNumber, VALUE(Catalog.SerialLotNumbers.EmptyRef)) AS SerialLotNumber + | ISNULL(PurchaseInvoiceSerialLotNumbers.SerialLotNumber, VALUE(Catalog.SerialLotNumbers.EmptyRef)) AS SerialLotNumber, + | PurchaseInvoiceItemList.Key AS Key |FROM | Document.PurchaseInvoice.ItemList AS PurchaseInvoiceItemList | LEFT JOIN Document.PurchaseInvoice.SerialLotNumbers AS PurchaseInvoiceSerialLotNumbers @@ -120,9 +121,10 @@ Function GetDataFromPI(BasisArray) Export | PurchaseInvoiceItemList.Ref IN (&BasisArray) |TOTALS | MAX(Item) AS Item, - | MAX(Unit) AS Unit + | MAX(Unit) AS Unit, + | MAX(ItemKey) AS ItemKey |BY - | ItemKey + | Key |; | |//////////////////////////////////////////////////////////////////////////////// @@ -154,9 +156,9 @@ Function GetDataFromPI(BasisArray) Export EndIf; EndDo; - SelectionItemKey = ResultsArray[0].Select(QueryResultIteration.ByGroups, "ItemKey"); - While SelectionItemKey.Next() Do - Selection = SelectionItemKey.Select(); + SelectionKey = ResultsArray[0].Select(QueryResultIteration.ByGroups, "Key"); + While SelectionKey.Next() Do + Selection = SelectionKey.Select(); CreateRow = False; ArrayOfSerialLotNumbers = New Array; While Selection.Next() Do @@ -184,7 +186,7 @@ Function GetDataFromPI(BasisArray) Export If CreateRow Then NewRowItemList = New Structure(ColumnForItemList); NewRowItemList.Key = New UUID(); - FillPropertyValues(NewRowItemList, SelectionItemKey, "Item, ItemKey, Unit"); + FillPropertyValues(NewRowItemList, SelectionKey, "Item, ItemKey, Unit, Key"); NewRowItemList.PurchaseInvoice = SelectionHeader.DistributedPurchaseInvoice; If ArrayOfSerialLotNumbers.Count() > 0 Then TotalQuantity = 0; diff --git a/IRP/src/Documents/PhysicalInventory/ManagerModule.bsl b/IRP/src/Documents/PhysicalInventory/ManagerModule.bsl index eaf7911c35..26edcd3265 100644 --- a/IRP/src/Documents/PhysicalInventory/ManagerModule.bsl +++ b/IRP/src/Documents/PhysicalInventory/ManagerModule.bsl @@ -381,10 +381,11 @@ Function R4032B_GoodsInTransitOutgoing() Return "SELECT | VALUE(AccumulationRecordType.Receipt) AS RecordType, - | ItemList.Period, - | ItemList.Store, - | ItemList.Basis, - | ItemList.ItemKey, + | ItemList.Period AS Period, + | ItemList.Store AS Store, + | ItemList.Basis AS Basis, + | ItemList.ItemKey AS ItemKey, + | VALUE(Catalog.SerialLotNumbers.EmptyRef) AS SerialLotNumber, | ItemList.WriteOffQuantity AS Quantity |INTO R4032B_GoodsInTransitOutgoing |FROM diff --git a/IRP/src/Documents/RetailGoodsReceipt/ManagerModule.bsl b/IRP/src/Documents/RetailGoodsReceipt/ManagerModule.bsl index 8d12961426..d094bb95f0 100644 --- a/IRP/src/Documents/RetailGoodsReceipt/ManagerModule.bsl +++ b/IRP/src/Documents/RetailGoodsReceipt/ManagerModule.bsl @@ -426,6 +426,7 @@ Function R4032B_GoodsInTransitOutgoing() | ItemList.Store, | ItemList.ItemKey, | ShipmentConfirmations.ShipmentConfirmation AS Basis, + | VALUE(Catalog.SerialLotNumbers.EmptyRef) AS SerialLotNumber, | -ShipmentConfirmations.Quantity AS Quantity |INTO R4032B_GoodsInTransitOutgoing |FROM diff --git a/IRP/src/Documents/RetailShipmentConfirmation/ManagerModule.bsl b/IRP/src/Documents/RetailShipmentConfirmation/ManagerModule.bsl index 10304c0fd9..0c189d2014 100644 --- a/IRP/src/Documents/RetailShipmentConfirmation/ManagerModule.bsl +++ b/IRP/src/Documents/RetailShipmentConfirmation/ManagerModule.bsl @@ -583,6 +583,7 @@ Function R4032B_GoodsInTransitOutgoing() | END AS Basis, | ItemList.Store AS Store, | ItemList.ItemKey AS ItemKey, + | VALUE(Catalog.SerialLotNumbers.EmptyRef) AS SerialLotNumber, | ItemList.Quantity AS Quantity |INTO R4032B_GoodsInTransitOutgoing |FROM diff --git a/IRP/src/Documents/StockAdjustmentAsWriteOff/ManagerModule.bsl b/IRP/src/Documents/StockAdjustmentAsWriteOff/ManagerModule.bsl index 393220a949..0fed2d70d4 100644 --- a/IRP/src/Documents/StockAdjustmentAsWriteOff/ManagerModule.bsl +++ b/IRP/src/Documents/StockAdjustmentAsWriteOff/ManagerModule.bsl @@ -345,6 +345,7 @@ Function R4032B_GoodsInTransitOutgoing() | ItemList.Store, | ItemList.AdjustmentBasis AS Basis, | ItemList.ItemKey, + | VALUE(Catalog.SerialLotNumbers.EmptyRef) AS SerialLotNumber, | ItemList.Quantity |INTO R4032B_GoodsInTransitOutgoing |FROM