diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/CustomerProductionReturnNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/CustomerProductionReturnNoteEventHandler.cs index ad2aa5cd4..babf76a2c 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/CustomerProductionReturnNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/CustomerProductionReturnNoteEventHandler.cs @@ -82,21 +82,22 @@ public class CustomerProductionReturnNoteEventHandler { var transaction = ObjectMapper.Map(detail); - transaction.PackingCode = (!string.IsNullOrEmpty(transaction.PackingCode) )? transaction.PackingCode :"" ; - transaction.ContainerCode = (!string.IsNullOrEmpty(transaction.ContainerCode) )? transaction.ContainerCode :"" ; - transaction.Lot = (!string.IsNullOrEmpty(transaction.Lot) )? transaction.Lot :"" ; - transaction.LocationArea = (!string.IsNullOrEmpty(transaction.LocationArea) )? transaction.LocationArea :"NONE" ; - transaction.LocationGroup = (!string.IsNullOrEmpty(transaction.LocationGroup) )? transaction.LocationGroup :"NONE" ; - transaction.LocationErpCode = (!string.IsNullOrEmpty(transaction.LocationErpCode))? transaction.LocationErpCode :"NONE" ; - transaction.WarehouseCode = (!string.IsNullOrEmpty(transaction.WarehouseCode)) ? transaction.WarehouseCode : "NONE"; - transaction.LocationErpCode = (!string.IsNullOrEmpty(transaction.LocationErpCode)) ? transaction.LocationErpCode : "NONE"; + transaction.PackingCode = detail.ToPackingCode; + transaction.ContainerCode = detail.ToContainerCode; + transaction.Lot = detail.ToLot; + transaction.Status = EnumInventoryStatus.OK; + + transaction.LocationArea = detail.ToLocationArea; + transaction.LocationGroup = detail.ToLocationGroup; + transaction.LocationErpCode = detail.ToLocationErpCode; + transaction.WarehouseCode = detail.ToWarehouseCode; + transaction.LocationCode = detail.ToLocationCode; + transaction.TransType = TransType; - transaction.TransInOut = TransInOut; + transaction.TransInOut = TransInOut; transaction.Worker = CustomerProductionReturnNote.Worker; transaction.DocNumber = CustomerProductionReturnNote.Number; transaction.JobNumber = CustomerProductionReturnNote.JobNumber; - transaction.PackingCode = detail.HandledPackingCode; - transaction.Status = EnumInventoryStatus.OK; transactions.Add(transaction); }