public FakeWaybillLANSourceHandler(string readerClassName, uint supplierId)
 {
     FillSourcesTable();
     drLanSource          = dtSources.Rows.Cast <DataRow>().FirstOrDefault(r => Convert.ToUInt32(r["FirmCode"]) == supplierId);
     reader               = ReflectionHelper.GetDocumentReader <BaseDocumentReader>(readerClassName, Assembly.GetExecutingAssembly());
     _currentDocumentType = new WaybillType();
 }
        /// <summary>
        /// Получение исходящей строки
        /// </summary>
        /// <param name="type">Тип исходящей накладной</param>
        /// <param name="id">Код строки исходящей накладной</param>
        /// <returns></returns>
        public OutgoingWaybillRow GetRow(WaybillType type, Guid id)
        {
            switch (type)
            {
            case WaybillType.ChangeOwnerWaybill:
                var changeOwnerWaybillRow = changeOwnerWaybillRepository.GetRowById(id);

                return(changeOwnerWaybillRow == null ? null : ConvertToOutgoingWaybillRow(changeOwnerWaybillRow));

            case WaybillType.MovementWaybill:
                var movementWaybillRow = movementWaybillRepository.GetRowById(id);

                return(movementWaybillRow == null ? null : ConvertToOutgoingWaybillRow(movementWaybillRow));

            case WaybillType.WriteoffWaybill:
                var writeoffWaybillRow = writeoffWaybillRepository.GetRowById(id);

                return(writeoffWaybillRow == null ? null : ConvertToOutgoingWaybillRow(writeoffWaybillRow));

            case WaybillType.ExpenditureWaybill:
                var expenditureWaybillRow = expenditureWaybillRepository.GetRowById(id);

                return(expenditureWaybillRow == null ? null : ConvertToOutgoingWaybillRow(expenditureWaybillRow));

            default:
                return(null);
            }
        }
Exemple #3
0
        protected BaseWaybill(WaybillType waybillType)
            : base()
        {
            ValidationUtils.Assert(Enum.IsDefined(typeof(WaybillType), waybillType), "Указан неизвестный тип накладной.");

            WaybillType = waybillType;
        }
 private ISubQuery GetWaybillSourceSubQuery(ISubQuery waybillRowsSubQuery, WaybillType waybillType)
 {
     return(SubQuery <WaybillRowArticleMovement>()
            .PropertyIn(x => x.DestinationWaybillRowId, waybillRowsSubQuery)
            .Where(x => x.SourceWaybillType == waybillType)
            .Select(x => x.SourceWaybillRowId));
 }
        public void ReadWaybillInternational()
        {
            string      filename = "UBL-Waybill-2.0-Example-International.xml";
            WaybillType doc      = UblDoc <WaybillType> .Create(filename);

            Assert.AreEqual("urn:oasis:names:specification:ubl:xpath:Waybill-2.0:samples-2.0-draft", doc.CustomizationID.Value);
            bool areEqual = UblXmlComparer.IsCopyEqual <WaybillType>(filename, doc);

            Assert.IsTrue(areEqual, "Written UBL doc differs from original");
        }
        public WaybillRowArticleMovement(Guid sourceWaybillRowId, WaybillType sourceWaybillType,
                                         Guid destinationWaybillRowId, WaybillType destinationWaybillType, decimal movingCount)
        {
            SourceWaybillRowId      = sourceWaybillRowId;
            SourceWaybillType       = sourceWaybillType;
            DestinationWaybillRowId = destinationWaybillRowId;
            DestinationWaybillType  = destinationWaybillType;

            MovingCount       = movingCount;
            IsManuallyCreated = false;
        }
 public AccountingPriceListWaybillTaking(DateTime takingDate, bool isWaybillRowIncoming, Guid articleAccountingPriceId, WaybillType waybillType,
                                         Guid waybillRowId, int articleId, short storageId, int accountOrganizationId, decimal accountingPrice, bool isOnAccountingPriceListStart, decimal count)
 {
     TakingDate               = takingDate;
     IsWaybillRowIncoming     = isWaybillRowIncoming;
     ArticleAccountingPriceId = articleAccountingPriceId;
     WaybillType              = waybillType;
     WaybillRowId             = waybillRowId;
     ArticleId                    = articleId;
     StorageId                    = storageId;
     AccountOrganizationId        = accountOrganizationId;
     AccountingPrice              = accountingPrice;
     IsOnAccountingPriceListStart = isOnAccountingPriceListStart;
     Count = count;
 }
Exemple #8
0
        protected BaseWaybill(WaybillType waybillType, string number, DateTime date, User curator, User createdBy, DateTime creationDate)
            : this(waybillType)
        {
            ValidationUtils.NotNull(curator, "Не указан куратор.");

            Number       = number;
            CreationDate = creationDate;
            CreatedBy    = createdBy;
            this.curator = curator;
            Comment      = String.Empty;

            Date = date.Date;

            rows = new HashedSet <BaseWaybillRow>();
        }
Exemple #9
0
        protected SaleWaybill(WaybillType waybillType, string number, DateTime date, Deal deal, Team team, DealQuota quota, bool isPrepayment, User curator,
                              DeliveryAddressType deliveryAddressType, string deliveryAddress, DateTime creationDate, User createdBy)
            : base(waybillType, number, date, curator, createdBy, creationDate)
        {
            ValidationUtils.Assert(deliveryAddressType == DeliveryAddressType.CustomAddress ? !String.IsNullOrEmpty(deliveryAddress) : true,
                                   "Адрес поставки не может быть пустым при ручном указании адреса поставки.");
            ValidationUtils.NotNull(team, "Необходимо указать команду.");

            Deal                = deal;
            this.team           = team;
            Quota               = quota;
            IsPrepayment        = isPrepayment;
            IsFullyPaid         = false;
            DeliveryAddressType = deliveryAddressType;
            DeliveryAddress     = deliveryAddress;
        }
Exemple #10
0
        /// <summary>
        /// Поиск позиции приходной накладной, по Id накладной, типу и товару
        /// </summary>
        /// <param name="waybillType">Тип накладной</param>
        /// <param name="waybillId">Код накладной</param>
        /// <param name="articleId">Код товара, для которого отчет</param>
        /// <returns></returns>
        public IncomingWaybillRow GetRow(WaybillType waybillType, Guid waybillId, int articleId)
        {
            switch (waybillType)
            {
            case WaybillType.ReceiptWaybill:
                var rwr = receiptWaybillRepository.Query <ReceiptWaybillRow>()
                          .Where(x => x.ReceiptWaybill.Id == waybillId && x.Article.Id == articleId).FirstOrDefault <ReceiptWaybillRow>();
                ValidationUtils.NotNull(rwr, "Позиция приходной накладной не найдена. Возможно, она была удалена.");

                return(ConvertToIncomingWaybillRow(rwr));

            case WaybillType.MovementWaybill:
                var q = receiptWaybillRepository.Query <MovementWaybillRow>()
                        .Where(x => x.MovementWaybill.Id == waybillId)
                        .Where(x => x.Article.Id == articleId);

                var mwr = q.FirstOrDefault <MovementWaybillRow>();
                ValidationUtils.NotNull(mwr, "Позиция накладной перемещения не найдена. Возможно, она была удалена.");

                return(ConvertToIncomingWaybillRow(mwr));

            case WaybillType.ChangeOwnerWaybill:
                var q2 = receiptWaybillRepository.Query <ChangeOwnerWaybillRow>()
                         .Where(x => x.ChangeOwnerWaybill.Id == waybillId)
                         .Where(x => x.Article.Id == articleId);

                var cowr = q2.FirstOrDefault <ChangeOwnerWaybillRow>();
                ValidationUtils.NotNull(cowr, "Позиция накладной смены собственника не найдена. Возможно, она была удалена.");

                return(ConvertToIncomingWaybillRow(cowr));

            case WaybillType.ReturnFromClientWaybill:
                var q3 = receiptWaybillRepository.Query <ReturnFromClientWaybillRow>()
                         .Where(x => x.ReturnFromClientWaybill.Id == waybillId)
                         .Where(x => x.Article.Id == articleId);

                var rfcwr = q3.FirstOrDefault <ReturnFromClientWaybillRow>();
                ValidationUtils.NotNull(rfcwr, "Позиция накладной возврата от клиента не найдена. Возможно, она была удалена.");

                return(ConvertToIncomingWaybillRow(rfcwr));

            default:
                throw new Exception("Неопределенный тип накладной.");
            }
        }
Exemple #11
0
 /// <summary>
 /// Конструктор
 /// </summary>
 /// <param name="waybillType">Тип накладной, которой принадлежит позиция</param>
 protected BaseWaybillRow(WaybillType waybillType)
 {
     CreationDate = DateTimeUtils.GetCurrentDateTime();
     WaybillType  = waybillType;
 }
Exemple #12
0
 /// <summary>
 /// Конструктор
 /// </summary>
 /// <param name="waybillType">Тип накладной, которой принадлежит позиция</param>
 public BaseOutgoingWaybillRow(WaybillType waybillType)
     : base(waybillType)
 {
 }
        public static WaybillType Create()
        {
            var doc = new WaybillType
            {
                UBLVersionID    = "2.0",
                CustomizationID = "urn:oasis:names:specification:ubl:xpath:Waybill-2.0:samples-2.0-draft",
                ProfileID       = "bpid:urn:oasis:names:draft:bpss:ubl-2-sample-international-scenario",
                ID = "KHN23-44044-1",
                CarrierAssignedID = "123456789987654321",
                UUID                        = "74638995-D67E-002F-436-8G17366352B1",
                IssueDate                   = "2005-06-25",
                IssueTime                   = "09:00:00.0Z",
                Name                        = "Air Waybill",
                ShippingOrderID             = "KHN23-44044",
                AdValoremIndicator          = false,
                DeclaredCarriageValueAmount = new AmountType
                {
                    currencyID = "USD",
                    Value      = 1500.00M
                },
                ConsignorParty = new PartyType
                {
                    PartyName = new PartyNameType[]
                    {
                        new PartyNameType
                        {
                            Name = "Consortial"
                        }
                    },
                    PostalAddress = new AddressType
                    {
                        StreetName           = "Boston Road",
                        BuildingName         = "Suite M-102",
                        BuildingNumber       = "630",
                        CityName             = "Billerica",
                        PostalZone           = "01821",
                        CountrySubentity     = "Massachusetts",
                        CountrySubentityCode = "MA",
                        Country = new CountryType
                        {
                            IdentificationCode = "US"
                        }
                    },
                    Contact = new ContactType
                    {
                        Name           = "Mrs Bouquet",
                        Telephone      = " +1 158 1233714",
                        Telefax        = "+ 1 158 1233856",
                        ElectronicMail = "*****@*****.**"
                    }
                },
                CarrierParty = new PartyType
                {
                    PartyName = new PartyNameType[]
                    {
                        new PartyNameType
                        {
                            Name = "United Airfreight"
                        }
                    },
                    Contact = new ContactType
                    {
                        ID             = "Freight Bookings",
                        Telephone      = "+1 3362 4788",
                        ElectronicMail = "*****@*****.**"
                    }
                },
                FreightForwarderParty = new PartyType
                {
                    PartyName = new PartyNameType[]
                    {
                        new PartyNameType
                        {
                            Name = "One-Stop Forwarders"
                        }
                    },
                    PostalAddress = new AddressType
                    {
                        Postbox              = "99043",
                        CityName             = "Boston",
                        PostalZone           = "02210",
                        CountrySubentityCode = "MA",
                        Country              = new CountryType
                        {
                            IdentificationCode = "US"
                        }
                    },
                    Contact = new ContactType
                    {
                        Name           = "Con Solidador",
                        Telephone      = " +1 343 1453654",
                        Telefax        = "+1 343 1453655",
                        ElectronicMail = "*****@*****.**"
                    }
                },
                Shipment = new ShipmentType
                {
                    ID = "CONS-0001",
                    GrossWeightMeasure = new MeasureType
                    {
                        unitCode = "KGM",
                        Value    = 130M
                    },
                    NetWeightMeasure = new MeasureType
                    {
                        unitCode = "KGM",
                        Value    = 110M
                    },
                    NetNetWeightMeasure = new MeasureType
                    {
                        unitCode = "KGM",
                        Value    = 100M
                    },
                    GrossVolumeMeasure = new MeasureType
                    {
                        unitCode = "MTQ",
                        Value    = 2M
                    },
                    NetVolumeMeasure = new MeasureType
                    {
                        unitCode = "MTQ",
                        Value    = 2.235M
                    },
                    TotalGoodsItemQuantity             = 1M,
                    TotalTransportHandlingUnitQuantity = 10M,
                    InsuranceValueAmount = new AmountType
                    {
                        currencyID = "USD",
                        Value      = 1000.00M
                    },
                    DeclaredCustomsValueAmount = new AmountType
                    {
                        currencyID = "GBP",
                        Value      = 524.80M
                    },
                    FreeOnBoardValueAmount = new AmountType
                    {
                        currencyID = "USD",
                        Value      = 1200.00M
                    },
                    SpecialInstructions = new TextType[]
                    {
                        new TextType
                        {
                            Value = "Beeswax becomes liquid at 50'C"
                        }
                    },
                    Consignment = new ConsignmentType[]
                    {
                        new ConsignmentType
                        {
                            ID = new IdentifierType
                            {
                                schemeAgencyName = "WCO",
                                schemeName       = "Unique Consignment Reference",
                                Value            = "2005US12345678998765432112345678"
                            },
                            TariffDescription = new TextType[]
                            {
                                new TextType
                                {
                                    Value = "Beeswax, other insect waxes and spermacetti"
                                }
                            },
                            TariffCode             = "15219000",
                            HazardousRiskIndicator = false,
                            ConsigneeParty         = new PartyType
                            {
                                PartyName = new PartyNameType[]
                                {
                                    new PartyNameType
                                    {
                                        Name = "IYT Corporation"
                                    }
                                },
                                PostalAddress = new AddressType
                                {
                                    StreetName       = "Avon Way",
                                    BuildingName     = "Thereabouts",
                                    BuildingNumber   = "56A",
                                    CityName         = "Bridgtow",
                                    PostalZone       = "ZZ99 1ZZ",
                                    CountrySubentity = "Avon",
                                    AddressLine      = new AddressLineType[]
                                    {
                                        new AddressLineType
                                        {
                                            Line = "3rd Floor, Room 5"
                                        }
                                    },
                                    Country = new CountryType
                                    {
                                        IdentificationCode = "GB"
                                    }
                                },
                                Contact = new ContactType
                                {
                                    Name           = "Mr Fred Churchill",
                                    Telephone      = "+44 127 2653214",
                                    Telefax        = "+44 127 2653215",
                                    ElectronicMail = "*****@*****.**"
                                }
                            },
                            NotifyParty = new PartyType
                            {
                                PartyName = new PartyNameType[]
                                {
                                    new PartyNameType
                                    {
                                        Name = "IYT Corporation"
                                    }
                                },
                                PostalAddress = new AddressType
                                {
                                    StreetName       = "Avon Way",
                                    BuildingName     = "Thereabouts",
                                    BuildingNumber   = "56A",
                                    CityName         = "Bridgtow",
                                    PostalZone       = "ZZ99 1ZZ",
                                    CountrySubentity = "Avon",
                                    AddressLine      = new AddressLineType[]
                                    {
                                        new AddressLineType
                                        {
                                            Line = "3rd Floor, Room 5"
                                        }
                                    },
                                    Country = new CountryType
                                    {
                                        IdentificationCode = "GB"
                                    }
                                },
                                Contact = new ContactType
                                {
                                    Name           = "Mr Fred Churchill",
                                    Telephone      = "+44 127 2653214",
                                    Telefax        = "+44 127 2653215",
                                    ElectronicMail = "*****@*****.**"
                                }
                            },
                            FinalDeliveryParty = new PartyType
                            {
                                PartyName = new PartyNameType[]
                                {
                                    new PartyNameType
                                    {
                                        Name = "The Terminus"
                                    }
                                },
                                PostalAddress = new AddressType
                                {
                                    StreetName       = "Avon Way",
                                    BuildingName     = "Thereabouts",
                                    BuildingNumber   = "56A",
                                    CityName         = "Bridgtow",
                                    PostalZone       = "ZZ99 1ZZ",
                                    CountrySubentity = "Avon",
                                    AddressLine      = new AddressLineType[]
                                    {
                                        new AddressLineType
                                        {
                                            Line = "3rd Floor, Room 5"
                                        }
                                    },
                                    Country = new CountryType
                                    {
                                        IdentificationCode = "GB"
                                    }
                                },
                                Contact = new ContactType
                                {
                                    Name           = "S Massiah",
                                    Telephone      = "+ 44 127 98876545",
                                    Telefax        = "+ 44 127 98876546",
                                    ElectronicMail = "*****@*****.**"
                                }
                            },
                            OriginalDepartureCountry = new CountryType
                            {
                                IdentificationCode = "US"
                            },
                            FinalDestinationCountry = new CountryType
                            {
                                IdentificationCode = "GB"
                            },
                            TransportContract = new ContractType
                            {
                                ID             = "CONS-001",
                                IssueDate      = "2005-06-24",
                                ContractType1  = "Forwarding Instructions",
                                ValidityPeriod = new PeriodType
                                {
                                    StartDate = "2005-06-25",
                                    StartTime = "01:00:00.0Z",
                                    EndDate   = "2005-06-30",
                                    EndTime   = "18:00:00.0Z"
                                },
                                ContractDocumentReference = new DocumentReferenceType[]
                                {
                                    new DocumentReferenceType
                                    {
                                        ID               = "normalizedString",
                                        CopyIndicator    = false,
                                        UUID             = "normalizedString",
                                        IssueDate        = "1967-08-13",
                                        DocumentTypeCode = "normalizedString",
                                        DocumentType     = "String",
                                        XPath            = new TextType[]
                                        {
                                            new TextType
                                            {
                                                Value = "String"
                                            },
                                            new TextType
                                            {
                                                Value = "String"
                                            }
                                        },
                                        Attachment = new AttachmentType
                                        {
                                            EmbeddedDocumentBinaryObject = new BinaryObjectType
                                            {
                                                mimeCode = "application/CSTAdata+xml",
                                                Value    = System.Convert.FromBase64String("UjBsR09EbGhjZ0dTQUxNQUFBUUNBRU1tQ1p0dU1GUXhEUzhi")
                                            },
                                            ExternalReference = new ExternalReferenceType
                                            {
                                                URI          = "normalizedString",
                                                DocumentHash = "String",
                                                ExpiryDate   = "1967-08-13",
                                                ExpiryTime   = "14:20:00.0Z"
                                            }
                                        }
                                    },
                                    new DocumentReferenceType
                                    {
                                        ID               = "normalizedString",
                                        CopyIndicator    = false,
                                        UUID             = "normalizedString",
                                        IssueDate        = "1967-08-13",
                                        DocumentTypeCode = "normalizedString",
                                        DocumentType     = "String",
                                        XPath            = new TextType[]
                                        {
                                            new TextType
                                            {
                                                Value = "String"
                                            },
                                            new TextType
                                            {
                                                Value = "String"
                                            }
                                        },
                                        Attachment = new AttachmentType
                                        {
                                            EmbeddedDocumentBinaryObject = new BinaryObjectType
                                            {
                                                mimeCode = "application/CSTAdata+xml",
                                                Value    = System.Convert.FromBase64String("UjBsR09EbGhjZ0dTQUxNQUFBUUNBRU1tQ1p0dU1GUXhEUzhi")
                                            },
                                            ExternalReference = new ExternalReferenceType
                                            {
                                                URI          = "normalizedString",
                                                DocumentHash = "String",
                                                ExpiryDate   = "1967-08-13",
                                                ExpiryTime   = "14:20:00.0Z"
                                            }
                                        }
                                    }
                                }
                            },
                            OriginalDespatchTransportationService = new TransportationServiceType
                            {
                                TransportServiceCode = "Door to Pier"
                            },
                            FinalDeliveryTransportationService = new TransportationServiceType
                            {
                                TransportServiceCode = "Pier to Pier"
                            },
                            DeliveryTerms = new DeliveryTermsType
                            {
                                ID = "FOB Destination",
                                DeliveryLocation = new LocationType
                                {
                                    ID = new IdentifierType
                                    {
                                        schemeAgencyID = "6",
                                        schemeID       = "UN/LOCODE",
                                        Value          = "GBBRS"
                                    },
                                    Description = new TextType[]
                                    {
                                        new TextType
                                        {
                                            Value = "Bristol"
                                        }
                                    }
                                }
                            },
                            PaymentTerms = new PaymentTermsType
                            {
                                PaymentMeansID = new IdentifierType[]
                                {
                                    new IdentifierType
                                    {
                                        Value = "Bankers Cheque"
                                    }
                                }
                            },
                            FreightAllowanceCharge = new AllowanceChargeType[]
                            {
                                new AllowanceChargeType
                                {
                                    ChargeIndicator       = true,
                                    AllowanceChargeReason = new TextType[]
                                    {
                                        new TextType
                                        {
                                            Value = "Freight charges"
                                        }
                                    },
                                    SequenceNumeric = 1M,
                                    Amount          = new AmountType
                                    {
                                        currencyID = "USD",
                                        Value      = 254.00M
                                    }
                                },
                                new AllowanceChargeType
                                {
                                    ChargeIndicator           = false,
                                    AllowanceChargeReasonCode = "79",
                                    AllowanceChargeReason     = new TextType[]
                                    {
                                        new TextType
                                        {
                                            Value = "Sundry discount"
                                        }
                                    },
                                    MultiplierFactorNumeric = 0.05M,
                                    SequenceNumeric         = 2M,
                                    Amount = new AmountType
                                    {
                                        currencyID = "USD",
                                        Value      = 12.70M
                                    },
                                    BaseAmount = new AmountType
                                    {
                                        currencyID = "USD",
                                        Value      = 254.00M
                                    }
                                }
                            }
                        }
                    },
                    GoodsItem = new GoodsItemType[]
                    {
                        new GoodsItemType
                        {
                            ID = "1",
                            SequenceNumberID = "1",
                            Description      = new TextType[]
                            {
                                new TextType
                                {
                                    Value = "Acme beeswax"
                                }
                            },
                            HazardousRiskIndicator     = false,
                            DeclaredCustomsValueAmount = new AmountType
                            {
                                currencyID = "GBP",
                                Value      = 524.80M
                            },
                            DeclaredStatisticsValueAmount = new AmountType
                            {
                                currencyID = "USD",
                                Value      = 1000.00M
                            },
                            FreeOnBoardValueAmount = new AmountType
                            {
                                currencyID = "USD",
                                Value      = 1241.30M
                            },
                            InsuranceValueAmount = new AmountType
                            {
                                currencyID = "USD",
                                Value      = 1241.30M
                            },
                            ValueAmount = new AmountType
                            {
                                currencyID = "USD",
                                Value      = 1000.00M
                            },
                            GrossWeightMeasure = new MeasureType
                            {
                                unitCode = "KGM",
                                Value    = 130M
                            },
                            NetWeightMeasure = new MeasureType
                            {
                                unitCode = "KGM",
                                Value    = 110M
                            },
                            NetNetWeightMeasure = new MeasureType
                            {
                                unitCode = "KGM",
                                Value    = 100M
                            },
                            GrossVolumeMeasure = new MeasureType
                            {
                                unitCode = "MTQ",
                                Value    = 2M
                            },
                            NetVolumeMeasure = new MeasureType
                            {
                                unitCode = "MTQ",
                                Value    = 2.235M
                            },
                            Quantity              = 10M,
                            RequiredCustomsID     = "ECN12344566",
                            CustomsStatusCode     = "Cleared",
                            CustomsTariffQuantity = 1000M,
                            Item = new ItemType[]
                            {
                                new ItemType
                                {
                                    Description = new TextType[]
                                    {
                                        new TextType
                                        {
                                            Value = "Beeswax"
                                        }
                                    },
                                    Name = "Acme Beeswax",
                                    BuyersItemIdentification = new ItemIdentificationType
                                    {
                                        ID = "6578489"
                                    },
                                    SellersItemIdentification = new ItemIdentificationType
                                    {
                                        ID = "17589683"
                                    },
                                    OriginCountry = new CountryType
                                    {
                                        IdentificationCode = "MX",
                                        Name = "Mexico"
                                    }
                                }
                            }
                        }
                    },
                    ShipmentStage = new ShipmentStageType[]
                    {
                        new ShipmentStageType
                        {
                            ID = "1",
                            TransportModeCode = new CodeType
                            {
                                listAgencyID = "6",
                                listID       = "UN/ECE rec 16",
                                Value        = "3"
                            },
                            TransportMeansTypeCode = "Truck",
                            PreCarriageIndicator   = true,
                            OnCarriageIndicator    = false,
                            TransitPeriod          = new PeriodType
                            {
                                StartDate = "2005-06-25",
                                StartTime = "11:35:00.0Z",
                                EndDate   = "2005-06-25",
                                EndTime   = "16:00:00.0Z"
                            },
                            CarrierParty = new PartyType[]
                            {
                                new PartyType
                                {
                                    PartyName = new PartyNameType[]
                                    {
                                        new PartyNameType
                                        {
                                            Name = "Keep On Trucking"
                                        }
                                    },
                                    Contact = new ContactType
                                    {
                                        Telephone = "+1 36222 33847"
                                    }
                                }
                            },
                            TransportMeans = new TransportMeansType
                            {
                                RoadTransport = new RoadTransportType
                                {
                                    LicensePlateID = "2652 WE"
                                }
                            }
                        },
                        new ShipmentStageType
                        {
                            ID = "2",
                            TransportModeCode = new CodeType
                            {
                                listAgencyID = "6",
                                listID       = "UN/ECE rec 16",
                                Value        = "4"
                            },
                            TransportMeansTypeCode = "Plane",
                            PreCarriageIndicator   = false,
                            OnCarriageIndicator    = false,
                            TransitPeriod          = new PeriodType
                            {
                                StartDate = "2005-06-25",
                                StartTime = "23:20:00.0Z"
                            },
                            CarrierParty = new PartyType[]
                            {
                                new PartyType
                                {
                                    PartyName = new PartyNameType[]
                                    {
                                        new PartyNameType
                                        {
                                            Name = "United Airfreight"
                                        }
                                    },
                                    Contact = new ContactType
                                    {
                                        ID             = "Freight Bookings",
                                        Telephone      = "+1 3362 4788",
                                        ElectronicMail = "*****@*****.**"
                                    }
                                }
                            },
                            TransportMeans = new TransportMeansType
                            {
                                JourneyID    = "UA 1234",
                                AirTransport = new AirTransportType
                                {
                                    AircraftID = "A-127763-747"
                                }
                            },
                            LoadingPortLocation = new LocationType
                            {
                                ID = new IdentifierType
                                {
                                    schemeAgencyID = "6",
                                    schemeID       = "UN/LOCODE",
                                    Value          = "USBOS"
                                },
                                Description = new TextType[]
                                {
                                    new TextType
                                    {
                                        Value = "Boston Airport"
                                    }
                                }
                            },
                            UnloadingPortLocation = new LocationType
                            {
                                ID = new IdentifierType
                                {
                                    schemeAgencyID = "6",
                                    schemeID       = "UN/LOCODE",
                                    Value          = "GBBRS"
                                },
                                Description = new TextType[]
                                {
                                    new TextType
                                    {
                                        Value = "Bristol Airport"
                                    }
                                }
                            },
                            TransshipPortLocation = new LocationType
                            {
                                ID = new IdentifierType
                                {
                                    schemeAgencyID = "6",
                                    schemeID       = "UN/LOCODE",
                                    Value          = "GBLHR"
                                },
                                Description = new TextType[]
                                {
                                    new TextType
                                    {
                                        Value = "Heathrow Apt/London"
                                    }
                                }
                            }
                        }
                    },
                    Delivery = new DeliveryType
                    {
                        Quantity           = 1M,
                        LatestDeliveryDate = "2005-06-30",
                        LatestDeliveryTime = "18:00:00.0Z",
                        TrackingID         = "NKH7712289-03339-000128",
                        DeliveryAddress    = new AddressType
                        {
                            StreetName       = "Avon Way",
                            BuildingName     = "Thereabouts",
                            BuildingNumber   = "56A",
                            CityName         = "Bridgtow",
                            PostalZone       = "ZZ99 1ZZ",
                            CountrySubentity = "Avon",
                            AddressLine      = new AddressLineType[]
                            {
                                new AddressLineType
                                {
                                    Line = "3rd Floor, Room 5"
                                }
                            },
                            Country = new CountryType
                            {
                                IdentificationCode = "GB"
                            }
                        },
                        RequestedDeliveryPeriod = new PeriodType
                        {
                            StartDate = "2005-06-29",
                            StartTime = "01:00:00.0Z",
                            EndDate   = "2005-06-30",
                            EndTime   = "18:00:00.0Z"
                        },
                        EstimatedDeliveryPeriod = new PeriodType
                        {
                            StartDate = "2005-06-30",
                            StartTime = "01:00:00.0Z"
                        },
                        DeliveryParty = new PartyType
                        {
                            PartyName = new PartyNameType[]
                            {
                                new PartyNameType
                                {
                                    Name = "The Terminus"
                                }
                            },
                            Contact = new ContactType
                            {
                                Name           = "S Massiah",
                                Telephone      = "+ 44 127 98876545",
                                Telefax        = "+ 44 127 98876546",
                                ElectronicMail = "*****@*****.**"
                            }
                        },
                        Despatch = new DespatchType
                        {
                            ActualDespatchDate = "2005-06-25",
                            ActualDespatchTime = "11:35:00.0Z",
                            DespatchAddress    = new AddressType
                            {
                                StreetName           = "Boston Road",
                                BuildingName         = "Suite M-102",
                                BuildingNumber       = "630",
                                CityName             = "Billerica",
                                PostalZone           = "01821",
                                CountrySubentity     = "Massachusetts",
                                CountrySubentityCode = "MA",
                                Country = new CountryType
                                {
                                    IdentificationCode = "US"
                                }
                            },
                            DespatchParty = new PartyType
                            {
                                PartyName = new PartyNameType[]
                                {
                                    new PartyNameType
                                    {
                                        Name = "Consortial"
                                    }
                                }
                            },
                            Contact = new ContactType
                            {
                                Name           = "Mrs Bouquet",
                                Telephone      = " +1 158 1233714",
                                Telefax        = "+ 1 158 1233856",
                                ElectronicMail = "*****@*****.**"
                            }
                        }
                    },
                    TransportHandlingUnit = new TransportHandlingUnitType[]
                    {
                        new TransportHandlingUnitType
                        {
                            ID = "1",
                            TransportHandlingUnitTypeCode = new CodeType
                            {
                                listAgencyName = "United Nations Economic Commission for Europe",
                                listID         = "TRED 8053",
                                Value          = "PA"
                            },
                            HazardousRiskIndicator = false,
                            TotalGoodsItemQuantity = 10M,
                            TotalPackageQuantity   = 10M,
                            ActualPackage          = new PackageType[]
                            {
                                new PackageType
                                {
                                    Quantity          = 10M,
                                    PackagingTypeCode = new CodeType
                                    {
                                        listAgencyID = "6",
                                        listID       = "UN/ECE rec 21",
                                        Value        = "TB"
                                    }
                                }
                            }
                        }
                    },
                    OriginAddress = new AddressType
                    {
                        StreetName           = "Boston Road",
                        BuildingName         = "Suite M-102",
                        BuildingNumber       = "630",
                        CityName             = "Billerica",
                        PostalZone           = "01821",
                        CountrySubentity     = "Massachusetts",
                        CountrySubentityCode = "MA",
                        Country = new CountryType
                        {
                            IdentificationCode = "US"
                        }
                    },
                    FirstArrivalPortLocation = new LocationType
                    {
                        ID = new IdentifierType
                        {
                            schemeAgencyID = "6",
                            schemeID       = "UN/LOCODE",
                            Value          = "GBBRS"
                        },
                        Description = new TextType[]
                        {
                            new TextType
                            {
                                Value = "Bristol"
                            }
                        }
                    },
                    LastExitPortLocation = new LocationType
                    {
                        ID = new IdentifierType
                        {
                            schemeAgencyID = "6",
                            schemeID       = "UN/LOCODE",
                            Value          = "USBOS"
                        },
                        Description = new TextType[]
                        {
                            new TextType
                            {
                                Value = "Boston"
                            }
                        }
                    },
                    ExportCountry = new CountryType
                    {
                        IdentificationCode = "US"
                    },
                    FreightAllowanceCharge = new AllowanceChargeType[]
                    {
                        new AllowanceChargeType
                        {
                            ChargeIndicator       = true,
                            AllowanceChargeReason = new TextType[]
                            {
                                new TextType
                                {
                                    Value = "Freight charges"
                                }
                            },
                            SequenceNumeric = 1M,
                            Amount          = new AmountType
                            {
                                currencyID = "USD",
                                Value      = 254.00M
                            }
                        },
                        new AllowanceChargeType
                        {
                            ChargeIndicator           = false,
                            AllowanceChargeReasonCode = "79",
                            AllowanceChargeReason     = new TextType[]
                            {
                                new TextType
                                {
                                    Value = "Sundry discount"
                                }
                            },
                            MultiplierFactorNumeric = 0.05M,
                            SequenceNumeric         = 2M,
                            Amount = new AmountType
                            {
                                currencyID = "USD",
                                Value      = 12.70M
                            },
                            BaseAmount = new AmountType
                            {
                                currencyID = "USD",
                                Value      = 254.00M
                            }
                        }
                    }
                },
                DocumentReference = new DocumentReferenceType[]
                {
                    new DocumentReferenceType
                    {
                        ID           = "AEG012345",
                        UUID         = "6E09886B-DC6E-439F-82D1-7CCAC7F4E3B1",
                        IssueDate    = "2005-06-20",
                        DocumentType = "Order"
                    },
                    new DocumentReferenceType
                    {
                        ID           = "KHN23-44044",
                        UUID         = "6E09886B-DC6E-439F-82D1-7C83746352B1",
                        IssueDate    = "2005-06-24",
                        DocumentType = "Forwarding Instructions"
                    }
                },
                ExchangeRate = new ExchangeRateType[]
                {
                    new ExchangeRateType
                    {
                        SourceCurrencyCode     = "USD",
                        SourceCurrencyBaseRate = 1.00M,
                        TargetCurrencyCode     = "GBP",
                        TargetCurrencyBaseRate = 1.00M,
                        CalculationRate        = 1.8947M,
                        MathematicOperatorCode = "Multiply",
                        Date = "1967-08-13"
                    }
                },
                DocumentDistribution = new DocumentDistributionType[]
                {
                    new DocumentDistributionType
                    {
                        PrintQualifier       = "Copies allowed",
                        MaximumCopiesNumeric = 5M,
                        Party = new PartyType
                        {
                            PartyName = new PartyNameType[]
                            {
                                new PartyNameType
                                {
                                    Name = "Consortial"
                                }
                            },
                            PostalAddress = new AddressType
                            {
                                StreetName           = "Boston Road",
                                BuildingName         = "Suite M-102",
                                BuildingNumber       = "630",
                                CityName             = "Billerica",
                                PostalZone           = "01821",
                                CountrySubentity     = "Massachusetts",
                                CountrySubentityCode = "MA",
                                Country = new CountryType
                                {
                                    IdentificationCode = "US"
                                }
                            },
                            Contact = new ContactType
                            {
                                Name           = "Mrs Bouquet",
                                Telephone      = " +1 158 1233714",
                                Telefax        = "+ 1 158 1233856",
                                ElectronicMail = "*****@*****.**"
                            }
                        }
                    },
                    new DocumentDistributionType
                    {
                        PrintQualifier       = "Copies allowed",
                        MaximumCopiesNumeric = 4M,
                        Party = new PartyType
                        {
                            PartyName = new PartyNameType[]
                            {
                                new PartyNameType
                                {
                                    Name = "IYT Corporation"
                                }
                            },
                            PostalAddress = new AddressType
                            {
                                StreetName       = "Avon Way",
                                BuildingName     = "Thereabouts",
                                BuildingNumber   = "56A",
                                CityName         = "Bridgtow",
                                PostalZone       = "ZZ99 1ZZ",
                                CountrySubentity = "Avon",
                                AddressLine      = new AddressLineType[]
                                {
                                    new AddressLineType
                                    {
                                        Line = "3rd Floor, Room 5"
                                    }
                                },
                                Country = new CountryType
                                {
                                    IdentificationCode = "GB"
                                }
                            },
                            Contact = new ContactType
                            {
                                Name           = "Mr Fred Churchill",
                                Telephone      = "+44 127 2653214",
                                Telefax        = "+44 127 2653215",
                                ElectronicMail = "*****@*****.**"
                            }
                        }
                    }
                }
            };

            doc.Xmlns = new System.Xml.Serialization.XmlSerializerNamespaces(new[]
            {
                new XmlQualifiedName("cac", "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"),
                new XmlQualifiedName("cbc", "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"),
            });
            return(doc);
        }
Exemple #14
0
 /// <summary>
 /// Конструктор
 /// </summary>
 /// <param name="waybillType">Тип накладной, которой принадлежит позиция</param>
 protected SaleWaybillRow(WaybillType waybillType)
     : base(waybillType)
 {
 }
Exemple #15
0
 /// <summary>
 /// Конструктор
 /// </summary>
 /// <param name="waybillType">Тип накладной, которой принадлежит позиция</param>
 public BaseIncomingAndOutgoingWaybillRow(WaybillType waybillType)
     : base(waybillType)
 {
     IsUsingManualSource = false;
 }
 /// <summary>
 /// Конструктор
 /// </summary>
 /// <param name="waybillType">Тип накладной, которой принадлежит позиция</param>
 public BaseIncomingWaybillRow(WaybillType waybillType)
     : base(waybillType)
 {
 }