Assuming you still have to complete this assignment...
You must convert the contents of the textboxes to the appropriate type before attempting to use them in any calculation:
Dim itemnumber As Integer
Dim quantity As Decimal
If Not Integer.TryParse(txtitemnumber.Text, itemnumber) Then
MessageBox.Show("No item number supplied")
Return
End If
If Not Decimal.TryParse(txtquantity.Text, quantity) Then
MessageBox.Show("No Quantity supplied")
Return
End If
Then in your checkout button you are assuming that there is only one item on the invoice and extendedprice will only be assigned a value once. Better would be to go through the invoice and calculate the values required - I'm using your listview here, it's not the best approach but it will do to demonstrate.
Private Sub btncheckout_Click(sender As Object, e As EventArgs) Handles btncheckout.Click
Dim discount As Decimal
If rbnodiscount.Checked Then
discount = 0
End If
If rb10discount.Checked Then
discount = 10
End If
If rb15discount.Checked Then
discount = 15
End If
Dim subTotal As Decimal = 0.0
For Each item In listorder.Items
If item.ToString().StartsWith("Extended Price:") Then
Dim extendedprice As Decimal = Decimal.Parse(item.ToString().Substring(16))
subTotal = subTotal + extendedprice
End If
Next
Dim totalprice As Decimal = subTotal - ((discount / 100.0) * subTotal)
listinvoice.Items.Add("Timber Tom’s Hardware")
listinvoice.Items.Add(Date.Now)
listinvoice.Items.Add("--------------------------------------------")
listinvoice.Items.Add("Sub Total " & subtotal.ToString("c"))
listinvoice.Items.Add(String.Format("{0} Discount", IIf(discount = 0, "No", discount.ToString() + "%")))
listinvoice.Items.Add("Total Price:" & totalprice.ToString("c"))
End Sub
Your next step should be to move all of that information about the Items into a collection - separate your data from your presentation