//[/BARCODE FUNCTIONS] private void UpdateCash() { SubtotalTemp = 0; TaxTemp = 0; Subtotal = 0; TotalTax = 0; if (!semaphore && !OnExit) { semaphore = true; foreach (DataGridViewRow r in TeldgView.Rows) { if (!r.IsNewRow && !OnExit) { try { //PriceLevelSelection DataRow aItemRow = ItemsMgmt.SelectItemRowByBarcode(TeldgView.Rows[r.Index].Cells["Barcode"].Value.ToString()); SubtotalTemp = Math.Round(double.Parse(TeldgView.Rows[r.Index].Cells["PriceTotal"].Value.ToString()), 3); Subtotal += SubtotalTemp; TaxTemp = double.Parse(TeldgView.Rows[r.Index].Cells["Tax"].Value.ToString()); TotalTax += (TaxTemp / 100) * SubtotalTemp; //Net amount = (Selling Price - Sales Price)*Tax //updates } catch (Exception ex) { MessageBox.Show("UPDATE CASH ERROR IN [DISPOSE ITEMS] Exception:" + ex.ToString()); return; } } } TotalTxtBox.Text = Math.Round(Subtotal + TotalTax, 2).ToString(); Subtotal = Math.Round(Subtotal, 2); SubtotalTxtBox.Text = Subtotal.ToString(); TotalTax = Math.Round(TotalTax, 3); TaxTxtBox.Text = TotalTax.ToString(); semaphore = false; } }
void FillPrices() { FindViewById <TextView>(Resource.Id.tvSubtotal).Text = Subtotal.ToString("C", System.Globalization.CultureInfo.GetCultureInfo("es-mx")); FindViewById <TextView>(Resource.Id.tvDescuento).Text = Descuento.ToString("C", System.Globalization.CultureInfo.GetCultureInfo("es-mx")); FindViewById <TextView>(Resource.Id.tvIVA).Text = IVATotal.ToString("C", System.Globalization.CultureInfo.GetCultureInfo("es-mx")); FindViewById <TextView>(Resource.Id.tvTotal).Text = Total.ToString("C", System.Globalization.CultureInfo.GetCultureInfo("es-mx")); }
/// <summary> /// Prints receipt /// </summary> /// <param name="pay"> number that represents the method of payment</param> private void Receipt(int pay) { ReceiptPrinter r = new ReceiptPrinter(); StringBuilder sb = new StringBuilder(); sb.Append("\t Cowboy Cafe\n _________________________________________\n\nOrder #" + OrderNumber.ToString() + "\t\t\t" + DateTime.Now + "\n\n"); foreach (IOrderItem i in Items) { sb.Append(i.ToString() + "\t\t " + i.Price.ToString("C2")); foreach (string st in i.SpecialInstructions) { sb.Append("\n\t" + st); } sb.Append("\n"); } sb.Append("\nSubtotal: " + Subtotal.ToString("C2") + "\nTax: \t " + Tax.ToString("C2") + "\nTotal: \t " + Total.ToString("C2") + "\n"); if (pay == 0) { sb.Append("\nPaid: \t" + Paid.ToString("C2")); } else { sb.Append("\nCredit: \t " + Paid.ToString("C2")); } sb.Append("\nChange: \t " + Change.ToString("C2")); string s = sb.ToString(); MessageBox.Show(s); r.Print(s); s = "Contents of the Cash Drawer\n\n____________________________\n Coins\n____________________________\n\nPennies: " + cd.Pennies + "\nNickels: " + cd.Nickels + "\nDimes: " + cd.Dimes + "\nQuarters: " + cd.Quarters + "\nHalf Dollars: " + cd.HalfDollars + "\nDollars: " + cd.Dollars + "\n\n____________________________\n Bills\n____________________________\n\nOnes: " + cd.Ones + "\nTwos: " + cd.Twos + "\nFives: " + cd.Fives + "\nTens: " + cd.Tens + "\nTwenties: " + cd.Twenties + "\nFifties: " + cd.Fifties + "\nHundreds: " + cd.Hundreds + "\n\n____________________________\nCash Drawer Total: " + cd.TotalValue.ToString("C2") + "\n____________________________\n"; MessageBox.Show(s); NewOrder(); }
public override string ToString() { // TODO ArBy global culture, datetime format var formattedIssueDate = IssueDate.ToString("yyyy-MM-dd"); var formattedDueDate = DueDate.ToString("yyyy-MM-dd"); var formattedRedemptionDate = RedemptionDate != null?RedemptionDate.Value.ToString("yyyy-MM-dd") : "n/a"; return("Invoice(" + $"serial={Serial}, " + $"id={Id}, " + $"isPayed={IsPayed.ToString()}, " + $"issueDate={formattedIssueDate}, " + $"dueDate={formattedDueDate}, " + $"redemptionDate={formattedRedemptionDate}, " + $"supplier={Supplier}, " + $"receiver={Receiver}, " + $"total={Total.ToString(CultureInfo.InvariantCulture)}, " + $"subtotal={Subtotal.ToString(CultureInfo.InvariantCulture)}, " + $"discount={Discount.ToString(CultureInfo.InvariantCulture)}, " + $"payed={Payed.ToString(CultureInfo.InvariantCulture)}, " + $"due={Due.ToString(CultureInfo.InvariantCulture)}, " + $"items=[{string.Join(", ", Items)}], " + $"payments=[{string.Join(", ", Payments)}]" + ")"); }
private void CMDFACUTRA_Click(object sender, EventArgs e) { //Programa para hacer factura de automovil //Silva Reyes Luis Adrian 19210549 //Tarea#12 //Declaracion de variables Double Precio, Ganancia, Comision, Iva, Subtotal, Total; string Descripciones; //Asignacion de variables Precio = System.Double.Parse(TXTPRE.Text); Descripciones = (TXTDES.Text); //Calculo de factura Ganancia = Precio * .20; Comision = Ganancia + 0.03; Subtotal = Ganancia + Precio + Comision; Iva = Subtotal * .15; Total = Subtotal + Iva; //Salida de datos TXTDESC.Text = Descripciones.ToString(); TXTSUB.Text = Subtotal.ToString(); TXTIVA.Text = Iva.ToString(); TXTTOTAL.Text = Total.ToString(); }
public override string ToString() { string cadena = ""; cadena += Cliente.ToString() + "\n"; cadena += "Pedido: " + Folio.ToString() + " Subtotal: " + Subtotal.ToString("C") + " Iva: " + MontoIva.ToString("C") + " MontoIeps: " + MontoIeps.ToString("C") + " Total: " + Total.ToString("C") + "\n\n"; foreach (clsProductosPedido item in Items) { cadena += item.ToString(); } return(cadena); }
public SeatPlan(PlayInfoForm upperForm) { InitializeComponent(); UpperForm = upperForm; Subtotal = 0.0; label10.Text = Subtotal.ToString("C", CultureInfo.CreateSpecificCulture("en-GB")); SelectedSeats = new List <Seat>(); foreach (Control p in panel1.Controls)//get all flowlaylout panels in panel1 { //check if flow layout panel if (p.GetType() == typeof(FlowLayoutPanel)) { foreach (Control b in p.Controls)//for each button a single flowlayoutpanel { foreach (Band band in UpperForm.ChosenPerformance.PerformanceBands) { Band currentBand = band; double price = currentBand.BandPrice; string letter = currentBand.BandNumber; foreach (Seat seat in band.BandSeats) { string number = seat.SeatNumber.ToString(); bool occupied = seat.Occupied; if (b.Name == letter + number) { if (occupied == true) { b.BackColor = Color.Red; b.Text = letter + number; b.Enabled = false; } else { b.BackColor = Color.Gray; b.Text = price.ToString("C", CultureInfo.CreateSpecificCulture("en-GB")) + "\n" + letter + number; b.Click += MyButtonClick; b.Enabled = true; } } } } } } } this.Show(); }
/// <summary> /// Creates the reciept to be sent to the printer /// </summary> /// <param name="cardOrCash">0 if card 1 if cash</param> private void PrintReceipt(int cardOrCash) { ReceiptPrinter rp = new ReceiptPrinter(); StringBuilder sb = new StringBuilder(); sb.Append("---------- COWBOY CAFE ----------\n"); sb.Append(DateTime.Now + "\n"); sb.Append("Order #: " + PrevOrderNumber + "\n"); /* Iterate over all items */ foreach (IOrderItem i in Items) { sb.Append(i.ToString() + "\t\t" + i.Price.ToString("C2") + "\n"); /* Iterate through the special instruction for the item i */ foreach (string s in i.SpecialInstructions) { sb.Append(s + "\n"); } sb.Append("\n"); } sb.Append("Subtotal: " + Subtotal.ToString("C2") + "\n"); sb.Append("Tax: " + Tax.ToString("C2") + "\n"); sb.Append("Total: " + TotalWithTax.ToString("C2") + "\n\n"); if (cardOrCash == 1) { sb.Append("Paid: " + Paid.ToString("C2") + "\n"); sb.Append("Change: " + Change.ToString("C2") + "\n"); } else { sb.Append("Credit Card was used!\n"); } string sr = sb.ToString(); MessageBox.Show(sr); rp.Print(sr); ShowDrawerContents(); SetNewOrder(); }
private void DgvListado_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { DgvMostrarDetalle.DataSource = NVenta.ListarDetalle(Convert.ToInt32(DgvListado.CurrentRow.Cells["ID"].Value)); decimal Total, Subtotal; decimal Impuesto = Convert.ToDecimal(DgvListado.CurrentRow.Cells["Impuesto"].Value); Total = Convert.ToDecimal(DgvListado.CurrentRow.Cells["Total"].Value); Subtotal = Total / (1 + Impuesto); TxtSubDetalle.Text = Subtotal.ToString("#0.00#"); TxtImDetalle.Text = (Total - Subtotal).ToString("#0.00#"); TxtTotDetalle.Text = Total.ToString("#0.00#"); PanelMostrar.Visible = true; } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { dgvMostarDetalle.DataSource = N_Factura.ListarDetalle(Convert.ToInt32(dataGridView1.CurrentRow.Cells["ID"].Value)); decimal Total, Subtotal; decimal Impuesto = Convert.ToDecimal(dataGridView1.CurrentRow.Cells["Impuesto"].Value); Total = Convert.ToDecimal(dataGridView1.CurrentRow.Cells["Total"].Value); Subtotal = Total / Impuesto; txtSubTotalDetalle.Text = Subtotal.ToString("#0.00#"); txtTotalDetalle.Text = Total.ToString("#0.00#"); txtIVADetalle.Text = (Total - Subtotal).ToString("#0.00#"); panelDetalleDoc.Visible = true; } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("Order Number " + OrderNumber.ToString()); sb.AppendLine(); sb.Append(DateTime.Now.ToString()); sb.AppendLine(); foreach (IOrderItem i in items) { sb.Append(i.ToString() + " " + i.Price.ToString()); sb.AppendLine(); } sb.Append("Tax is " + Tax.ToString()); sb.AppendLine(); sb.Append("Total is" + Subtotal.ToString()); sb.AppendLine(); sb.Append("Paid with Credit"); return(sb.ToString()); }
/// <summary> /// Simple formatted output /// </summary> public string ToString(bool useBasic) { StringBuilder result = new StringBuilder(); if (useBasic) { result.AppendFormat("Subtotal : £{0} ", Subtotal.ToString("0.00")); result.Append(Discount.Replace("\r\n", ", ")); result.AppendFormat(" Total : £{0}\r\n", Total.ToString("0.00")); } else { //we put any additional dialogue here result.AppendLine(fremarks.ToString()); result.AppendFormat("Subtotal : £{0} \r\n\r\n", Subtotal.ToString("0.00")); result.AppendLine(Discount); result.AppendFormat("Total : £{0}\r\n", Total.ToString("0.00")); } return(result.ToString()); }
public string ToString(double cashGiven) { StringBuilder sb = new StringBuilder(); double changeDue = Subtotal - cashGiven; sb.Append("Order Number " + OrderNumber.ToString()); sb.AppendLine(); sb.Append(DateTime.Now.ToString()); sb.AppendLine(); foreach (IOrderItem i in items) { sb.Append(i.ToString() + " " + i.Price.ToString()); sb.AppendLine(); } sb.Append("Tax is " + Tax.ToString()); sb.AppendLine(); sb.Append("Total is" + Subtotal.ToString()); sb.AppendLine(); sb.Append("Paid with " + cashGiven.ToString()); sb.AppendLine(); sb.Append("Change due " + changeDue.ToString()); return(sb.ToString()); }
public override string ToString() { //Creates a variable to be used to convert the myStringBuilder into a string String StringVar; //instatiates an object of the StringBuilder class StringBuilder myStringBuilder = new StringBuilder(); //Adding to String myStringBuilder.Append("\n"); myStringBuilder.Append("Customer Type: EVENT \n"); myStringBuilder.Append("Customer Name: " + CustomerName + "\n"); myStringBuilder.Append("Total Items: " + TotalItem + "\n"); myStringBuilder.Append("Adult Subtotal: " + AdultSubtotal.ToString("c") + "\n"); myStringBuilder.Append("Child Subtotal: " + ChildSubtotal.ToString("c") + "\n"); myStringBuilder.Append("Subtotal: " + Subtotal.ToString("c") + "\n"); myStringBuilder.Append("Sales Tax:" + SalesTaxAmount.ToString("c") + "\n"); myStringBuilder.Append("Grand Total: " + Total.ToString("c") + "\n"); StringVar = myStringBuilder.ToString(); return(StringVar); }
private void ImprimirVenta(object idVenta) { using (var dt = ObtenerDetalles()) { if (dt.Rows.Count > 0) { string documento = Documento.ToString(); string tipoDocumento = TipoDocumento.ToString(); string comprobante = "Venta"; string número = idVenta.ToString(); string fecha = Fecha.Date.ToString("dd/MM/yyyy"); string subTotal = Subtotal.ToString(); string descuento = Descuento.ToString(); string total = ImporteTotal.ToString(); MostrarReporte(dt, DireccionCliente, RazónSocialCliente, documento, tipoDocumento, comprobante, número, fecha, subTotal, descuento, total); } else { ShowError("No pudo imprimir el documento."); } } }
// Event handler for printing receipt void rcpt_PrintPage(object sender, PrintPageEventArgs e) { // Initialize printing stuff Graphics g = e.Graphics; Font font = new Font("Arial", 10); Font barcodeFont = new Font("Free 3 of 9", 36); //Will default to Sans Serif if not installed float lSpacing = 5F; Brush brush = Brushes.Black; Pen pen = new Pen(brush); StringFormat leftAlign = new StringFormat() { Alignment = StringAlignment.Near }; StringFormat centerAlign = new StringFormat() { Alignment = StringAlignment.Center }; StringFormat rightAlign = new StringFormat() { Alignment = StringAlignment.Far }; RectangleF cursor = new RectangleF(e.PageBounds.X, e.PageBounds.Y, e.PageBounds.Width, font.Height); // Print Logo g.DrawImage(logo, cursor.Width / 2 - logo.Width / 2, cursor.Top); cursor.Y += logo.Height + lSpacing; // Print InvoiceID Barcode cursor = printText("*" + InvoiceID.ToString() + "*", true, g, barcodeFont, brush, cursor, centerAlign, lSpacing); // Print Header cursor = printHeaderFooter(header, g, font, brush, cursor, centerAlign, lSpacing); // Print InvoiceID cursor = printText("Invoice #: " + InvoiceID.ToString(), true, g, font, brush, cursor, leftAlign, lSpacing); // Print RegisterID cursor = printText("Register ID: " + RegisterID.ToString(), false, g, font, brush, cursor, leftAlign, lSpacing); // Print Location cursor = printText("Location: " + Location, true, g, font, brush, cursor, rightAlign, lSpacing); // Date and time cursor = printText("Date and time: " + TransactionDateTime.ToString(), true, g, font, brush, cursor, leftAlign, lSpacing); // Print Separator cursor = printHorizontalLine(g, font, pen, cursor, lSpacing); // Print Items foreach (Item item in Items) { cursor = printText(item.NumSold + " " + item.Name, false, g, font, brush, cursor, leftAlign, lSpacing); cursor = printText("$ " + item.Price.ToString(), true, g, font, brush, cursor, rightAlign, lSpacing); } // Print Separator cursor = printHorizontalLine(g, font, pen, cursor, lSpacing); // Print subtotal cursor = printText("SubTotal:", false, g, font, brush, cursor, leftAlign, lSpacing); cursor = printText("$ " + Subtotal.ToString(), true, g, font, brush, cursor, rightAlign, lSpacing); // Print tax cursor = printText("Tax:", false, g, font, brush, cursor, leftAlign, lSpacing); cursor = printText("$ " + Tax.ToString(), true, g, font, brush, cursor, rightAlign, lSpacing); // Print total cursor = printText("TOTAL:", false, g, font, brush, cursor, leftAlign, lSpacing); cursor = printText("$ " + Total.ToString(), true, g, font, brush, cursor, rightAlign, lSpacing); // Print Separator cursor = printHorizontalLine(g, font, pen, cursor, lSpacing); // Print # of items cursor = printText("# of Items: " + Items.Count.ToString(), true, g, font, brush, cursor, leftAlign, lSpacing); // Print Payment Method cursor = printText("Payment Method: " + PayMethod + ": " + PayNum, true, g, font, brush, cursor, leftAlign, lSpacing); //Print footer cursor = printHeaderFooter(footer, g, font, brush, cursor, centerAlign, lSpacing); }
private async void btnFinalizar_Click(object sender, EventArgs e) { if (btnFinalizar.Text != "OK") { if (ManipulaMensagens.MostrarMensagem(MensagensPredefinidas.CONFIRMA_ACAO, MessageBoxButtons.YesNoCancel) == DialogResult.Yes) { if (bool.Parse(await ConectaServidor.EnviarItem($"UPDATE ENSAIOS SET ENSPRECO = {Subtotal.ToString().Replace(',', '.')} WHERE ENSID = {EnsaioID}"))) { ManipulaMensagens.MostrarMensagem(MensagensPredefinidas.OPERACAO_CONCLUIDA); DialogResult = DialogResult.Yes; } else { ManipulaMensagens.MostrarMensagem(MensagensPredefinidas.ERRO_INESPERADO); } } } else { this.Close(); } }
private void btnCalcular_Click(object sender, EventArgs e) { //Variables//Empieza la calculacion double Subtotal; double Tax = .115; double Total; double Vevidas = 0.00; double Frituras = 0.00; double SalsaAderezo = 0.00; if (radSorrullo.Checked) { Frituras = 1.00; } else if (radAlcapurria.Checked) { Frituras = 1.50; } if (radPastelillos.Checked) { Frituras = 0.85; } else if (radpizza.Checked) { Frituras = 1.00; } if (radSorrudog.Checked) { Frituras = 1.00; } else if (radPepsi.Checked) { Vevidas = 1.00; } if (radSprite.Checked) { Vevidas = 1.00; } else if (radCoca.Checked) { Vevidas = 1.00; } if (radCocoRico.Checked) { Vevidas = 1.00; } else if (radCafe.Checked) { Vevidas = 0.50; } if (radChina.Checked) { Vevidas = 1.25; } else if (radTe.Checked) { Vevidas = 2.00; } if (radTropical.Checked) { Vevidas = 1.25; } else if (false) { ; } //S SalsaAderezo += (chkHoneyM.Checked ? 0.70 : 0.00); SalsaAderezo += (chkKetchup.Checked ? 0.25 : 0.00); SalsaAderezo += (chkMayoK.Checked ? 0.25 : 0.00); SalsaAderezo += (chkRanch.Checked ? 0.25 : 0.00); SalsaAderezo += (chkSpicyPig.Checked ? 0.70 : 0.00); Subtotal = Frituras + SalsaAderezo + Vevidas; Tax = Tax * Subtotal; Total = Subtotal + Tax; msjSub.Text = Subtotal.ToString("c"); msjTax.Text = Tax.ToString("c"); msjTotal.Text = Total.ToString("c"); }
public Member(string _MembershipType, DateTime _StartDate, bool _PersonalTrainingPlan, bool _LockerRental) { //Initialize PersonalTrainingPlan = _PersonalTrainingPlan; LockerRental = _LockerRental; StartDate = _StartDate; MembershipType = _MembershipType; //Calculate end date if ("Individual 1 Month" == MembershipType || "Two Person 1 Month" == MembershipType || "Family 1 Month" == MembershipType) { EndDate = StartDate.AddMonths(1); } else if ("Individual 12 Month" == MembershipType || "Two Person 12 Month" == MembershipType || "Family 12 Month" == MembershipType) { EndDate = StartDate.AddYears(1); } //Read price and set subtotal var lines = File.ReadAllLines(@"..\..\Data\price.csv"); foreach (var line in lines) { var elements = line.Split(','); if (MembershipType == elements[0]) { Subtotal = Convert.ToDouble(elements[1]); strSubtotal = Subtotal.ToString("C2"); break; } } Total = Subtotal; strTotal = Total.ToString("C2"); ////Calculate cost per month if (MembershipType.IndexOf(" 1 ") >= 0) { MembershipCostPerMonth = Subtotal; strMembershipCostPerMonth = MembershipCostPerMonth.ToString("C2"); } else { MembershipCostPerMonth = Math.Round(Subtotal / 12, 2); strMembershipCostPerMonth = MembershipCostPerMonth.ToString("C2"); } //If personal training plan selected, charge 5/mon if (PersonalTrainingPlan) { double PersonalTrainingPlan = Convert.ToDouble(File.ReadAllText(@"..\..\Data\PersonalTrainingPlan.txt")); MembershipCostPerMonth += 5; strMembershipCostPerMonth = MembershipCostPerMonth.ToString("C2"); if (MembershipType.IndexOf(" 1 ") >= 0) { Total += PersonalTrainingPlan; strTotal = Total.ToString("C2"); } else { Total += PersonalTrainingPlan * 12; strTotal = Total.ToString("C2"); } } //If locker rental selected, charge 1/mon if (LockerRental) { double LockerRental = Convert.ToDouble(File.ReadAllText(@"..\..\Data\LockerRental.txt")); MembershipCostPerMonth += 1; strMembershipCostPerMonth = MembershipCostPerMonth.ToString("C2"); if (MembershipType.IndexOf(" 1 ") >= 0) { Total += LockerRental; strTotal = Total.ToString("C2"); } else { Total += LockerRental * 12; strTotal = Total.ToString("C2"); } } }
public string mostrarGasolina() { return(Tipodegasolina.ToString() + Galon + Precio + Subtotal.ToString()); }
void rcpt_PrintPage(object sender, PrintPageEventArgs e) { // Initialize printing stuff Graphics g = e.Graphics; Font font = new Font("Arial", 12); Brush brush = Brushes.Black; StringFormat leftAlign = new StringFormat() { Alignment = StringAlignment.Near }; StringFormat rightAlign = new StringFormat() { Alignment = StringAlignment.Far }; StringFormat centerAlign = new StringFormat() { Alignment = StringAlignment.Center }; RectangleF cursor = new RectangleF(e.PageBounds.X, e.PageBounds.Y, e.PageBounds.Width, font.Height); // Print Logo g.DrawImage(logo, cursor.Width / 2 - logo.Width / 2, cursor.Top); cursor.Y += logo.Height; // Print InvoiceID Barcode g.DrawString(InvoiceID.ToString(), font, brush, cursor, leftAlign); cursor.Y += font.Height; // Print Header g.DrawString(header, font, brush, cursor, centerAlign); cursor.Y += font.Height; //TODO: Will nee to handle multiline headers well // Print InvoiceID g.DrawString("Invoice #: " + InvoiceID.ToString(), font, brush, cursor, leftAlign); // Print Location g.DrawString("Location" + Location, font, brush, cursor, rightAlign); cursor.Y += font.Height; // Date and time g.DrawString("Date and time: " + TransactionDateTime.ToString(), font, brush, cursor, leftAlign); cursor.Y += font.Height; // Print Items g.DrawString("---------------------------------", font, brush, cursor, leftAlign); cursor.Y += font.Height; foreach (Item item in Items) { g.DrawString(item.NumSold + " " + item.Name, font, brush, cursor, leftAlign); g.DrawString("$ " + item.Price.ToString(), font, brush, cursor, rightAlign); cursor.Y += font.Height; } g.DrawString("---------------------------------", font, brush, cursor, leftAlign); cursor.Y += font.Height; // Print subtotal g.DrawString("SubTotal:", font, brush, cursor, leftAlign); g.DrawString("$ " + Subtotal.ToString(), font, brush, cursor, rightAlign); cursor.Y += font.Height; // Print tax g.DrawString("Tax:", font, brush, cursor, leftAlign); g.DrawString("$ " + Tax.ToString(), font, brush, cursor, rightAlign); cursor.Y += font.Height; // Print total g.DrawString("TOTAL:", font, brush, cursor, leftAlign); g.DrawString("$ " + Total.ToString(), font, brush, cursor, rightAlign); cursor.Y += font.Height; g.DrawString("---------------------------------", font, brush, cursor, leftAlign); cursor.Y += font.Height; // Print # of items g.DrawString("# of Items: " + Items.Count.ToString(), font, brush, cursor, leftAlign); cursor.Y += font.Height; // Print Payment Method // Print # of items g.DrawString("Payment Method: " + PayMethod + ": " + PayNum, font, brush, cursor, leftAlign); cursor.Y += font.Height; //Print footer // Print # of items g.DrawString(footer, font, brush, cursor, centerAlign); cursor.Y += font.Height; //TODO: Will nee to handle multiline footers well }