hey guys i need some help on my code here..........
im trying to do some computation about the biling system or a library if the borrwer returns the book on time it will be no charge.......but if hte book is damage then it will charge him trice the ammount of the fineRate also if hes a non member theres an extra charge for it 30% of the FineRate
Dim FineRate As String = My.Settings.FineRate
Dim dmgfee As Double
Dim tot As String
Dim dayslate As String
Dim nm As Double
Dim fac As String
Dim dt1 As Date
Dim dt2 As Date
Dim ef As String
Dim ts As System.TimeSpan
dt1 = DateTimePicker3.Value
dt2 = DateTimePicker4.Value
ts = dt2.Subtract(dt1)
dayslate = ts.Days
If dayslate >= 0 Then
lblDaysLate.Text = dayslate
End If
dayslate = Val(lblDaysLate.Text)
If cboBookStat.Text = "Damage" Then
dmgfee = 0.3 * FineRate
ElseIf cboBookStat.Text = "Un Damage" Then
dmgfee = 0 * FineRate
End If
If lblbtype.Text = "Non Member" Then
nm = 0.3 * FineRate
ElseIf lblbtype.Text = "Member" Then
nm = 0.1 * FineRate
End If
fac = dayslate * FineRate
ef = dmgfee + nm
tot = FineRate * (dayslate + ef)
lblDmgFee.Text = dmgfee
lblTotal.Text = tot
lblTfine.Text = fac