parroquia 1.1.19 → 1.1.21

Sign up to get free protection for your applications and to get access to all the features.
@@ -97,6 +97,9 @@ class ResultadosConsulta < FXMainWindow
97
97
 
98
98
  # Cambiar el formato de la fecha de YYYY-MM-DD a DD de nombre_mes de YYYY
99
99
  def cambiar_formato_fecha(fecha)
100
+ if fecha.nil?
101
+ return ''
102
+ end
100
103
  # split "-" or "/"
101
104
  fecha = fecha.split(%r{-|/})
102
105
  # si el formato de fecha es YYYY-MM-DD o YYYY/MM/DD, sino si es DD-MM-YYYY o DD/MM/YYYY
@@ -438,7 +441,7 @@ class ResultadosConsulta < FXMainWindow
438
441
  end
439
442
  when 'Partida Supletoria del Bautismo'
440
443
  pdf.move_down 20
441
- pdf.text 'CERTIFICADO DE PARTIDA SUPLETORIA DEL BAUTISMO', align: :center, size: 20, style: :bold,
444
+ pdf.text 'PARTIDA SUPLETORIA DEL BAUTISMO', align: :center, size: 20, style: :bold,
442
445
  color: 'FF0000'
443
446
  pdf.move_down 20
444
447
  registros_seleccionados.each do |registro|
@@ -481,9 +484,9 @@ class ResultadosConsulta < FXMainWindow
481
484
  pdf.move_down 10
482
485
  pdf.text "MADRE: #{registro[10]} FIRMA: __________________", align: :center
483
486
  pdf.move_down 10
484
- pdf.text 'TESTIGO 1): ................................... FIRMA: __________________', align: :center
487
+ pdf.text "TESTIGO 1): #{registro[7]} FIRMA: __________________", align: :center
485
488
  pdf.move_down 10
486
- pdf.text 'TESTIGO 2): ................................... FIRMA: __________________', align: :center
489
+ pdf.text "TESTIGO 2): #{registro[8]} FIRMA: __________________", align: :center
487
490
  pdf.move_down 30
488
491
  # Firma del párroco
489
492
  pdf.text '_______________________________', align: :center
@@ -608,6 +611,42 @@ class ResultadosConsulta < FXMainWindow
608
611
  # Parroco
609
612
  pdf.text 'Párroco', align: :center
610
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
611
650
  end
612
651
  end
613
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: 310)
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
- @lbl_certifica = FXLabel.new(self, 'Certifica: ', opts: LAYOUT_EXPLICIT, width: 150, height: 20, x: 10,
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: 170,
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
@@ -176,33 +183,35 @@ class Supletoria < FXMainWindow
176
183
 
177
184
  # connect buttons
178
185
  @btnsave.connect(SEL_COMMAND) do
179
- tomo = @input_tomo.text
180
- page = @input_page.text
181
- number = @input_number.text
182
- fecha = @input_fecha.text
186
+ tomo = @input_tomo.text.empty? ? nil : @input_tomo.text
187
+ page = @input_page.text.empty? ? nil : @input_page.text
188
+ number = @input_number.text.empty? ? nil : @input_number.text
189
+ fecha = @input_fecha.text.empty? ? nil : @input_fecha.text
183
190
  sacramento = @input_sacramento.text
184
- parroquia = @input_parroquia.text
185
- sector = @input_sector.text
186
- parroco = @input_parroco.text
187
- ministro = @input_ministro.text
188
- name = @input_name.text
189
- apellidos = @input_apellidos.text
190
- lugar_nacimiento = @input_lugar_nacimiento.text
191
- fecha_nacimiento = @input_fecha_nacimiento.text
191
+ parroquia = @input_parroquia.text.empty? ? nil : @input_parroquia.text
192
+ sector = @input_sector.text.empty? ? nil : @input_sector.text
193
+ parroco = @input_parroco.text.empty? ? nil : @input_parroco.text
194
+ ministro = @input_ministro.text.empty? ? nil : @input_ministro.text
195
+ name = @input_name.text.empty? ? nil : @input_name.text
196
+ apellidos = @input_apellidos.text.empty? ? nil : @input_apellidos.text
197
+ lugar_nacimiento = @input_lugar_nacimiento.text.empty? ? nil : @input_lugar_nacimiento.text
198
+ fecha_nacimiento = @input_fecha_nacimiento.text.empty? ? nil : @input_fecha_nacimiento.text
192
199
  cedula = @input_cedula.text.empty? ? nil : @input_cedula.text
193
200
  padrino = @input_padrino.text.empty? ? nil : @input_padrino.text
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
197
- certifica = @input_certifica.text
198
- provincia_rc = @input_provincia_rc.text
199
- canton_rc = @input_canton_rc.text
200
- parroquia_rc = @input_parroquia_rc.text
201
- anio_rc = @input_anio_rc.text
202
- tomo_rc = @input_tomo_rc.text
203
- pag_rc = @input_pag_rc.text
204
- acta_rc = @input_acta_rc.text
205
- date_rc = @input_date_rc.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
206
+ certifica = @input_certifica.text.empty? ? nil : @input_certifica.text
207
+ provincia_rc = @input_provincia_rc.text.empty? ? nil : @input_provincia_rc.text
208
+ canton_rc = @input_canton_rc.text.empty? ? nil : @input_canton_rc.text
209
+ parroquia_rc = @input_parroquia_rc.text.empty? ? nil : @input_parroquia_rc.text
210
+ anio_rc = @input_anio_rc.text.empty? ? nil : @input_anio_rc.text
211
+ tomo_rc = @input_tomo_rc.text.empty? ? nil : @input_tomo_rc.text
212
+ pag_rc = @input_pag_rc.text.empty? ? nil : @input_pag_rc.text
213
+ acta_rc = @input_acta_rc.text.empty? ? nil : @input_acta_rc.text
214
+ date_rc = @input_date_rc.text.empty? ? nil : @input_date_rc.text
206
215
 
207
216
  # tables
208
217
  # tabla libros (id, tomo, pagina, numero)
@@ -215,23 +224,17 @@ class Supletoria < FXMainWindow
215
224
  $conn.exec('INSERT INTO libros (tomo, pagina, numero) VALUES ($1, $2, $3)', [tomo, page, number])
216
225
  $conn.exec(
217
226
  'INSERT INTO creyentes (nombres, apellidos, lugar_nacimiento, fecha_nacimiento, cedula) VALUES ($1, $2, $3, $4, $5)', [
218
- name, apellidos, lugar_nacimiento, fecha_nacimiento, cedula
219
- ]
220
- )
227
+ name, apellidos, lugar_nacimiento, fecha_nacimiento, cedula])
221
228
  $conn.exec('INSERT INTO parroquias (parroquia, sector, parroco) VALUES ($1, $2, $3)',
222
229
  [parroquia, sector, parroco])
223
230
  $conn.exec(
224
231
  '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)', [
225
- provincia_rc, canton_rc, parroquia_rc, anio_rc, tomo_rc, pag_rc, acta_rc, date_rc
226
- ]
227
- )
232
+ provincia_rc, canton_rc, parroquia_rc, anio_rc, tomo_rc, pag_rc, acta_rc, date_rc])
228
233
  # Insertar en la tabla misas
229
234
  @registro_misas = $conn.exec('INSERT INTO misas (intencion, fecha, hora) VALUES ($1, $2, $3)', [nil, nil, nil])
230
235
  $conn.exec(
231
- 'INSERT INTO sacramentos (sacramento, fecha, celebrante, certifica, padrino, madrina, padre, madre) VALUES ($1, $2, $3, $4, $5, $6, $7, $8)', [
232
- sacramento, fecha, ministro, certifica, padrino, madrina, padre, madre
233
- ]
234
- )
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])
235
238
  # Confirmar la transacción
236
239
  $conn.exec('COMMIT')
237
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.19
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-08 00:00:00.000000000 Z
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