parroquia 1.1.20 → 1.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/parroquia/sacramentos/actualizar_bautismo.rb +22 -22
- data/lib/parroquia/sacramentos/actualizar_certificado_prebautismal.rb +7 -7
- data/lib/parroquia/sacramentos/actualizar_comunion.rb +14 -14
- data/lib/parroquia/sacramentos/actualizar_confirmacion.rb +14 -14
- data/lib/parroquia/sacramentos/actualizar_licencia_matrimonio.rb +298 -0
- data/lib/parroquia/sacramentos/actualizar_matrimonio.rb +20 -20
- data/lib/parroquia/sacramentos/actualizar_misa.rb +7 -7
- data/lib/parroquia/sacramentos/actualizar_permiso_prebautismal.rb +8 -8
- data/lib/parroquia/sacramentos/actualizar_permiso_prematrimonial.rb +8 -8
- data/lib/parroquia/sacramentos/actualizar_supletoria.rb +40 -26
- data/lib/parroquia/sacramentos/licencia_matrimonio.rb +293 -0
- data/lib/parroquia/sacramentos/resultados.rb +38 -2
- data/lib/parroquia/sacramentos/sacramentos.rb +9 -1
- data/lib/parroquia/sacramentos/supletoria.rb +16 -7
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6a2411ab2cf88dcb909d449a647c05776d7a4db046ec8eed0301d62c9c42190
|
4
|
+
data.tar.gz: d7f11c369a8d4da2e948e8958c40b9924b77d715c8132fe92edca1588c69e3c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fadd1e1cf76850585fce5277cc5299c225d94c256c8d097401734e26c5d3b5089cbd4b414089d74902a98d67a4eff9c1423a8b7c771aaca6569fd6bd6762ce04
|
7
|
+
data.tar.gz: 141146830bcfe9de1482f17da7ff72d0835348dd9efb53a469657456d836e5987a3be50ccdf18b9ba84f8efe5d9e5dbb1ed1b07547b3640a995eeb0dc1a5e2df
|
@@ -201,33 +201,33 @@ class ActualizarBautismo < FXMainWindow
|
|
201
201
|
|
202
202
|
# connect buttons
|
203
203
|
@btnupdate.connect(SEL_COMMAND) do
|
204
|
-
tomo = @input_tomo.text
|
205
|
-
page = @input_page.text
|
206
|
-
number = @input_number.text
|
207
|
-
fecha = @input_fecha.text
|
208
|
-
sacramento = @input_sacramento.text
|
209
|
-
parroquia = @input_parroquia.text
|
210
|
-
sector = @input_sector.text
|
211
|
-
parroco = @input_parroco.text
|
212
|
-
ministro = @input_ministro.text
|
213
|
-
name = @input_name.text
|
214
|
-
apellidos = @input_apellidos.text
|
215
|
-
lugar_nacimiento = @input_lugar_nacimiento.text
|
216
|
-
fecha_nacimiento = @input_fecha_nacimiento.text
|
204
|
+
tomo = @input_tomo.text.empty? ? nil : @input_tomo.text
|
205
|
+
page = @input_page.text.empty? ? nil : @input_page.text
|
206
|
+
number = @input_number.text.empty? ? nil : @input_number.text
|
207
|
+
fecha = @input_fecha.text.empty? ? nil : @input_fecha.text
|
208
|
+
sacramento = @input_sacramento.text.empty? ? nil : @input_sacramento.text
|
209
|
+
parroquia = @input_parroquia.text.empty? ? nil : @input_parroquia.text
|
210
|
+
sector = @input_sector.text.empty? ? nil : @input_sector.text
|
211
|
+
parroco = @input_parroco.text.empty? ? nil : @input_parroco.text
|
212
|
+
ministro = @input_ministro.text.empty? ? nil : @input_ministro.text
|
213
|
+
name = @input_name.text.empty? ? nil : @input_name.text
|
214
|
+
apellidos = @input_apellidos.text.empty? ? nil : @input_apellidos.text
|
215
|
+
lugar_nacimiento = @input_lugar_nacimiento.text.empty? ? nil : @input_lugar_nacimiento.text
|
216
|
+
fecha_nacimiento = @input_fecha_nacimiento.text.empty? ? nil : @input_fecha_nacimiento.text
|
217
217
|
cedula = @input_cedula.text.empty? ? nil : @input_cedula.text
|
218
218
|
padrino = @input_padrino.text.empty? ? nil : @input_padrino.text
|
219
219
|
madrina = @input_madrina.text.empty? ? nil : @input_madrina.text
|
220
220
|
padre = @input_padre.text.empty? ? nil : @input_padre.text
|
221
221
|
madre = @input_madre.text.empty? ? nil : @input_madre.text
|
222
|
-
certifica = @input_certifica.text
|
223
|
-
provincia_rc = @input_provincia_rc.text
|
224
|
-
canton_rc = @input_canton_rc.text
|
225
|
-
parroquia_rc = @input_parroquia_rc.text
|
226
|
-
anio_rc = @input_anio_rc.text
|
227
|
-
tomo_rc = @input_tomo_rc.text
|
228
|
-
pag_rc = @input_pag_rc.text
|
229
|
-
acta_rc = @input_acta_rc.text
|
230
|
-
date_rc = @input_date_rc.text
|
222
|
+
certifica = @input_certifica.text.empty? ? nil : @input_certifica.text
|
223
|
+
provincia_rc = @input_provincia_rc.text.empty? ? nil : @input_provincia_rc.text
|
224
|
+
canton_rc = @input_canton_rc.text.empty? ? nil : @input_canton_rc.text
|
225
|
+
parroquia_rc = @input_parroquia_rc.text.empty? ? nil : @input_parroquia_rc.text
|
226
|
+
anio_rc = @input_anio_rc.text.empty? ? nil : @input_anio_rc.text
|
227
|
+
tomo_rc = @input_tomo_rc.text.empty? ? nil : @input_tomo_rc.text
|
228
|
+
pag_rc = @input_pag_rc.text.empty? ? nil : @input_pag_rc.text
|
229
|
+
acta_rc = @input_acta_rc.text.empty? ? nil : @input_acta_rc.text
|
230
|
+
date_rc = @input_date_rc.text.empty? ? nil : @input_date_rc.text
|
231
231
|
|
232
232
|
# tables
|
233
233
|
# tabla libros (id, tomo, pagina, numero)
|
@@ -100,13 +100,13 @@ class ActualizarPreBautismoal < FXMainWindow
|
|
100
100
|
|
101
101
|
# connect buttons
|
102
102
|
@btnupdate.connect(SEL_COMMAND) do
|
103
|
-
fecha = @input_fecha.text
|
104
|
-
sacramento = @input_sacramento.text
|
105
|
-
parroquia = @input_parroquia.text
|
106
|
-
sector = @input_sector.text
|
107
|
-
parroco = @input_parroco.text
|
108
|
-
name = @input_name.text
|
109
|
-
apellidos = @input_apellidos.text
|
103
|
+
fecha = @input_fecha.text.empty? ? nil : @input_fecha.text
|
104
|
+
sacramento = @input_sacramento.text.empty? ? nil : @input_sacramento.text
|
105
|
+
parroquia = @input_parroquia.text.empty? ? nil : @input_parroquia.text
|
106
|
+
sector = @input_sector.text.empty? ? nil : @input_sector.text
|
107
|
+
parroco = @input_parroco.text.empty? ? nil : @input_parroco.text
|
108
|
+
name = @input_name.text.empty? ? nil : @input_name.text
|
109
|
+
apellidos = @input_apellidos.text.empty? ? nil : @input_apellidos.text
|
110
110
|
cedula = @input_cedula.text.empty? ? nil : @input_cedula.text
|
111
111
|
padrino = @input_padrino.text.empty? ? nil : @input_padrino.text
|
112
112
|
madrina = @input_madrina.text.empty? ? nil : @input_madrina.text
|
@@ -128,21 +128,21 @@ class ActualizarComunion < FXMainWindow
|
|
128
128
|
|
129
129
|
# connect buttons
|
130
130
|
@btnupdate.connect(SEL_COMMAND) do
|
131
|
-
tomo = @input_tomo.text
|
132
|
-
page = @input_page.text
|
133
|
-
number = @input_number.text
|
134
|
-
fecha = @input_fecha.text
|
135
|
-
sacramento = @input_sacramento.text
|
136
|
-
parroquia = @input_parroquia.text
|
137
|
-
sector = @input_sector.text
|
138
|
-
parroco = @input_parroco.text
|
139
|
-
celebrante = @input_celebrante.text
|
140
|
-
name = @input_name.text
|
141
|
-
apellidos = @input_apellidos.text
|
142
|
-
lugar_nacimiento = @input_lugar_nacimiento.text
|
143
|
-
fecha_nacimiento = @input_fecha_nacimiento.text
|
131
|
+
tomo = @input_tomo.text.empty? ? nil : @input_tomo.text
|
132
|
+
page = @input_page.text.empty? ? nil : @input_page.text
|
133
|
+
number = @input_number.text.empty? ? nil : @input_number.text
|
134
|
+
fecha = @input_fecha.text.empty? ? nil : @input_fecha.text
|
135
|
+
sacramento = @input_sacramento.text.empty? ? nil : @input_sacramento.text
|
136
|
+
parroquia = @input_parroquia.text.empty? ? nil : @input_parroquia.text
|
137
|
+
sector = @input_sector.text.empty? ? nil : @input_sector.text
|
138
|
+
parroco = @input_parroco.text.empty? ? nil : @input_parroco.text
|
139
|
+
celebrante = @input_celebrante.text.empty? ? nil : @input_celebrante.text
|
140
|
+
name = @input_name.text.empty? ? nil : @input_name.text
|
141
|
+
apellidos = @input_apellidos.text.empty? ? nil : @input_apellidos.text
|
142
|
+
lugar_nacimiento = @input_lugar_nacimiento.text.empty? ? nil : @input_lugar_nacimiento.text
|
143
|
+
fecha_nacimiento = @input_fecha_nacimiento.text.empty? ? nil : @input_fecha_nacimiento.text
|
144
144
|
cedula = @input_cedula.text.empty? ? nil : @input_cedula.text
|
145
|
-
certifica = @input_certifica.text
|
145
|
+
certifica = @input_certifica.text.empty? ? nil : @input_certifica.text
|
146
146
|
|
147
147
|
# tables
|
148
148
|
# tabla libros (id, tomo, pagina, numero)
|
@@ -128,22 +128,22 @@ class ActualizarConfirmacion < FXMainWindow
|
|
128
128
|
|
129
129
|
# connect buttons
|
130
130
|
@btnupdate.connect(SEL_COMMAND) do
|
131
|
-
tomo = @input_tomo.text
|
132
|
-
page = @input_page.text
|
133
|
-
number = @input_number.text
|
134
|
-
fecha = @input_fecha.text
|
135
|
-
sacramento = @input_sacramento.text
|
136
|
-
parroquia = @input_parroquia.text
|
137
|
-
sector = @input_sector.text
|
138
|
-
parroco = @input_parroco.text
|
139
|
-
celebrante = @input_celebrante.text
|
140
|
-
name = @input_name.text
|
141
|
-
apellidos = @input_apellidos.text
|
142
|
-
lugar_nacimiento = @input_lugar_nacimiento.text
|
143
|
-
fecha_nacimiento = @input_fecha_nacimiento.text
|
131
|
+
tomo = @input_tomo.text.empty? ? nil : @input_tomo.text
|
132
|
+
page = @input_page.text.empty? ? nil : @input_page.text
|
133
|
+
number = @input_number.text.empty? ? nil : @input_number.text
|
134
|
+
fecha = @input_fecha.text.empty? ? nil : @input_fecha.text
|
135
|
+
sacramento = @input_sacramento.text.empty? ? nil : @input_sacramento.text
|
136
|
+
parroquia = @input_parroquia.text.empty? ? nil : @input_parroquia.text
|
137
|
+
sector = @input_sector.text.empty? ? nil : @input_sector.text
|
138
|
+
parroco = @input_parroco.text.empty? ? nil : @input_parroco.text
|
139
|
+
celebrante = @input_celebrante.text.empty? ? nil : @input_celebrante.text
|
140
|
+
name = @input_name.text.empty? ? nil : @input_name.text
|
141
|
+
apellidos = @input_apellidos.text.empty? ? nil : @input_apellidos.text
|
142
|
+
lugar_nacimiento = @input_lugar_nacimiento.text.empty? ? nil : @input_lugar_nacimiento.text
|
143
|
+
fecha_nacimiento = @input_fecha_nacimiento.text.empty? ? nil : @input_fecha_nacimiento.text
|
144
144
|
cedula = @input_cedula.text.empty? ? nil : @input_cedula.text
|
145
145
|
padrino = @input_padrino.text.empty? ? nil : @input_padrino.text
|
146
|
-
certifica = @input_certifica.text
|
146
|
+
certifica = @input_certifica.text.empty? ? nil : @input_certifica.text
|
147
147
|
|
148
148
|
# tables
|
149
149
|
# tabla libros (id, tomo, pagina, numero)
|
@@ -0,0 +1,298 @@
|
|
1
|
+
require 'fox16'
|
2
|
+
include Fox
|
3
|
+
|
4
|
+
class ActualizarLicenciaMatrimonio < FXMainWindow
|
5
|
+
def initialize(app, registro)
|
6
|
+
@registro = registro
|
7
|
+
super(app, 'Parroquia San Judas Tadeo', width: 1050, height: 530)
|
8
|
+
self.backColor = FXRGB(3, 187, 133)
|
9
|
+
# Title
|
10
|
+
@lbltitle = FXLabel.new(self, 'Bienvenido a la Parroquia San Judas Tadeo',
|
11
|
+
opts: LAYOUT_EXPLICIT | JUSTIFY_CENTER_X, width: 1050, height: 20, x: 0, y: 20)
|
12
|
+
@lbltitle.font = FXFont.new(app, 'Geneva', 16, FONTWEIGHT_BOLD)
|
13
|
+
@lbltitle.backColor = FXRGB(3, 187, 133)
|
14
|
+
# Subtitle
|
15
|
+
@lblsubtitle = FXLabel.new(self, 'ARQUIDIOSESIS DE QUITO - SERVICIO PARROQUIAL DE SAN JUDAS TADEO',
|
16
|
+
opts: LAYOUT_EXPLICIT | JUSTIFY_CENTER_X, width: 1050, height: 20, x: 0, y: 40)
|
17
|
+
@lblsubtitle.font = FXFont.new(app, 'Geneva', 10, FONTWEIGHT_BOLD)
|
18
|
+
@lblsubtitle.backColor = FXRGB(3, 187, 133)
|
19
|
+
# Date
|
20
|
+
@date = Time.now.strftime('%d/%m/%Y')
|
21
|
+
@lbldate = FXLabel.new(self, "Fecha: #{cambiar_formato_fecha(@date)}", opts: LAYOUT_EXPLICIT | JUSTIFY_RIGHT,
|
22
|
+
width: 1050, height: 20, x: 0, y: 60, padRight: 20)
|
23
|
+
@lbldate.font = FXFont.new(app, 'Geneva', 12, FONTWEIGHT_BOLD)
|
24
|
+
@lbldate.backColor = FXRGB(3, 187, 133)
|
25
|
+
# section libros
|
26
|
+
@lbl_tomo = FXLabel.new(self, 'Tomo', opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 50, y: 100)
|
27
|
+
@lbl_tomo.backColor = FXRGB(3, 187, 133)
|
28
|
+
# EL input tomoo debe tener el valor del campo "tomo" del registro
|
29
|
+
@input_tomo = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 110, y: 100)
|
30
|
+
@input_tomo.text = registro[15]
|
31
|
+
|
32
|
+
@lbl_page = FXLabel.new(self, 'Pagina', opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 170, y: 100)
|
33
|
+
@lbl_page.backColor = FXRGB(3, 187, 133)
|
34
|
+
@input_page = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 230, y: 100)
|
35
|
+
@input_page.text = registro[16]
|
36
|
+
@lbl_number = FXLabel.new(self, 'Numero', opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 290,
|
37
|
+
y: 100)
|
38
|
+
@lbl_number.backColor = FXRGB(3, 187, 133)
|
39
|
+
@input_number = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 350,
|
40
|
+
y: 100)
|
41
|
+
@input_number.text = registro[17]
|
42
|
+
# section datos
|
43
|
+
@lbl_fecha = FXLabel.new(self, 'Fecha de matrimonio (AAAA/MM/DD): ', opts: LAYOUT_EXPLICIT, width: 250,
|
44
|
+
height: 20, x: 10, y: 150)
|
45
|
+
@lbl_fecha.backColor = FXRGB(3, 187, 133)
|
46
|
+
@input_fecha = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 340,
|
47
|
+
y: 150)
|
48
|
+
@input_fecha.text = @registro[2]
|
49
|
+
@lbl_sacramento = FXLabel.new(self, 'Sacramento: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
50
|
+
x: 680, y: 150)
|
51
|
+
@lbl_sacramento.backColor = FXRGB(3, 187, 133)
|
52
|
+
@input_sacramento = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 850,
|
53
|
+
y: 150)
|
54
|
+
@input_sacramento.text = @registro[1]
|
55
|
+
@input_sacramento.disable
|
56
|
+
@lbl_parroquia = FXLabel.new(self, 'Iglesia parroquial: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
57
|
+
x: 10, y: 180)
|
58
|
+
@lbl_parroquia.backColor = FXRGB(3, 187, 133)
|
59
|
+
@input_parroquia = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 170,
|
60
|
+
y: 180)
|
61
|
+
@input_parroquia.text = @registro[25]
|
62
|
+
@lbl_sector = FXLabel.new(self, 'Sector: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 340,
|
63
|
+
y: 180)
|
64
|
+
@lbl_sector.backColor = FXRGB(3, 187, 133)
|
65
|
+
@input_sector = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 510,
|
66
|
+
y: 180)
|
67
|
+
@input_sector.text = @registro[26]
|
68
|
+
@lbl_parroco = FXLabel.new(self, 'Parroco: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 680,
|
69
|
+
y: 180)
|
70
|
+
@lbl_parroco.backColor = FXRGB(3, 187, 133)
|
71
|
+
@input_parroco = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 850,
|
72
|
+
y: 180)
|
73
|
+
@input_parroco.text = @registro[27]
|
74
|
+
@lbl_celebrante = FXLabel.new(self, 'Celebrante: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
75
|
+
x: 10, y: 210)
|
76
|
+
@lbl_celebrante.backColor = FXRGB(3, 187, 133)
|
77
|
+
@input_celebrante = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 170,
|
78
|
+
y: 210)
|
79
|
+
@input_celebrante.text = @registro[3]
|
80
|
+
@lbl_name_novio = FXLabel.new(self, 'Nombres del novio: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
81
|
+
x: 10, y: 240)
|
82
|
+
@lbl_name_novio.backColor = FXRGB(3, 187, 133)
|
83
|
+
@input_name_novio = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 170,
|
84
|
+
y: 240)
|
85
|
+
@input_name_novio.text = @registro[19]
|
86
|
+
@lbl_apellido_novio = FXLabel.new(self, 'Apellidos del novio: ', opts: LAYOUT_EXPLICIT, width: 150,
|
87
|
+
height: 20, x: 340, y: 240)
|
88
|
+
@lbl_apellido_novio.backColor = FXRGB(3, 187, 133)
|
89
|
+
@input_apellido_novio = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 510,
|
90
|
+
y: 240)
|
91
|
+
@input_apellido_novio.text = @registro[20]
|
92
|
+
@lbl_cedula_novio = FXLabel.new(self, 'Cédula del novio: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
93
|
+
x: 680, y: 240)
|
94
|
+
@lbl_cedula_novio.backColor = FXRGB(3, 187, 133)
|
95
|
+
@input_cedula_novio = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 850,
|
96
|
+
y: 240)
|
97
|
+
@input_cedula_novio.text = @registro[23]
|
98
|
+
@lbl_name_novia = FXLabel.new(self, 'Nombres de la novia: ', opts: LAYOUT_EXPLICIT, width: 150,
|
99
|
+
height: 20, x: 10, y: 270)
|
100
|
+
@lbl_name_novia.backColor = FXRGB(3, 187, 133)
|
101
|
+
@input_name_novia = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 170,
|
102
|
+
y: 270)
|
103
|
+
@input_name_novia.text = @registro[11]
|
104
|
+
@lbl_apellido_novia = FXLabel.new(self, 'Apellidos de la novia: ', opts: LAYOUT_EXPLICIT, width: 150,
|
105
|
+
height: 20, x: 340, y: 270)
|
106
|
+
@lbl_apellido_novia.backColor = FXRGB(3, 187, 133)
|
107
|
+
@input_apellido_novia = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 510,
|
108
|
+
y: 270)
|
109
|
+
@input_apellido_novia.text = @registro[12]
|
110
|
+
@lbl_cedula_novia = FXLabel.new(self, 'Cédula de la novia: ', opts: LAYOUT_EXPLICIT, width: 150,
|
111
|
+
height: 20, x: 680, y: 270)
|
112
|
+
@lbl_cedula_novia.backColor = FXRGB(3, 187, 133)
|
113
|
+
@input_cedula_novia = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 850,
|
114
|
+
y: 270)
|
115
|
+
@input_cedula_novia.text = @registro[13]
|
116
|
+
@lbl_testigo_novio = FXLabel.new(self, 'Testigo del novio: ', opts: LAYOUT_EXPLICIT, width: 150,
|
117
|
+
height: 20, x: 10, y: 300)
|
118
|
+
@lbl_testigo_novio.backColor = FXRGB(3, 187, 133)
|
119
|
+
@input_nombres_testigo_novio = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
120
|
+
x: 170, y: 300)
|
121
|
+
@input_nombres_testigo_novio.text = @registro[7]
|
122
|
+
@lbl_testigo_novia = FXLabel.new(self, 'Testigo novia: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
123
|
+
x: 340, y: 300)
|
124
|
+
@lbl_testigo_novia.backColor = FXRGB(3, 187, 133)
|
125
|
+
@input_nombres_testigo_novia = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
126
|
+
x: 510, y: 300)
|
127
|
+
@input_nombres_testigo_novia.text = @registro[8]
|
128
|
+
@lbl_certifica = FXLabel.new(self, 'Certifica: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
129
|
+
x: 680, y: 300)
|
130
|
+
@lbl_certifica.backColor = FXRGB(3, 187, 133)
|
131
|
+
@input_certifica = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 850,
|
132
|
+
y: 300)
|
133
|
+
@input_certifica.text = @registro[4]
|
134
|
+
# section registro civil
|
135
|
+
@lbl_reg_civ = FXLabel.new(self,
|
136
|
+
'------------------------------------ REGISTRO CIVIL ------------------------------------', opts: LAYOUT_EXPLICIT | JUSTIFY_CENTER_X, width: 1050, height: 20, x: 10, y: 330)
|
137
|
+
@lbl_reg_civ.backColor = FXRGB(3, 187, 133)
|
138
|
+
@lbl_provincia_rc = FXLabel.new(self, 'Provincia: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
139
|
+
x: 10, y: 360)
|
140
|
+
@lbl_provincia_rc.backColor = FXRGB(3, 187, 133)
|
141
|
+
@input_provincia_rc = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 170,
|
142
|
+
y: 360)
|
143
|
+
@input_provincia_rc.text = @registro[29]
|
144
|
+
@lbl_canton_rc = FXLabel.new(self, 'Cantón: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 340,
|
145
|
+
y: 360)
|
146
|
+
@lbl_canton_rc.backColor = FXRGB(3, 187, 133)
|
147
|
+
@input_canton_rc = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 510,
|
148
|
+
y: 360)
|
149
|
+
@input_canton_rc.text = @registro[30]
|
150
|
+
@lbl_parroquia_rc = FXLabel.new(self, 'Parroquia: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
151
|
+
x: 680, y: 360)
|
152
|
+
@lbl_parroquia_rc.backColor = FXRGB(3, 187, 133)
|
153
|
+
@input_parroquia_rc = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 850,
|
154
|
+
y: 360)
|
155
|
+
@input_parroquia_rc.text = @registro[31]
|
156
|
+
@lbl_anio_rc = FXLabel.new(self, 'Año: ', opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 50,
|
157
|
+
y: 390)
|
158
|
+
@lbl_anio_rc.backColor = FXRGB(3, 187, 133)
|
159
|
+
@input_anio_rc = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 110,
|
160
|
+
y: 390)
|
161
|
+
@input_anio_rc.text = @registro[32]
|
162
|
+
@lbl_tomo_rc = FXLabel.new(self, 'Tomo: ', opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 170,
|
163
|
+
y: 390)
|
164
|
+
@lbl_tomo_rc.backColor = FXRGB(3, 187, 133)
|
165
|
+
@input_tomo_rc = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 230,
|
166
|
+
y: 390)
|
167
|
+
@input_tomo_rc.text = @registro[33]
|
168
|
+
@lbl_pag_rc = FXLabel.new(self, 'Página: ', opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 290,
|
169
|
+
y: 390)
|
170
|
+
@lbl_pag_rc.backColor = FXRGB(3, 187, 133)
|
171
|
+
@input_pag_rc = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 350,
|
172
|
+
y: 390)
|
173
|
+
@input_pag_rc.text = @registro[34]
|
174
|
+
@lbl_acta_rc = FXLabel.new(self, 'Acta: ', opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 410,
|
175
|
+
y: 390)
|
176
|
+
@lbl_acta_rc.backColor = FXRGB(3, 187, 133)
|
177
|
+
@input_acta_rc = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 470,
|
178
|
+
y: 390)
|
179
|
+
@input_acta_rc.text = @registro[35]
|
180
|
+
@lbl_date_rc = FXLabel.new(self, 'Fecha (AAAA/MM/DD): ', opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
181
|
+
x: 10, y: 420)
|
182
|
+
@lbl_date_rc.backColor = FXRGB(3, 187, 133)
|
183
|
+
@input_date_rc = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 170,
|
184
|
+
y: 420)
|
185
|
+
@input_date_rc.text = @registro[36]
|
186
|
+
|
187
|
+
# create buttons
|
188
|
+
@btnupdate = FXButton.new(self, 'Actualizar', opts: LAYOUT_EXPLICIT | BUTTON_NORMAL, width: 100, height: 30,
|
189
|
+
x: 790, y: 480)
|
190
|
+
@btncancel = FXButton.new(self, 'Cancelar', opts: LAYOUT_EXPLICIT | BUTTON_NORMAL, width: 100, height: 30,
|
191
|
+
x: 900, y: 480)
|
192
|
+
|
193
|
+
# connect buttons
|
194
|
+
@btnupdate.connect(SEL_COMMAND) do
|
195
|
+
tomo = @input_tomo.text.empty? ? nil : @input_tomo.text
|
196
|
+
page = @input_page.text.empty? ? nil : @input_page.text
|
197
|
+
number = @input_number.text.empty? ? nil : @input_number.text
|
198
|
+
fecha = @input_fecha.text.empty? ? nil : @input_fecha.text
|
199
|
+
sacramento = @input_sacramento.text.empty? ? nil : @input_sacramento.text
|
200
|
+
parroquia = @input_parroquia.text.empty? ? nil : @input_parroquia.text
|
201
|
+
sector = @input_sector.text.empty? ? nil : @input_sector.text
|
202
|
+
parroco = @input_parroco.text.empty? ? nil : @input_parroco.text
|
203
|
+
celebrante = @input_celebrante.text.empty? ? nil : @input_celebrante.text
|
204
|
+
name_novio = @input_name_novio.text.empty? ? nil : @input_name_novio.text
|
205
|
+
apellido_novio = @input_apellido_novio.text.empty? ? nil : @input_apellido_novio.text
|
206
|
+
cedula_novio = @input_cedula_novio.text.empty? ? nil : @input_cedula_novio.text
|
207
|
+
nombres_novia = @input_name_novia.text.empty? ? nil : @input_name_novia.text
|
208
|
+
apellidos_novia = @input_apellido_novia.text.empty? ? nil : @input_apellido_novia.text
|
209
|
+
cedula_novia = @input_cedula_novia.text.empty? ? nil : @input_cedula_novia.text
|
210
|
+
testigo_novio = @input_nombres_testigo_novio.text.empty? ? nil : @input_nombres_testigo_novio.text
|
211
|
+
testigo_novia = @input_nombres_testigo_novia.text.empty? ? nil : @input_nombres_testigo_novia.text
|
212
|
+
certifica = @input_certifica.text.empty? ? nil : @input_certifica.text
|
213
|
+
provincia_rc = @input_provincia_rc.text.empty? ? nil : @input_provincia_rc.text
|
214
|
+
canton_rc = @input_canton_rc.text.empty? ? nil : @input_canton_rc.text
|
215
|
+
parroquia_rc = @input_parroquia_rc.text.empty? ? nil : @input_parroquia_rc.text
|
216
|
+
anio_rc = @input_anio_rc.text.empty? ? nil : @input_anio_rc.text
|
217
|
+
tomo_rc = @input_tomo_rc.text.empty? ? nil : @input_tomo_rc.text
|
218
|
+
pagina_rc = @input_pag_rc.text.empty? ? nil : @input_pag_rc.text
|
219
|
+
acta_rc = @input_acta_rc.text.empty? ? nil : @input_acta_rc.text
|
220
|
+
fecha_rc = @input_date_rc.text.empty? ? nil : @input_date_rc.text
|
221
|
+
|
222
|
+
# tables
|
223
|
+
# tabla libros (id, tomo, pagina, numero)
|
224
|
+
# tabla creyentes (id, nombres, apellidos, lugar_nacimiento, fecha_nacimiento, cedula)
|
225
|
+
# tabla parroquias (id, nombre, sector, parroco)
|
226
|
+
# tabla sacramentos (id, nombre, fecha, celebrante, certifica, padrino, madrina, testigo_novio, testigo_novia, padre, madre, nombres_novia, apellidos_novia, cedula_novia, fk_creyentes, fk_parroquias, fk_registros_civiles, fk_libros)
|
227
|
+
# tabla registros_civiles (id, provincia_rc, canton_rc, parroquia_rc, anio_rc, tomo_rc, pagina_rc, acta_rc, fecha_rc)
|
228
|
+
$conn.transaction do
|
229
|
+
$conn.exec('UPDATE libros SET tomo = $1, pagina = $2, numero = $3 WHERE id = $4',
|
230
|
+
[tomo, page, number, registro[14]])
|
231
|
+
$conn.exec(
|
232
|
+
'UPDATE sacramentos SET sacramento = $1, fecha = $2, celebrante = $3, certifica = $4, testigo_novio = $5, testigo_novia = $6, nombres_novia = $7, apellidos_novia = $8, cedula_novia = $9 WHERE id = $10', [
|
233
|
+
sacramento, fecha, celebrante, certifica, testigo_novio, testigo_novia, nombres_novia, apellidos_novia, cedula_novia, registro[0]
|
234
|
+
]
|
235
|
+
)
|
236
|
+
$conn.exec('UPDATE creyentes SET nombres = $1, apellidos = $2, cedula = $3 WHERE id = $4',
|
237
|
+
[name_novio, apellido_novio, cedula_novio, registro[18]])
|
238
|
+
$conn.exec('UPDATE parroquias SET parroquia = $1, sector = $2, parroco = $3 WHERE id = $4',
|
239
|
+
[parroquia, sector, parroco, registro[24]])
|
240
|
+
$conn.exec(
|
241
|
+
'UPDATE registros_civiles SET provincia_rc = $1, canton_rc = $2, parroquia_rc = $3, anio_rc = $4, tomo_rc = $5, pagina_rc = $6, acta_rc = $7, fecha_rc = $8 WHERE id = $9', [
|
242
|
+
provincia_rc, canton_rc, parroquia_rc, anio_rc, tomo_rc, pagina_rc, acta_rc, fecha_rc, registro[28]
|
243
|
+
]
|
244
|
+
)
|
245
|
+
|
246
|
+
# ¿Desea guardar los cambios? SI: commit msg: datos actualizados correctamente, NO: rollback, close
|
247
|
+
if FXMessageBox.question(self, MBOX_YES_NO, 'Pregunta', '¿Desea guardar los cambios?') == MBOX_CLICKED_YES
|
248
|
+
$conn.exec('COMMIT')
|
249
|
+
FXMessageBox.information(self, MBOX_OK, 'Información', 'Datos actualizados correctamente')
|
250
|
+
else
|
251
|
+
$conn.exec('ROLLBACK')
|
252
|
+
end
|
253
|
+
close
|
254
|
+
end
|
255
|
+
end
|
256
|
+
|
257
|
+
@btncancel.connect(SEL_COMMAND) do
|
258
|
+
FXMessageBox.warning(self, MBOX_OK, 'Advertencia', 'No se guardarán los cambios')
|
259
|
+
close
|
260
|
+
end
|
261
|
+
end
|
262
|
+
|
263
|
+
# Nombre del mes
|
264
|
+
def nombre_mes(mes)
|
265
|
+
meses = {
|
266
|
+
'01' => 'enero',
|
267
|
+
'02' => 'febrero',
|
268
|
+
'03' => 'marzo',
|
269
|
+
'04' => 'abril',
|
270
|
+
'05' => 'mayo',
|
271
|
+
'06' => 'junio',
|
272
|
+
'07' => 'julio',
|
273
|
+
'08' => 'agosto',
|
274
|
+
'09' => 'septiembre',
|
275
|
+
'10' => 'octubre',
|
276
|
+
'11' => 'noviembre',
|
277
|
+
'12' => 'diciembre'
|
278
|
+
}
|
279
|
+
meses[mes]
|
280
|
+
end
|
281
|
+
|
282
|
+
# Cambiar el formato de la fecha de YYYY-MM-DD a DD de nombre_mes de YYYY
|
283
|
+
def cambiar_formato_fecha(fecha)
|
284
|
+
# split "-" or "/"
|
285
|
+
fecha = fecha.split(%r{-|/})
|
286
|
+
# si el formato de fecha es YYYY-MM-DD o YYYY/MM/DD, sino si es DD-MM-YYYY o DD/MM/YYYY
|
287
|
+
if fecha[0].length == 4
|
288
|
+
"#{fecha[2]} de #{nombre_mes(fecha[1])} de #{fecha[0]}"
|
289
|
+
else
|
290
|
+
"#{fecha[0]} de #{nombre_mes(fecha[1])} de #{fecha[2]}"
|
291
|
+
end
|
292
|
+
end
|
293
|
+
|
294
|
+
def create
|
295
|
+
super
|
296
|
+
show(PLACEMENT_SCREEN)
|
297
|
+
end
|
298
|
+
end
|
@@ -192,32 +192,32 @@ class ActualizarMatrimonio < FXMainWindow
|
|
192
192
|
|
193
193
|
# connect buttons
|
194
194
|
@btnupdate.connect(SEL_COMMAND) do
|
195
|
-
tomo = @input_tomo.text
|
196
|
-
page = @input_page.text
|
197
|
-
number = @input_number.text
|
198
|
-
fecha = @input_fecha.text
|
199
|
-
sacramento = @input_sacramento.text
|
200
|
-
parroquia = @input_parroquia.text
|
201
|
-
sector = @input_sector.text
|
202
|
-
parroco = @input_parroco.text
|
203
|
-
celebrante = @input_celebrante.text
|
204
|
-
name_novio = @input_name_novio.text
|
205
|
-
apellido_novio = @input_apellido_novio.text
|
195
|
+
tomo = @input_tomo.text.empty? ? nil : @input_tomo.text
|
196
|
+
page = @input_page.text.empty? ? nil : @input_page.text
|
197
|
+
number = @input_number.text.empty? ? nil : @input_number.text
|
198
|
+
fecha = @input_fecha.text.empty? ? nil : @input_fecha.text
|
199
|
+
sacramento = @input_sacramento.text.empty? ? nil : @input_sacramento.text
|
200
|
+
parroquia = @input_parroquia.text.empty? ? nil : @input_parroquia.text
|
201
|
+
sector = @input_sector.text.empty? ? nil : @input_sector.text
|
202
|
+
parroco = @input_parroco.text.empty? ? nil : @input_parroco.text
|
203
|
+
celebrante = @input_celebrante.text.empty? ? nil : @input_celebrante.text
|
204
|
+
name_novio = @input_name_novio.text.empty? ? nil : @input_name_novio.text
|
205
|
+
apellido_novio = @input_apellido_novio.text.empty? ? nil : @input_apellido_novio.text
|
206
206
|
cedula_novio = @input_cedula_novio.text.empty? ? nil : @input_cedula_novio.text
|
207
207
|
nombres_novia = @input_name_novia.text.empty? ? nil : @input_name_novia.text
|
208
208
|
apellidos_novia = @input_apellido_novia.text.empty? ? nil : @input_apellido_novia.text
|
209
209
|
cedula_novia = @input_cedula_novia.text.empty? ? nil : @input_cedula_novia.text
|
210
210
|
testigo_novio = @input_nombres_testigo_novio.text.empty? ? nil : @input_nombres_testigo_novio.text
|
211
211
|
testigo_novia = @input_nombres_testigo_novia.text.empty? ? nil : @input_nombres_testigo_novia.text
|
212
|
-
certifica = @input_certifica.text
|
213
|
-
provincia_rc = @input_provincia_rc.text
|
214
|
-
canton_rc = @input_canton_rc.text
|
215
|
-
parroquia_rc = @input_parroquia_rc.text
|
216
|
-
anio_rc = @input_anio_rc.text
|
217
|
-
tomo_rc = @input_tomo_rc.text
|
218
|
-
pagina_rc = @input_pag_rc.text
|
219
|
-
acta_rc = @input_acta_rc.text
|
220
|
-
fecha_rc = @input_date_rc.text
|
212
|
+
certifica = @input_certifica.text.empty? ? nil : @input_certifica.text
|
213
|
+
provincia_rc = @input_provincia_rc.text.empty? ? nil : @input_provincia_rc.text
|
214
|
+
canton_rc = @input_canton_rc.text.empty? ? nil : @input_canton_rc.text
|
215
|
+
parroquia_rc = @input_parroquia_rc.text.empty? ? nil : @input_parroquia_rc.text
|
216
|
+
anio_rc = @input_anio_rc.text.empty? ? nil : @input_anio_rc.text
|
217
|
+
tomo_rc = @input_tomo_rc.text.empty? ? nil : @input_tomo_rc.text
|
218
|
+
pagina_rc = @input_pag_rc.text.empty? ? nil : @input_pag_rc.text
|
219
|
+
acta_rc = @input_acta_rc.text.empty? ? nil : @input_acta_rc.text
|
220
|
+
fecha_rc = @input_date_rc.text.empty? ? nil : @input_date_rc.text
|
221
221
|
|
222
222
|
# tables
|
223
223
|
# tabla libros (id, tomo, pagina, numero)
|
@@ -76,13 +76,13 @@ class ActualizarMisa < FXMainWindow
|
|
76
76
|
|
77
77
|
# connect buttons
|
78
78
|
@btnupdate.connect(SEL_COMMAND) do
|
79
|
-
sacramento = @input_sacramento.text
|
80
|
-
capilla = @input_parroquia.text
|
81
|
-
sector = @input_sector.text
|
82
|
-
celebrante = @input_parroco.text
|
83
|
-
fecha_misa = @input_fecha.text
|
84
|
-
hora = @input_hora.text
|
85
|
-
intencion = @input_intencion.text
|
79
|
+
sacramento = @input_sacramento.text.empty? ? nil : @input_sacramento.text
|
80
|
+
capilla = @input_parroquia.text.empty? ? nil : @input_parroquia.text
|
81
|
+
sector = @input_sector.text.empty? ? nil : @input_sector.text
|
82
|
+
celebrante = @input_parroco.text.empty? ? nil : @input_parroco.text
|
83
|
+
fecha_misa = @input_fecha.text.empty? ? nil : @input_fecha.text
|
84
|
+
hora = @input_hora.text.empty? ? nil : @input_hora.text
|
85
|
+
intencion = @input_intencion.text.empty? ? nil : @input_intencion.text
|
86
86
|
|
87
87
|
# tables
|
88
88
|
# tabla libros (id, tomo, pagina, numero)
|
@@ -111,19 +111,19 @@ class ActualizarPermisoBautismo < FXMainWindow
|
|
111
111
|
|
112
112
|
# connect buttons
|
113
113
|
@btnupdate.connect(SEL_COMMAND) do
|
114
|
-
fecha = @input_fecha.text
|
115
|
-
sacramento = @input_sacramento.text
|
116
|
-
parroquia = @input_parroquia.text
|
117
|
-
sector = @input_sector.text
|
118
|
-
parroco = @input_parroco.text
|
119
|
-
name = @input_name.text
|
120
|
-
apellidos = @input_apellidos.text
|
114
|
+
fecha = @input_fecha.text.empty? ? nil : @input_fecha.text
|
115
|
+
sacramento = @input_sacramento.text.empty? ? nil : @input_sacramento.text
|
116
|
+
parroquia = @input_parroquia.text.empty? ? nil : @input_parroquia.text
|
117
|
+
sector = @input_sector.text.empty? ? nil : @input_sector.text
|
118
|
+
parroco = @input_parroco.text.empty? ? nil : @input_parroco.text
|
119
|
+
name = @input_name.text.empty? ? nil : @input_name.text
|
120
|
+
apellidos = @input_apellidos.text.empty? ? nil : @input_apellidos.text
|
121
121
|
cedula = @input_cedula.text.empty? ? nil : @input_cedula.text
|
122
122
|
padrino = @input_padrino.text.empty? ? nil : @input_padrino.text
|
123
123
|
madrina = @input_madrina.text.empty? ? nil : @input_madrina.text
|
124
124
|
padre = @input_padre.text.empty? ? nil : @input_padre.text
|
125
125
|
madre = @input_madre.text.empty? ? nil : @input_madre.text
|
126
|
-
certifica = @input_certifica.text
|
126
|
+
certifica = @input_certifica.text.empty? ? nil : @input_certifica.text
|
127
127
|
|
128
128
|
|
129
129
|
# tables
|
@@ -118,20 +118,20 @@ class ActualizarPreMatrimonial < FXMainWindow
|
|
118
118
|
|
119
119
|
# connect buttons
|
120
120
|
@btnupdate.connect(SEL_COMMAND) do
|
121
|
-
fecha = @input_fecha.text
|
122
|
-
sacramento = @input_sacramento.text
|
123
|
-
parroquia = @input_parroquia.text
|
124
|
-
sector = @input_sector.text
|
125
|
-
parroco = @input_parroco.text
|
126
|
-
name_novio = @input_name_novio.text
|
127
|
-
apellido_novio = @input_apellido_novio.text
|
121
|
+
fecha = @input_fecha.text.empty? ? nil : @input_fecha.text
|
122
|
+
sacramento = @input_sacramento.text.empty? ? nil : @input_sacramento.text
|
123
|
+
parroquia = @input_parroquia.text.empty? ? nil : @input_parroquia.text
|
124
|
+
sector = @input_sector.text.empty? ? nil : @input_sector.text
|
125
|
+
parroco = @input_parroco.text.empty? ? nil : @input_parroco.text
|
126
|
+
name_novio = @input_name_novio.text.empty? ? nil : @input_name_novio.text
|
127
|
+
apellido_novio = @input_apellido_novio.text.empty? ? nil : @input_apellido_novio.text
|
128
128
|
cedula_novio = @input_cedula_novio.text.empty? ? nil : @input_cedula_novio.text
|
129
129
|
nombres_novia = @input_name_novia.text.empty? ? nil : @input_name_novia.text
|
130
130
|
apellidos_novia = @input_apellido_novia.text.empty? ? nil : @input_apellido_novia.text
|
131
131
|
cedula_novia = @input_cedula_novia.text.empty? ? nil : @input_cedula_novia.text
|
132
132
|
testigo_novio = @input_nombres_testigo_novio.text.empty? ? nil : @input_nombres_testigo_novio.text
|
133
133
|
testigo_novia = @input_nombres_testigo_novia.text.empty? ? nil : @input_nombres_testigo_novia.text
|
134
|
-
certifica = @input_certifica.text
|
134
|
+
certifica = @input_certifica.text.empty? ? nil : @input_certifica.text
|
135
135
|
|
136
136
|
# tables
|
137
137
|
# tabla libros (id, tomo, pagina, numero)
|
@@ -132,10 +132,22 @@ class ActualizarSupletoria < FXMainWindow
|
|
132
132
|
@input_madrina = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 510,
|
133
133
|
y: 360)
|
134
134
|
@input_madrina.text = registro[6]
|
135
|
-
@
|
135
|
+
@lbl_testigo_uno = FXLabel.new(self, 'Testigo 1): ', opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
136
|
+
x: 10, y: 390)
|
137
|
+
@lbl_testigo_uno.backColor = FXRGB(3, 187, 133)
|
138
|
+
@input_testigo_uno = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 170,
|
139
|
+
y: 390)
|
140
|
+
@input_testigo_uno.text = registro[7]
|
141
|
+
@lbl_testigo_dos = FXLabel.new(self, 'Testigo 2): ', opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
142
|
+
x: 340, y: 390)
|
143
|
+
@lbl_testigo_dos.backColor = FXRGB(3, 187, 133)
|
144
|
+
@input_testigo_dos = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 510,
|
145
|
+
y: 390)
|
146
|
+
@input_testigo_dos.text = registro[8]
|
147
|
+
@lbl_certifica = FXLabel.new(self, 'Certifica: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 680,
|
136
148
|
y: 390)
|
137
149
|
@lbl_certifica.backColor = FXRGB(3, 187, 133)
|
138
|
-
@input_certifica = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x:
|
150
|
+
@input_certifica = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 850,
|
139
151
|
y: 390)
|
140
152
|
@input_certifica.text = registro[4]
|
141
153
|
|
@@ -201,33 +213,35 @@ class ActualizarSupletoria < FXMainWindow
|
|
201
213
|
|
202
214
|
# connect buttons
|
203
215
|
@btnupdate.connect(SEL_COMMAND) do
|
204
|
-
tomo = @input_tomo.text
|
205
|
-
page = @input_page.text
|
206
|
-
number = @input_number.text
|
207
|
-
fecha = @input_fecha.text
|
208
|
-
sacramento = @input_sacramento.text
|
209
|
-
parroquia = @input_parroquia.text
|
210
|
-
sector = @input_sector.text
|
211
|
-
parroco = @input_parroco.text
|
212
|
-
ministro = @input_ministro.text
|
213
|
-
name = @input_name.text
|
214
|
-
apellidos = @input_apellidos.text
|
215
|
-
lugar_nacimiento = @input_lugar_nacimiento.text
|
216
|
-
fecha_nacimiento = @input_fecha_nacimiento.text
|
216
|
+
tomo = @input_tomo.text.empty? ? nil : @input_tomo.text
|
217
|
+
page = @input_page.text.empty? ? nil : @input_page.text
|
218
|
+
number = @input_number.text.empty? ? nil : @input_number.text
|
219
|
+
fecha = @input_fecha.text.empty? ? nil : @input_fecha.text
|
220
|
+
sacramento = @input_sacramento.text.empty? ? nil : @input_sacramento.text
|
221
|
+
parroquia = @input_parroquia.text.empty? ? nil : @input_parroquia.text
|
222
|
+
sector = @input_sector.text.empty? ? nil : @input_sector.text
|
223
|
+
parroco = @input_parroco.text.empty? ? nil : @input_parroco.text
|
224
|
+
ministro = @input_ministro.text.empty? ? nil : @input_ministro.text
|
225
|
+
name = @input_name.text.empty? ? nil : @input_name.text
|
226
|
+
apellidos = @input_apellidos.text.empty? ? nil : @input_apellidos.text
|
227
|
+
lugar_nacimiento = @input_lugar_nacimiento.text.empty? ? nil : @input_lugar_nacimiento.text
|
228
|
+
fecha_nacimiento = @input_fecha_nacimiento.text.empty? ? nil : @input_fecha_nacimiento.text
|
217
229
|
cedula = @input_cedula.text.empty? ? nil : @input_cedula.text
|
218
230
|
padrino = @input_padrino.text.empty? ? nil : @input_padrino.text
|
219
231
|
madrina = @input_madrina.text.empty? ? nil : @input_madrina.text
|
220
232
|
padre = @input_padre.text.empty? ? nil : @input_padre.text
|
221
233
|
madre = @input_madre.text.empty? ? nil : @input_madre.text
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
234
|
+
testigo_uno = @input_testigo_uno.text.empty? ? nil : @input_testigo_uno.text
|
235
|
+
testigo_dos = @input_testigo_dos.text.empty? ? nil : @input_testigo_dos.text
|
236
|
+
certifica = @input_certifica.text.empty? ? nil : @input_certifica.text
|
237
|
+
provincia_rc = @input_provincia_rc.text.empty? ? nil : @input_provincia_rc.text
|
238
|
+
canton_rc = @input_canton_rc.text.empty? ? nil : @input_canton_rc.text
|
239
|
+
parroquia_rc = @input_parroquia_rc.text. empty? ? nil : @input_parroquia_rc.text
|
240
|
+
anio_rc = @input_anio_rc.text.empty? ? nil : @input_anio_rc.text
|
241
|
+
tomo_rc = @input_tomo_rc.text.empty? ? nil : @input_tomo_rc.text
|
242
|
+
pag_rc = @input_pag_rc.text.empty? ? nil : @input_pag_rc.text
|
243
|
+
acta_rc = @input_acta_rc.text.empty? ? nil : @input_acta_rc.text
|
244
|
+
date_rc = @input_date_rc.text.empty? ? nil : @input_date_rc.text
|
231
245
|
|
232
246
|
# tables
|
233
247
|
# tabla libros (id, tomo, pagina, numero)
|
@@ -240,8 +254,8 @@ class ActualizarSupletoria < FXMainWindow
|
|
240
254
|
$conn.exec('UPDATE libros SET tomo = $1, pagina = $2, numero = $3 WHERE id = $4',
|
241
255
|
[tomo, page, number, registro[14]])
|
242
256
|
$conn.exec(
|
243
|
-
'UPDATE sacramentos SET fecha = $1, sacramento = $2, celebrante = $3,
|
244
|
-
fecha, sacramento, ministro, certifica, padrino, madrina, padre, madre, registro[0]
|
257
|
+
'UPDATE sacramentos SET fecha = $1, sacramento = $2, celebrante = $3, testigo_novio = $4, testigo_novia = $5, certifica = $6, padrino = $7, madrina = $8, padre = $9, madre = $10 WHERE id = $11', [
|
258
|
+
fecha, sacramento, ministro, testigo_uno, testigo_dos, certifica, padrino, madrina, padre, madre, registro[0]
|
245
259
|
]
|
246
260
|
)
|
247
261
|
$conn.exec(
|
@@ -0,0 +1,293 @@
|
|
1
|
+
require 'fox16'
|
2
|
+
include Fox
|
3
|
+
|
4
|
+
class LicenciaMatrimonio < FXMainWindow
|
5
|
+
def initialize(app)
|
6
|
+
super(app, 'Parroquia San Judas Tadeo', width: 1050, height: 530)
|
7
|
+
self.backColor = FXRGB(3, 187, 133)
|
8
|
+
# Title
|
9
|
+
@lbltitle = FXLabel.new(self, 'Bienvenido a la Parroquia San Judas Tadeo',
|
10
|
+
opts: LAYOUT_EXPLICIT | JUSTIFY_CENTER_X, width: 1050, height: 20, x: 0, y: 20)
|
11
|
+
@lbltitle.font = FXFont.new(app, 'Geneva', 16, FONTWEIGHT_BOLD)
|
12
|
+
@lbltitle.backColor = FXRGB(3, 187, 133)
|
13
|
+
# Subtitle
|
14
|
+
@lblsubtitle = FXLabel.new(self, 'ARQUIDIOSESIS DE QUITO - SERVICIO PARROQUIAL DE SAN JUDAS TADEO',
|
15
|
+
opts: LAYOUT_EXPLICIT | JUSTIFY_CENTER_X, width: 1050, height: 20, x: 0, y: 40)
|
16
|
+
@lblsubtitle.font = FXFont.new(app, 'Geneva', 10, FONTWEIGHT_BOLD)
|
17
|
+
@lblsubtitle.backColor = FXRGB(3, 187, 133)
|
18
|
+
# Date
|
19
|
+
@date = Time.now.strftime('%d/%m/%Y')
|
20
|
+
@lbldate = FXLabel.new(self, "Fecha: #{cambiar_formato_fecha(@date)}", opts: LAYOUT_EXPLICIT | JUSTIFY_RIGHT,
|
21
|
+
width: 1050, height: 20, x: 0, y: 60, padRight: 20)
|
22
|
+
@lbldate.font = FXFont.new(app, 'Geneva', 12, FONTWEIGHT_BOLD)
|
23
|
+
@lbldate.backColor = FXRGB(3, 187, 133)
|
24
|
+
# section libros
|
25
|
+
@lbl_tomo = FXLabel.new(self, 'Tomo', opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 50, y: 100)
|
26
|
+
@lbl_tomo.backColor = FXRGB(3, 187, 133)
|
27
|
+
@input_tomo = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 110, y: 100)
|
28
|
+
@lbl_page = FXLabel.new(self, 'Pagina', opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 170, y: 100)
|
29
|
+
@lbl_page.backColor = FXRGB(3, 187, 133)
|
30
|
+
@input_page = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 230, y: 100)
|
31
|
+
@lbl_number = FXLabel.new(self, 'Numero', opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 290,
|
32
|
+
y: 100)
|
33
|
+
@lbl_number.backColor = FXRGB(3, 187, 133)
|
34
|
+
@input_number = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 350,
|
35
|
+
y: 100)
|
36
|
+
|
37
|
+
# section datos
|
38
|
+
@lbl_fecha = FXLabel.new(self, 'Fecha de matrimonio (AAAA/MM/DD): ', opts: LAYOUT_EXPLICIT, width: 250,
|
39
|
+
height: 20, x: 10, y: 150)
|
40
|
+
@lbl_fecha.backColor = FXRGB(3, 187, 133)
|
41
|
+
@input_fecha = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 340,
|
42
|
+
y: 150)
|
43
|
+
@lbl_sacramento = FXLabel.new(self, 'Sacramento: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
44
|
+
x: 680, y: 150)
|
45
|
+
@lbl_sacramento.backColor = FXRGB(3, 187, 133)
|
46
|
+
@input_sacramento = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 850,
|
47
|
+
y: 150)
|
48
|
+
@input_sacramento.text = 'Licencia de Matrimonio'
|
49
|
+
@input_sacramento.disable
|
50
|
+
@lbl_parroquia = FXLabel.new(self, 'Iglesia parroquial: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
51
|
+
x: 10, y: 180)
|
52
|
+
@lbl_parroquia.backColor = FXRGB(3, 187, 133)
|
53
|
+
@input_parroquia = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 170,
|
54
|
+
y: 180)
|
55
|
+
@lbl_sector = FXLabel.new(self, 'Sector: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 340,
|
56
|
+
y: 180)
|
57
|
+
@lbl_sector.backColor = FXRGB(3, 187, 133)
|
58
|
+
@input_sector = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 510,
|
59
|
+
y: 180)
|
60
|
+
@lbl_parroco = FXLabel.new(self, 'Parroco: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 680,
|
61
|
+
y: 180)
|
62
|
+
@lbl_parroco.backColor = FXRGB(3, 187, 133)
|
63
|
+
@input_parroco = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 850,
|
64
|
+
y: 180)
|
65
|
+
@lbl_celebrante = FXLabel.new(self, 'Celebrante: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
66
|
+
x: 10, y: 210)
|
67
|
+
@lbl_celebrante.backColor = FXRGB(3, 187, 133)
|
68
|
+
@input_celebrante = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 170,
|
69
|
+
y: 210)
|
70
|
+
@lbl_name_novio = FXLabel.new(self, 'Nombres del novio: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
71
|
+
x: 10, y: 240)
|
72
|
+
@lbl_name_novio.backColor = FXRGB(3, 187, 133)
|
73
|
+
@input_name_novio = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 170,
|
74
|
+
y: 240)
|
75
|
+
@lbl_apellido_novio = FXLabel.new(self, 'Apellidos del novio: ', opts: LAYOUT_EXPLICIT, width: 150,
|
76
|
+
height: 20, x: 340, y: 240)
|
77
|
+
@lbl_apellido_novio.backColor = FXRGB(3, 187, 133)
|
78
|
+
@input_apellido_novio = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 510,
|
79
|
+
y: 240)
|
80
|
+
@lbl_cedula_novio = FXLabel.new(self, 'Cédula del novio: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
81
|
+
x: 680, y: 240)
|
82
|
+
@lbl_cedula_novio.backColor = FXRGB(3, 187, 133)
|
83
|
+
@input_cedula_novio = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 850,
|
84
|
+
y: 240)
|
85
|
+
@lbl_name_novia = FXLabel.new(self, 'Nombres de la novia: ', opts: LAYOUT_EXPLICIT, width: 150,
|
86
|
+
height: 20, x: 10, y: 270)
|
87
|
+
@lbl_name_novia.backColor = FXRGB(3, 187, 133)
|
88
|
+
@input_name_novia = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 170,
|
89
|
+
y: 270)
|
90
|
+
@lbl_apellido_novia = FXLabel.new(self, 'Apellidos de la novia: ', opts: LAYOUT_EXPLICIT, width: 150,
|
91
|
+
height: 20, x: 340, y: 270)
|
92
|
+
@lbl_apellido_novia.backColor = FXRGB(3, 187, 133)
|
93
|
+
@input_apellido_novia = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 510,
|
94
|
+
y: 270)
|
95
|
+
@lbl_cedula_novia = FXLabel.new(self, 'Cédula de la novia: ', opts: LAYOUT_EXPLICIT, width: 150,
|
96
|
+
height: 20, x: 680, y: 270)
|
97
|
+
@lbl_cedula_novia.backColor = FXRGB(3, 187, 133)
|
98
|
+
@input_cedula_novia = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 850,
|
99
|
+
y: 270)
|
100
|
+
@lbl_testigo_novio = FXLabel.new(self, 'Testigo del novio: ', opts: LAYOUT_EXPLICIT, width: 150,
|
101
|
+
height: 20, x: 10, y: 300)
|
102
|
+
@lbl_testigo_novio.backColor = FXRGB(3, 187, 133)
|
103
|
+
@input_nombres_testigo_novio = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
104
|
+
x: 170, y: 300)
|
105
|
+
@lbl_testigo_novia = FXLabel.new(self, 'Testigo novia: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
106
|
+
x: 340, y: 300)
|
107
|
+
@lbl_testigo_novia.backColor = FXRGB(3, 187, 133)
|
108
|
+
@input_nombres_testigo_novia = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
109
|
+
x: 510, y: 300)
|
110
|
+
@lbl_certifica = FXLabel.new(self, 'Certifica: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
111
|
+
x: 680, y: 300)
|
112
|
+
@lbl_certifica.backColor = FXRGB(3, 187, 133)
|
113
|
+
@input_certifica = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 850,
|
114
|
+
y: 300)
|
115
|
+
|
116
|
+
# section registro civil
|
117
|
+
@lbl_reg_civ = FXLabel.new(self,
|
118
|
+
'------------------------------------ REGISTRO CIVIL ------------------------------------', opts: LAYOUT_EXPLICIT | JUSTIFY_CENTER_X, width: 1050, height: 20, x: 10, y: 330)
|
119
|
+
@lbl_reg_civ.backColor = FXRGB(3, 187, 133)
|
120
|
+
@lbl_provincia_rc = FXLabel.new(self, 'Provincia: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
121
|
+
x: 10, y: 360)
|
122
|
+
@lbl_provincia_rc.backColor = FXRGB(3, 187, 133)
|
123
|
+
@input_provincia_rc = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 170,
|
124
|
+
y: 360)
|
125
|
+
@lbl_canton_rc = FXLabel.new(self, 'Cantón: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 340,
|
126
|
+
y: 360)
|
127
|
+
@lbl_canton_rc.backColor = FXRGB(3, 187, 133)
|
128
|
+
@input_canton_rc = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 510,
|
129
|
+
y: 360)
|
130
|
+
@lbl_parroquia_rc = FXLabel.new(self, 'Parroquia: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
131
|
+
x: 680, y: 360)
|
132
|
+
@lbl_parroquia_rc.backColor = FXRGB(3, 187, 133)
|
133
|
+
@input_parroquia_rc = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 850,
|
134
|
+
y: 360)
|
135
|
+
@lbl_anio_rc = FXLabel.new(self, 'Año: ', opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 50,
|
136
|
+
y: 390)
|
137
|
+
@lbl_anio_rc.backColor = FXRGB(3, 187, 133)
|
138
|
+
@input_anio_rc = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 110,
|
139
|
+
y: 390)
|
140
|
+
@lbl_tomo_rc = FXLabel.new(self, 'Tomo: ', opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 170,
|
141
|
+
y: 390)
|
142
|
+
@lbl_tomo_rc.backColor = FXRGB(3, 187, 133)
|
143
|
+
@input_tomo_rc = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 230,
|
144
|
+
y: 390)
|
145
|
+
@lbl_pag_rc = FXLabel.new(self, 'Página: ', opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 290,
|
146
|
+
y: 390)
|
147
|
+
@lbl_pag_rc.backColor = FXRGB(3, 187, 133)
|
148
|
+
@input_pag_rc = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 350,
|
149
|
+
y: 390)
|
150
|
+
@lbl_acta_rc = FXLabel.new(self, 'Acta: ', opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 410,
|
151
|
+
y: 390)
|
152
|
+
@lbl_acta_rc.backColor = FXRGB(3, 187, 133)
|
153
|
+
@input_acta_rc = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 50, height: 20, x: 470,
|
154
|
+
y: 390)
|
155
|
+
@lbl_date_rc = FXLabel.new(self, 'Fecha (AAAA/MM/DD): ', opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
156
|
+
x: 10, y: 420)
|
157
|
+
@lbl_date_rc.backColor = FXRGB(3, 187, 133)
|
158
|
+
@input_date_rc = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 170,
|
159
|
+
y: 420)
|
160
|
+
|
161
|
+
|
162
|
+
# create buttons
|
163
|
+
@btnsave = FXButton.new(self, 'Guardar', opts: LAYOUT_EXPLICIT | BUTTON_NORMAL, width: 100, height: 30,
|
164
|
+
x: 790, y: 480)
|
165
|
+
@btncancel = FXButton.new(self, 'Cancelar', opts: LAYOUT_EXPLICIT | BUTTON_NORMAL, width: 100, height: 30,
|
166
|
+
x: 900, y: 480)
|
167
|
+
|
168
|
+
# connect buttons
|
169
|
+
@btnsave.connect(SEL_COMMAND) do
|
170
|
+
tomo = @input_tomo.text
|
171
|
+
page = @input_page.text
|
172
|
+
number = @input_number.text
|
173
|
+
fecha = @input_fecha.text
|
174
|
+
sacramento = @input_sacramento.text
|
175
|
+
parroquia = @input_parroquia.text
|
176
|
+
sector = @input_sector.text
|
177
|
+
parroco = @input_parroco.text
|
178
|
+
celebrante = @input_celebrante.text
|
179
|
+
name_novio = @input_name_novio.text
|
180
|
+
apellido_novio = @input_apellido_novio.text
|
181
|
+
cedula_novio = @input_cedula_novio.text.empty? ? nil : @input_cedula_novio.text
|
182
|
+
nombres_novia = @input_name_novia.text.empty? ? nil : @input_name_novia.text
|
183
|
+
apellidos_novia = @input_apellido_novia.text.empty? ? nil : @input_apellido_novia.text
|
184
|
+
cedula_novia = @input_cedula_novia.text.empty? ? nil : @input_cedula_novia.text
|
185
|
+
testigo_novio = @input_nombres_testigo_novio.text.empty? ? nil : @input_nombres_testigo_novio.text
|
186
|
+
testigo_novia = @input_nombres_testigo_novia.text.empty? ? nil : @input_nombres_testigo_novia.text
|
187
|
+
certifica = @input_certifica.text
|
188
|
+
provincia_rc = @input_provincia_rc.text
|
189
|
+
canton_rc = @input_canton_rc.text
|
190
|
+
parroquia_rc = @input_parroquia_rc.text
|
191
|
+
anio_rc = @input_anio_rc.text
|
192
|
+
tomo_rc = @input_tomo_rc.text
|
193
|
+
pagina_rc = @input_pag_rc.text
|
194
|
+
acta_rc = @input_acta_rc.text
|
195
|
+
fecha_rc = @input_date_rc.text
|
196
|
+
|
197
|
+
# tables
|
198
|
+
# tabla libros (id, tomo, pagina, numero)
|
199
|
+
# tabla creyentes (id, nombres, apellidos, lugar_nacimiento, fecha_nacimiento, cedula)
|
200
|
+
# tabla parroquias (id, nombre, sector, parroco)
|
201
|
+
# tabla sacramentos (id, nombre, fecha, celebrante, certifica, padrino, madrina, testigo_novio, testigo_novia, padre, madre, nombres_novia, apellidos_novia, cedula_novia, fk_creyentes, fk_parroquias, fk_registros_civiles, fk_libros)
|
202
|
+
# tabla registros_civiles (id, provincia_rc, canton_rc, parroquia_rc, anio_rc, tomo_rc, pagina_rc, acta_rc, fecha_rc)
|
203
|
+
$conn.transaction do
|
204
|
+
$conn.exec('INSERT INTO libros (tomo, pagina, numero) VALUES ($1, $2, $3)', [tomo, page, number])
|
205
|
+
$conn.exec('INSERT INTO creyentes (nombres, apellidos, cedula) VALUES ($1, $2, $3)',
|
206
|
+
[name_novio, apellido_novio, cedula_novio])
|
207
|
+
$conn.exec('INSERT INTO parroquias (parroquia, sector, parroco) VALUES ($1, $2, $3)',
|
208
|
+
[parroquia, sector, parroco])
|
209
|
+
$conn.exec(
|
210
|
+
'INSERT INTO registros_civiles (provincia_rc, canton_rc, parroquia_rc, anio_rc, tomo_rc, pagina_rc, acta_rc, fecha_rc) VALUES ($1, $2, $3, $4, $5, $6, $7, $8)', [
|
211
|
+
provincia_rc, canton_rc, parroquia_rc, anio_rc, tomo_rc, pagina_rc, acta_rc, fecha_rc
|
212
|
+
]
|
213
|
+
)
|
214
|
+
# Insertar en la tabla misas
|
215
|
+
@registro_misas = $conn.exec('INSERT INTO misas (intencion, fecha, hora) VALUES ($1, $2, $3)', [nil, nil, nil])
|
216
|
+
$conn.exec(
|
217
|
+
'INSERT INTO sacramentos (sacramento, fecha, celebrante, certifica, testigo_novio, testigo_novia, nombres_novia, apellidos_novia, cedula_novia) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)', [
|
218
|
+
sacramento, fecha, celebrante, certifica, testigo_novio, testigo_novia, nombres_novia, apellidos_novia, cedula_novia
|
219
|
+
]
|
220
|
+
)
|
221
|
+
$conn.exec('COMMIT')
|
222
|
+
FXMessageBox.information(self, MBOX_OK, 'Información', 'Datos guardados correctamente')
|
223
|
+
clear_input_fields
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
@btncancel.connect(SEL_COMMAND) do
|
228
|
+
clear_input_fields
|
229
|
+
end
|
230
|
+
|
231
|
+
def clear_input_fields
|
232
|
+
@input_tomo.text = ''
|
233
|
+
@input_page.text = ''
|
234
|
+
@input_number.text = ''
|
235
|
+
@input_fecha.text = ''
|
236
|
+
@input_parroco.text = ''
|
237
|
+
@input_celebrante.text = ''
|
238
|
+
@input_name_novio.text = ''
|
239
|
+
@input_apellido_novio.text = ''
|
240
|
+
@input_cedula_novio.text = ''
|
241
|
+
@input_name_novia.text = ''
|
242
|
+
@input_apellido_novia.text = ''
|
243
|
+
@input_cedula_novia.text = ''
|
244
|
+
@input_nombres_testigo_novio.text = ''
|
245
|
+
@input_nombres_testigo_novia.text = ''
|
246
|
+
@input_certifica.text = ''
|
247
|
+
@input_provincia_rc.text = ''
|
248
|
+
@input_canton_rc.text = ''
|
249
|
+
@input_parroquia_rc.text = ''
|
250
|
+
@input_anio_rc.text = ''
|
251
|
+
@input_tomo_rc.text = ''
|
252
|
+
@input_pag_rc.text = ''
|
253
|
+
@input_acta_rc.text = ''
|
254
|
+
@input_date_rc.text = ''
|
255
|
+
end
|
256
|
+
end
|
257
|
+
|
258
|
+
# Nombre del mes
|
259
|
+
def nombre_mes(mes)
|
260
|
+
meses = {
|
261
|
+
'01' => 'enero',
|
262
|
+
'02' => 'febrero',
|
263
|
+
'03' => 'marzo',
|
264
|
+
'04' => 'abril',
|
265
|
+
'05' => 'mayo',
|
266
|
+
'06' => 'junio',
|
267
|
+
'07' => 'julio',
|
268
|
+
'08' => 'agosto',
|
269
|
+
'09' => 'septiembre',
|
270
|
+
'10' => 'octubre',
|
271
|
+
'11' => 'noviembre',
|
272
|
+
'12' => 'diciembre'
|
273
|
+
}
|
274
|
+
meses[mes]
|
275
|
+
end
|
276
|
+
|
277
|
+
# Cambiar el formato de la fecha de YYYY-MM-DD a DD de nombre_mes de YYYY
|
278
|
+
def cambiar_formato_fecha(fecha)
|
279
|
+
# split "-" or "/"
|
280
|
+
fecha = fecha.split(%r{-|/})
|
281
|
+
# si el formato de fecha es YYYY-MM-DD o YYYY/MM/DD, sino si es DD-MM-YYYY o DD/MM/YYYY
|
282
|
+
if fecha[0].length == 4
|
283
|
+
"#{fecha[2]} de #{nombre_mes(fecha[1])} de #{fecha[0]}"
|
284
|
+
else
|
285
|
+
"#{fecha[0]} de #{nombre_mes(fecha[1])} de #{fecha[2]}"
|
286
|
+
end
|
287
|
+
end
|
288
|
+
|
289
|
+
def create
|
290
|
+
super
|
291
|
+
show(PLACEMENT_SCREEN)
|
292
|
+
end
|
293
|
+
end
|
@@ -484,9 +484,9 @@ class ResultadosConsulta < FXMainWindow
|
|
484
484
|
pdf.move_down 10
|
485
485
|
pdf.text "MADRE: #{registro[10]} FIRMA: __________________", align: :center
|
486
486
|
pdf.move_down 10
|
487
|
-
pdf.text
|
487
|
+
pdf.text "TESTIGO 1): #{registro[7]} FIRMA: __________________", align: :center
|
488
488
|
pdf.move_down 10
|
489
|
-
pdf.text
|
489
|
+
pdf.text "TESTIGO 2): #{registro[8]} FIRMA: __________________", align: :center
|
490
490
|
pdf.move_down 30
|
491
491
|
# Firma del párroco
|
492
492
|
pdf.text '_______________________________', align: :center
|
@@ -611,6 +611,42 @@ class ResultadosConsulta < FXMainWindow
|
|
611
611
|
# Parroco
|
612
612
|
pdf.text 'Párroco', align: :center
|
613
613
|
end
|
614
|
+
when 'Licencia de Matrimonio'
|
615
|
+
pdf.move_down 20
|
616
|
+
pdf.text 'LICENCIA DE MATRIMONIO', align: :center, size: 20, style: :bold, color: 'FF0000'
|
617
|
+
pdf.move_down 20
|
618
|
+
registros_seleccionados.each do |registro|
|
619
|
+
# Fecha actual alineada a la derecha
|
620
|
+
pdf.text "Quito, #{cambiar_formato_fecha(Time.now.strftime('%d/%m/%Y'))}", align: :right
|
621
|
+
pdf.move_down 20
|
622
|
+
# Título
|
623
|
+
pdf.text 'Zona Pastoral Norte', align: :justify
|
624
|
+
pdf.move_down 10
|
625
|
+
pdf.text "Ministerio Parroquial \"San Judas Tadeo\"", align: :justify
|
626
|
+
pdf.move_down 10
|
627
|
+
pdf.text 'Rvdo. Padre', align: :justify
|
628
|
+
# Nombre del párroco
|
629
|
+
pdf.text (registro[27]).to_s, align: :justify
|
630
|
+
pdf.move_down 10
|
631
|
+
# Parroquia
|
632
|
+
pdf.text "Párroco de \"#{registro[25]}\" #{registro[26]}", align: :justify
|
633
|
+
pdf.move_down 10
|
634
|
+
pdf.text 'Presente.', align: :justify
|
635
|
+
pdf.move_down 40
|
636
|
+
# Cuerpo
|
637
|
+
pdf.text "Habiendose realizado en este despacho parroquial las informaciones previas al matrimonio del Sr. #{registro[19]} #{registro[20]} C.I. #{registro[23]} con la Sra. #{registro[11]} #{registro[12]} C.I. #{registro[13]}. Feligreses de esta parroquia, San Judas Tadeo, sin que de lo actudo haya aparecido impedimento alguno, habiéndose así mismo realizado la dispensa de las tres moniciones canónicas, concedo a V. Reverencia la licencia prescrita por el canon 1115, para que dentro de esta jurisdicción parroquial precencia lícitamente y bendiga el sobredicho matrimonio, de lo que servirá notificar a esta parroquia con la incicación de la fecha y de los testigos.",
|
638
|
+
align: :justify
|
639
|
+
pdf.move_down 40
|
640
|
+
# Despedida
|
641
|
+
pdf.text 'Dios N. S. guarde a V. Reverencia', align: :justify
|
642
|
+
pdf.move_down 40
|
643
|
+
# Firma del párroco
|
644
|
+
pdf.text '_______________________________', align: :center
|
645
|
+
pdf.move_down 10
|
646
|
+
# Nombre del párroco
|
647
|
+
pdf.text (registro[4]).to_s, align: :center
|
648
|
+
# Parroco
|
649
|
+
pdf.text 'PÁRROCO', align: :center
|
614
650
|
end
|
615
651
|
end
|
616
652
|
# Abre el archivo PDF con el visor de PDF predeterminado del sistema
|
@@ -58,8 +58,10 @@ class Sacramentos < FXMainWindow
|
|
58
58
|
width: 150, height: 30, x: 620, y: 230)
|
59
59
|
@btnprematrimonial = FXButton.new(self, 'Permiso Prematrimonial', opts: LAYOUT_EXPLICIT | BUTTON_NORMAL,
|
60
60
|
width: 150, height: 30, x: 620, y: 270)
|
61
|
+
@btnlicenciamatrimonio = FXButton.new(self, 'Licencia de Matrimonio', opts: LAYOUT_EXPLICIT | BUTTON_NORMAL,
|
62
|
+
width: 150, height: 30, x: 620, y: 310)
|
61
63
|
@btnmisa = FXButton.new(self, 'Misa', opts: LAYOUT_EXPLICIT | BUTTON_NORMAL, width: 150, height: 30,
|
62
|
-
x: 620, y:
|
64
|
+
x: 620, y: 350)
|
63
65
|
# Footer
|
64
66
|
@lblfooter = FXLabel.new(self, 'WebMinds Studio - 2023', opts: LAYOUT_EXPLICIT | JUSTIFY_CENTER_X, width: 700,
|
65
67
|
height: 20, x: 0, y: 400)
|
@@ -132,6 +134,12 @@ class Sacramentos < FXMainWindow
|
|
132
134
|
vtnprematrimonial.create
|
133
135
|
vtnprematrimonial.show(PLACEMENT_SCREEN)
|
134
136
|
end
|
137
|
+
@btnlicenciamatrimonio.connect(SEL_COMMAND) do
|
138
|
+
require_relative 'licencia_matrimonio'
|
139
|
+
vtnlicenciamatrimonio = LicenciaMatrimonio.new(@app)
|
140
|
+
vtnlicenciamatrimonio.create
|
141
|
+
vtnlicenciamatrimonio.show(PLACEMENT_SCREEN)
|
142
|
+
end
|
135
143
|
@btnmisa.connect(SEL_COMMAND) do
|
136
144
|
require_relative 'misa'
|
137
145
|
vtnmisa = Misa.new(@app)
|
@@ -53,14 +53,11 @@ class Supletoria < FXMainWindow
|
|
53
53
|
@lbl_parroquia.backColor = FXRGB(3, 187, 133)
|
54
54
|
@input_parroquia = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 170,
|
55
55
|
y: 180)
|
56
|
-
@input_parroquia.text = 'San Judas Tadeo'
|
57
|
-
@input_parroquia.disable
|
58
56
|
@lbl_sector = FXLabel.new(self, 'Sector: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 340,
|
59
57
|
y: 180)
|
60
58
|
@lbl_sector.backColor = FXRGB(3, 187, 133)
|
61
59
|
@input_sector = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 510,
|
62
60
|
y: 180)
|
63
|
-
@input_sector.text = 'Jaime Roldós'
|
64
61
|
@lbl_parroco = FXLabel.new(self, 'Parroco: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 680,
|
65
62
|
y: 180)
|
66
63
|
@lbl_parroco.backColor = FXRGB(3, 187, 133)
|
@@ -116,10 +113,20 @@ class Supletoria < FXMainWindow
|
|
116
113
|
@lbl_madrina.backColor = FXRGB(3, 187, 133)
|
117
114
|
@input_madrina = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 510,
|
118
115
|
y: 360)
|
119
|
-
@
|
116
|
+
@lbl_testigo_uno = FXLabel.new(self, 'Testigo 1): ', opts: LAYOUT_EXPLICIT, width: 150,
|
117
|
+
height: 20, x: 10, y: 390)
|
118
|
+
@lbl_testigo_uno.backColor = FXRGB(3, 187, 133)
|
119
|
+
@input_testigo_uno = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
120
|
+
x: 170, y: 390)
|
121
|
+
@lbl_testigo_dos = FXLabel.new(self, 'Testigo 2): ', opts: LAYOUT_EXPLICIT, width: 150,
|
122
|
+
height: 20, x: 340, y: 390)
|
123
|
+
@lbl_testigo_dos.backColor = FXRGB(3, 187, 133)
|
124
|
+
@input_testigo_dos = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20,
|
125
|
+
x: 510, y: 390)
|
126
|
+
@lbl_certifica = FXLabel.new(self, 'Certifica: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 680,
|
120
127
|
y: 390)
|
121
128
|
@lbl_certifica.backColor = FXRGB(3, 187, 133)
|
122
|
-
@input_certifica = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x:
|
129
|
+
@input_certifica = FXTextField.new(self, 10, opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 850,
|
123
130
|
y: 390)
|
124
131
|
|
125
132
|
# section registro civil
|
@@ -194,6 +201,8 @@ class Supletoria < FXMainWindow
|
|
194
201
|
madrina = @input_madrina.text.empty? ? nil : @input_madrina.text
|
195
202
|
padre = @input_padre.text.empty? ? nil : @input_padre.text
|
196
203
|
madre = @input_madre.text.empty? ? nil : @input_madre.text
|
204
|
+
testigo_uno = @input_testigo_uno.text.empty? ? nil : @input_testigo_uno.text
|
205
|
+
testigo_dos = @input_testigo_dos.text.empty? ? nil : @input_testigo_dos.text
|
197
206
|
certifica = @input_certifica.text.empty? ? nil : @input_certifica.text
|
198
207
|
provincia_rc = @input_provincia_rc.text.empty? ? nil : @input_provincia_rc.text
|
199
208
|
canton_rc = @input_canton_rc.text.empty? ? nil : @input_canton_rc.text
|
@@ -224,8 +233,8 @@ class Supletoria < FXMainWindow
|
|
224
233
|
# Insertar en la tabla misas
|
225
234
|
@registro_misas = $conn.exec('INSERT INTO misas (intencion, fecha, hora) VALUES ($1, $2, $3)', [nil, nil, nil])
|
226
235
|
$conn.exec(
|
227
|
-
'INSERT INTO sacramentos (sacramento, fecha, celebrante, certifica, padrino, madrina, padre, madre) VALUES ($1, $2, $3, $4, $5, $6, $7, $8)', [
|
228
|
-
sacramento, fecha, ministro, certifica, padrino, madrina, padre, madre])
|
236
|
+
'INSERT INTO sacramentos (sacramento, fecha, celebrante, testigo_novio, testigo_novia, certifica, padrino, madrina, padre, madre) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)', [
|
237
|
+
sacramento, fecha, ministro, teatigo_uno, testigo_dos, certifica, padrino, madrina, padre, madre])
|
229
238
|
# Confirmar la transacción
|
230
239
|
$conn.exec('COMMIT')
|
231
240
|
FXMessageBox.information(self, MBOX_OK, 'Información', 'Datos guardados correctamente')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parroquia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francisco Javier Borja Lobato
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-11-
|
11
|
+
date: 2023-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fxruby
|
@@ -93,6 +93,7 @@ files:
|
|
93
93
|
- lib/parroquia/sacramentos/actualizar_certificado_prebautismal.rb
|
94
94
|
- lib/parroquia/sacramentos/actualizar_comunion.rb
|
95
95
|
- lib/parroquia/sacramentos/actualizar_confirmacion.rb
|
96
|
+
- lib/parroquia/sacramentos/actualizar_licencia_matrimonio.rb
|
96
97
|
- lib/parroquia/sacramentos/actualizar_matrimonio.rb
|
97
98
|
- lib/parroquia/sacramentos/actualizar_misa.rb
|
98
99
|
- lib/parroquia/sacramentos/actualizar_permiso_prebautismal.rb
|
@@ -103,6 +104,7 @@ files:
|
|
103
104
|
- lib/parroquia/sacramentos/comunion.rb
|
104
105
|
- lib/parroquia/sacramentos/confirmacion.rb
|
105
106
|
- lib/parroquia/sacramentos/consultas.rb
|
107
|
+
- lib/parroquia/sacramentos/licencia_matrimonio.rb
|
106
108
|
- lib/parroquia/sacramentos/matrimonio.rb
|
107
109
|
- lib/parroquia/sacramentos/misa.rb
|
108
110
|
- lib/parroquia/sacramentos/permiso_bautismo.rb
|