Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6734723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:55:22+00:00 2026-05-26T10:55:22+00:00

Why is sales tax not adding to the subtotal and total? //Value from xQuantity

  • 0

Why is sales tax not adding to the subtotal and total?

    //Value from xQuantity
    double quantity = Convert.ToDouble(xQuantity.Text);

    //Value from xUnitPrice
    double unitPrice = Convert.ToDouble(xUnitPrice.Text);

    //Value from xSubTotal and xTotalPrice
    double SubTotal = quantity * unitPrice;
    xSubTotalTextBox.Text = Convert.ToString(subTotal);

    double Tax = subTotal * 1.06 + subTotal;
    xSubTotalTextBox.Text = Convert.ToString(subTotal);
    xTotalPrice.Text = Convert.ToString(totalPrice);

    //Calculate subtotal and totalprice
    subTotal = Convert.ToDouble(xQuantity.Text) * Convert.ToDouble(xUnitPrice.Text);
    xSubTotalTextBox.Text = subTotal.ToString();
    xTotalPrice.Text = (subTotal * Tax).ToString();         
}

private void xBalance_Click(object sender, EventArgs e)
{
    xRetTextBox.Visible = true;
    xReturn.Visible = true;

    double totalPrice = Convert.ToDouble(xTotalPrice.Text);
    double receive = Convert.ToDouble(xRecvTextBox.Text);
    double subTotal = totalPrice - receive;
    xRetTextBox.Text = Convert.ToString(totalPrice);

    if (totalPrice < .01) xRetTextBox.BackColor = Color.Green;
    else xRetTextBox.BackColor = Color.Red;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:55:23+00:00Added an answer on May 26, 2026 at 10:55 am

    Because this line:

     double Tax = subTotal * 1.06 + subTotal;
    

    Should be wrong. Tax cannot be subTotal*1.06+subTotal;

    Maybe you meant:

    double totalPrice = subTotal * (1.06/100) + subTotal ;
    xSubTotalTextBox.Text = Convert.ToString(subTotal);
    xTotalPrice.Text = Convert.ToString(totalPrice);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Sales tax column in one of my SQL Table where Data
Are there any ways to calculate Sales Tax Rates via some sort of web
I have a sales simulator written in C#. I did not write this however
I have created a function (see below) that calculates a 7.5% sales tax. Now
select si.total from sales_inv si,c nf_order co where si.order_num=co.order_no and co.cnf_no='CNF001' and co.added_on between
I have monthly sales figures stored in separate sheets. I would like to create
My company uses a sales model of dealers, territory managers and regional managers, each
I often work with sales and marketing types that cannot figure out how to
I rewrite the sales/order_collection Model or, perhaps, correctly said the Resource. I did that
I know the Sales pitch answer is yes to this question, but is it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.