TABLA DE AMORTIZACION
Publicado por elvis (3 intervenciones) el 30/09/2015 07:20:10
Buenas noches amigos necesito de su ayuda por favor, estoy haciendo un formulario para generar mis amortizaciones de un prestamo tengo este código pero no me salen bien en algunos puntos.
*****************
que debo corregir para solucionar mi problema? mil gracias estimados amigos
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Option Explicit
Dim canti As Double
Dim pag As Double
Dim Num, n As Integer
Dim i, P, PVIFA, R, pmt, PI, PP As Double
Dim cnn As New ADODB.Connection
Dim Rst As New ADODB.Recordset
Dim CADENA As String
Dim O As Integer
Dim FECHA As Date
Dim y As Date
Dim yx As Integer
Private Sub KewlButtons2_Click()
Dim x As Integer
Dim dFecha As Date
Dim nPeriodo As Integer
P = monto.Text
Num = numpag.Text
R = interes.Text
i = R / 100
PVIFA = 1 / i - 1 / (i * (1 + i) ^ Num)
pmt = P / PVIFA
Text7.Text = numpag.Text
total.Text = Val(monto) * Val(numpag)
cantidad.Text = Round(pmt, 2)
pag = Val(numpag.Text)
canti = Val(cantidad.Text)
total.Text = canti * numpag
totalinteres.Text = Val(total.Text) - Val(monto)
dFecha = CDate(fechadt.Value)
nPeriodo = CInt(Text1.Text)
'*************************
Call BD
Call amortizacion
n = n + 1
PI = P * i
PP = pmt - PI
P = P - PP
For i = 0 To numpag - 1
Rc.AddNew
Rc!numero = (no me sale se refiere a los Nª de cuota eje 1,2,3.....
Rc!FECHA = DateAdd("D", nPeriodo * i, dFecha) esta bien
Rc!cuota = Round(pmt, 2) esta bien
Rc!interes = Round(PI, 2) en todo los meses sale 40
Rc!capital = Round(PP, 2) tambien sale ugual todos los meses
Rc!balance = Round(P, 2) igual sale en todos los meses
Rc!pago = "0.00" esta bien
Rc!estado = "Pendiente" esta bien
Next
Rc.UpdateBatch
Set DataGrid1.DataSource = Rc
End Sub
que debo corregir para solucionar mi problema? mil gracias estimados amigos
Valora esta pregunta


0