Skip to content

Commit

Permalink
Actualiza
Browse files Browse the repository at this point in the history
  • Loading branch information
vtamara committed May 31, 2019
1 parent 226811c commit 41bb257
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/pasosdeJesus/heb412_gen.git
revision: 4c5db2b827f3c7bfc0309b03143167e9797ed234
revision: b898f59243fdfdac4f7e910ee256288e13527fe1
specs:
heb412_gen (1.0.b6)
chosen-rails
Expand All @@ -11,7 +11,7 @@ GIT

GIT
remote: https://github.com/pasosdeJesus/sip.git
revision: bb110a5560b9c0ff758da2980051d35e4c250320
revision: f0e277f70d570a5d990f847289f846c11c5c04f8
specs:
sip (2.0.b6)
bootstrap-datepicker-rails
Expand Down Expand Up @@ -107,7 +107,7 @@ GEM
tzinfo (~> 1.1)
zeitwerk (~> 2.1, >= 2.1.4)
andand (1.3.3)
bcrypt (3.1.12)
bcrypt (3.1.13)
bindex (0.7.0)
bootsnap (1.4.4)
msgpack (~> 1.0)
Expand Down Expand Up @@ -315,7 +315,7 @@ GEM
activemodel (>= 6.0.0.a)
bindex (>= 0.4.0)
railties (>= 6.0.0.a)
webpacker (4.0.5)
webpacker (4.0.6)
activesupport (>= 4.2)
rack-proxy (>= 0.6.1)
railties (>= 4.2)
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,31 @@ def reportar
@titulo = 'Reporte de Repetidos'
@repetidos = []

rf="AND c1.fecha>='2010-05-01' AND c2.fecha>='2010-05-01'"
rf=""

if (params[:buscarrepetido] &&
params[:buscarrepetido][:fechaini] &&
params[:buscarrepetido][:fechaini] != '')
pfi = params[:buscarrepetido][:fechaini]
if Rails.application.config.x.formato_fecha == 'dd-mm-yyyy'
pfid = Date.strptime(pfi, '%d-%m-%Y')
else
pfid = Date.strptime(pfi, '%Y-%m-%d')
end
rf += " AND c1.fecha >= #{pfid.strftime('%Y-%m-%d')}" +
" AND c2.fecha >= #{pfid.strftime('%Y-%m-%d')}"
end
if(params[:buscarrepetido] && params[:buscarrepetido][:fechafin] &&
params[:buscarrepetido][:fechafin] != '')
pff = params[:buscarrepetido][:fechafin]
if Rails.application.config.x.formato_fecha == 'dd-mm-yyyy'
pffd = Date.strptime(pff, '%d-%m-%Y')
else
pffd = Date.strptime(pff, '%Y-%m-%d')
end
rf += " AND c1.fecha <= #{pfid.strftime('%Y-%m-%d')}" +
" AND c2.fecha <= #{pfid.strftime('%Y-%m-%d')}"
end
res = Sivel2Gen::Caso.connection.select_all("
SELECT DISTINCT gr
FROM (SELECT id, ARRAY(SELECT id FROM sivel2_gen_caso AS c2
Expand Down

0 comments on commit 41bb257

Please sign in to comment.