Results 1 to 2 of 2

Thread: tax change..

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2009
    Posts
    56

    tax change..

    hey guys i have this code example and i need to change the taxes on it.
    7.85 and 5%(gst and pst)

    in line

    TextBox14.Text = 0.06 i tried 7.85 but in the calculations it gives me 78.5


    ' calculating the subtotal
    TextBox13.Text = (unitpriceone * qtyone) + (unitpricetwo * qtytwo) + (unitpricethree * qtythree)
    ' calculating the GST
    TextBox14.Text = 0.06 * ((unitpriceone * qtyone) + (unitpricetwo * qtytwo) + (unitpricethree * qtythree))
    ' calculating the PST
    TextBox15.Text = 0.07 * ((unitpriceone * qtyone) + (unitpricetwo * qtytwo) + (unitpricethree * qtythree))
    'setting what the total will equal to
    total = (0.07 * ((unitpriceone * qtyone) + (unitpricetwo * qtytwo) + (unitpricethree * qtythree))) + (0.06 * ((unitpriceone * qtyone) + (unitpricetwo * qtytwo) + (unitpricethree * qtythree))) + ((unitpriceone * qtyone) + (unitpricetwo * qtytwo) + (unitpricethree * qtythree))
    ' calculating the total price gst + pst + subtotal
    TextBox16.Text = (0.07 * ((unitpriceone * qtyone) + (unitpricetwo * qtytwo) + (unitpricethree * qtythree))) + (0.06 * ((unitpriceone * qtyone) + (unitpricetwo * qtytwo) + (unitpricethree * qtythree))) + ((unitpriceone * qtyone) + (unitpricetwo * qtytwo) + (unitpricethree * qtythree))
    'displaying the information
    Label10.Text = "Thankyou for purchasing the following items: " & Chr(13) & "You have purcheased: " & qtyone & " of " & itemone & " =&" & Val(TextBox7.Text) & Chr(13) & "You have purcheased: " & qtytwo & " of " & itemtwo & " =&" & Val(TextBox11.Text) & Chr(13) & "You have purcheased: " & qtythree & " of " & itemthree & " =&" & Val(TextBox13.Text)

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: tax change..

    Thread moved from 'General Developer' forum to 'VB.Net' (VB2002 and later) forum.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width