parroquia 1.1.19 → 1.1.21

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ee3cc3c2a2f6740622c5f3ffce22289f668e4c547db8aa36912f4ab540cc5d0
4
- data.tar.gz: c4bd0926973d5656bf2d1143f3f8839b10d8b601906446d51903996a6dd74728
3
+ metadata.gz: c6a2411ab2cf88dcb909d449a647c05776d7a4db046ec8eed0301d62c9c42190
4
+ data.tar.gz: d7f11c369a8d4da2e948e8958c40b9924b77d715c8132fe92edca1588c69e3c6
5
5
  SHA512:
6
- metadata.gz: e1afb8c8702fe64403c40b585176ceb28b5f1750edb124d768b48481f12582f8749ff3ddad81aae3e1f304d5c3ff26ed6e69f033b9c07d20b477f961fc5c1228
7
- data.tar.gz: 75a8b42dab4f9a816c955439facc2cbd8d23d4e1943eebfa8e96b74668f9c339e74ccc6c4e468c0e1379da8473cf10eb8d585e6bdba05fd0e9f3353b887136d1
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)