public void Parse()
        {
            Assert.IsTrue(PandaKazan19267Parser.CheckFileFormat(Dbf.Load(@"..\..\Data\Waybills\39.dbf")));
            var document = WaybillParser.Parse("39.dbf");

            Assert.That(document.Lines.Count, Is.EqualTo(1));
            Assert.That(document.ProviderDocumentId, Is.EqualTo("39"));
            Assert.That(document.DocumentDate, Is.EqualTo(Convert.ToDateTime("17.10.2016")));

            var invoice = document.Invoice;

            Assert.That(invoice.BuyerName, Is.EqualTo("\"Иволга\" (Бирюзовая)"));
            Assert.That(invoice.BuyerId, Is.EqualTo(157));

            var line = document.Lines[0];

            Assert.That(line.Code, Is.EqualTo("892"));
            Assert.That(line.Product, Is.EqualTo("Сеалекс фоpте ПЛЮС капс 0,4г ь4"));
            Assert.That(line.Producer, Is.EqualTo("ООО ВИС"));
            Assert.That(line.Country, Is.EqualTo("Россия"));
            Assert.That(line.SupplierCostWithoutNDS, Is.EqualTo(451.19));
            Assert.That(line.SupplierCost, Is.EqualTo(532.40));
            Assert.That(line.RegistryCost, Is.EqualTo(0));
            Assert.That(line.ProducerCost, Is.EqualTo(527.13));
            Assert.That(line.Nds, Is.EqualTo(18));
            Assert.That(line.NdsAmount, Is.EqualTo(162.43));
            Assert.That(line.Quantity, Is.EqualTo(2));
            Assert.That(line.Amount, Is.EqualTo(1064.80));
            Assert.That(line.Period, Is.EqualTo("22.03.2018"));
            Assert.That(line.SerialNumber, Is.EqualTo("040316"));
            Assert.That(line.Certificates, Is.EqualTo("СГР ьRU.77.99.32.003.Е.009173."));
            Assert.That(line.CertificatesDate, Is.EqualTo("24.09.2015"));
            Assert.That(line.CertificatesEndDate, Is.EqualTo(Convert.ToDateTime("24.09.2025")));
            Assert.That(line.CertificateAuthority, Is.EqualTo("Таможенный союз"));
            Assert.That(line.BillOfEntryNumber, Is.Null);
        }
示例#2
0
        public void Parse()
        {
            var document = WaybillParser.Parse("3897503_ОАС(order732274).xls");

            Assert.That(document.ProviderDocumentId, Is.EqualTo("91931"));
            Assert.That(document.DocumentDate, Is.EqualTo(DateTime.Parse("02.06.10")));

            Assert.That(document.Lines.Count, Is.EqualTo(7));
            var line = document.Lines[0];

            Assert.That(line.Product, Is.EqualTo("Амлодипин тб 10мг бл пач карт N10x3 Озон РОС"));
            Assert.That(line.Code, Is.Null);
            Assert.That(line.Producer, Is.Null);
            Assert.That(line.RegistryCost, Is.Null);
            Assert.That(line.SupplierCost, Is.EqualTo(66.41));
            Assert.That(line.Quantity, Is.EqualTo(5));
            Assert.That(line.ProducerCostWithoutNDS, Is.Null);
            Assert.That(line.SerialNumber, Is.Null);
            Assert.That(line.Certificates, Is.Null);
            Assert.That(line.Country, Is.Null);
            Assert.That(line.Period, Is.Null);
            Assert.That(line.Nds, Is.Null);
            Assert.That(line.VitallyImportant, Is.Null);
        }
示例#3
0
        public void Parse()
        {
            var doc = WaybillParser.Parse("00815575.dbf");

            Assert.That(doc.ProviderDocumentId, Is.EqualTo("815575"));
            //Assert.That(doc.DocumentDate.Value.ToShortDateString(), Is.EqualTo("20.09.2010"));
            var line = doc.Lines[0];

            //Assert.That(.S, Is.EqualTo("815575"));
            Assert.That(line.Product, Is.EqualTo("Оциллококцинум гран. 1г №6доз"));
            Assert.That(line.Nds, Is.EqualTo(10));
            Assert.That(line.Quantity, Is.EqualTo(10));
            Assert.That(line.ProducerCostWithoutNDS, Is.EqualTo(168.43));
            Assert.That(line.SupplierCostWithoutNDS, Is.EqualTo(155.20));
            Assert.That(line.SupplierCost, Is.EqualTo(170.72));
            Assert.That(line.RegistryCost, Is.EqualTo(0.00));
            Assert.That(line.Period, Is.EqualTo("01.12.2014"));
            Assert.That(line.SerialNumber, Is.EqualTo("09382"));
            Assert.That(line.Country, Is.EqualTo("Франция"));
            Assert.That(line.Producer, Is.EqualTo("Laboratoires Boiron"));
            Assert.That(line.Certificates, Is.EqualTo("РОСС.FR.ФМ08.Д37876"));
            Assert.That(line.Code, Is.EqualTo("17917"));
            Assert.That(line.VitallyImportant, !Is.True);
        }
        public void Parse_ForaFarmLogic_Moscow1()
        {
            var document = WaybillParser.Parse(@"..\..\Data\Waybills\5189569_ФораФарм_лоджик-Москва_506462_.dbf");

            Assert.That(document.Lines.Count, Is.EqualTo(11));
            Assert.That(document.ProviderDocumentId, Is.EqualTo("506462"));
            Assert.That(document.Lines[0].Code, Is.EqualTo("18024"));
            Assert.That(document.Lines[0].Product, Is.EqualTo("Гематоген Народный детский 40г (БАД)"));
            Assert.That(document.Lines[0].Producer, Is.EqualTo("Сибирское здоровье 2000"));
            Assert.That(document.Lines[0].Country, Is.EqualTo("РОССИЯ"));
            Assert.That(document.Lines[0].Quantity, Is.EqualTo(50));
            Assert.That(document.Lines[0].SupplierCost, Is.EqualTo(4.61));
            Assert.That(document.Lines[0].SupplierCostWithoutNDS, Is.EqualTo(3.91));
            Assert.That(document.Lines[0].ProducerCostWithoutNDS, Is.EqualTo(0));
            Assert.That(document.Lines[0].VitallyImportant, Is.Null);
            Assert.That(document.Lines[0].RegistryCost, Is.Null);
            Assert.That(document.Lines[0].Period, Is.EqualTo("04.05.2011"));
            Assert.That(document.Lines[0].Nds.Value, Is.EqualTo(18));
            Assert.That(document.Lines[0].Certificates, Is.EqualTo("РОСС RU.АИ42.Д01672"));
            Assert.That(document.Lines[0].SerialNumber, Is.EqualTo("0910"));
            Assert.That(document.DocumentDate, Is.EqualTo(Convert.ToDateTime("09.11.2010")));
            Assert.That(document.Lines[0].NdsAmount, Is.EqualTo(35.16));
            Assert.That(document.Lines[0].Amount, Is.EqualTo(230.5));
        }
示例#5
0
        public void Parse()
        {
            var doc = WaybillParser.Parse("354329.dbf");

            Assert.That(doc.ProviderDocumentId, Is.EqualTo("354329"));
            Assert.That(doc.DocumentDate, Is.EqualTo(DateTime.Parse("22/05/2015")));

            var line = doc.Lines[0];

            Assert.That(line.Code, Is.EqualTo("9243"));
            Assert.That(line.Product, Is.EqualTo("Актовегин р-р 40 мг/мл амп. 5 мл х 5"));
            Assert.That(line.Country, Is.EqualTo("Австрия"));
            Assert.That(line.Producer, Is.EqualTo("Nycomed Austria GmbH - Австрия"));
            Assert.That(line.Quantity, Is.EqualTo(5));
            Assert.That(line.Nds, Is.EqualTo(10));
            Assert.That(line.Period, Is.EqualTo("01.03.2019"));
            Assert.That(line.Certificates, Is.EqualTo("РОСС AT ФМ08 Д33890"));
            Assert.That(line.SupplierCostWithoutNDS, Is.EqualTo(458.10));
            Assert.That(line.SupplierCost, Is.EqualTo(503.91));
            Assert.That(line.ProducerCostWithoutNDS, Is.EqualTo(462.06));
            Assert.That(line.SerialNumber, Is.EqualTo("10968672"));
            Assert.That(line.RegistryCost, Is.EqualTo(0.00));
            Assert.That(line.EAN13, Is.EqualTo(9003638023831));
        }
示例#6
0
        public void Parse()
        {
            var documentLog = new DocumentReceiveLog {
                Supplier = new Supplier {
                    Id = 7
                }
            };                                                                                           // код поставщика Ориола (Воронеж)

            Assert.IsTrue(new WaybillFormatDetector().DetectParser(@"..\..\Data\Waybills\Reon_AX_Comp_Nzak.dbf", documentLog) is OriolaVoronezhSpecialParser);
            var document = WaybillParser.Parse(@"Reon_AX_Comp_Nzak.dbf", documentLog);

            Assert.That(document.Lines.Count, Is.EqualTo(29));
            Assert.That(document.ProviderDocumentId, Is.EqualTo("1006044"));
            Assert.That(document.DocumentDate.Value.ToShortDateString(), Is.EqualTo("27.06.2011"));
            Assert.That(document.Lines[0].Code, Is.EqualTo("65313"));
            Assert.That(document.Lines[0].Product, Is.EqualTo("Аквалор беби д/дет 15мл"));
            Assert.That(document.Lines[0].SerialNumber, Is.EqualTo("SM052(0311)"));
            Assert.That(document.Lines[0].Quantity, Is.EqualTo(1));
            Assert.That(document.Lines[0].SupplierCostWithoutNDS, Is.EqualTo(66.40));
            Assert.That(document.Lines[0].NdsAmount, Is.EqualTo(6.64));
            Assert.That(document.Lines[0].Certificates, Is.EqualTo("РОСС.FR.ИМ25.А01079"));
            Assert.That(document.Lines[0].CertificatesDate, Is.EqualTo("25.04.2008"));
            Assert.That(document.Lines[0].Period, Is.Null);
            Assert.That(document.Lines[0].Country, Is.EqualTo("Франция"));
            Assert.That(document.Lines[0].RegistryCost, Is.EqualTo(0.00));
            Assert.That(document.Lines[0].ProducerCostWithoutNDS, Is.EqualTo(69.09));
            Assert.That(document.Lines[0].SupplierPriceMarkup, Is.EqualTo(-3.89));
            Assert.That(document.Lines[0].Producer, Is.EqualTo("YS LAB"));
            Assert.That(document.Lines[0].SupplierCost, Is.EqualTo(73.04));
            Assert.That(document.Lines[0].Amount, Is.EqualTo(73.04));
            Assert.That(document.Lines[0].Nds, Is.EqualTo(10));
            Assert.That(document.Lines[0].VitallyImportant, Is.False);
            Assert.That(document.Lines[0].EAN13, Is.EqualTo(3582910130062));
            Assert.That(document.Lines[0].BillOfEntryNumber, Is.EqualTo("10130032/080411/0001507/1"));
            Assert.That(document.Lines[0].OrderId, Is.EqualTo(1));
        }
示例#7
0
        public void Parse()
        {
            Assert.IsTrue(FarmGroupParser.CheckFileFormat(Dbf.Load(@"..\..\Data\Waybills\2505.DBF")));
            var document = WaybillParser.Parse("2505.DBF");

            var line = document.Lines[0];

            Assert.That(line.Code, Is.EqualTo("8759"));
            Assert.That(line.Product, Is.EqualTo("Ацикловир Гексал 5% крем д/наруж. прим. 2г Туба (R)"));
            Assert.That(line.ProducerCostWithoutNDS, Is.EqualTo(55.99));
            Assert.That(line.SupplierCostWithoutNDS, Is.EqualTo(60.44));
            Assert.That(line.SupplierCost, Is.EqualTo(66.48));
            Assert.That(line.RegistryCost, Is.EqualTo(56.1));
            Assert.That(line.Nds, Is.EqualTo(10));
            Assert.That(line.Quantity, Is.EqualTo(1));
            //Assert.That(line.Amount, Is.EqualTo(3573.57));
            Assert.That(line.Nds, Is.EqualTo(10));
            Assert.That(line.Producer, Is.EqualTo("Салютас Фарма ГмбХ (ГЕРМАНИЯ)"));
            Assert.That(line.Country, Is.Null);
            Assert.That(line.Period, Is.EqualTo("01.11.2015"));
            Assert.That(line.SerialNumber, Is.EqualTo("CD9853"));
            Assert.That(line.Certificates, Is.EqualTo("РОСС DE.ФМ08.Д99296"));
            Assert.That(line.VitallyImportant, Is.True);
        }
示例#8
0
        public void Parse()
        {
            var document = WaybillParser.Parse("н-023623.dbf");
            var invoice  = document.Invoice;

            Assert.That(document.DocumentDate, Is.EqualTo(DateTime.Parse("15.05.2013")));
            Assert.That(document.ProviderDocumentId, Is.EqualTo("РБн-023623"));
            Assert.That(invoice.BuyerName, Is.EqualTo("<>"));
            Assert.That(invoice.RecipientAddress, Is.Null);
            Assert.That(document.Lines.Count, Is.EqualTo(1));

            var line = document.Lines[0];

            Assert.That(line.Code, Is.EqualTo("18597"));
            Assert.That(line.Product, Is.EqualTo("Тонометр механический СS Medica CS-105 (со встроен"));
            Assert.That(line.Producer, Is.EqualTo("ООО " + '\u0022' + "СиЭс Медика" + '\u0022'));
            Assert.That(line.Quantity, Is.EqualTo(3));
            Assert.That(line.Nds, Is.EqualTo(0));
            Assert.That(line.SupplierCost, Is.EqualTo(10000));
            Assert.That(line.NdsAmount, Is.EqualTo(0));
            Assert.That(line.Amount, Is.EqualTo(30000));
            Assert.That(line.Certificates, Is.EqualTo("РОСС СN.ME20.B07108"));
            Assert.That(line.CertificatesDate, Is.EqualTo("28.10.2013"));
        }
示例#9
0
        public void Parse()
        {
            var doc = WaybillParser.Parse("4048371_Биолайн(10283).txt");

            Assert.That(doc.Lines.Count, Is.EqualTo(14));
            Assert.That(doc.ProviderDocumentId, Is.EqualTo("10283"));
            Assert.That(doc.DocumentDate, Is.EqualTo(Convert.ToDateTime("08.07.2010")));

            Assert.That(doc.Lines[0].Code, Is.EqualTo("50199"));
            Assert.That(doc.Lines[0].Product, Is.EqualTo("Левосин~мазь~туба40г N1~Нижфарм"));
            Assert.That(doc.Lines[0].Producer, Is.EqualTo("Нижфарм"));
            Assert.That(doc.Lines[0].Country, Is.EqualTo("RU"));
            Assert.That(doc.Lines[0].Quantity, Is.EqualTo(3));
            Assert.That(doc.Lines[0].ProducerCostWithoutNDS, Is.EqualTo(52.54));
            Assert.That(doc.Lines[0].SupplierCost, Is.EqualTo(56.26));
            Assert.That(doc.Lines[0].SupplierCostWithoutNDS, Is.EqualTo(51.14));
            Assert.That(doc.Lines[0].Nds.Value, Is.EqualTo(10));
            Assert.That(doc.Lines[0].SerialNumber, Is.EqualTo("241209"));
            Assert.That(doc.Lines[0].Period, Is.EqualTo("01.01.2012"));
            Assert.That(doc.Lines[0].Certificates, Is.EqualTo("РОСС RU ФМ01 Д26574"));
            Assert.That(doc.Lines[0].RegistryCost, Is.Null);
            Assert.That(doc.Lines[0].VitallyImportant, Is.Null);
            Assert.That(doc.Lines[0].SupplierPriceMarkup, Is.EqualTo(15.35));
        }
示例#10
0
 public void No_Tzena()
 {
     WaybillParser.Parse("30893754_001.dbf");
 }
示例#11
0
 public void Parse4()
 {
     var doc = WaybillParser.Parse(@"..\..\Data\Waybills\21796_1272844.dbf");
 }
        public void Parse()
        {
            Assert.IsTrue(KatrenVoronezhParser.CheckFileFormat(Dbf.Load(@"..\..\Data\Waybills\241417.dbf")));
            var document = WaybillParser.Parse("241417.dbf");

            Assert.That(document.Lines.Count, Is.EqualTo(16));
            Assert.That(document.ProviderDocumentId, Is.EqualTo("241417"));
            Assert.That(document.DocumentDate.Value.ToShortDateString(), Is.EqualTo("20.10.2011"));

            var invoice = document.Invoice;

            Assert.That(invoice, Is.Not.Null);
            Assert.That(invoice.InvoiceNumber, Is.EqualTo("241417"));
            Assert.That(invoice.InvoiceDate.Value.ToShortDateString(), Is.EqualTo("21.10.2011"));
            Assert.That(invoice.SellerName, Is.EqualTo("Филиал ЗАО НПК \"Катрен\" в г.Воронеж"));
            Assert.That(invoice.SellerAddress, Is.EqualTo("394065, Россия, г. Воронеж, пр-т Патриотов д. 57а"));
            Assert.That(invoice.SellerINN, Is.EqualTo("5408130693"));
            Assert.That(invoice.SellerKPP, Is.EqualTo("366502001"));
            Assert.That(invoice.ShipperInfo, Is.EqualTo("394065, Россия, г. Воронеж, пр-т Патриотов д. 57а"));
            Assert.That(invoice.RecipientAddress, Is.EqualTo(", г. Воронеж, ул. Димитрова, д. 127"));
            Assert.That(invoice.PaymentDocumentInfo, Is.Null);
            Assert.That(invoice.BuyerName, Is.EqualTo("ВОРОНЕЖ, ИП *Воронова М.В.*"));
            Assert.That(invoice.BuyerAddress, Is.EqualTo("г. Воронеж, Набережная Авиастроителей, дом 18 кв. 360"));
            Assert.That(invoice.BuyerINN, Is.EqualTo("366300341432"));
            Assert.That(invoice.BuyerKPP, Is.Null);
            Assert.That(invoice.AmountWithoutNDS0, Is.EqualTo(0.00));
            Assert.That(invoice.AmountWithoutNDS10, Is.EqualTo(572.60));
            Assert.That(invoice.NDSAmount10, Is.EqualTo(57.26));
            Assert.That(invoice.Amount10, Is.EqualTo(629.86));
            Assert.That(invoice.AmountWithoutNDS18, Is.EqualTo(2755.09));
            Assert.That(invoice.NDSAmount18, Is.EqualTo(495.92));
            Assert.That(invoice.Amount18, Is.EqualTo(3251.01));
            Assert.That(invoice.AmountWithoutNDS, Is.EqualTo(3327.69));
            Assert.That(invoice.NDSAmount, Is.EqualTo(553.18));
            Assert.That(invoice.Amount, Is.EqualTo(3880.87));

            var line = document.Lines[0];

            Assert.That(line.Product, Is.EqualTo("СТОПАНГИН 2А N24 ТАБЛ Д/РАССАС /МЯТА/"));
            Assert.That(line.Unit, Is.EqualTo("шт."));
            Assert.That(line.Quantity, Is.EqualTo(7));
            Assert.That(line.Producer, Is.EqualTo("Рафа Лабораториз Лтд"));
            Assert.That(line.SupplierCost, Is.EqualTo(89.98));
            Assert.That(line.SupplierCostWithoutNDS, Is.EqualTo(81.80));
            Assert.That(line.ExciseTax, Is.Null);
            Assert.That(line.SupplierPriceMarkup, Is.EqualTo(0.00));
            Assert.That(line.RegistryCost, Is.EqualTo(0.00));
            Assert.That(line.ProducerCost, Is.EqualTo(89.98));
            Assert.That(line.ProducerCostWithoutNDS, Is.EqualTo(81.80));
            Assert.That(line.Nds, Is.EqualTo(10));
            Assert.That(line.NdsAmount, Is.EqualTo(57.26));
            Assert.That(line.Amount, Is.EqualTo(629.86));
            Assert.That(line.SerialNumber, Is.EqualTo("102437"));
            Assert.That(line.Period, Is.EqualTo("01.04.2014"));
            Assert.That(line.Certificates, Is.EqualTo("РОСС IL.ФМ08.Д61690"));
            Assert.That(line.Country, Is.EqualTo("израиль"));
            Assert.That(line.BillOfEntryNumber, Is.EqualTo("10130032/170611/0002992/5"));
            Assert.That(line.CertificatesDate, Is.EqualTo("15.06.2011"));
            Assert.That(line.VitallyImportant, Is.False);
            Assert.That(line.EAN13, Is.EqualTo(7290008016766));
            Assert.That(line.OrderId, Is.EqualTo(297967));
        }
 public void Parse_without_supplier_cost_without_nds()
 {
     var doc = WaybillParser.Parse(@"..\..\Data\Waybills\8521183.sst");
 }
        public void Parse_sia_smolensk_vitally_important()
        {
            var doc = WaybillParser.Parse(@"v1R1106787.DBF");

            Assert.IsTrue(doc.Lines[3].VitallyImportant.Value);
        }
        public void Parse2()
        {
            var document = WaybillParser.Parse(@"397173.dbf");

            Assert.AreEqual(document.Lines[0].EAN13, 9006968004006);
        }
        public void Parse3()
        {
            var document = WaybillParser.Parse(@"..\..\Data\Waybills\Р-2620497.DBF");

            Assert.That(document.Invoice.Amount, Is.EqualTo(55593.5600));
        }
        public void Parse()
        {
            var doc = WaybillParser.Parse("66909869-001.sst");

            Assert.That(doc.Lines.Count, Is.EqualTo(18));
            Assert.That(doc.ProviderDocumentId, Is.EqualTo("66909869-001"));
            Assert.That(doc.DocumentDate, Is.EqualTo(Convert.ToDateTime("25.08.2016")));

            Assert.That(doc.Invoice.NDSAmount, Is.EqualTo(3947.82m));
            //Тип накладной
            Assert.That(doc.Invoice.NDSAmount10, Is.EqualTo(337.70m));
            Assert.That(doc.Invoice.NDSAmount18, Is.EqualTo(35.56m));
            //Тип валюты
            //Курс валюты
            Assert.That(doc.Invoice.CommissionFee, Is.Null);
            Assert.That(doc.Invoice.CommissionFeeContractId, Is.EqualTo("0.00"));
            //Наименование плательщика
            Assert.That(doc.Invoice.BuyerId, Is.EqualTo(135192));
            Assert.That(doc.Invoice.BuyerName, Is.EqualTo("ИП Ланзат Н.Б."));
            Assert.That(doc.Invoice.RecipientId, Is.EqualTo(260815));
            Assert.That(doc.Invoice.RecipientName, Is.EqualTo("ул. Дзержинского, 79 (павильон № 4)"));
            Assert.That(doc.Invoice.DelayOfPaymentInBankDays, Is.Null);
            Assert.That(doc.Invoice.DelayOfPaymentInDays, Is.Null);


            Assert.That(doc.Lines[0].Code, Is.EqualTo("30538"));
            Assert.That(doc.Lines[0].Product, Is.EqualTo("911 ВЕНОЛГОН ГЕЛЬ Д/ НОГ ПРИ ТЯЖЕСТИ БОЛИ И ОТЕКАХ ТУБА 100МЛ"));
            Assert.That(doc.Lines[0].Producer, Is.EqualTo("Твинс Тэк"));
            Assert.That(doc.Lines[0].Country, Is.EqualTo("РОССИЯ"));
            Assert.That(doc.Lines[0].Quantity, Is.EqualTo(2.00m));
            Assert.That(doc.Lines[0].SupplierCost, Is.EqualTo(60.06m));
            Assert.That(doc.Lines[0].ProducerCostWithoutNDS, Is.EqualTo(47.79m));
            Assert.That(doc.Lines[0].SupplierCostWithoutNDS, Is.EqualTo(50.90m));
            //Резерв
            Assert.That(doc.Lines[0].SupplierPriceMarkup, Is.EqualTo(0.00m));
            Assert.That(doc.Lines[0].ExpireInMonths, Is.EqualTo(24));
            Assert.That(doc.Lines[0].BillOfEntryNumber, Is.Null);
            Assert.That(doc.Lines[0].Certificates, Is.EqualTo("0516^TC RU Д-RU.AB07.B.00135^20.12.2012^Таможенный союз РБ,РК и РФ0516^POCC RU.ДП.3716.П.RU.0021^13.06.2011^ООО \"БИОСАН-ГИД\"0516^77.99.40.915.Д.010532.06.10^29.06.2010^ФСН ППиБЧ"));
            Assert.That(doc.Lines[0].SerialNumber, Is.EqualTo("0516"));
            Assert.That(doc.Lines[0].DateOfManufacture, Is.EqualTo(Convert.ToDateTime("01.05.2016")));
            Assert.That(doc.Lines[0].Period, Is.EqualTo("01.05.2018"));
            Assert.That(doc.Lines[0].EAN13, Is.EqualTo(4607010242558));
            Assert.That(doc.Lines[0].RegistryDate, Is.Null);
            Assert.That(doc.Lines[0].RegistryCost, Is.EqualTo(0.00m));
            //Торговая наценка организации-импортера
            //Цена комиссионера с НДС
            //Комиссионное вознаграждение без НДС
            //НДС с комиссионного вознаграждения
            //Отпускная цена ЛБО
            Assert.That(doc.Lines[0].Amount, Is.EqualTo(120.12m));
            Assert.That(doc.Lines[0].ProducerCost, Is.EqualTo(56.40m));
            Assert.That(doc.Lines[0].VitallyImportant, Is.EqualTo(false));
            Assert.That(doc.Lines[0].Nds, Is.EqualTo(18.00m));


            Assert.That(doc.Lines[7].Code, Is.EqualTo("652"));
            Assert.That(doc.Lines[7].Product, Is.EqualTo("ВЕНТОЛИН АЭР. Д/ИНГ. ДОЗИР. 0,1МГ/ДОЗА 200 ДОЗ №1"));
            Assert.That(doc.Lines[7].Producer, Is.EqualTo("Glaxo Wellcome Production"));
            Assert.That(doc.Lines[7].Country, Is.EqualTo("ФРАНЦИЯ"));
            Assert.That(doc.Lines[7].Quantity, Is.EqualTo(3.00m));
            Assert.That(doc.Lines[7].SupplierCost, Is.EqualTo(126.94));
            Assert.That(doc.Lines[7].ProducerCostWithoutNDS, Is.EqualTo(107.41m));
            Assert.That(doc.Lines[7].SupplierCostWithoutNDS, Is.EqualTo(115.40m));
            //Резерв
            Assert.That(doc.Lines[7].SupplierPriceMarkup, Is.EqualTo(0.00m));
            Assert.That(doc.Lines[7].ExpireInMonths, Is.EqualTo(24));
            Assert.That(doc.Lines[7].BillOfEntryNumber, Is.EqualTo("10130130/180516/0006781/11"));
            Assert.That(doc.Lines[7].Certificates, Is.Null);
            Assert.That(doc.Lines[7].SerialNumber, Is.EqualTo("WW7N"));
            Assert.That(doc.Lines[7].DateOfManufacture, Is.EqualTo(Convert.ToDateTime("01.03.2016")));
            Assert.That(doc.Lines[7].Period, Is.EqualTo("01.03.2018"));
            Assert.That(doc.Lines[7].EAN13, Is.EqualTo(4607008131857));
            Assert.That(doc.Lines[7].RegistryDate, Is.Null);
            Assert.That(doc.Lines[7].RegistryCost, Is.EqualTo(107.41m));
            //Торговая наценка организации-импортера
            //Цена комиссионера с НДС
            //Комиссионное вознаграждение без НДС
            //НДС с комиссионного вознаграждения
            //Отпускная цена ЛБО
            Assert.That(doc.Lines[7].Amount, Is.EqualTo(380.82m));
            Assert.That(doc.Lines[7].ProducerCost, Is.EqualTo(118.15m));
            Assert.That(doc.Lines[7].VitallyImportant, Is.EqualTo(true));
            Assert.That(doc.Lines[7].Nds, Is.EqualTo(10.00m));
        }
示例#18
0
        public void Parse2()
        {
            var document = WaybillParser.Parse(@"1360036-2.dbf");

            Assert.That(document.Lines[0].EAN13, Is.EqualTo(4607008131321));
        }
        public void Parse_vitally_important()
        {
            var doc = WaybillParser.Parse("Та003539.dbf");

            Assert.IsTrue(doc.Lines[1].VitallyImportant.Value);
        }
        public void Parse()
        {
            var documentLog = new DocumentReceiveLog {
                Supplier = new Supplier {
                    Id = 1581u
                }
            };                                                                                               // код поставщика Здравсервис

            Assert.IsTrue(new WaybillFormatDetector().DetectParser(@"..\..\Data\Waybills\2094247.dbf", documentLog) is ZdravServiceSpecialParser);

            var document = WaybillParser.Parse("2094247.dbf", documentLog);

            Assert.That(document.Lines.Count, Is.EqualTo(22));
            Assert.That(document.ProviderDocumentId, Is.EqualTo("2094247"));
            Assert.That(document.DocumentDate.Value.ToShortDateString(), Is.EqualTo("01.07.2011"));

            var invoice = document.Invoice;

            Assert.That(invoice, Is.Not.Null);
            Assert.That(invoice.InvoiceNumber, Is.EqualTo("2094247"));
            Assert.That(invoice.InvoiceDate.Value.ToShortDateString(), Is.EqualTo("01.07.2011"));
            Assert.That(invoice.SellerName, Is.EqualTo("ЗДРАВСЕРВИС"));
            Assert.That(invoice.SellerAddress, Is.EqualTo("300026, г.Тула, ул.Скуратовская, д.107"));
            Assert.That(invoice.SellerINN, Is.EqualTo("4826022196"));
            Assert.That(invoice.SellerKPP, Is.EqualTo("482601001"));
            Assert.That(invoice.ShipperInfo, Is.EqualTo("ООО Здравсервис, 300026, г.Тула, ул.Скуратовская, д.107"));
            Assert.That(invoice.RecipientAddress, Is.EqualTo("ОГУП \"Липецкфармация\" аптека №1, г. Липецк, ул.Ворошилова, д.1"));
            Assert.That(invoice.PaymentDocumentInfo, Is.Null);
            Assert.That(invoice.BuyerName, Is.EqualTo("ОГУП \"Липецкфармация\""));
            Assert.That(invoice.BuyerAddress, Is.EqualTo("398025, г. Липецк, ул. Гагарина, 113"));
            Assert.That(invoice.BuyerINN, Is.Null);
            Assert.That(invoice.BuyerKPP, Is.Null);
            Assert.That(invoice.AmountWithoutNDS0, Is.EqualTo(0.00));
            Assert.That(invoice.AmountWithoutNDS10, Is.EqualTo(10365.77));
            Assert.That(invoice.NDSAmount10, Is.EqualTo(1036.59));
            Assert.That(invoice.Amount10, Is.EqualTo(11402.36));
            Assert.That(invoice.AmountWithoutNDS18, Is.EqualTo(0.00));
            Assert.That(invoice.NDSAmount18, Is.EqualTo(0.00));
            Assert.That(invoice.Amount18, Is.EqualTo(0.00));
            Assert.That(invoice.AmountWithoutNDS, Is.EqualTo(0));             // ?
            Assert.That(invoice.NDSAmount, Is.EqualTo(11402.36));             // ?
            Assert.That(invoice.Amount, Is.EqualTo(11402.36));

            var line = document.Lines[0];

            Assert.That(line.Code, Is.EqualTo("252740"));
            Assert.That(line.Product, Is.EqualTo("Бактериофаг клебсиеллезный поливалентный очищенный жидкий фл 20мл N4"));
            Assert.That(line.Unit, Is.EqualTo("шт."));
            Assert.That(line.Quantity, Is.EqualTo(3));
            Assert.That(line.Producer, Is.EqualTo("Микроген-Иммун"));
            Assert.That(line.SupplierCost, Is.EqualTo(632.53));
            Assert.That(line.SupplierCostWithoutNDS, Is.EqualTo(575.03));
            Assert.That(line.ExciseTax, Is.Null);
            Assert.That(line.SupplierPriceMarkup, Is.EqualTo(0.00));
            Assert.That(line.RegistryCost, Is.Null);
            Assert.That(line.ProducerCostWithoutNDS, Is.EqualTo(485.76));
            Assert.That(line.Nds, Is.EqualTo(10));
            Assert.That(line.NdsAmount, Is.EqualTo(172.51));
            Assert.That(line.Amount, Is.EqualTo(1897.59));
            Assert.That(line.SerialNumber, Is.EqualTo("Y125/0211"));
            Assert.That(line.Period, Is.EqualTo("01.03.2013"));
            Assert.That(line.Certificates, Is.EqualTo("002840"));
            Assert.That(line.Country, Is.EqualTo("РОС"));
            Assert.That(line.BillOfEntryNumber, Is.Null);
            Assert.That(line.VitallyImportant, Is.False);
            Assert.That(line.EAN13, Is.EqualTo(4600488003393));
        }
        public void Parse_sia_volgograd_vitally_important()
        {
            var doc = WaybillParser.Parse(@"Р-1390032.DBF");

            Assert.IsTrue(doc.Lines[4].VitallyImportant.Value);
        }
        public void Parse_with_incorrect_reg_date()
        {
            var document = WaybillParser.Parse(@"8472653.dbf");

            Assert.AreEqual("  .  .", document.Lines[0].CertificatesDate);
        }
示例#23
0
        public void Parse_with_vitally_important()
        {
            var doc = WaybillParser.Parse("97303.dbf");

            Assert.That(doc.Lines[2].VitallyImportant, Is.True);
        }
        public void Parse()
        {
            var doc = WaybillParser.Parse("761517.dbf");

            Assert.That(doc.ProviderDocumentId, Is.EqualTo("761517"));
        }