diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportBookingOrClosingEDIService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportBookingOrClosingEDIService.cs index 99ec4925..cc17305b 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportBookingOrClosingEDIService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/SeaExportBookingOrClosingEDIService.cs @@ -1545,6 +1545,16 @@ namespace DS.WMS.Core.Op.Method if (string.IsNullOrWhiteSpace(primaryModel.EDIATTNEMAIL)) { primaryModel.EDIATTNEMAIL = ftpSet.SendEmail; + + if (ediRouteEnum == EDIRouteEnum.YT && string.IsNullOrWhiteSpace(primaryModel.EDIATTNEMAIL)) + { + var currUser = db.Queryable().Where(x => x.Id == long.Parse(user.UserId)).First(); + + if (currUser != null && !string.IsNullOrWhiteSpace(currUser.Email)) + { + primaryModel.EDIATTNEMAIL = currUser.Email; + } + } } primaryModel.AMSCONSIGNEE = ediExtModel.AMSConsignee;