Example #1
0
        public void marocco_print_format_Type_1()
        {
            VoucherPrinter printer = new VoucherPrinter();

            printer.m_PrinterName        = @"\\192.168.44.158\della52fe3-p";
            printer.m_ReportType2        = "VPrinting.Documents.VoucherPrintLayout276";
            printer.m_PrinterXmlFilePath = @"C:\PROJECTS\VPrint2\XmlConfigurations\print504_Type1.xml";
            printer.PrintAllocation(0, true);
        }
Example #2
0
        public void czech_print_format_TypeX_1()
        {
            VoucherPrinter printer = new VoucherPrinter();

            printer.m_PrinterName        = Printers.DELL;
            printer.m_ReportType2        = "VPrinting.Documents.VoucherPrintLayoutRazX";
            printer.m_PrinterXmlFilePath = @"C:\PROJECTS\VPrint2\XmlConfigurations\print203_Type1_RazX.xml";
            printer.PrintAllocation(102223, false); //
        }
Example #3
0
        public void uk_print_format_Demo()
        {
            VoucherPrinter printer = new VoucherPrinter();

            printer.m_PrinterName        = Printers.Tally_T2365_2T;
            printer.m_ReportType2        = "VPrinting.Documents.VoucherPrintLayout826";
            printer.m_PrinterXmlFilePath = @"C:\PROJECTS\VPrint2\XmlConfigurations\print826.xml";
            printer.PrintAllocation(246244, true);
        }
Example #4
0
        public void germany_print_format_Type_1_Raz()
        {
            VoucherPrinter printer = new VoucherPrinter();

            printer.m_PrinterName        = Printers.Empty;
            printer.m_ReportType2        = "VPrinting.Documents.VoucherPrintLayoutRaz";
            printer.m_PrinterXmlFilePath = @"C:\PROJECTS\VPrint2\XmlConfigurations\print276_Type1_Raz.xml";
            printer.PrintAllocation(80882, false);
        }
Example #5
0
        public void suisse_print_format_Type_1()
        {
            VoucherPrinter printer = new VoucherPrinter();

            printer.m_PrinterName        = Printers.Tally_T2365_2T;
            printer.m_ReportType2        = "VPrinting.Documents.VoucherPrintLayout250";
            printer.m_PrinterXmlFilePath = @"C:\PROJECTS\VPrint2\XmlConfigurations\print756_Type1.xml";
            printer.PrintAllocation(246244, false);
        }
Example #6
0
        public void germany_print_format_Type_1()
        {
            VoucherPrinter printer = new VoucherPrinter();

            printer.m_PrinterName        = Printers.DELL;
            printer.m_ReportType2        = "VPrinting.Documents.VoucherPrintLayout276";
            printer.m_PrinterXmlFilePath = @"C:\PROJECTS\VPrint2\XmlConfigurations\print276_Type1.xml";
            printer.PrintAllocation(0, true);
        }
Example #7
0
        public void hungary_print_format_Type_1()
        {
            VoucherPrinter printer = new VoucherPrinter();

            printer.UseLocalFormat       = true;
            printer.m_PrinterName        = Printers.DELL;
            printer.m_ReportType2        = "VPrinting.Documents.VoucherPrintLayoutRaz";
            printer.m_PrinterXmlFilePath = @"C:\PROJECTS\VPrint2\XmlConfigurations\print348_Type1_Raz.xml";
            printer.PrintAllocation(401177, false);
        }
Example #8
0
        //Should be built in Release
        public void argentina_print_format_Type_1_Live()
        {
            VoucherPrinter printer = new VoucherPrinter();

            printer.m_PrinterName        = Printers.DELL;
            printer.m_ReportType2        = "VPrinting.Documents.VoucherPrintLayout620";
            printer.m_PrinterXmlFilePath = @"C:\PROJECTS\VPrint2\XmlConfigurations\print32_Type1.xml";
            //5 MUNDOS, LDA
            //BUBBLE-QUINTA SHOPPING LJ43 8135-862: id(141690)
            printer.PrintAllocation(332970, false);
        }
Example #9
0
        public void germany_print_format_Type_6_RazX()
        {
            VoucherPrinter printer = new VoucherPrinter();

            printer.m_PrinterName        = Printers._3TH_FLOOR_PRINTER;
            printer.m_ReportType2        = "VPrinting.Documents.VoucherPrintLayoutRazX";
            printer.m_PrinterXmlFilePath = @"C:\PROJECTS\VPrint2\XmlConfigurations\print276_Type6_RazX.xml";
            printer.PrintOnce            = true;
            printer.UseLocalFormat       = true;
            printer.UseLocalPrinter      = true;
            printer.PrintAllocation(80882, false);
        }
Example #10
0
        public void austria_print_format_Type_1_Raz()
        {
            VoucherPrinter printer = new VoucherPrinter();

            printer.m_PrinterName        = Printers.Empty;
            printer.m_ReportType2        = "VPrinting.Documents.VoucherPrintLayoutRaz";
            printer.m_PrinterXmlFilePath = @"C:\PROJECTS\VPrint2\XmlConfigurations\print40_Type1_Raz.xml";
            printer.PrintOnce            = true;
            printer.UseLocalFormat       = true;
            printer.UseLocalPrinter      = true;
            printer.PrintAllocation(203931, false);
        }
Example #11
0
        public void hungaryForFrance_print_format_Type_1()
        {
            VoucherPrinter printer = new VoucherPrinter();

            printer.UseLocalFormat       = true;
            printer.UseLocalPrinter      = true;
            printer.PrintOnce            = true;
            printer.m_PrinterName        = Printers.DELL;
            printer.m_ReportType2        = "VPrinting.Documents.VoucherPrintLayoutRazX";
            printer.m_PrinterXmlFilePath = @"C:\PROJECTS\VPrint2\XmlConfigurations\print348_Type2_RazX.xml";
            printer.SimulatePrint        = true;
            printer.PrintAllocation(454247, false);
        }
Example #12
0
        public void uk_RGPrintLine_format_test()
        {
            VoucherPrinter printer = new VoucherPrinter();

            printer.m_PrinterName        = Printers.DELL;
            printer.m_ReportType2        = "VPrinting.Documents.VoucherPrintLayoutUnitRazX";
            printer.m_PrinterXmlFilePath = @"C:\PROJECTS\VPrint\RGPrintLineTest.xml";
            printer.PrintOnce            = true;
            printer.SimulatePrint        = false;
            printer.UseLocalFormat       = true;
            printer.UseLocalPrinter      = true;
            printer.PrintAllocation(246244, false);
        }
Example #13
0
        public void printUnits_format_Type_1()
        {
            VoucherPrinter printer = new VoucherPrinter();

            printer.UseLocalFormat       = true;
            printer.UseLocalPrinter      = true;
            printer.PrintOnce            = true;
            printer.SimulatePrint        = true;
            printer.m_PrinterName        = Printers.DELL;
            printer.m_ReportType2        = "VPrinting.Documents.VoucherPrintLayoutUnitRazX";
            printer.m_PrinterXmlFilePath = @"C:\PROJECTS\VPrint2\XmlConfigurations\printUnits.xml";
            printer.PrintAllocation(77493, false);
        }
Example #14
0
        public void holland_print_format_Type_1()
        {
            VoucherPrinter printer = new VoucherPrinter();

            printer.UseLocalFormat       = false;
            printer.UseLocalPrinter      = true;
            printer.PrintOnce            = true;
            printer.m_PrinterName        = Printers.DELL;
            printer.m_ReportType2        = "VPrinting.Documents.VoucherPrintLayoutRaz";
            printer.m_PrinterXmlFilePath = @"C:\PROJECTS\VPrint2\XmlConfigurations\print528_Type1_Raz.xml";
            printer.SimulatePrint        = false;
            printer.PrintAllocation(457312, false);
        }
Example #15
0
        public void belgium_print_format_Type_1()
        {
            VoucherPrinter printer = new VoucherPrinter();

            printer.m_PrinterName        = Printers.AJ_RAVI_ROOM;
            printer.m_ReportType2        = "VPrinting.Documents.VoucherPrintLayout250";
            printer.m_PrinterXmlFilePath = @"C:\PROJECTS\VPrint2\XmlConfigurations\print56_Type1.xml";
            printer.PrintOnce            = true;
            printer.UseLocalPrinter      = true;
            printer.UseLocalFormat       = false;
            printer.SimulatePrint        = true;
            printer.PrintAllocation(246244, false);
        }
Example #16
0
        public void france_print_format_Type_2()
        {
            VoucherPrinter printer = new VoucherPrinter();

            printer.m_PrinterName        = Printers.DELL;
            printer.m_ReportType2        = "VPrinting.Documents.VoucherPrintLayout250";
            printer.m_PrinterXmlFilePath = @"C:\PROJECTS\VPrint2\XmlConfigurations\print250_Type2.xml";
            printer.PrintOnce            = true;
            printer.UseLocalFormat       = true;
            printer.UseLocalPrinter      = true;
            printer.SimulatePrint        = false;
            printer.PrintAllocation(358828, false);
        }
Example #17
0
        private void printer_Test2(object sender, System.EventArgs e)
        {
            VoucherPrinter Model = (VoucherPrinter)sender;

            var id            = Model.Retailer.Id;
            var barcodeNumber = Model.StrVoucherNo.Replace(" ", "").Substring(3);
            var barcodeText   = Model.StrVoucherNo.Replace(" ", "");

            //RETAILER
            var shopName      = Model.Retailer.Name;
            var voucher       = Model.VoucherNo;
            var checkDig      = Model.Printing.CalculateCheckDigit(Model.VoucherNo);
            var voucherNumber = string.Concat(Model.VoucherNo, checkDig);
            var line1         = Model.Retailer.RetailAddress.Line1;
            var line2         = Model.Retailer.RetailAddress.Line2;
            var line3         = Model.Retailer.RetailAddress.Line3;
            var line5         = Model.Retailer.RetailAddress.Line5;

            var officeData = Model.Manager.RetrieveTableData("ho_pfs, ho_Certificate_1, ho_Certificate_2, ho_Certificate_3, ho_category_title,ho_add_id", "HeadOffice",
                                                             "where ho_id={0} and ho_iso_id={1}".format(Model.Retailer.HeadOfficeId, Model.Retailer.CountryId));
            var branchData = Model.Manager.RetrieveTableData("br_category, br_pfs", "Branch",
                                                             "where br_id={0} and br_iso_id={1}".format(Model.Retailer.Id, Model.Retailer.CountryId));

            //OFFICE
            var officeName = Convert.ToString(Model.Manager.RetrieveTableData("ho_trading_name", "HeadOffice",
                                                                              "where ho_id={0} and ho_iso_id={1}".format(Model.Retailer.HeadOfficeId, Model.Retailer.CountryId)).FirstOrDefault());

            var hoData = Model.Manager.RetrieveTableData("hoa_add_1,hoa_add_2,hoa_add_3,hoa_add_4,hoa_add_5,hoa_add_6", "HeadOfficeAddress",
                                                         "where hoa_id = {0} ".format(officeData.Length > 5 ? officeData[5] : "0"));

            var oLine1 = Convert.ToString(hoData.Length > 0 ? hoData[0] : "");
            var oLine2 = Convert.ToString(hoData.Length > 1 ? hoData[1] : "");
            var oLine3 = Convert.ToString(hoData.Length > 2 ? hoData[2] : "");
            var oLine5 = Convert.ToString(hoData.Length > 3 ? hoData[4] : "");

            //CERTIFICATES
            var certificate1 = Convert.ToString(officeData.Length > 1 ? officeData[1] : "");
            var certificate2 = Convert.ToString(officeData.Length > 2 ? officeData[2] : "");
            var certificate3 = Convert.ToString(officeData.Length > 3 ? officeData[3] : "");
            var category     = Convert.ToString(officeData.Length > 4 ? officeData[4] : "");
            var vatNumber    = Model.Retailer.VatNumber;

            Assert.AreEqual(id, 123456);
            Assert.IsNotNull(Model.Retailer);
            Assert.IsTrue(Model.Retailer.HeadOfficeId != 0);
            Assert.IsTrue(Model.Retailer.CountryId != 0);
            Assert.IsNotNull(oLine2);
            Assert.IsTrue(!string.IsNullOrWhiteSpace(certificate3));
            Assert.IsTrue(!string.IsNullOrWhiteSpace(officeName));
            Assert.IsTrue(!string.IsNullOrWhiteSpace(vatNumber));
        }
Example #18
0
        public void greece_print_format_TypeX_3()
        {
            //Oki
            VoucherPrinter printer = new VoucherPrinter();

            printer.m_PrinterName        = Printers.DELL;
            printer.m_ReportType2        = "VPrinting.Documents.VoucherPrintLayoutRazX";
            printer.m_PrinterXmlFilePath = @"C:\PROJECTS\VPrint\print300_Type3_RazX.xml";
            printer.UseLocalPrinter      = true;
            printer.UseLocalFormat       = true;
            printer.PrintOnce            = true;
            printer.SimulatePrint        = false;
            printer.PrintAllocation(389298, false); //388608
        }
Example #19
0
        public void italy_print_format_Type_2()
        {
            //SMALL
            VoucherPrinter printer = new VoucherPrinter();

            printer.UseLocalFormat       = false;
            printer.UseLocalPrinter      = true;
            printer.SimulatePrint        = false;
            printer.PrintOnce            = true;
            printer.m_PrinterName        = Printers.DELL;
            printer.m_ReportType2        = "VPrinting.Documents.VoucherPrintLayoutRazX";
            printer.m_PrinterXmlFilePath = @"C:\PROJECTS\VPrint2\XmlConfigurations\print380_Type2_RazX.xml";
            printer.PrintAllocation(360303, false);//384920//384920//211771
        }
Example #20
0
        public void italy_print_format_Type_1()
        {
            VoucherPrinter printer = new VoucherPrinter();

            printer.UseLocalFormat       = false;
            printer.UseLocalPrinter      = false;
            printer.PrintOnce            = true;
            printer.m_PrinterName        = Printers.DELL;
            printer.m_ReportType2        = "VPrinting.Documents.VoucherPrintLayoutRaz";
            printer.m_PrinterXmlFilePath = @"C:\PROJECTS\VPrint2\XmlConfigurations\print380_Type1_Raz.xml";
            printer.Test         += new EventHandler(printer_Test);
            printer.SimulatePrint = true;
            printer.PrintAllocation(589331, false);//384920//211771
        }
Example #21
0
        public void spain_print724_format_ss_only_1_Demo()
        {
            //724
            VoucherPrinter printer = new VoucherPrinter();

            printer.m_PrinterName        = Printers.Tally_T2365_2T;
            printer.m_ReportType2        = "VPrinting.Documents.VoucherPrintLayoutRazX";
            printer.m_PrinterXmlFilePath = @"C:\PROJECTS\VPrint2\XmlConfigurations\print724_ss_RazX.xml";
            printer.UseLocalFormat       = true;
            printer.UseLocalPrinter      = true;
            printer.SimulatePrint        = false;
            printer.PrintOnce            = true;
            printer.PrintAllocation(422651, false);//335934
        }
Example #22
0
        public void portugal_print901_format_ss_1_Demo()
        {
            //CountryID = 901
            VoucherPrinter printer = new VoucherPrinter();

            printer.m_PrinterName        = Printers.DELL;
            printer.m_ReportType2        = "VPrinting.Documents.VoucherPrintLayoutRazX";
            printer.m_PrinterXmlFilePath = @"C:\PROJECTS\VPrint2\XmlConfigurations\print901_RazX.xml";
            printer.UseLocalFormat       = true;
            printer.UseLocalPrinter      = true;
            printer.SimulatePrint        = false;
            printer.PrintOnce            = true;
            printer.PrintAllocation(421141, false);
        }
Example #23
0
        public void greece_print_format_TypeX_2()
        {
            //HP - RID - 361456
            VoucherPrinter printer = new VoucherPrinter();

            printer.m_PrinterName        = Printers._3TH_FLOOR_PRINTER;
            printer.m_ReportType2        = "VPrinting.Documents.VoucherPrintLayoutRazX";
            printer.m_PrinterXmlFilePath = @"C:\PROJECTS\VPrint2\XmlConfigurations\print300_Type2_RazX.xml";
            printer.UseLocalPrinter      = true;
            printer.UseLocalFormat       = true;
            printer.PrintOnce            = true;
            printer.SimulatePrint        = false;
            printer.Test += new System.EventHandler(printer_Test);
            printer.PrintAllocation(389298, false); //361456
        }
Example #24
0
        public void portugal_print901_format_ssnew_2_Demo()
        {
            //CountryID = 901
            var printer = new VoucherPrinter();

            printer.m_PrinterName        = Printers._3TH_FLOOR_PRINTER;
            printer.m_ReportType2        = "VPrinting.Documents.VoucherPrintLayoutRazX";
            printer.m_PrinterXmlFilePath = @"C:\PROJECTS\VPrint2\XmlConfigurations\print901_Type4_RazX.xml";
            printer.UseLocalFormat       = false;
            printer.UseLocalPrinter      = true;
            printer.SimulatePrint        = false;
            printer.PrintOnce            = true;
            printer.Test += new EventHandler(printer_Test);
            printer.PrintAllocation(547200, false);
        }
Example #25
0
        public void hungary_print_format_TypeX_1testing()
        {
            VoucherPrinter printer = new VoucherPrinter();

            printer.UseLocalFormat       = true;
            printer.UseLocalPrinter      = true;
            printer.PrintOnce            = false;
            printer.m_PrinterName        = Printers.DELL;
            printer.m_ReportType2        = "VPrinting.Documents.VoucherPrintLayoutRazX";
            printer.m_PrinterXmlFilePath = @"C:\PROJECTS\VPrint2\XmlConfigurations\print348_Type1_RazX.xml";
            printer.SimulatePrint        = true;
            printer.PrintAllocation(440972, new List <int>()
            {
                110
            });
        }
Example #26
0
        public void italy_print_format_Type_4()
        {
            //BIG
            VoucherPrinter printer = new VoucherPrinter();

            printer.Test                += new System.EventHandler(printer_Test);
            printer.UseLocalFormat       = false;
            printer.UseLocalPrinter      = true;
            printer.PrintOnce            = true;
            printer.SimulatePrint        = true;
            printer.m_PrinterName        = Printers._3TH_FLOOR_PRINTER;
            printer.m_ReportType2        = "VPrinting.Documents.VoucherPrintLayoutRazX";
            printer.m_PrinterXmlFilePath = @"C:\PROJECTS\VPrint2\XmlConfigurations\print380_Type4_RazX.xml";
            printer.PrintAllocation(589331, false); //569366  360303
            //435438//384920//211771
            //441786//435438//428314---•	Sephora  head office 106793
        }
Example #27
0
        void printer_Test(object sender, EventArgs e)
        {
            VoucherPrinter Model = (VoucherPrinter)sender;

            //Please no code into the body tag!
            //Only variables

            //Voucher
            var voucherNumber = Model.VoucherNo + Model.Printing.CalculateCheckDigit(Model.VoucherNo);


            var barcodeNumber = Model.StrVoucherNo.Replace(" ", "").Substring(3);
            var barcodeText   = Model.StrVoucherNo.Replace(" ", "");

            //Retailer
            var id              = Model.Retailer.Id;
            var retailerName    = Model.Retailer.TradingName.EscapeXml();
            var rLine1          = Model.Retailer.RetailAddress.Line1;
            var rLine2          = Model.Retailer.RetailAddress.Line2;
            var rLine3          = Model.Retailer.RetailAddress.Line3;
            var rLine5          = Model.Retailer.RetailAddress.Line5;
            var retailerAddress = string.Concat(rLine1, '\n', rLine2, '\n', rLine5, '-', rLine3).EscapeXml();
            var retailerPhone   = Model.Retailer.Phone.EscapeXml();

            var officeData = Model.Manager.RetrieveTableData("ho_pfs, ho_Certificate_1, ho_Certificate_2, ho_Certificate_3, ho_category_title,ho_add_id", "HeadOffice",
                                                             "where ho_id={0} and ho_iso_id={1}".format(Model.Retailer.HeadOfficeId, Model.Retailer.CountryId));
            var branchData = Model.Manager.RetrieveTableData("br_category, br_pfs", "Branch",
                                                             "where br_id={0} and br_iso_id={1}".format(Model.Retailer.Id, Model.Retailer.CountryId));

            var ho = "HO: " + Model.Retailer.HeadOfficeId;

            //Office
            var officeName = Model.Retailer.HeadOfficeName.EscapeXml();
            var hoData     = Model.Manager.RetrieveTableData("hoa_add_1,hoa_add_2,hoa_add_3,hoa_add_4,hoa_add_5,hoa_add_6", "HeadOfficeAddress",
                                                             "where hoa_id = {0} ".format(officeData.Length > 5 ? officeData[5] : "0"));
            var oLine1        = hoData.Length > 0 ? hoData[0] : "";
            var oLine2        = hoData.Length > 1 ? hoData[1] : "";
            var oLine3        = hoData.Length > 2 ? hoData[2] : "";
            var oLine5        = hoData.Length > 4 ? hoData[4] : "";
            var officeAddress = string.Concat(oLine1, '\n', oLine2, '\n', oLine5, '-', oLine3).EscapeXml();

            var vatNumber = string.Concat("", Model.Retailer.VatNumber);
        }
Example #28
0
        private void btnTryPrint_Click(object sender, EventArgs e)
        {
            int allocationId = 0;

            if (int.TryParse(tbAllocationId.Text, out allocationId))
            {
                string filePath = Path.GetTempFileName();
                File.WriteAllText(filePath, txtXmlText.Text);
                string formatType = txtType.Text;

                Task.Factory.StartNew((o) =>
                {
                    try
                    {
                        Tuple <string, string, int> t = (Tuple <string, string, int>)o;

                        using (var printer = new VoucherPrinter())
                        {
                            printer.m_PrinterName        = ConfigurationManager.AppSettings["PrinterName"];
                            printer.m_ReportType2        = t.Item2; //"VPrinting.Documents.VoucherPrintLayoutUnitRazX";
                            printer.m_PrinterXmlFilePath = t.Item1;
                            printer.PrintOnce            = true;
                            printer.UseLocalFormat       = true;
                            printer.UseLocalPrinter      = true;
                            printer.SimulatePrint        = false;
                            printer.PrintAllocation(t.Item3, false);
                        }
                        File.Delete(t.Item1);
                    }
                    catch (Exception ex)
                    {
                        Program.OnThreadException(this, new ThreadExceptionEventArgs(ex));
                    }
                }, new Tuple <string, string, int>(filePath, formatType, allocationId));
            }
        }
Example #29
0
        private void printer_Test(object sender, System.EventArgs e)
        {
            VoucherPrinter Model = (VoucherPrinter)sender;

            var id            = Model.Retailer.Id;
            var barcodeNumber = Model.StrVoucherNo.Replace(" ", "").Substring(3);
            var barcodeText   = Model.StrVoucherNo.Replace(" ", "");

            //RETAILER
            var shopName      = Model.Retailer.Name;
            var voucher       = Model.VoucherNo;
            var checkDig      = Model.Printing.CalculateCheckDigit(Model.VoucherNo);
            var voucherNumber = string.Concat(Model.VoucherNo, checkDig);
            var line1         = Model.Retailer.RetailAddress.Line1;
            var line2         = Model.Retailer.RetailAddress.Line2;
            var line3         = Model.Retailer.RetailAddress.Line3;
            var line5         = Model.Retailer.RetailAddress.Line5;

            var officeData = Model.Manager.RetrieveTableData("ho_pfs, ho_Certificate_1, ho_Certificate_2, ho_Certificate_3, ho_category_title,ho_add_id", "HeadOffice",
                                                             "where ho_id={0} and ho_iso_id={1}".format(Model.Retailer.HeadOfficeId, Model.Retailer.CountryId));
            var branchData = Model.Manager.RetrieveTableData("br_category, br_pfs", "Branch",
                                                             "where br_id={0} and br_iso_id={1}".format(Model.Retailer.Id, Model.Retailer.CountryId));

            //OFFICE
            var officeName = Convert.ToString(Model.Manager.RetrieveTableData("ho_trading_name", "HeadOffice",
                                                                              "where ho_id={0} and ho_iso_id={1}".format(Model.Retailer.HeadOfficeId, Model.Retailer.CountryId)).FirstOrDefault()).EscapeXml();

            var hoData = Model.Manager.RetrieveTableData("hoa_add_1,hoa_add_2,hoa_add_3,hoa_add_4,hoa_add_5,hoa_add_6", "HeadOfficeAddress",
                                                         "where hoa_id = {0} ".format(officeData.Length > 5 ? officeData[5] : "0"));

            var oLine1 = Convert.ToString(hoData.Length > 0 ? hoData[0] : "");
            var oLine2 = Convert.ToString(hoData.Length > 1 ? hoData[1] : "");
            var oLine3 = Convert.ToString(hoData.Length > 2 ? hoData[2] : "");
            var oLine5 = Convert.ToString(hoData.Length > 3 ? hoData[4] : "");

            //CERTIFICATES
            var certificate1 = Convert.ToString(officeData.Length > 1 ? officeData[1] : "");
            var certificate2 = Convert.ToString(officeData.Length > 2 ? officeData[2] : "");
            var certificate3 = Convert.ToString(officeData.Length > 3 ? officeData[3] : "");
            var category     = Convert.ToString(officeData.Length > 4 ? officeData[4] : "");
            var vatNumber    = Model.Retailer.VatNumber;

            var value = string.Format(
                "Shop Code: {0}\r\n" +
                "Doc nr: S-IT-380-10-{0}-{1}-{2}\r\n" +
                "{3}\r\n" +
                "{4}\r\n" +
                "{5} {6}\r\n" +
                "{7}\r\n" +
                "{8}\r\n" +
                "{9}\t{10}\r\n" +
                "P.I: {11}\r\n" +
                "C.F./REG.IMP.: {12}\r\n" +
                "N.REA: {13,-30} CAP.SOC: {14}",
                id, voucher, checkDig,
                shopName,
                line1,
                line5, line3,
                officeName,
                oLine1,
                oLine5, oLine3,
                vatNumber,
                certificate1,
                certificate3, certificate2).EscapeXml();
        }