Exemplo n.º 1
0
        private void SetAuroraPickTicketInformation(Order order)
        {
            var auroraPickTicket = _auroraPickTicketRepository.GetAuroraPickTicket(order.OrderNumber);

            if (auroraPickTicket.Header == null)
            {
                _logger.Warning("Cannot find aurora pick ticket for order number " + order.OrderNumber);
            }
            else
            {
                order.ArAccountNumber             = auroraPickTicket.Header.ArAccountNumber;
                order.CustomerPurchaseOrderNumber = auroraPickTicket.Header.CustomerPurchaseOrderNumber;
                order.OrderType      = OrderType.BrickAndClick;
                order.LineItems      = auroraPickTicket.Details.ToDictionary(d => d.PackageBarcode, d => d.PickticketLineNumber);
                order.ShippingMethod = _carrierReadRepository.GetOmsShipMethod(auroraPickTicket.Header.ShipVia);
            }
        }
Exemplo n.º 2
0
        public Order ToOrder(ICarrierReadRepository carrierReadRepository, ICountryReader countryReader)
        {
            int soldToCountry, shipToCountry;

            int.TryParse(SoldToCountry, out soldToCountry);
            int.TryParse(ShipToCountry, out shipToCountry);

            return(new Order
            {
                BillingAddress = new Address
                {
                    City = SoldToCity,
                    Country = countryReader.GetCountryAbbreviation(soldToCountry),
                    Line1 = SoldToAddr1,
                    Line2 = SoldToAddr2,
                    Line3 = SoldToAddr3,
                    Name = SoldToName,
                    State = SoldToState,
                    Zip = SoldToZip
                },
                ShippingAddress = new Address
                {
                    City = ShipToCity,
                    Country = countryReader.GetCountryAbbreviation(shipToCountry),
                    Line1 = ShipToAddr1,
                    Line2 = ShipToAddr2,
                    Line3 = ShipToAddr3,
                    Name = ShipToName,
                    State = ShipToState,
                    Zip = ShipToZip
                },
                OrderNumber = PickticketControlNumber, //MiscellaneousIns20Byte11, ?
                OrderDate = (OrderDate != 0 ? MainframeExtensions.ParseDateTime(OrderDate, 0, DateTimeStyles.AssumeUniversal) : MainframeExtensions.ParseDateTime(DateCreated, 0, DateTimeStyles.AssumeUniversal)).ToUniversalTime(),
                BillingPhone = TelephoneNumber,
                ShippingPhone = TelephoneNumber,
                EmailAddress = "*****@*****.**",
                ShippingMethod = carrierReadRepository.GetOmsShipMethod(ShipVia)
            });
        }