Beispiel #1
0
        internal void Execute_ClickEnterCommand(object parameter)
        {
            if (Category != null && Price != null && Price != "0")
            {
                if (ManualProduct == null)
                {
                    if (UsdEnabled == true)
                    {
                        ManualProduct = ProductBase.Add(Description, Category, Math.Round(decimal.Parse(Price) * MainWindowViewModel.GetInstance(null, null).ExchangeRate,
                                                                                          2), Quantity);
                    }
                    else
                    {
                        ManualProduct = ProductBase.Add(Description, Category, decimal.Parse(Price), Quantity);
                    }
                    ManualProduct.Seller         = Seller;
                    ManualProduct.LastAmountSold = ManualProduct.LastQuantitySold * ManualProduct.Price;
                }
                else
                {
                    //Check price currency and current currency state
                    //    if (ManualProduct.PriceCurrency == CurrencyTypeEnum.USD)
                    if (UsdEnabled)
                    {
                        ManualProduct.Price = Math.Round(decimal.Parse(Price) * MainWindowViewModel.GetInstance(null, null).ExchangeRate, 2);
                    }
                    else
                    {
                        ManualProduct.Price = decimal.Parse(Price);
                    }

                    ManualProduct.Seller           = Seller;
                    ManualProduct.Description      = Description;
                    ManualProduct.Category         = Category;
                    ManualProduct.LastQuantitySold = Quantity;
                    ManualProduct.LastAmountSold   = ManualProduct.Price * ManualProduct.LastQuantitySold;
                }
            }
            //MainWindowViewModel.AddManualProductToCart(ManualProduct); Changed from static
            var main = MainWindowViewModel.GetInstance(null, null);

            main.AddManualProductToCart(ManualProduct);
            Clear         = true;
            Price         = "0";
            Description   = "";
            Seller        = "";
            Quantity      = 1;
            ManualProduct = null;
        }
Beispiel #2
0
        /// <summary>
        /// Search and returns a list of products
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public virtual List <IProduct> Search(string input)
        {
            var products = new List <IProduct>();

            //Return empty list if invalid inputs are entered for the search
            if (string.IsNullOrWhiteSpace(input) || input == "x")
            {
                return(products);
            }

            if (input == "*")
            {
                var allProducts = DictOfData.AsEnumerable();
                foreach (var row in allProducts)
                {
                    var product = new ProductBase()
                    {
                        Id                     = Int32.Parse(row["NumeroProducto"].ToString()),
                        Code                   = row["Codigo"].ToString(),
                        AlternativeCode        = row["CodigoAlterno"].ToString(),
                        ProviderProductId      = row["ProveedorProductoId"].ToString(),
                        Description            = row["Descripcion"].ToString(),
                        Provider               = row["Proveedor"].ToString(),
                        Category               = row["Categoria"].ToString(),
                        LastPurchaseDate       = Convert.ToDateTime(row["UltimoPedidoFecha"].ToString()),
                        Cost                   = Decimal.Parse(row["Costo"].ToString()),
                        Price                  = decimal.Parse(row["Precio"].ToString()),
                        InternalQuantity       = Int32.Parse(row["CantidadInternoHistorial"].ToString()),
                        QuantitySold           = Int32.Parse(row["CantidadVendidoHistorial"].ToString()),
                        AmountSold             = decimal.Parse(row["VendidoHistorial"].ToString()),
                        LocalQuantityAvailable = Int32.Parse(row["CantidadLocal"].ToString()),
                        TotalQuantityAvailable = Int32.Parse(row["CantidadDisponibleTotal"].ToString()),
                        MinimumStockQuantity   = Int32.Parse(row["CantidadMinima"].ToString()),
                        LastSaleDate           = Convert.ToDateTime(row["UltimaTransaccionFecha"].ToString()),
                        ImageName              = row["Imagen"].ToString()
                    };

                    product.CostCurrency  = row["CostoMoneda"].ToString().ToUpper() == "USD" ? CurrencyTypeEnum.USD : CurrencyTypeEnum.MXN;
                    product.PriceCurrency = row["PrecioMoneda"].ToString().ToUpper() == "USD" ? CurrencyTypeEnum.USD : CurrencyTypeEnum.MXN;

                    products.Add(product);
                }

                return(products);
            }

            var descriptionFilter = DictOfData.AsEnumerable().Where(r => r.Field <string>("Descripcion").ToLower().Contains(input));
            var codeFilter        = DictOfData.AsEnumerable().Where(r => r.Field <string>("Codigo").ToLower().Contains(input));

            foreach (var row in codeFilter)
            {
                var product = new ProductBase()
                {
                    Id                     = Int32.Parse(row["NumeroProducto"].ToString()),
                    Code                   = row["Codigo"].ToString(),
                    AlternativeCode        = row["CodigoAlterno"].ToString(),
                    ProviderProductId      = row["ProveedorProductoId"].ToString(),
                    Description            = row["Descripcion"].ToString(),
                    Provider               = row["Proveedor"].ToString(),
                    Category               = row["Categoria"].ToString(),
                    LastPurchaseDate       = Convert.ToDateTime(row["UltimoPedidoFecha"].ToString()),
                    Cost                   = Decimal.Parse(row["Costo"].ToString()),
                    Price                  = decimal.Parse(row["Precio"].ToString()),
                    InternalQuantity       = Int32.Parse(row["CantidadInternoHistorial"].ToString()),
                    QuantitySold           = Int32.Parse(row["CantidadVendidoHistorial"].ToString()),
                    AmountSold             = decimal.Parse(row["VendidoHistorial"].ToString()),
                    LocalQuantityAvailable = Int32.Parse(row["CantidadLocal"].ToString()),
                    TotalQuantityAvailable = Int32.Parse(row["CantidadDisponibleTotal"].ToString()),
                    MinimumStockQuantity   = Int32.Parse(row["CantidadMinima"].ToString()),
                    LastSaleDate           = Convert.ToDateTime(row["UltimaTransaccionFecha"].ToString()),
                    ImageName              = row["Imagen"].ToString()
                };

                product.CostCurrency  = row["CostoMoneda"].ToString().ToUpper() == "USD" ? CurrencyTypeEnum.USD : CurrencyTypeEnum.MXN;
                product.PriceCurrency = row["PrecioMoneda"].ToString().ToUpper() == "USD" ? CurrencyTypeEnum.USD : CurrencyTypeEnum.MXN;

                products.Add(product);
            }

            foreach (var row in descriptionFilter)
            {
                var product = new ProductBase()
                {
                    Id                     = Int32.Parse(row["NumeroProducto"].ToString()),
                    Code                   = row["Codigo"].ToString(),
                    AlternativeCode        = row["CodigoAlterno"].ToString(),
                    ProviderProductId      = row["ProveedorProductoId"].ToString(),
                    Description            = row["Descripcion"].ToString(),
                    Provider               = row["Proveedor"].ToString(),
                    Category               = row["Categoria"].ToString(),
                    LastPurchaseDate       = Convert.ToDateTime(row["UltimoPedidoFecha"].ToString()),
                    Cost                   = Decimal.Parse(row["Costo"].ToString()),
                    Price                  = decimal.Parse(row["Precio"].ToString()),
                    InternalQuantity       = Int32.Parse(row["CantidadInternoHistorial"].ToString()),
                    QuantitySold           = Int32.Parse(row["CantidadVendidoHistorial"].ToString()),
                    AmountSold             = decimal.Parse(row["VendidoHistorial"].ToString()),
                    LocalQuantityAvailable = Int32.Parse(row["CantidadLocal"].ToString()),
                    TotalQuantityAvailable = Int32.Parse(row["CantidadDisponibleTotal"].ToString()),
                    MinimumStockQuantity   = Int32.Parse(row["CantidadMinima"].ToString()),
                    LastSaleDate           = Convert.ToDateTime(row["UltimaTransaccionFecha"].ToString()),
                    ImageName              = row["Imagen"].ToString()
                };

                product.CostCurrency  = row["CostoMoneda"].ToString().ToUpper() == "USD" ? CurrencyTypeEnum.USD : CurrencyTypeEnum.MXN;
                product.PriceCurrency = row["PrecioMoneda"].ToString().ToUpper() == "USD" ? CurrencyTypeEnum.USD : CurrencyTypeEnum.MXN;

                //Add if it does not exist already
                if (!products.Exists(x => x.Code == product.Code))
                {
                    products.Add(product);
                }
            }

            return(products);
        }
Beispiel #3
0
        /// <summary>
        /// Prints end of sales X receipt
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void PrintEndOfDaySalesFullReceipt(object sender, PrintPageEventArgs e)
        {
            Graphics graphic = e.Graphics;

            Font font          = new Font("Courier New", 9, System.Drawing.FontStyle.Bold);
            Font storeNameFont = new Font("Courier New", 14, System.Drawing.FontStyle.Bold);
            Font storeInfoFont = new Font("Courier New", 8, System.Drawing.FontStyle.Bold);

            var   buf                 = string.Empty;
            float fontHeight          = 9.0f + 4.5f;
            float storeNameFontHeight = storeNameFont.GetHeight();
            float storeInfoFontHeight = 8 + 6f;

            //Parse Description
            var commentsLines = new List <string>();

            if (EndOfDayAmountData.Comments == null)
            {
                commentsLines.Add(" ");
            }
            else
            {
                commentsLines = Formatter.BreakDownString(EndOfDayAmountData.Comments, 35);
            }

            int startX = 5;
            int startY = 1;
            int offset = 10;

            int itemsNumber = 0;

            //Header business info
            buf = "  " + Pos.BusinessName;
            graphic.DrawString(buf, storeNameFont, new SolidBrush(Color.Black), startX,
                               startY + offset);
            offset = offset + (int)storeNameFontHeight;
            buf    = "     " + Pos.FiscalName;
            graphic.DrawString(buf, storeInfoFont, new SolidBrush(Color.Black), startX,
                               startY + offset);
            offset = offset + (int)storeInfoFontHeight;
            buf    = "          " + Pos.FiscalType + "  " + Pos.FiscalNumber;
            graphic.DrawString(buf, storeInfoFont, new SolidBrush(Color.Black), startX,
                               startY + offset);
            offset = offset + (int)storeInfoFontHeight;
            buf    = "  " + Pos.FiscalStreetAddress;
            graphic.DrawString(buf, storeInfoFont, new SolidBrush(Color.Black),
                               startX, startY + offset);
            offset = offset + (int)storeInfoFontHeight;
            buf    = "   " + Pos.FiscalCityAndZipCode + "  " + Pos.FiscalPhoneNumber;
            graphic.DrawString(buf, storeInfoFont, new SolidBrush(Color.Black), startX,
                               startY + offset);
            offset = offset + (int)storeInfoFontHeight;

            buf = "        " + Pos.FiscalEmail;
            graphic.DrawString(buf, storeInfoFont, new SolidBrush(Color.Black), startX,
                               startY + offset);
            offset = offset + (int)storeInfoFontHeight + 10;

            //Ticket numbers and range
            graphic.DrawString("Corte X    " + "Folio " + EndOfDayReceiptData.FirstReceiptNumber.ToString() + " al " +
                               EndOfDayReceiptData.LastReceiptNumber, storeInfoFont, new SolidBrush(Color.Black), startX,
                               startY + offset);
            offset = offset + (int)storeInfoFontHeight + 10;

            Thread.CurrentThread.CurrentCulture = new CultureInfo("es-MX");
            var date = DateTime.Now.ToString("g");

            var ticketNumber = "No. " + Pos.LastCorteZNumber.ToString();

            graphic.DrawString(ticketNumber.PadRight(18) + date, storeInfoFont, new SolidBrush(Color.Black), startX,
                               startY + offset);
            offset = offset + (int)storeInfoFontHeight + 10;

            //Sales per category loop
            foreach (var catInfo in EndOfDayReceiptData.SalesInfoPerCategory)
            {
                //mimic a product just to use the ToString overwrite
                var cat = new ProductBase()
                {
                    Category         = catInfo.Item1,
                    LastQuantitySold = catInfo.Item2,
                    Price            = catInfo.Item3
                };
                if (cat.LastAmountSold != 0 || cat.Price != 0)
                {
                    graphic.DrawString(cat.ToString(ReceiptType.DailyRegular), font, new SolidBrush(Color.Black), startX, startY + offset);
                    offset = offset + (int)fontHeight;
                }
            }

            offset = offset + 10;

            //TOTAL LE CABEN 35 letras
            //graphic.DrawString("***********************************", font,
            //    new SolidBrush(Color.Black), startX, startY + offset);

            //offset = offset + (int)fontHeight + 1;

            graphic.DrawString("********** Total Ventas ***********", font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Puntos Usados: ".PadLeft(20) + string.Format("{0}", EndOfDayReceiptData.PointsTotal), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Total Articulos: ".PadLeft(20) + string.Format("{0}", EndOfDayReceiptData.TotalItemsSold), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Efectivo MXN: ".PadLeft(20) + string.Format("{0:c}", EndOfDayReceiptData.CashTotal), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Tarjeta MXN: ".PadLeft(20) + string.Format("{0:c}", EndOfDayReceiptData.CardTotal), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Otro Metodo MXN: ".PadLeft(20) + string.Format("{0:c}", EndOfDayReceiptData.OtherTotal +
                                                                               EndOfDayReceiptData.BankTotal + EndOfDayReceiptData.CheckTotal), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Total MXN: ".PadLeft(20) + string.Format("{0:c}", EndOfDayReceiptData.TotalAmountSold), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("********** Devoluciones ***********", font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Total Articulos: ".PadLeft(20) + string.Format("{0}", EndOfDayReceiptData.TotalReturnItems), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Efectivo MXN: ".PadLeft(20) + string.Format("{0:c}", EndOfDayReceiptData.ReturnsCash), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Tarjeta MXN: ".PadLeft(20) + string.Format("{0:c}", EndOfDayReceiptData.ReturnsCard), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Total MXN: ".PadLeft(20) + string.Format("{0:c}", EndOfDayReceiptData.ReturnsCard + EndOfDayReceiptData.ReturnsCash),
                               font, new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("*********** Total Caja ************", font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Monedas Pesos: ".PadLeft(20) + string.Format("{0:c}", EndOfDayAmountData.MxnCoins), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Pesos 20: ".PadLeft(20) + string.Format("{0}", EndOfDayAmountData.Mxn20), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Pesos 50: ".PadLeft(20) + string.Format("{0}", EndOfDayAmountData.Mxn50), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Pesos 100: ".PadLeft(20) + string.Format("{0}", EndOfDayAmountData.Mxn100), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Pesos 200: ".PadLeft(20) + string.Format("{0}", EndOfDayAmountData.Mxn200), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Pesos 500: ".PadLeft(20) + string.Format("{0}", EndOfDayAmountData.Mxn500), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Pesos 1000: ".PadLeft(20) + string.Format("{0}", EndOfDayAmountData.Mxn1000), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Total Efectivo MXN: ".PadLeft(20) + string.Format("{0:c}", EndOfDayAmountData.MxnTotalCash), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Monedas Dolar: ".PadLeft(20) + string.Format("{0:c}", EndOfDayAmountData.UsdCoins), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Dolar 1: ".PadLeft(20) + string.Format("{0}", EndOfDayAmountData.Usd1), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Dolar 5: ".PadLeft(20) + string.Format("{0}", EndOfDayAmountData.Usd5), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Dolar 10: ".PadLeft(20) + string.Format("{0}", EndOfDayAmountData.Usd10), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Dolar 20: ".PadLeft(20) + string.Format("{0}", EndOfDayAmountData.Usd20), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Dolar 50: ".PadLeft(20) + string.Format("{0}", EndOfDayAmountData.Usd50), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Dolar 100: ".PadLeft(20) + string.Format("{0}", EndOfDayAmountData.Usd100), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Total Efectivo USD: ".PadLeft(20) + string.Format("{0:c}", EndOfDayAmountData.UsdTotalCash), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("********** Total Gastos ***********", font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Efectivo MXN: ".PadLeft(20) + string.Format("{0:c}", EndOfDayAmountData.ExpensesCash), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Totales MXN: ".PadLeft(20) + string.Format("{0:c}", EndOfDayAmountData.ExpensesTotal), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("************* Resumen *************", font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Usuario: ".PadLeft(20) + string.Format("{0}", EndOfDayAmountData.User), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Tipo de Corte: ".PadLeft(20) + string.Format("{0}", EndOfDayAmountData.EndOfSalesReceiptType), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Tipo de Cambio: ".PadLeft(20) + string.Format("{0:c}", EndOfDayAmountData.ExchangeRate), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Caja Inicio MXN: ".PadLeft(20) + string.Format("{0:c}", EndOfDayAmountData.InitialCash), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Caja Nueva MXN: ".PadLeft(20) + string.Format("{0:c}", EndOfDayAmountData.NewInitialCash), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Diferencia MXN: ".PadLeft(20) + string.Format("{0:c}", EndOfDayAmountData.Delta), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;
            offset = offset + (int)fontHeight + 1;

            graphic.DrawString("Comentarios: ", font, new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 1;

            foreach (var commentLine in commentsLines)
            {
                graphic.DrawString(string.Format("{0}", commentLine), font, new SolidBrush(Color.Black), startX, startY + offset);

                offset = offset + (int)fontHeight + 1;
            }

            graphic.DrawString(string.Format("  Final Corte {0} {1}", EndOfDayAmountData.EndOfSalesReceiptType, date), storeInfoFont, new SolidBrush(Color.Black),
                               startX, startY + offset);
            offset = offset + (int)storeInfoFontHeight;
        }
Beispiel #4
0
        /// <summary>
        /// Prints end of day Z receipt
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void PrintEndOfDaySalesReceipt(object sender, PrintPageEventArgs e)
        {
            Graphics graphic = e.Graphics;

            Font font          = new Font("Courier New", 9, System.Drawing.FontStyle.Bold);
            Font storeNameFont = new Font("Courier New", 14, System.Drawing.FontStyle.Bold);
            Font storeInfoFont = new Font("Courier New", 8, System.Drawing.FontStyle.Bold);

            var   buf                 = string.Empty;
            float fontHeight          = font.GetHeight();
            float storeNameFontHeight = storeNameFont.GetHeight();
            float storeInfoFontHeight = storeInfoFont.GetHeight();

            int startX = 5;
            int startY = 2;
            int offset = 10;

            int itemsNumber = 0;

            //Header business information
            buf = "  " + Pos.BusinessName;
            graphic.DrawString(buf, storeNameFont, new SolidBrush(Color.Black), startX,
                               startY + offset);
            offset = offset + (int)storeNameFontHeight;
            buf    = "     " + Pos.FiscalName;
            graphic.DrawString(buf, storeInfoFont, new SolidBrush(Color.Black), startX,
                               startY + offset);
            offset = offset + (int)storeInfoFontHeight;
            buf    = "          " + Pos.FiscalType + "  " + Pos.FiscalNumber;
            graphic.DrawString(buf, storeInfoFont, new SolidBrush(Color.Black), startX,
                               startY + offset);
            offset = offset + (int)storeInfoFontHeight;
            buf    = "  " + Pos.FiscalStreetAddress;
            graphic.DrawString(buf, storeInfoFont, new SolidBrush(Color.Black),
                               startX, startY + offset);
            offset = offset + (int)storeInfoFontHeight;
            buf    = "   " + Pos.FiscalCityAndZipCode + "  " + Pos.FiscalPhoneNumber;
            graphic.DrawString(buf, storeInfoFont, new SolidBrush(Color.Black), startX,
                               startY + offset);
            offset = offset + (int)storeInfoFontHeight;

            buf = "        " + Pos.FiscalEmail;
            graphic.DrawString(buf, storeInfoFont, new SolidBrush(Color.Black), startX,
                               startY + offset);
            offset = offset + (int)storeInfoFontHeight + 10;

            //Receipt number and tickets number range
            graphic.DrawString("Corte Z    " + "Folio " + EndOfDayReceiptData.FirstReceiptNumber.ToString() + " al " +
                               EndOfDayReceiptData.LastReceiptNumber, storeInfoFont, new SolidBrush(Color.Black), startX,
                               startY + offset);
            offset = offset + (int)storeInfoFontHeight + 10;

            Thread.CurrentThread.CurrentCulture = new CultureInfo("es-MX");
            var date = DateTime.Now.ToString("g");

            var ticketNumber = "No. " + Pos.LastCorteZNumber.ToString();

            graphic.DrawString(ticketNumber.PadRight(18) + date, storeInfoFont, new SolidBrush(Color.Black), startX,
                               startY + offset);
            offset = offset + (int)storeInfoFontHeight + 10;

            //Gets each category information
            foreach (var catInfo in EndOfDayReceiptData.SalesInfoPerCategory)
            {
                //mimic a product just to use the ToString overwrite
                var cat = new ProductBase()
                {
                    Category         = catInfo.Item1,
                    LastQuantitySold = catInfo.Item2,
                    Price            = catInfo.Item3
                };
                //product line
                if (cat.LastQuantitySold != 0 || cat.Price != 0)
                {
                    graphic.DrawString(cat.ToString(ReceiptType.DailyRegular), font, new SolidBrush(Color.Black), startX, startY + offset);
                    offset = offset + (int)fontHeight;
                }
            }

            offset = offset + 10;

            graphic.DrawString("Articulos: ".PadLeft(20) + string.Format("{0}", EndOfDayReceiptData.TotalItemsSold), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 5;

            graphic.DrawString("Efectivo: ".PadLeft(20) + string.Format("{0:c}", EndOfDayReceiptData.CashTotal), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 5;

            graphic.DrawString("Tarjeta: ".PadLeft(20) + string.Format("{0:c}", EndOfDayReceiptData.CardTotal), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 5;

            graphic.DrawString("Otro Metodo: ".PadLeft(20) + string.Format("{0:c}", EndOfDayReceiptData.OtherTotal +
                                                                           EndOfDayReceiptData.BankTotal + EndOfDayReceiptData.BankTotal), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 5;

            graphic.DrawString("Total: ".PadLeft(20) + string.Format("{0:c}", EndOfDayReceiptData.TotalAmountSold), font,
                               new SolidBrush(Color.Black), startX, startY + offset);

            offset = offset + (int)fontHeight + 5;

            graphic.DrawString(string.Format("  Final Corte {0} {1}", EndOfDayAmountData.EndOfSalesReceiptType, date), storeInfoFont, new SolidBrush(Color.Black),
                               startX, startY + offset);
            offset = offset + (int)storeInfoFontHeight;
        }