Private Sub bntCalculate_Click()
lblTotal.Caption = txtPrice.Text * txtAmount.Text
If (optCash.Value = True) Then
If (lblTotal.Caption < 5000) Then
lblDiscount.Caption = 0
ElseIf (lblTotal.Caption >= 5000) And (lblTotal.Caption <= 10000) Then
lblDiscount.Caption = lblTotal.Caption * 10 / 100
ElseIf (lblTotal.Caption > 10000) Then
lblDiscount.Caption = lblTotal.Caption * 15 / 100
End If
ElseIf (optCredit.Value = True) Then
If (lblTotal.Caption < 5000) Then
lblDiscount.Caption = 0
ElseIf (lblTotal.Caption >= 10000) And (lblTotal.Caption <= 15000) Then
lblDiscount.Caption = lblTotal.Caption * 7 / 100
ElseIf (lblTotal.Caption > 15000) Then
lblDiscount.Caption = lblTotal.Caption * 12 / 100
End If
End If
lblNet.Caption = lblTotal.Caption - lblDiscount.Caption
End Sub