Usuario registrado requerido

Políticas de uso y aceptación

TEKTON PRESUPUESTOS es una herramienta de apoyo para presupuestación de obras. Para ingresar debes estar registrado en la plataforma TEKTON, aceptar estas condiciones y asumir plena responsabilidad profesional por cada presupuesto generado.

TEKTON PRESUPUESTOS
APU técnico · cotización general · recursos consolidados
Sesión temporal 12:00:00
Costo directo
$ 0
Administración
$ 0
Imprevistos
$ 0
Utilidad
$ 0
IVA sobre U
$ 0
Total venta
$ 0
Listo
#CódigoActividadUNDCantidadValor unitario APUTotalAcción
0 APUs
CódigoActividadUNDCategoríaCapítuloUnitarioAcción
TipoRecursoUNDCantidad acumuladaCosto acumulado%

Distribución global

Participación por tipo de recurso sobre el costo directo.

Automática desde Cotizar Fuente única: cada actividad activa de Cotizar aparece aquí con unidad, cantidad, unitario y total.
Actividades desde cotización0
Costo programado$0
Avance físico ponderado0%
Avance financiero0%
Actividades críticas0
Logo opcional del usuario para PDF
'; } function openUnifiedSchedule(){ var html=buildUnifiedScheduleHtml(); if(!html){alert('No se encontró la programación para exportar.');return} var w=window.open('','_blank'); if(w){w.document.open();w.document.write(html);w.document.close();return} var a=document.createElement('a');a.download='TEKTON_programacion_completa_'+new Date().toISOString().slice(0,10)+'.html';a.href=URL.createObjectURL(new Blob([html],{type:'text/html;charset=utf-8'}));document.body.appendChild(a);a.click();a.remove(); } window.tekExportScheduleImage=openUnifiedSchedule; window.tekExportScheduleFullPdf=openUnifiedSchedule; window.tekExportSchedulePdfFull=openUnifiedSchedule; window.tekPrintScheduleComplete=openUnifiedSchedule; function wire(){ var img=q('#tekScheduleImageBtn'); if(img) img.onclick=function(e){e.preventDefault();openUnifiedSchedule()}; var pdf=q('#tekSchedulePdfFullBtn'); if(pdf) pdf.onclick=function(e){e.preventDefault();openUnifiedSchedule()}; } var oldShow=window.showView; if(typeof oldShow==='function'){window.showView=function(id){var r=oldShow.apply(this,arguments);setTimeout(wire,120);return r}} document.addEventListener('DOMContentLoaded',function(){setTimeout(wire,800)}); setTimeout(wire,1200); })(); '} function openPrint(){var html=printHtml(); if(!html){alert('No se encontró la programación para exportar.');return} var w=window.open('','_blank'); if(w){w.document.open();w.document.write(html);w.document.close();return} var a=document.createElement('a'); a.download='TEKTON_programacion_completa_'+new Date().toISOString().slice(0,10)+'.html'; a.href=URL.createObjectURL(new Blob([html],{type:'text/html;charset=utf-8'})); document.body.appendChild(a); a.click(); a.remove();} window.tekExportScheduleImage=openPrint; window.tekExportScheduleFullPdf=openPrint; window.tekExportSchedulePdfFull=openPrint; window.tekPrintScheduleComplete=openPrint; function wireButtons(){var img=q('#tekScheduleImageBtn'); if(img)img.onclick=function(e){e.preventDefault();openPrint()}; var pdf=q('#tekSchedulePdfFullBtn'); if(pdf)pdf.onclick=function(e){e.preventDefault();openPrint()}; var cols=q('#tekColumnsBtn'); if(cols)cols.onclick=window.tekScheduleToggleCols; fixGanttHeader();} var css=document.createElement('style'); css.id='tekFinalHeaderButtonsCss'; css.textContent='#scheduleView #tekScheduleGrid th[data-col="gantt"]{padding:0!important;min-width:1180px!important;vertical-align:middle!important}#scheduleView #tekScheduleGrid td[data-col="gantt"] .ganttHead,#scheduleView #tekScheduleGrid td[data-col="gantt"] .tekFinalScale{display:none!important}#scheduleView .tekGanttHeaderScale{display:grid!important;grid-auto-flow:column;grid-auto-columns:minmax(46px,1fr);height:42px;min-width:1180px;overflow:hidden}#scheduleView .tekGanttHeaderScale span{display:flex;flex-direction:column;align-items:center;justify-content:center;white-space:normal;line-height:1.05;text-align:center;font-size:9px;border-left:1px solid rgba(255,255,255,.22);padding:2px}#scheduleView .tekGanttHeaderScale small{font-size:8px;opacity:.9}body.tek-light #scheduleView .tekGanttHeaderScale span{border-left-color:rgba(11,35,64,.16)}#scheduleView #tekColPicker.open{display:grid!important;position:absolute!important;top:58px!important;left:12px!important;grid-template-columns:repeat(2,minmax(190px,1fr));gap:8px;min-width:440px;max-width:min(760px,calc(100vw - 38px));max-height:72vh;overflow:auto;padding:12px;border:1px solid #1b3555;border-radius:14px;background:#07111d;color:#eaf3ff;box-shadow:0 22px 70px rgba(0,0,0,.48);z-index:2147483647}#tekColPicker .tekColTitle{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;gap:10px}#tekColPicker .tekColNote{grid-column:1/-1;font-size:11px;color:#9fb0c8}#tekColPicker label{display:flex!important;align-items:center;gap:8px;font-size:12px;line-height:1.2}#tekColPicker input{accent-color:#2f89ff}#tekColPicker button{height:28px;border-radius:8px;border:1px solid #27496d;background:#0c1a2b;color:#eaf3ff;font-weight:700}#tekColPicker .tekColActions{grid-column:1/-1;display:flex;gap:8px;position:sticky;bottom:0;background:inherit;padding-top:8px}#tekColPicker .tekColActions button{flex:1}body.tek-light #scheduleView #tekColPicker.open{background:#fff;color:#0b2340;border-color:#cbd9e9;box-shadow:0 22px 70px rgba(11,35,64,.18)}body.tek-light #tekColPicker .tekColNote{color:#52667f}body.tek-light #tekColPicker button{background:#edf5ff;color:#0b2340;border-color:#cbd9e9}'; document.head.appendChild(css); var oldRender=window.tekScheduleRender; if(typeof oldRender==='function'){window.tekScheduleRender=function(){var r=oldRender.apply(this,arguments);setTimeout(wireButtons,90);return r}} var oldShow=window.showView; if(typeof oldShow==='function'){window.showView=function(id){var r=oldShow.apply(this,arguments);if(id==='scheduleView')setTimeout(wireButtons,140);return r}} document.addEventListener('DOMContentLoaded',function(){setTimeout(wireButtons,1200)}); setTimeout(wireButtons,1600); })(); '; } function openUnifiedSchedule(){ var html=buildUnifiedScheduleHtml(); if(!html){alert('No se encontró la programación para exportar.');return} var w=window.open('','_blank'); if(w){w.document.open();w.document.write(html);w.document.close();return} var a=document.createElement('a');a.download='TEKTON_programacion_completa_'+new Date().toISOString().slice(0,10)+'.html';a.href=URL.createObjectURL(new Blob([html],{type:'text/html;charset=utf-8'}));document.body.appendChild(a);a.click();a.remove(); } window.tekExportScheduleImage=openUnifiedSchedule; window.tekExportScheduleFullPdf=openUnifiedSchedule; window.tekExportSchedulePdfFull=openUnifiedSchedule; window.tekPrintScheduleComplete=openUnifiedSchedule; function wire(){ var img=q('#tekScheduleImageBtn'); if(img) img.onclick=function(e){e.preventDefault();openUnifiedSchedule()}; var pdf=q('#tekSchedulePdfFullBtn'); if(pdf) pdf.onclick=function(e){e.preventDefault();openUnifiedSchedule()}; } var oldShow=window.showView; if(typeof oldShow==='function'){window.showView=function(id){var r=oldShow.apply(this,arguments);setTimeout(wire,120);return r}} document.addEventListener('DOMContentLoaded',function(){setTimeout(wire,800)}); setTimeout(wire,1200); })(); '} function openPrintable(){var html=buildHtml();if(!html){alert('No se encontró la programación para exportar.');return}var w=window.open('','_blank');if(w){w.document.open();w.document.write(html);w.document.close();try{w.focus()}catch(e){}return}var a=document.createElement('a');a.download='TEKTON_programacion_completa_'+new Date().toISOString().slice(0,10)+'.html';a.href=URL.createObjectURL(new Blob([html],{type:'text/html;charset=utf-8'}));document.body.appendChild(a);a.click();a.remove()} function ensureButtons(){decorateLiveGantt();ensureModal();var controls=q('#scheduleView .scheduleControls');if(!controls)return;var img=q('#tekScheduleImageBtn');if(img){img.onclick=function(e){e.preventDefault();openCfg()};img.title='Configura encabezado, logo y exporta la programación completa con tabla y Gantt.'}var pdf=q('#tekSchedulePdfFullBtn')||qa('button',controls).find(function(b){return /pdf programación|pdf programacion/i.test(b.textContent||'')});if(pdf){pdf.onclick=function(e){e.preventDefault();openCfg()};pdf.title='Configura encabezado, logo y exporta la programación completa con tabla y Gantt.'}var cfgBtn=q('#tekScheduleExportCfgBtn');if(!cfgBtn){cfgBtn=document.createElement('button');cfgBtn.id='tekScheduleExportCfgBtn';cfgBtn.type='button';cfgBtn.textContent='Encabezado export';cfgBtn.onclick=function(e){e.preventDefault();openCfg()};var ref=img||pdf||controls.firstChild;ref?controls.insertBefore(cfgBtn,ref):controls.appendChild(cfgBtn)}} window.tekExportScheduleImage=function(){openCfg()}; window.tekExportScheduleFullPdf=function(){openCfg()}; window.tekExportSchedulePdfFull=function(){openCfg()}; window.tekPrintScheduleComplete=function(){openCfg()}; window.tekScheduleOpenExportConfig=openCfg; var oldRender=window.tekScheduleRender;if(typeof oldRender==='function'){window.tekScheduleRender=function(){var r=oldRender.apply(this,arguments);setTimeout(ensureButtons,120);return r}} var oldShow=window.showView;if(typeof oldShow==='function'){window.showView=function(id){var r=oldShow.apply(this,arguments);if(id==='scheduleView')setTimeout(ensureButtons,180);return r}} document.addEventListener('DOMContentLoaded',function(){setTimeout(ensureButtons,1200)});setTimeout(ensureButtons,1500); })(); '; } function openUnifiedSchedule(){ var html=buildUnifiedScheduleHtml(); if(!html){alert('No se encontró la programación para exportar.');return} var w=window.open('','_blank'); if(w){w.document.open();w.document.write(html);w.document.close();return} var a=document.createElement('a');a.download='TEKTON_programacion_completa_'+new Date().toISOString().slice(0,10)+'.html';a.href=URL.createObjectURL(new Blob([html],{type:'text/html;charset=utf-8'}));document.body.appendChild(a);a.click();a.remove(); } window.tekExportScheduleImage=openUnifiedSchedule; window.tekExportScheduleFullPdf=openUnifiedSchedule; window.tekExportSchedulePdfFull=openUnifiedSchedule; window.tekPrintScheduleComplete=openUnifiedSchedule; function wire(){ var img=q('#tekScheduleImageBtn'); if(img) img.onclick=function(e){e.preventDefault();openUnifiedSchedule()}; var pdf=q('#tekSchedulePdfFullBtn'); if(pdf) pdf.onclick=function(e){e.preventDefault();openUnifiedSchedule()}; } var oldShow=window.showView; if(typeof oldShow==='function'){window.showView=function(id){var r=oldShow.apply(this,arguments);setTimeout(wire,120);return r}} document.addEventListener('DOMContentLoaded',function(){setTimeout(wire,800)}); setTimeout(wire,1200); })(); '} function openPrint(){var html=printHtml(); if(!html){alert('No se encontró la programación para exportar.');return} var w=window.open('','_blank'); if(w){w.document.open();w.document.write(html);w.document.close();return} var a=document.createElement('a'); a.download='TEKTON_programacion_completa_'+new Date().toISOString().slice(0,10)+'.html'; a.href=URL.createObjectURL(new Blob([html],{type:'text/html;charset=utf-8'})); document.body.appendChild(a); a.click(); a.remove();} window.tekExportScheduleImage=openPrint; window.tekExportScheduleFullPdf=openPrint; window.tekExportSchedulePdfFull=openPrint; window.tekPrintScheduleComplete=openPrint; function wireButtons(){var img=q('#tekScheduleImageBtn'); if(img)img.onclick=function(e){e.preventDefault();openPrint()}; var pdf=q('#tekSchedulePdfFullBtn'); if(pdf)pdf.onclick=function(e){e.preventDefault();openPrint()}; var cols=q('#tekColumnsBtn'); if(cols)cols.onclick=window.tekScheduleToggleCols; fixGanttHeader();} var css=document.createElement('style'); css.id='tekFinalHeaderButtonsCss'; css.textContent='#scheduleView #tekScheduleGrid th[data-col="gantt"]{padding:0!important;min-width:1180px!important;vertical-align:middle!important}#scheduleView #tekScheduleGrid td[data-col="gantt"] .ganttHead,#scheduleView #tekScheduleGrid td[data-col="gantt"] .tekFinalScale{display:none!important}#scheduleView .tekGanttHeaderScale{display:grid!important;grid-auto-flow:column;grid-auto-columns:minmax(46px,1fr);height:42px;min-width:1180px;overflow:hidden}#scheduleView .tekGanttHeaderScale span{display:flex;flex-direction:column;align-items:center;justify-content:center;white-space:normal;line-height:1.05;text-align:center;font-size:9px;border-left:1px solid rgba(255,255,255,.22);padding:2px}#scheduleView .tekGanttHeaderScale small{font-size:8px;opacity:.9}body.tek-light #scheduleView .tekGanttHeaderScale span{border-left-color:rgba(11,35,64,.16)}#scheduleView #tekColPicker.open{display:grid!important;position:absolute!important;top:58px!important;left:12px!important;grid-template-columns:repeat(2,minmax(190px,1fr));gap:8px;min-width:440px;max-width:min(760px,calc(100vw - 38px));max-height:72vh;overflow:auto;padding:12px;border:1px solid #1b3555;border-radius:14px;background:#07111d;color:#eaf3ff;box-shadow:0 22px 70px rgba(0,0,0,.48);z-index:2147483647}#tekColPicker .tekColTitle{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;gap:10px}#tekColPicker .tekColNote{grid-column:1/-1;font-size:11px;color:#9fb0c8}#tekColPicker label{display:flex!important;align-items:center;gap:8px;font-size:12px;line-height:1.2}#tekColPicker input{accent-color:#2f89ff}#tekColPicker button{height:28px;border-radius:8px;border:1px solid #27496d;background:#0c1a2b;color:#eaf3ff;font-weight:700}#tekColPicker .tekColActions{grid-column:1/-1;display:flex;gap:8px;position:sticky;bottom:0;background:inherit;padding-top:8px}#tekColPicker .tekColActions button{flex:1}body.tek-light #scheduleView #tekColPicker.open{background:#fff;color:#0b2340;border-color:#cbd9e9;box-shadow:0 22px 70px rgba(11,35,64,.18)}body.tek-light #tekColPicker .tekColNote{color:#52667f}body.tek-light #tekColPicker button{background:#edf5ff;color:#0b2340;border-color:#cbd9e9}'; document.head.appendChild(css); var oldRender=window.tekScheduleRender; if(typeof oldRender==='function'){window.tekScheduleRender=function(){var r=oldRender.apply(this,arguments);setTimeout(wireButtons,90);return r}} var oldShow=window.showView; if(typeof oldShow==='function'){window.showView=function(id){var r=oldShow.apply(this,arguments);if(id==='scheduleView')setTimeout(wireButtons,140);return r}} document.addEventListener('DOMContentLoaded',function(){setTimeout(wireButtons,1200)}); setTimeout(wireButtons,1600); })(); '; } function openUnifiedSchedule(){ var html=buildUnifiedScheduleHtml(); if(!html){alert('No se encontró la programación para exportar.');return} var w=window.open('','_blank'); if(w){w.document.open();w.document.write(html);w.document.close();return} var a=document.createElement('a');a.download='TEKTON_programacion_completa_'+new Date().toISOString().slice(0,10)+'.html';a.href=URL.createObjectURL(new Blob([html],{type:'text/html;charset=utf-8'}));document.body.appendChild(a);a.click();a.remove(); } window.tekExportScheduleImage=openUnifiedSchedule; window.tekExportScheduleFullPdf=openUnifiedSchedule; window.tekExportSchedulePdfFull=openUnifiedSchedule; window.tekPrintScheduleComplete=openUnifiedSchedule; function wire(){ var img=q('#tekScheduleImageBtn'); if(img) img.onclick=function(e){e.preventDefault();openUnifiedSchedule()}; var pdf=q('#tekSchedulePdfFullBtn'); if(pdf) pdf.onclick=function(e){e.preventDefault();openUnifiedSchedule()}; } var oldShow=window.showView; if(typeof oldShow==='function'){window.showView=function(id){var r=oldShow.apply(this,arguments);setTimeout(wire,120);return r}} document.addEventListener('DOMContentLoaded',function(){setTimeout(wire,800)}); setTimeout(wire,1200); })(); '} function openPrintable(mode){var html=buildHtml(mode);if(!html){alert('No se encontró la programación para exportar.');return}var w=window.open('','_blank');if(w){w.document.open();w.document.write(html);w.document.close();return}var a=document.createElement('a');a.download='TEKTON_programacion_completa_'+new Date().toISOString().slice(0,10)+'.html';a.href=URL.createObjectURL(new Blob([html],{type:'text/html;charset=utf-8'}));document.body.appendChild(a);a.click();a.remove()} window.tekExportScheduleImage=function(){openPrintable('image')}; window.tekExportScheduleFullPdf=function(){openPrintable('pdf')}; window.tekExportSchedulePdfFull=function(){openPrintable('pdf')}; window.tekPrintScheduleComplete=function(){openPrintable('pdf')}; var oldRender=window.tekScheduleRender;if(typeof oldRender==='function'){window.tekScheduleRender=function(){var r=oldRender.apply(this,arguments);setTimeout(function(){ensureButtons();decorateTimeline()},120);return r}} var oldShow=window.showView;if(typeof oldShow==='function'){window.showView=function(id){var r=oldShow.apply(this,arguments);if(id==='scheduleView')setTimeout(function(){ensureButtons();decorateTimeline()},180);return r}} document.addEventListener('DOMContentLoaded',function(){setTimeout(function(){ensureButtons();decorateTimeline()},1300)});setTimeout(function(){ensureButtons();decorateTimeline()},1500); })(); '; } function openUnifiedSchedule(){ var html=buildUnifiedScheduleHtml(); if(!html){alert('No se encontró la programación para exportar.');return} var w=window.open('','_blank'); if(w){w.document.open();w.document.write(html);w.document.close();return} var a=document.createElement('a');a.download='TEKTON_programacion_completa_'+new Date().toISOString().slice(0,10)+'.html';a.href=URL.createObjectURL(new Blob([html],{type:'text/html;charset=utf-8'}));document.body.appendChild(a);a.click();a.remove(); } window.tekExportScheduleImage=openUnifiedSchedule; window.tekExportScheduleFullPdf=openUnifiedSchedule; window.tekExportSchedulePdfFull=openUnifiedSchedule; window.tekPrintScheduleComplete=openUnifiedSchedule; function wire(){ var img=q('#tekScheduleImageBtn'); if(img) img.onclick=function(e){e.preventDefault();openUnifiedSchedule()}; var pdf=q('#tekSchedulePdfFullBtn'); if(pdf) pdf.onclick=function(e){e.preventDefault();openUnifiedSchedule()}; } var oldShow=window.showView; if(typeof oldShow==='function'){window.showView=function(id){var r=oldShow.apply(this,arguments);setTimeout(wire,120);return r}} document.addEventListener('DOMContentLoaded',function(){setTimeout(wire,800)}); setTimeout(wire,1200); })(); '} function openPrint(){var html=printHtml(); if(!html){alert('No se encontró la programación para exportar.');return} var w=window.open('','_blank'); if(w){w.document.open();w.document.write(html);w.document.close();return} var a=document.createElement('a'); a.download='TEKTON_programacion_completa_'+new Date().toISOString().slice(0,10)+'.html'; a.href=URL.createObjectURL(new Blob([html],{type:'text/html;charset=utf-8'})); document.body.appendChild(a); a.click(); a.remove();} window.tekExportScheduleImage=openPrint; window.tekExportScheduleFullPdf=openPrint; window.tekExportSchedulePdfFull=openPrint; window.tekPrintScheduleComplete=openPrint; function wireButtons(){var img=q('#tekScheduleImageBtn'); if(img)img.onclick=function(e){e.preventDefault();openPrint()}; var pdf=q('#tekSchedulePdfFullBtn'); if(pdf)pdf.onclick=function(e){e.preventDefault();openPrint()}; var cols=q('#tekColumnsBtn'); if(cols)cols.onclick=window.tekScheduleToggleCols; fixGanttHeader();} var css=document.createElement('style'); css.id='tekFinalHeaderButtonsCss'; css.textContent='#scheduleView #tekScheduleGrid th[data-col="gantt"]{padding:0!important;min-width:1180px!important;vertical-align:middle!important}#scheduleView #tekScheduleGrid td[data-col="gantt"] .ganttHead,#scheduleView #tekScheduleGrid td[data-col="gantt"] .tekFinalScale{display:none!important}#scheduleView .tekGanttHeaderScale{display:grid!important;grid-auto-flow:column;grid-auto-columns:minmax(46px,1fr);height:42px;min-width:1180px;overflow:hidden}#scheduleView .tekGanttHeaderScale span{display:flex;flex-direction:column;align-items:center;justify-content:center;white-space:normal;line-height:1.05;text-align:center;font-size:9px;border-left:1px solid rgba(255,255,255,.22);padding:2px}#scheduleView .tekGanttHeaderScale small{font-size:8px;opacity:.9}body.tek-light #scheduleView .tekGanttHeaderScale span{border-left-color:rgba(11,35,64,.16)}#scheduleView #tekColPicker.open{display:grid!important;position:absolute!important;top:58px!important;left:12px!important;grid-template-columns:repeat(2,minmax(190px,1fr));gap:8px;min-width:440px;max-width:min(760px,calc(100vw - 38px));max-height:72vh;overflow:auto;padding:12px;border:1px solid #1b3555;border-radius:14px;background:#07111d;color:#eaf3ff;box-shadow:0 22px 70px rgba(0,0,0,.48);z-index:2147483647}#tekColPicker .tekColTitle{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;gap:10px}#tekColPicker .tekColNote{grid-column:1/-1;font-size:11px;color:#9fb0c8}#tekColPicker label{display:flex!important;align-items:center;gap:8px;font-size:12px;line-height:1.2}#tekColPicker input{accent-color:#2f89ff}#tekColPicker button{height:28px;border-radius:8px;border:1px solid #27496d;background:#0c1a2b;color:#eaf3ff;font-weight:700}#tekColPicker .tekColActions{grid-column:1/-1;display:flex;gap:8px;position:sticky;bottom:0;background:inherit;padding-top:8px}#tekColPicker .tekColActions button{flex:1}body.tek-light #scheduleView #tekColPicker.open{background:#fff;color:#0b2340;border-color:#cbd9e9;box-shadow:0 22px 70px rgba(11,35,64,.18)}body.tek-light #tekColPicker .tekColNote{color:#52667f}body.tek-light #tekColPicker button{background:#edf5ff;color:#0b2340;border-color:#cbd9e9}'; document.head.appendChild(css); var oldRender=window.tekScheduleRender; if(typeof oldRender==='function'){window.tekScheduleRender=function(){var r=oldRender.apply(this,arguments);setTimeout(wireButtons,90);return r}} var oldShow=window.showView; if(typeof oldShow==='function'){window.showView=function(id){var r=oldShow.apply(this,arguments);if(id==='scheduleView')setTimeout(wireButtons,140);return r}} document.addEventListener('DOMContentLoaded',function(){setTimeout(wireButtons,1200)}); setTimeout(wireButtons,1600); })(); '; } function openUnifiedSchedule(){ var html=buildUnifiedScheduleHtml(); if(!html){alert('No se encontró la programación para exportar.');return} var w=window.open('','_blank'); if(w){w.document.open();w.document.write(html);w.document.close();return} var a=document.createElement('a');a.download='TEKTON_programacion_completa_'+new Date().toISOString().slice(0,10)+'.html';a.href=URL.createObjectURL(new Blob([html],{type:'text/html;charset=utf-8'}));document.body.appendChild(a);a.click();a.remove(); } window.tekExportScheduleImage=openUnifiedSchedule; window.tekExportScheduleFullPdf=openUnifiedSchedule; window.tekExportSchedulePdfFull=openUnifiedSchedule; window.tekPrintScheduleComplete=openUnifiedSchedule; function wire(){ var img=q('#tekScheduleImageBtn'); if(img) img.onclick=function(e){e.preventDefault();openUnifiedSchedule()}; var pdf=q('#tekSchedulePdfFullBtn'); if(pdf) pdf.onclick=function(e){e.preventDefault();openUnifiedSchedule()}; } var oldShow=window.showView; if(typeof oldShow==='function'){window.showView=function(id){var r=oldShow.apply(this,arguments);setTimeout(wire,120);return r}} document.addEventListener('DOMContentLoaded',function(){setTimeout(wire,800)}); setTimeout(wire,1200); })(); '} function openPrintable(){var html=buildHtml();if(!html){alert('No se encontró la programación para exportar.');return}var w=window.open('','_blank');if(w){w.document.open();w.document.write(html);w.document.close();try{w.focus()}catch(e){}return}var a=document.createElement('a');a.download='TEKTON_programacion_completa_'+new Date().toISOString().slice(0,10)+'.html';a.href=URL.createObjectURL(new Blob([html],{type:'text/html;charset=utf-8'}));document.body.appendChild(a);a.click();a.remove()} function ensureButtons(){decorateLiveGantt();ensureModal();var controls=q('#scheduleView .scheduleControls');if(!controls)return;var img=q('#tekScheduleImageBtn');if(img){img.onclick=function(e){e.preventDefault();openCfg()};img.title='Configura encabezado, logo y exporta la programación completa con tabla y Gantt.'}var pdf=q('#tekSchedulePdfFullBtn')||qa('button',controls).find(function(b){return /pdf programación|pdf programacion/i.test(b.textContent||'')});if(pdf){pdf.onclick=function(e){e.preventDefault();openCfg()};pdf.title='Configura encabezado, logo y exporta la programación completa con tabla y Gantt.'}var cfgBtn=q('#tekScheduleExportCfgBtn');if(!cfgBtn){cfgBtn=document.createElement('button');cfgBtn.id='tekScheduleExportCfgBtn';cfgBtn.type='button';cfgBtn.textContent='Encabezado export';cfgBtn.onclick=function(e){e.preventDefault();openCfg()};var ref=img||pdf||controls.firstChild;ref?controls.insertBefore(cfgBtn,ref):controls.appendChild(cfgBtn)}} window.tekExportScheduleImage=function(){openCfg()}; window.tekExportScheduleFullPdf=function(){openCfg()}; window.tekExportSchedulePdfFull=function(){openCfg()}; window.tekPrintScheduleComplete=function(){openCfg()}; window.tekScheduleOpenExportConfig=openCfg; var oldRender=window.tekScheduleRender;if(typeof oldRender==='function'){window.tekScheduleRender=function(){var r=oldRender.apply(this,arguments);setTimeout(ensureButtons,120);return r}} var oldShow=window.showView;if(typeof oldShow==='function'){window.showView=function(id){var r=oldShow.apply(this,arguments);if(id==='scheduleView')setTimeout(ensureButtons,180);return r}} document.addEventListener('DOMContentLoaded',function(){setTimeout(ensureButtons,1200)});setTimeout(ensureButtons,1500); })(); '; } function openUnifiedSchedule(){ var html=buildUnifiedScheduleHtml(); if(!html){alert('No se encontró la programación para exportar.');return} var w=window.open('','_blank'); if(w){w.document.open();w.document.write(html);w.document.close();return} var a=document.createElement('a');a.download='TEKTON_programacion_completa_'+new Date().toISOString().slice(0,10)+'.html';a.href=URL.createObjectURL(new Blob([html],{type:'text/html;charset=utf-8'}));document.body.appendChild(a);a.click();a.remove(); } window.tekExportScheduleImage=openUnifiedSchedule; window.tekExportScheduleFullPdf=openUnifiedSchedule; window.tekExportSchedulePdfFull=openUnifiedSchedule; window.tekPrintScheduleComplete=openUnifiedSchedule; function wire(){ var img=q('#tekScheduleImageBtn'); if(img) img.onclick=function(e){e.preventDefault();openUnifiedSchedule()}; var pdf=q('#tekSchedulePdfFullBtn'); if(pdf) pdf.onclick=function(e){e.preventDefault();openUnifiedSchedule()}; } var oldShow=window.showView; if(typeof oldShow==='function'){window.showView=function(id){var r=oldShow.apply(this,arguments);setTimeout(wire,120);return r}} document.addEventListener('DOMContentLoaded',function(){setTimeout(wire,800)}); setTimeout(wire,1200); })(); '} function openPrint(){var html=printHtml(); if(!html){alert('No se encontró la programación para exportar.');return} var w=window.open('','_blank'); if(w){w.document.open();w.document.write(html);w.document.close();return} var a=document.createElement('a'); a.download='TEKTON_programacion_completa_'+new Date().toISOString().slice(0,10)+'.html'; a.href=URL.createObjectURL(new Blob([html],{type:'text/html;charset=utf-8'})); document.body.appendChild(a); a.click(); a.remove();} window.tekExportScheduleImage=openPrint; window.tekExportScheduleFullPdf=openPrint; window.tekExportSchedulePdfFull=openPrint; window.tekPrintScheduleComplete=openPrint; function wireButtons(){var img=q('#tekScheduleImageBtn'); if(img)img.onclick=function(e){e.preventDefault();openPrint()}; var pdf=q('#tekSchedulePdfFullBtn'); if(pdf)pdf.onclick=function(e){e.preventDefault();openPrint()}; var cols=q('#tekColumnsBtn'); if(cols)cols.onclick=window.tekScheduleToggleCols; fixGanttHeader();} var css=document.createElement('style'); css.id='tekFinalHeaderButtonsCss'; css.textContent='#scheduleView #tekScheduleGrid th[data-col="gantt"]{padding:0!important;min-width:1180px!important;vertical-align:middle!important}#scheduleView #tekScheduleGrid td[data-col="gantt"] .ganttHead,#scheduleView #tekScheduleGrid td[data-col="gantt"] .tekFinalScale{display:none!important}#scheduleView .tekGanttHeaderScale{display:grid!important;grid-auto-flow:column;grid-auto-columns:minmax(46px,1fr);height:42px;min-width:1180px;overflow:hidden}#scheduleView .tekGanttHeaderScale span{display:flex;flex-direction:column;align-items:center;justify-content:center;white-space:normal;line-height:1.05;text-align:center;font-size:9px;border-left:1px solid rgba(255,255,255,.22);padding:2px}#scheduleView .tekGanttHeaderScale small{font-size:8px;opacity:.9}body.tek-light #scheduleView .tekGanttHeaderScale span{border-left-color:rgba(11,35,64,.16)}#scheduleView #tekColPicker.open{display:grid!important;position:absolute!important;top:58px!important;left:12px!important;grid-template-columns:repeat(2,minmax(190px,1fr));gap:8px;min-width:440px;max-width:min(760px,calc(100vw - 38px));max-height:72vh;overflow:auto;padding:12px;border:1px solid #1b3555;border-radius:14px;background:#07111d;color:#eaf3ff;box-shadow:0 22px 70px rgba(0,0,0,.48);z-index:2147483647}#tekColPicker .tekColTitle{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;gap:10px}#tekColPicker .tekColNote{grid-column:1/-1;font-size:11px;color:#9fb0c8}#tekColPicker label{display:flex!important;align-items:center;gap:8px;font-size:12px;line-height:1.2}#tekColPicker input{accent-color:#2f89ff}#tekColPicker button{height:28px;border-radius:8px;border:1px solid #27496d;background:#0c1a2b;color:#eaf3ff;font-weight:700}#tekColPicker .tekColActions{grid-column:1/-1;display:flex;gap:8px;position:sticky;bottom:0;background:inherit;padding-top:8px}#tekColPicker .tekColActions button{flex:1}body.tek-light #scheduleView #tekColPicker.open{background:#fff;color:#0b2340;border-color:#cbd9e9;box-shadow:0 22px 70px rgba(11,35,64,.18)}body.tek-light #tekColPicker .tekColNote{color:#52667f}body.tek-light #tekColPicker button{background:#edf5ff;color:#0b2340;border-color:#cbd9e9}'; document.head.appendChild(css); var oldRender=window.tekScheduleRender; if(typeof oldRender==='function'){window.tekScheduleRender=function(){var r=oldRender.apply(this,arguments);setTimeout(wireButtons,90);return r}} var oldShow=window.showView; if(typeof oldShow==='function'){window.showView=function(id){var r=oldShow.apply(this,arguments);if(id==='scheduleView')setTimeout(wireButtons,140);return r}} document.addEventListener('DOMContentLoaded',function(){setTimeout(wireButtons,1200)}); setTimeout(wireButtons,1600); })(); '; } function openUnifiedSchedule(){ var html=buildUnifiedScheduleHtml(); if(!html){alert('No se encontró la programación para exportar.');return} var w=window.open('','_blank'); if(w){w.document.open();w.document.write(html);w.document.close();return} var a=document.createElement('a');a.download='TEKTON_programacion_completa_'+new Date().toISOString().slice(0,10)+'.html';a.href=URL.createObjectURL(new Blob([html],{type:'text/html;charset=utf-8'}));document.body.appendChild(a);a.click();a.remove(); } window.tekExportScheduleImage=openUnifiedSchedule; window.tekExportScheduleFullPdf=openUnifiedSchedule; window.tekExportSchedulePdfFull=openUnifiedSchedule; window.tekPrintScheduleComplete=openUnifiedSchedule; function wire(){ var img=q('#tekScheduleImageBtn'); if(img) img.onclick=function(e){e.preventDefault();openUnifiedSchedule()}; var pdf=q('#tekSchedulePdfFullBtn'); if(pdf) pdf.onclick=function(e){e.preventDefault();openUnifiedSchedule()}; } var oldShow=window.showView; if(typeof oldShow==='function'){window.showView=function(id){var r=oldShow.apply(this,arguments);setTimeout(wire,120);return r}} document.addEventListener('DOMContentLoaded',function(){setTimeout(wire,800)}); setTimeout(wire,1200); })();