السلام عليكم
تقبل الله منكم الصيام و القيام و صالح الاعمال و عيدكم مبارك سعيد
أعاني من مشكل على بعض الأجهزة دون البعض الآخر عند إعادة الحساب حيث تختفي الاصفار من المبالغ بالشكل التالي
هذا هو الكود المستعمل
Dim a, b, c, d, f, g, h, i, j, k, tva, ttc, ven, ach As Decimal
a = Val(TextBox1.Text)
f = Val(TextBox5.Text)
h = Val(TextBox7.Text)
i = Val(TextBox8.Text)
j = Val(TextBox9.Text)
k = Val(TextBox10.Text)
'===============================الخمس المودع===================================
b = a / 5
'==================================التسجيــــــل===============================
c = a * 5 / 100
If c <= 1500 Then
c = 1500
End If
'==================================الشهر العقاري================================
d = a * 1 / 100
If d <= 2000 Then
d = 2000
End If
'====================================الأتعاب======================================
If a > 1000000 Then
g = 15000 + 10000 + ((a - 1000000) * 0.01)
ElseIf a > 500000 Then
g = 15000 + ((a - 500000) * 0.02)
ElseIf a <= 500000 Then
g = 15000
End If
'====================================TVA===========================================
tva = (g + h + i + j + k) * 19 / 100
ttc = c + d + f + g + h + i + j + k + tva
'=====================================البائــــع==================================
ven = c / 2
'=====================================المشتري=====================================
ach = ttc - ven
'===================================================================================
TextBox2.Text = Str(b)
TextBox3.Text = Str©
TextBox4.Text = Str(d)
TextBox6.Text = Str(g)
TextBox11.Text = Str(tva)
TextBox12.Text = Str(ttc)
TextBox13.Text = Str(ven)
TextBox14.Text = Str(ach)
'================================================================
TextBox1.Text = FormatNumber(a, 2)
TextBox2.Text = FormatNumber(b, 2)
TextBox3.Text = FormatNumber(c, 2)
TextBox4.Text = FormatNumber(d, 2)
TextBox5.Text = FormatNumber(f, 2)
TextBox6.Text = FormatNumber(g, 2)
TextBox7.Text = FormatNumber(h, 2)
TextBox8.Text = FormatNumber(i, 2)
TextBox9.Text = FormatNumber(j, 2)
TextBox10.Text = FormatNumber(k, 2)
TextBox11.Text = FormatNumber(tva, 2)
TextBox12.Text = FormatNumber(ttc, 2)
TextBox13.Text = FormatNumber(ven, 2)
TextBox14.Text = FormatNumber(ach, 2)
Dim a, b, c, d, f, g, h, i, j, k, tva, ttc, ven, ach As Decimal
a = Val(TextBox1.Text)
f = Val(TextBox5.Text)
h = Val(TextBox7.Text)
i = Val(TextBox8.Text)
j = Val(TextBox9.Text)
k = Val(TextBox10.Text)
'===============================الخمس المودع===================================
b = a / 5
'==================================التسجيــــــل===============================
c = a * 5 / 100
If c <= 1500 Then
c = 1500
End If
'==================================الشهر العقاري================================
d = a * 1 / 100
If d <= 2000 Then
d = 2000
End If
'====================================الأتعاب======================================
If a > 1000000 Then
g = 15000 + 10000 + ((a - 1000000) * 0.01)
ElseIf a > 500000 Then
g = 15000 + ((a - 500000) * 0.02)
ElseIf a <= 500000 Then
g = 15000
End If
'====================================TVA===========================================
tva = (g + h + i + j + k) * 19 / 100
ttc = c + d + f + g + h + i + j + k + tva
'=====================================البائــــع==================================
ven = c / 2
'=====================================المشتري=====================================
ach = ttc - ven
'===================================================================================
TextBox2.Text = Str(b)
TextBox3.Text = Str©
TextBox4.Text = Str(d)
TextBox6.Text = Str(g)
TextBox11.Text = Str(tva)
TextBox12.Text = Str(ttc)
TextBox13.Text = Str(ven)
TextBox14.Text = Str(ach)
'================================================================
TextBox1.Text = FormatNumber(a, 2)
TextBox2.Text = FormatNumber(b, 2)
TextBox3.Text = FormatNumber(c, 2)
TextBox4.Text = FormatNumber(d, 2)
TextBox5.Text = FormatNumber(f, 2)
TextBox6.Text = FormatNumber(g, 2)
TextBox7.Text = FormatNumber(h, 2)
TextBox8.Text = FormatNumber(i, 2)
TextBox9.Text = FormatNumber(j, 2)
TextBox10.Text = FormatNumber(k, 2)
TextBox11.Text = FormatNumber(tva, 2)
TextBox12.Text = FormatNumber(ttc, 2)
TextBox13.Text = FormatNumber(ven, 2)
TextBox14.Text = FormatNumber(ach, 2)