Question: This is for visual studio and it is worked on in the windows forms application Hello guys today I need to add in some ifs
This is for visual studio and it is worked on in the windows forms application Hello guys today I need to add in some ifs and else's in my project I want to add some in for shipping if the order total is above 1000 they get free shipping 500- 999 shipping would be 12 dollars 200-499 - shipping would be 25. I also want to add in discounts on the price. so if orders over 1000 dollars would get a 20% discount Orders 500 dollars to 999 would get a 15 percent discount orders from 200- 499 would get 10 percent discount and orders from 100-199 would get a 5 percent discount. 'this line calculates the subtotal before taxes and shipping sngSubTotal = sngQuantity * msngQuiltCost 'this line calculates the sales tax based on the tax rate constant sngSalesTax = sngSubTotal * CSngSalesTax 'this line caluclates the total for the order sngTotal = sngSubTotal + sngSalesTax + msngShipping ' This line will update the counter and the accumulators mintNumberOfSalesForToday += 1 msngTodaysGrandTotal += FormatCurrency(sngTotal) msngSubTotal += sngSubTotal msngTotal += sngTotal sngSalesTax = CSngSalesTax * msngTotal 'This is the output section lblSubTotal.Text = FormatCurrency(sngSubTotal) lblSalesTax.Text = FormatCurrency(sngSalesTax) lblShipping.Text = FormatCurrency(msngShipping) lblTotal.Text = FormatCurrency(msngTotal) 'This line is the output in the items this order box lblSubTotal2.Text = FormatCurrency(msngSubTotal) lblTaxRate2.Text = FormatCurrency(sngSalesTax) lblShipping2.Text = FormatCurrency(msngShipping) lblOrderTotal.Text = FormatCurrency(msngTotal) ' This line puts the quilt information in the items this order box lblItemsThisOrder.Text &= Chr(13) & sngQuantity & mstrItemName & msngColorName & FormatCurrency(sngSubTotal) lblSubTotal.Text = FormatCurrency(msngSubTotal) lblNumberOfSalesToday.Text = mintNumberOfSalesForToday 'This line updates the number of sales for the day lblTodaysGrandTotal.Text = FormatCurrency(msngTodaysGrandTotal) 'This line is used for the grand total for the day 'These lines will clear and be ready for the next order RadBaby.Checked = True RadBaby.Checked = False radYellow.Checked = True radYellow.Checked = False txtQuantity.Text = "" txtPrice.Text = "" txtColor.Text = "" 'This will put the cursor back in the quantity text box txtQuantity.Focus()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
